hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts module – Get storage classes from VSP One Object

Note

This module is part of the hitachivantara.vspone_object collection (version 1.0.0).

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_object. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts.

New in hitachivantara.vspone_object 1.0.0

Synopsis

  • This module queries storage classes from Hitachi VSP One Object.

Requirements

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

  • python >= 3.7

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the system.

cluster_name

string / required

Cluster name of the system.

http_request_retry_interval_seconds

integer / required

Interval between retries of an HTTP request.

http_request_retry_times

integer / required

Number of times to retry an HTTP request.

http_request_timeout

integer / required

Timeout for HTTP requests.

oneobject_node_client_id

string / required

Id for authentication.

oneobject_node_client_secret

string

Secret for authentication.

oneobject_node_username

string / required

Username for authentication.

oneobject_node_userpass

string / required

Password for authentication.

region

string / required

Region of the system.

ssl

dictionary

SSL configuration.

ca_certs

string

Path to the CA certificates file.

Default: ""

ca_path

string

Path to the CA certificate file.

Default: ""

check_hostname

boolean

Whether to check the hostname.

Choices:

  • false ← (default)

  • true

client_cert

string

Path to the client certificate file.

Default: ""

client_key

string

Path to the client key file.

Default: ""

ssl_cipher

string

SSL cipher to use.

Default: ""

ssl_version

string

SSL version to use.

Default: ""

validate_certs

boolean / required

Whether to validate SSL certificates.

Choices:

  • false

  • true

spec

dictionary

Optional request parameters for fetching storage class information.

id

string

The ID of the storage class.

page_size

integer

The maximum amount of domains to return in a single response.

query_type

string

Set state to regular for fetching regular storage classes

Set state to default for fetching default storage class

Choices:

  • "regular" ← (default)

  • "default"

Attributes

Attribute

Support

Description

check_mode

Support: full

Determines if the module should run in check mode.

Examples

- name: Get Storage Classes
  hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts:
    connection_info:
      http_request_timeout: 300
      http_request_retry_times: 3
      http_request_retry_interval_seconds: 5
      cluster_name: "your_cluster_name"
      region: "your_region"
      oneobject_node_username: "your_username"
      oneobject_node_userpass: "your_password"
      oneobject_node_client_id: "vsp-object-external-client"

- name: Get info of a storage class
  hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts:
    connection_info:
      http_request_timeout: 300
      http_request_retry_times: 3
      http_request_retry_interval_seconds: 5
      cluster_name: "your_cluster_name"
      region: "your_region"
      oneobject_node_username: "your_username"
      oneobject_node_userpass: "your_password"
      oneobject_node_client_id: "vsp-object-external-client"
    spec:
      id: 1169621510

- name: Get n storage classes
  hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts:
    connection_info:
      http_request_timeout: 300
      http_request_retry_times: 3
      http_request_retry_interval_seconds: 5
      cluster_name: "your_cluster_name"
      region: "your_region"
      oneobject_node_username: "your_username"
      oneobject_node_userpass: "your_password"
      oneobject_node_client_id: "vsp-object-external-client"
    spec:
      page_size: 2

- name: Get default storage class
  hitachivantara.vspone_object.oneobject_node.hv_storage_class_facts:
    connection_info:
      http_request_timeout: 300
      http_request_retry_times: 3
      http_request_retry_interval_seconds: 5
      cluster_name: "your_cluster_name"
      region: "your_region"
      oneobject_node_username: "your_username"
      oneobject_node_userpass: "your_password"
      oneobject_node_client_id: "vsp-object-external-client"
    spec:
      query_type: "default"

Returned Facts

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Key

Description

storage_class_summary

list / elements=dictionary

Summary of storage classes in the Hitachi VSP One Object system.

Returned: success

page_token

string

Token for pagination.

Returned: success

Sample: "eyJ2ZXJzaW9uIjoxL"

storage_classes

list / elements=dictionary

List of storage classes.

Returned: success

data_count

integer

The number of data fragments of the storage class.

Returned: success

Sample: 1

id

integer

The ID of the storage class.

Returned: success

Sample: 194783998

name

string

The name of the storage class.

Returned: success

Sample: "StandardClass"

parity_count

integer

The number of parity fragments of the storage class.

Returned: success

Sample: 1

storage_components

list / elements=dictionary

List of storage components associated with the storage classes.

Refer to hitachivantara.vspone_object.oneobject_node.hv_storage_components_facts for more details.

Returned: success

Sample: []

Authors

  • Hitachi Vantara, LTD. (@hitachi-vantara)