nttmcp.mcp.snapshot_info (1.0.9) — module

List/Get information about Snapshots

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

List/Get information about Snapshots


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 Snapshot Windows
    snapshot_info:
      region: na
      datacenter: NA9
      plan: ONE_MONTH

  - name: Get a specific Snapshot Window for 8am
    snapshot_info:
      region: na
      datacenter: NA9
      plan: ONE_MONTH
      window: 8

  - name: List Snapshot Plans
    snapshot_info:
      region: na
      datacenter: NA9
      type: plan

  - name: Get the Snapshot service configuration for a server
    snapshot_info:
      region: na
      datacenter: NA9
      network_domain: my_network_domain
      name: My_Server
      type: server

  - name: Get a list of Snapshots for a configured server
    snapshot_info:
      region: na
      datacenter: NA9
      network_domain: my_network_domain
      name: My_Server
      type: snapshot

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

plan:
    description:
    - The name of a desired Service Plan. Use snapshot_info to get a list of valid plans.
    required: false
    type: str

type:
    choices:
    - window
    - plan
    - snapshot
    - server
    default: window
    description:
    - The type of entity to get/list information about
    required: false
    type: str

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

server:
    description:
    - The name of a server to enable Snapshots on
    required: false
    type: str

window:
    description:
    - The starting hour for the snapshot window/window (24 hour notation).
    - Use snapshot_info to find a window.
    required: false
    type: int

server_id:
    description:
    - The UUID of a server to enable Snapshots on
    required: false
    type: str

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

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

slots_available:
    default: true
    description:
    - Only show windows with slots available
    required: false
    type: bool

Outputs

