hitachivantara.vspone_block.sds_block.hv_sds_block_volume module – Manages VSP One SDS Block and Cloud systems volumes.

Note

This module is part of the hitachivantara.vspone_block collection (version 4.6.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install hitachivantara.vspone_block. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: hitachivantara.vspone_block.sds_block.hv_sds_block_volume.

New in hitachivantara.vspone_block 3.0.0

Synopsis

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string / required

Password for authentication. This is a required field.

username

string / required

Username for authentication. This is a required field.

spec

dictionary / required

Specification for the volume task.

capacity

string

The capacity of the volume. Required for the Create a volume /Create volume with QoS parameters /Expand a volume by name /Expand a volume by ID tasks.

capacity_saving

string

Settings of the data reduction function. Disabled or Compression. Optional for the Create a volume /Update a volume tasks.

compute_nodes

list / elements=string

The array of name of compute nodes to which the volume is attached. Optional for the Create a volume /Create volume with QoS parameters tasks. Required for the Add a volume to compute nodes /Remove a volume from compute nodes tasks.

id

string

The id of the volume. Optional for the Update a volume task. Required for the Expand a volume by ID /Delete a volume by ID tasks.

name

string

The name of the volume. Optional for the Create a volume /Create volume with QoS parameters /Update a volume tasks. Required for the Update volume QoS parameters /Expand a volume by name /Add a volume to compute nodes /Remove a volume from compute nodes /Delete a volume by name tasks.

nickname

string

The nickname of the volume.

pool_name

string

The name of the storage pool where the volume will be created. Required for the Create a volume /Create volume with QoS parameters tasks.

qos_param

dictionary

The quality of service parameters for the volume. Optional for the Create volume with QoS parameters task.

upper_alert_allowable_time_in_sec

integer

The upper alert allowable time(In seconds). Optional for the Create volume with QoS parameters /Update volume QoS parameters tasks.

upper_limit_for_iops

integer

The upper limit for IOPS. Optional for the Create volume with QoS parameters /Update volume QoS parameters tasks.

upper_limit_for_transfer_rate_mb_per_sec

integer

The upper limit for transfer rate (MB per Sec). Optional for the Create volume with QoS parameters /Update volume QoS parameters tasks.

state

string

The state of the volume task. Required for the Add a volume to compute nodes /Remove a volume from compute nodes tasks.

Choices:

  • "add_compute_node"

  • "remove_compute_node"

vps_id

string

The ID of the VPS where the volume will be created/deleted. vps_id and pool_name are mutually exclusive.

vps_name

string

The name of the VPS where the volume will be created/deleted. vps_name and pool_name are mutually exclusive.

state

string

The level of the volume task. Choices are present and absent.

Choices:

  • "present" ← (default)

  • "absent"

Attributes

Attribute

Support

Description

check_mode

Support: none

Determines if the module should run in check mode.

Examples

- name: Create volume
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      pool_name: "SP01"
      name: "RD-volume-4"
      capacity: 99
      compute_nodes: ["CAPI123678", "ComputeNode-1"]

- name: Create volume with QoS parameters
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      pool_name: "SP01"
      name: "RD-volume-4"
      capacity: 99
      qos_param:
        upper_limit_for_iops: 100
        upper_limit_for_transfer_rate_mb_per_sec: 100
        upper_alert_allowable_time_in_sec: 100
      compute_nodes: ["CAPI123678", "ComputeNode-1"]

- name: Delete volume by ID
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: absent
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      id: "df63a5d9-32ea-4ae1-879a-7c23fbc574db"

- name: Delete volume by name
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: absent
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      name: "RD-volume-4"

- name: Expand volume
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      name: "RD-volume-4"
      capacity: 202

- name: Update volume nickname
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      name: "RD-volume-4"
      nickname: "RD-volume-0004"

- name: Update volume QoS parameters
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      name: "RD-volume-4"
      qos_param:
        upper_limit_for_iops: 100
        upper_limit_for_transfer_rate_mb_per_sec: 100
        upper_alert_allowable_time_in_sec: 100

- name: Update volume name
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      id: "aba5c900-b04c-4beb-8ca4-ed53537afb09"
      name: "RD-volume-0004"
      nickname: "RD-volume-0004"

- name: Remove compute node
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      state: "remove_compute_node"
      id: "aba5c900-b04c-4beb-8ca4-ed53537afb09"
      compute_nodes: ["ComputeNode-1"]

- name: Add compute node
  hitachivantara.vspone_block.sds_block.hv_sds_block_volume:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      state: "add_compute_node"
      id: "aba5c900-b04c-4beb-8ca4-ed53537afb09"
      compute_nodes: ["ComputeNode-1"]

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

volumes

dictionary

The volume information.

Returned: always

capacity_saving

string

Capacity saving status.

Returned: success

Sample: "Disabled"

compute_nodes_info

list / elements=dictionary

List of compute nodes to which the volume is attached.

Returned: success

Sample: []

data_reduction_effects

dictionary

Data reduction effects on the volume.

Returned: success

Sample: {}

data_reduction_progress_rate

string

Data reduction progress rate.

Returned: success

Sample: ""

data_reduction_status

string

Data reduction status.

Returned: success

Sample: "Disabled"

full_allocated

boolean

Whether the volume is fully allocated.

Returned: success

Sample: false

id

string

Unique identifier for the volume.

Returned: success

Sample: "355a9259-96e7-479d-8586-29b2aa74e106"

naa_id

string

NAA identifier for the volume.

Returned: success

Sample: "60060e810274f000600274f00000271c"

name

string

Name of the volume.

Returned: success

Sample: "SDSBolume12"

nickname

string

Nickname of the volume.

Returned: success

Sample: "SDSBolume12"

number_of_connecting_servers

integer

Number of servers connected to the volume.

Returned: success

Sample: 0

number_of_snapshots

integer

Number of snapshots of the volume.

Returned: success

Sample: 0

pool_id

string

Pool identifier where the volume is created.

Returned: success

Sample: "80d306ea-d224-4fb1-a746-5ed41994e708"

pool_name

string

Name of the storage pool.

Returned: success

Sample: "SP01"

protection_domain_id

string

Protection domain identifier.

Returned: success

Sample: "66449f50-caa4-4070-ade1-e81f29614741"

qos_param

dictionary

Quality of service parameters for the volume.

Returned: success

upper_alert_allowable_time_in_sec

integer

Upper alert allowable time in seconds.

Returned: success

Sample: 100

upper_alert_time

boolean

Upper alert time.

Returned: success

Sample: false

upper_limit_for_iops

integer

Upper limit for IOPS.

Returned: success

Sample: 100

upper_limit_for_transfer_rate_mb_per_sec

integer

Upper limit for transfer rate (MB per sec).

Returned: success

Sample: 100

saving_mode

string

Saving mode.

Returned: success

Sample: ""

snapshot_attribute

string

Snapshot attribute.

Returned: success

Sample: "-"

snapshot_status

string

Snapshot status.

Returned: success

Sample: ""

status

string

Status of the volume.

Returned: success

Sample: "Normal"

status_summary

string

Summary of the volume status.

Returned: success

Sample: "Normal"

storage_controller_id

string

Storage controller identifier.

Returned: success

Sample: "970e253e-b023-4ce5-b538-c9f8b9ebfa56"

total_capacity_mb

integer

Total capacity of the volume in MB.

Returned: success

Sample: 100

used_capacity

integer

Used capacity of the volume.

Returned: success

Sample: -1

volume_number

integer

Volume number.

Returned: success

Sample: 10012

volume_type

string

Type of the volume.

Returned: success

Sample: "Normal"

vps_id

string

VPS identifier.

Returned: success

Sample: "(system)"

vps_name

string

VPS name.

Returned: success

Sample: "(system)"

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)