This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

NSO to EPNM Optical Service

A python script to create and delete optical services (OCHCC) through REST API calls to NSO. NSO then communicates to EPNM and launches the service.

The python "create_service.py" script will create the necessary internal patchcords for the deployment of the OCHCC service. The site names, endpoints, links and service names need to be modified to your specific EPNM parameters. I have left my parameters for reference in the code. The python script uses the NSO APIs to send the necessary parameters from the json templates to NSO. NSO utilizes an EPN-M NED to communicate the parameters to create the patchcords and deploy the service over the patchcords links.

The python "delete_service.py" script will delete the service and remove the internal patchcords. The service names, links, endpoints and site names need to be modified to your specific EPNM parameters. Again I have left my parameters for reference in the code. The delete operation is the same as the create but the necessary parameters for the NSO API to perform the operation is less.

Contacts:

Solution Components

  • Python3
  • NSO
  • EPN-M
  • NSO NEDs - EPN-M package 1.0.4 or above

Installation

Create a constants.py file and add the following variables:

# NSO server IP and Username and Password
NSO_URL = "http://x.x.x.x:8080/"
NSO_USER = "nso_username"
NSO_PASSWORD = "nso_password"

# EPNM server IP and port and NSO device name
EPNM_IP = "x.x.x.x"
EPNM_PORT = "443"
EPNM_DEVICE_NAME = "EPNM1"  #EPNM NSO server name

Usage

To launch an optical service create:

$ python create_service.py

To launch an optical service delete:

$ python delete_service.py

License

Provided under Cisco Sample Code License, for details see LICENSE

Code of Conduct

Our code of conduct is available here

Contributing

See our contributing guidelines here

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    NSO
  • Programming Languages

    Python
  • License

    Other

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.