data:
  contains:
    count:
      description: The number of entities returned
      returned: on a list operation
      sample: 1
      type: int
    server_snaphot_info:
      contains:
        manualSnapshotInProgress:
          description: Is a manual Snapshot currently being processed
          returned: success
          type: bool
        servicePlan:
          description: The type fo Snapshot Plan configured for this server
          returned: success
          sample: ONE_MONTH
          type: str
        state:
          description: Simple text display name. Useful for reference and display
            in UI integration.
          sample: 'One Month: 7d-4w'
          type: str
        window:
          contains:
            dayOfWeek:
              description: Which day it the Snapshot is taken on (this should always
                be daily)
              returned: success
              sample: DAILY
              type: str
            startHour:
              description: Snapshot Windows begin on 2 hour periods
              returned: success
              sample: 8
              type: str
          description: The window for the configured Snapshot service
          returned: success
          type: complex
      description: The Snapshot configuration for a server
      returned: type == server
      type: complex
    snapshot_info:
      contains:
        consistencyLevel:
          description:
          - Returned for snapshots which have completed successfully
          - (have a NORMAL value for state).
          sample: CRASH_CONSISTENT
          type: str
        createTime:
          description:
          - For User initiated Manual Snapshot createTime corresponds to the point
            in time that
          - CloudControl processed the Initiate Manual Snapshot for a Server API.
          sample: '2019-11-15T08:31:22.000Z'
          type: str
        datacenterId:
          description: ID of the datacenter
          sample: NA12
          type: str
        expiryTime:
          description: Snapshots exist for a limited period after which the system
            will remove them
          sample: '2019-11-22T08:00:05.000Z'
          type: str
        id:
          description: UUID identifying the Snapshot.
          sample: 68138b18-1e08-49bd-96e3-49a4d80e7c62
          type: str
        indexState:
          description: Possible values for indexState are INDEX_NOT_COMPLETE, INDEX_VALID,
            INDEX_INVALID
          sample: INDEX_VALID
          type: str
        replica:
          description:
          - Boolean identifying whether or not a the Snapshot is local or one replicated
          - from another Data Center
          type: bool
        serverConfig:
          contains:
            advancedVirtualizationSetting:
              contains:
                name:
                  description: Advanced VMWare setting
                  sample: nestedHardwareVirtualization
                  type: str
                value:
                  description: Advanced VMWare setting
                  sample: false
                  type: str
              description: Advanced virtualization settings for the VM
              type: list
            cluster:
              contains:
                id:
                  description: The UUID of the cluster
                  sample: NA12-01
                  type: str
                name:
                  description: The name of the cluster
                  sample: Default Cluster
                  type: str
              description: The vCenter cluster for the server
              type: complex
            cpu:
              contains:
                coresPerSocket:
                  description: The number of cores per socket
                  sample: 1
                  type: int
                count:
                  description: The number of CPUs
                  sample: 2
                  type: int
                speed:
                  description: The CPU speed
                  sample: STANDARD
                  type: str
              description: The CPU specifications for the server
              type: complex
            guest:
              contains:
                operatingSystem:
                  contains:
                    displayName:
                      description: The OS display name
                      sample: UBUNTU16/64
                      type: str
                    family:
                      description: The OS family
                      sample: UNIX
                      type: str
                    id:
                      description: The OS UUID
                      sample: UBUNTU1664
                      type: str
                  description: Operating system information
                  type: complex
                osCustomization:
                  description: Does the image support guest OS customization
                  type: bool
              description: Information about the guest OS
              type: complex
            memoryGb:
              description: Server memory in GB
              sample: 4
              type: int
            networkInfo:
              contains:
                networkDomainId:
                  description: The UUID of the Cloud Network Domain the server resides
                    in
                  sample: 2495e11a-8d52-40f1-9d67-512ade6139ee
                  type: str
                networkDomainName:
                  description: The name of the Cloud Network Domain the server resides
                    in
                  sample: ansible_test
                  type: str
                primaryNic:
                  contains:
                    connected:
                      description: Is the NIC connected
                      type: bool
                    id:
                      description: The UUID of the NIC
                      sample: a616cd9b-82bc-4f8c-bec2-7d58fea88a9c
                      type: str
                    ipv6:
                      description: The IPv6 address of the server
                      sample: 2607:f480:211:1238:3678:58e8:4e42:93fc
                      type: str
                    key:
                      description: Internal Usage
                      sample: 4000
                      type: int
                    networkAdapter:
                      description: The VMWare NIC type
                      sample: VMXNET3
                      type: str
                    privateIpv4:
                      description: The IPv4 address of the server
                      sample: 10.0.0.6
                      type: str
                    state:
                      description: The UUID of the VLAN the server resides in
                      sample: NORMAL
                      type: str
                    vlanId:
                      description: The UUID of the VLAN
                      sample: b7de0cfd-46d5-4316-845b-d1283245c79f
                      type: str
                    vlanName:
                      description: The name of the VLAN the server resides in
                      sample: vlan_01
                      type: str
                  description: The primary NIC on the server
                  type: complex
              description: Server network information
              type: complex
            scsiController:
              contains:
                adapterType:
                  description: the SCSI Controller type
                  sample: LSI_LOGIC_PARALLEL
                  type: str
                busNumber:
                  description: The SCSI bus number
                  sample: 0
                  type: int
                disk:
                  contains:
                    driveType:
                      description: The type of disk
                      sample: DISK
                      type: str
                    id:
                      description: The disk UUID
                      sample: 93df19a6-3136-4078-836e-f37aeb139bfd
                      type: str
                    scsiId:
                      description: The ID of the disk on the controller
                      sample: 0
                      type: int
                    sizeGb:
                      description: The initial size of the disk in GB
                      sample: 20
                      type: int
                    speed:
                      description: The disk speed
                      sample: STANDARD
                      type: str
                    state:
                      description: The state of the disk
                      sample: NORMAL
                      type: str
                  description: List of disks associated with this image
                  type: list
                id:
                  description: The UUID of the SCSI Controller
                  sample: 62602df5-10b1-44e4-817a-38b97ca18c48
                  type: str
                state:
                  description: The state of the SCSI Controller
                  sample: NORMAL
                  type: str
              description: List of the SCSI controllers and disk configuration for
                the image
              type: list
            virtualHardwareVersion:
              description: The VM hardware version
              sample: vmx-10
              type: str
          description: The specification of the Server at the time the Snapshot was
            taken
          type: complex
        startTime:
          description: The time at which the system begins the snapshot process.
          sample: '2019-11-15T08:00:05.000Z'
          type: str
        state:
          description: The state of the Snapshot
          sample: NORMAL
          type: str
        type:
          description: Indicates whether or not the Snapshot is a SYSTEM scheduled
            Snapshot or a MANUAL
          sample: SYSTEM
          type: str
      description: List of Snapshots for a server
      returned: type == snapshot
      type: complex
    snapshot_plan_info:
      contains:
        available:
          description: When "true" indicates that the plan is available for use
          returned: success
          type: bool
        description:
          description: More detailed description of what comprises the plan.
          returned: success
          sample: Daily Snapshots retained for 14 Days, Weekly Snapshots retained
            for 90 Days
          type: str
        displayName:
          description: Simple text display name. Useful for reference and display
            in UI integration.
          sample: 'One Month: 7d-4w'
          type: str
        id:
          description: String UID or UUID identifying the entity
          returned: success
          sample: ONE_MONTH or d62596e8-fe2b-44ba-8ad2-a669b9dfcb51
          type: str
        snapshotFrequency:
          description: The frequency of SYSTEM snapshots for the plan. Values are
            DAILY and WEEKLY
          returned: success
          sample: DAILY
          type: str
        supportsReplication:
          description: When True indicates that the plan supports Snapshot Replication
          returned: success
          type: str
      description: List of Snapshot Plans
      returned: type == plan
      type: complex
    snapshot_window_info:
      contains:
        availabilityStatus:
          description: RESERVED_FOR_MAINTENANCE, AVAILABLE or NOT_CURRENTLY_AVAILABLE
          returned: success
          sample: OVERLAPS_WITH_MAINTENANCE
          type: str
        availableSlotCount:
          description: The number of available slots in the Snapshot Window
          returned: success
          sample: 59
          type: int
        dayOfWeek:
          description: Which day it the Snapshot is taken on (this should always be
            daily)
          returned: success
          sample: DAILY
          type: str
        startHour:
          description: Snapshot Windows begin on 2 hour periods
          returned: success
          sample: 8
          type: int
        timeZone:
          description: The timeZone that the Snapshot Window is relative to
          returned: success
          sample: Etc/UTC
          type: str
      description: List of Snapshot Windows
      returned: type == window
      type: complex
  description: Snapshot objects
  returned: success
  type: complex