Skip to content

ciena/ciena.mcp

Repository files navigation

Ciena MCP Collection

The Ansible Ciena MCP collection includes a variety of Ansible content to help automate the management of Ciena MCP network management system.

This collection has been tested against MCP 4.2

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10,<2.11.

Included content

Supported APIs

Name Description
[ciena.mcp.application_slices] Handle resource of type application_slices
[ciena.mcp.discovery] management sessions and neprofiles
[ciena.mcp.domains] domains data
[ciena.mcp.mcpview] TAPI
[ciena.mcp.products] orchestration products
[ciena.mcp.resources] orchestration resources
[ciena.mcp.tapi_xxxx] TAPI
[ciena.mcp.nsi_api_fres] FREs

Installing this collection

Install the Ciena MCP collection with the Ansible Galaxy CLI:

ansible-galaxy collection install ciena.mcp

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: ciena.mcp

Using this collection

Using modules from the Ciena MCP collection in your playbooks

You can call modules by their Fully Qualified Collection Namespace (FQCN), such as ciena.mcp.resources.

---
- name: playbook get vars for lab localhost facts
  import_playbook: lab_get_vars.yml
  when: hostvars['localhost'].lab_vars is not defined
- hosts:
  - localhost
  vars:
    devices:
    - 10.20.10.1
    - 10.20.10.2
    - 10.20.10.3
    - 10.20.10.4
    mcp_creds: &mcp_creds
      mcp_hostname: 10.10.10.10
      mcp_username: admin
      mcp_password: adminpw
  name: Enroll Devices in MCP
  collections:
  - ciena.mcp
  gather_facts: false
  tasks:
  - name: list getNEConnectionProfiles
    discovery_api_neprofiles:
      <<: *mcp_creds
      state: get
  - name: createNEConnectionProfile
    discovery_api_neprofiles:
      <<: *mcp_creds
      state: post
      data:
        type: neConnectionProfile
        attributes:
          name: saos10
          profileDescription: saos10
          typeGroup: "/typeGroups/PN10x"
          isEnabled: true
          isDefault: false
          protocolEndpoints:
            cli:
              connection:
                hostport: 22
              authentication:
                username: diag
                password: ciena123
            netconf:
              connection:
                hostport: 830
              authentication:
                username: diag
                password: ciena123
    register: connectionProfile
  - name: debug
    debug:
      var: connectionProfile
  - name: Create Management Session
    loop: "{{ devices }}"
    discovery_api_managementsessions:
      <<: *mcp_creds
      state: post
      data:
        attributes:
          ipAddress: "{{ devices }}"
          profile: "{{ connectionProfile.data.id }}"
          resourcePartitionInfo: []
          additionalIpAddresses: []
        type: managementSessions

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Ciena MCP collection repository.

Release is done automatically use Github Actions as part of merging to master.

Changelogs

CHANGELOG

Roadmap

  • build a roadmap

More information

Licensing

See LICENSE to see the full text.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages