nttmcp.mcp.image_info (1.0.9) — module

Get available server images information

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

Get available server images information


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: Get a list of Operating Systems in NA12
    image_info:
      region: na
      datacenter: NA12
    register: image
    tags:
      - list

  - name: Get a list of Operating Systems in NA12 by wildcard name
    image_info:
      region: na
      datacenter: NA12
      name: "*Centos*"

  - name: Get a list of Windows Operating Systems in NA12 by wildcard name
    image_info:
      region: na
      datacenter: NA12
      name: "*WINDOWS*"

  - name: Get a specific image in NA12 by ID
    image_info:
      region: na
      datacenter: NA12
      id: 112b7faa-ffff-ffff-ffff-dc273085cbe4

Inputs

    
id:
    description:
    - The UUID of the image, supports wildcard matching with "*" e.g. "*ffff*"
    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 infrastructure entity, supports wildcard matching with "*" e.g.
      "*Centos*"
    required: false
    type: str

family:
    choices:
    - UNIX
    - WINDOWS
    description:
    - The OS family name of the infrastructure entity
    required: false
    type: str

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

datacenter:
    description:
    - The datacenter name e.g NA9
    required: false
    type: str

customer_image:
    default: false
    description:
    - Is this a customer import image
    required: false
    type: bool

Outputs

data:
  contains:
    count:
      description: The total count of found/returned objects
      returned: success
      sample: 5
      type: int
    image:
      contains:
        cpu:
          contains:
            coresPerSocket:
              description: The number of cores per CPU socket
              sample: 1
              type: int
            count:
              description: The number of CPUs
              sample: 2
              type: int
            speed:
              description: The CPU reservation to be applied
              sample: STANDARD
              type: str
          description: The default CPU specifications for the image
          type: complex
        createTime:
          description: The creation date of the image
          sample: '2019-01-14T11:12:31.000Z'
          type: str
        datacenterId:
          description: The MCP id for this image
          sample: NA9
          type: str
        description:
          description: The description for the image
          sample: My OS Image
          type: str
        guest:
          contains:
            operatingSystem:
              contains:
                displayName:
                  description: The name of the OS
                  sample: CENTOS7/64
                  type: str
                family:
                  description: The OS family e.g. UNIX or WINDOWS
                  sample: UNIX
                  type: str
                id:
                  description: OS ID
                  sample: CENTOS764
                  type: str
                osUnitsGroupId:
                  description: The OS billing group
                  sample: CENTOS
                  type: str
              description: The operating system attributes for this image
              type: complex
            osCustomization:
              description: Does this OS support guest OS cusomtizations
              sample: true
              type: bool
          description: Custom VM attributes for the image
          type: complex
        id:
          description: OS ID
          sample: CENTOS764
          type: str
        memoryGb:
          description: The default memory setting for this image in GB
          sample: 4
          type: int
        name:
          description: The common name for the Image
          sample: CentOS 7 64-bit 2 CPU
          type: str
        osImageKey:
          description: Internal image identifier
          sample: T-CENT-7-64-2-4-10
          type: str
        scsiController:
          contains:
            adapterType:
              description: The name of the adapter
              sample: LSI_LOGIC_SAS
              type: str
            busNumber:
              description: The SCSI bus number
              sample: 1
              type: int
            disk:
              contains:
                id:
                  description: The disk id
                  sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4
                  type: str
                scsiId:
                  description: The id of the disk on the SCSI controller
                  sample: 0
                  type: int
                sizeGb:
                  description: The initial size of the disk in GB
                  sample: 10
                  type: int
                speed:
                  description: The disk speed
                  sample: STANDARD
                  type: str
              description: List of disks associated with this image
              type: complex
            id:
              description: The SCSI controller id
              sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4
              type: str
            key:
              description: Internal use
              sample: 1000
              type: int
          description: SCSI controller and disk configuration for the image
          type: complex
        softwareLabel:
          description: List of associated labels
          sample:
          - MSSQL2012R2E
          type: list
        tag:
          contains:
            tagKeyId:
              description: GUID of the tag
              sample: 112b7faa-ffff-ffff-ffff-dc273085cbe4
              type: str
            tagKeyName:
              description: Human readable key name
              sample: Owner
              type: str
            value:
              description: The value of the key
              sample: Someone
              type: str
          description: List of associated tags
          type: complex
      description: A list of images
      returned: success
      type: complex
  description: dict of returned Objects
  returned: success
  type: complex