nttmcp.mcp.ipam_info (1.0.9) — module

IP Address Management Facts

| "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

IP Address Management Facts


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: List all reserved private IPv4 addresses for a VLAN
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND
      vlan: myVLAN
      reserved: True
      version: 4

  - name: List all reserved private IPv4 addresses for a CND
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND
      reserved: True
      version: 4

  - name: List all reserved IPv6 addresses for a VLAN
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND
      vlan: myVLAN
      reserved: True
      version: 6

  - name: List all public IPv4 blocks for a CND
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND

  - name: Get a public IPv4 block by IP address
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND
      public_ip_address: x.x.x.x

  - name: Get a public IPv4 block by UUID
    ipam_info:
      region: na
      datacenter: NA12
      network_domain: myCND
      id: ffffffff-ffff-ffff-ffff-ffffffffffff

Inputs

    
id:
    description:
    - The UUID of the IP address entity to search for
    required: false
    type: str

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: false
    type: str

vlan:
    description:
    - The name of a VLAN
    required: false
    type: str

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

version:
    choices:
    - 4
    - 6
    default: 4
    description:
    - The IP version
    required: false
    type: int

reserved:
    default: false
    description:
    - Is the IP address entity to search for an reserved IP address
    required: false
    type: bool

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

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

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

public_ip_address:
    description:
    - Any of the IPv4 addresses within the /31 public IPv4 block
    required: false
    type: str

Outputs

data:
  contains:
    count:
      description: The number of objects returned
      returned: success
      sample: 1
      type: int
    ipam:
      contains:
        datacenterId:
          description: UUID of the datacenter/MCP
          sample: N"b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae"
          type: str
        exclusive:
          description: Is this an explicity reservation
          type: bool
        ipAddress:
          description: The IPv4/IPv6 IP address
          sample: 10.0.0.10
          type: str
        vlanId:
          description: UUID of the VLAN
          sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
          type: str
      description: List of of IP address objects
      returned: success
      type: complex
  description: The returned data
  returned: success
  type: complex