nttmcp.mcp.network (1.0.9) — module

Create, Update and Delete Cloud Network Domains (CND)

| "added in version" 2.10.0 of nttmcp.mcp"

Authors: Ken Sinfield (@kensinfield)

preview | supported by NTT Ltd.

Install collection

Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9


Add to requirements.yml

  collections:
    - name: nttmcp.mcp
      version: 1.0.9

Description

Create, Update and Delete Cloud Network Domains (CND)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- hosts: 127.0.0.1
  connection: local
  collections:
    - nttmcp.mcp
  tasks:

  - name: Create a Cloud Network Domain
    network:
      region: na
      datacenter: N112
      name: myCND
      description: "My CND 2"
      network_type: ENTERPRISE
      state: present

  - name: Update a Cloud Network Domain
    network:
      region: na
      datacenter: NA12
      name: myCND
      description: "My CND 2"
      network_type: ADVANCED
      new_name: myCND2
      state: present

  - name: Delete a Cloud Network Domain
    network:
      region: na
      datacenter: NA12
      name: myCND2
      state: absent

Inputs

    
auth:
    description:
    - Optional dictionary containing the authentication and API information for Cloud
      Control
    required: false
    suboptions:
      api:
        description:
        - The Cloud Control API endpoint e.g. api-na.mcp-services.net
        required: false
        type: str
      api_version:
        description:
        - The Cloud Control API version e.g. 2.11
        required: false
        type: str
      password:
        description:
        - The Cloud Control API user password
        required: false
        type: str
      username:
        description:
        - The Cloud Control API username
        required: false
        type: str
    type: dict

name:
    description:
    - The name of the Cloud Network Domain
    required: true
    type: str

wait:
    default: true
    description:
    - Should Ansible wait for the task to complete before continuing
    required: false
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - The action to be performed
    required: false
    type: str

region:
    default: na
    description:
    - The geographical region
    required: false
    type: str

new_name:
    description:
    - The new name of the Cloud Network Domain when renaming a CND
    required: false
    type: str

wait_time:
    default: 600
    description: The maximum time the Ansible should wait for the task to complete in
      seconds
    required: false
    type: int

datacenter:
    description:
    - The datacenter name
    required: true
    type: str

description:
    description:
    - The description of the Cloud Network Domain
    required: false
    type: str

network_type:
    default: ADVANCED
    description:
    - The type of Cloud Network Domain (e.g. ADVANCED, ESSENTIALS, ENTERPRISE)
    required: false
    type: str

wait_poll_interval:
    default: 10
    description:
    - The time in between checking the status of the task in seconds
    required: false
    type: int

Outputs

data:
  contains:
    baselineStaticRouteConfiguration:
      description: Internal use
      returned: when state == present and wait is True
      type: bool
    createTime:
      description: The creation date of the image
      returned: when state == present and wait is True
      sample: '2019-01-14T11:12:31.000Z'
      type: str
    datacenterId:
      description: Datacenter id/location
      returned: when state == present and wait is True
      sample: NA9
      type: str
    description:
      description: Network Domain description
      returned: when state == present and wait is True
      sample: My network description
      type: str
    id:
      description: Network Domain ID
      returned: when state == present
      sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
      type: str
    ipv4CpncGatewayAddress:
      description: The CPNC gateway address (mostly for internal use)
      returned: when state == present and wait is True
      sample: 10.10.10.10
      type: str
    ipv4InternetGatewayAddress:
      description: The upstream gateway address
      returned: when state == present and wait is True
      sample: 10.10.10.10
      type: str
    ipv6CpncGatewayAddress:
      description: The CPNC gateway address (mostly for internal use)
      returned: when state == present and wait is True
      sample: 1111:1111:1111:1111:0:0:0:1
      type: str
    ipv6InternetGatewayAddress:
      description: The upstream gateway address
      returned: when state == present and wait is True
      sample: 1111:1111:1111:1111:0:0:0:1
      type: str
    name:
      description: Network Domain name
      returned: when state == present and wait is True
      sample: My network
      type: str
    outsideTransitVlanIpv4Subnet:
      contains:
        address:
          description: The upstream IPv4 transit network gateway
          sample: 10.10.10.0
          type: str
        prefixSize:
          description: The upstream IPv4 transit network prefix
          sample: 24
          type: int
      description: The upstream IPv4 transit network
      returned: when state == present and wait is True
      type: complex
    outsideTransitVlanIpv6Subnet:
      contains:
        address:
          description: The upstream IPv6 transit network gateway
          sample: 1111:1111:1111:1111:0:0:0:0
          type: str
        prefixSize:
          description: The upstream IPv6 transit network prefix
          sample: 64
          type: int
      description: The upstream IPv6 transit network
      returned: when state == present and wait is True
      type: complex
    snatIpv4Address:
      description: The outgoing public IPv4 source address
      returned: when state == present and wait is True
      sample: 1.1.1.1
      type: str
    state:
      description: Status of the Network Domain
      returned: when state == present and wait is True
      sample: NORMAL
      type: str
    type:
      description: The VLAN type
      returned: when state == present and wait is True
      sample: ADVANCED
      type: str
  description: Dictionary of the network domain
  returned: success
  type: complex