phoenixnap.bmc.storage_network_info (1.17.0) — module

Gather information about phoenixNAP BMC storage networks

| "added in version" 1.6.0 of phoenixnap.bmc"

Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com>

preview | supported by certified

Install collection

Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0


Add to requirements.yml

  collections:
    - name: phoenixnap.bmc
      version: 1.17.0

Description

Gather information about storage networks available.

This module has a dependency on requests

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret'
# in location: ~/.pnap/config.yaml

- name: List all storage networks
  hosts: localhost
  gather_facts: false
  vars_files:
    - ~/.pnap/config.yaml
  tasks:
    - name: List all storage networks information for account
      phoenixnap.bmc.storage_network_info:
        client_id: "{{ clientId }}"
        client_secret: "{{ clientSecret }}"
      register: output
    - name: Print the gathered infos
      ansible.builtin.debug:
        var: output.storage_networks
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List the storage network details
  hosts: localhost
  gather_facts: false
  vars_files:
    - ~/.pnap/config.yaml
  tasks:
    - name: List storage networks information based on the specified names
      phoenixnap.bmc.storage_network_info:
        client_id: "{{ clientId }}"
        client_secret: "{{ clientSecret }}"
        names: My storage network
      register: output
    - name: Print the gathered infos
      ansible.builtin.debug:
        var: output.storage_networks

Inputs

    
names:
    description: The friendly name of this storage network.
    elements: str
    type: list

location:
    description: If present will filter the result by the given location.
    type: str

client_id:
    description: Client ID (Application Management)
    type: str

client_secret:
    description: Client Secret (Application Management)
    type: str

Outputs

storage_networks:
  contains:
    createdOn:
      description: Date and time when this storage network was created.
      returned: always
      type: str
    deleteRequestedOn:
      description: Date and time of the initial request for storage network deletion.
      returned: always
      type: str
    description:
      description: Storage network description.
      returned: always
      sample: My storage network description
      type: str
    id:
      description: Storage network ID.
      returned: always
      sample: 603f3b2cfcaf050643b89a4b
      type: str
    ips:
      description: IP of the storage network.
      elements: str
      returned: always
      sample:
      - 100.64.0.1
      - 100.64.0.2
      type: list
    location:
      description: Location of storage network.
      returned: always
      sample: PHX
      type: str
    name:
      description: Storage network friendly name.
      returned: always
      sample: My storage network
      type: str
    networkId:
      description: Id of network the storage belongs to.
      returned: always
      sample: 603f3b2cfcaf050643b89a4b
      type: str
    status:
      description: Status of the resource.
      returned: always
      sample: READY
      type: str
    volumes:
      contains:
        capacityInGb:
          description: Maximum capacity in GB.
          example: 2000
          type: int
        createdOn:
          description: Date and time when this volume was created.
          returned: always
          type: str
        deleteRequestedOn:
          description: Date and time of the initial request for volume deletion.
          returned: always
          type: str
        description:
          description: Volume description.
          example: My volume description
          type: str
        id:
          description: Volume ID.
          sample: 50dc434c-9bba-427b-bcd6-0bdba45c4dd2
          type: str
        name:
          description: Volume friendly name.
          example: My volume name
          type: str
        path:
          description: Volume's full path. It is in form of /{volumeId}/pathSuffix'.
          example: /qjul77ahf5fplr2ba484/shared-docs
          type: str
        pathSuffix:
          description: Last part of volume's path.
          example: /shared-docs
          type: str
        permissions:
          description: Permissions for a volume.
          type: dict
        protocol:
          description: File system protocol. Currently this field should be set to
            NFS.
          example: NFS
          type: str
        status:
          description: Status of the resource.
          example: READY
          type: str
        tags:
          contains:
            createdBy:
              description: Who the tag was created by.
              type: str
            id:
              description: The unique id of the tag.
              type: str
            isBillingTag:
              description: Whether or not to show the tag as part of billing and invoices.
              type: bool
            name:
              description: The name of the tag.
              type: str
            value:
              description: The value of the tag assigned to the resource.
              type: str
          description: The tags assigned if any.
          type: list
        usedCapacityInGb:
          description: Used capacity in GB, updated periodically.
          example: 2000
          type: int
      description: Volume for a storage network.
      returned: always
      type: list
  description: The storage networks information as list
  returned: success
  type: complex