�
�Udac @` s� d d l m Z m Z m Z e Z i d g d 6d d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z m Z m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functiont previewt statust communityt supported_bys 1.1t metadata_versions`
---
module: ibm_sa_vol_map
short_description: Handles volume mapping on IBM Spectrum Accelerate Family storage systems.
version_added: "2.8"
description:
- "This module maps volumes to or unmaps them from the hosts on
IBM Spectrum Accelerate Family storage systems."
options:
vol:
description:
- Volume name.
required: true
state:
default: "present"
choices: [ "present", "absent" ]
description:
- When the state is present the volume is mapped.
When the state is absent, the volume is meant to be unmapped.
required: true
cluster:
description:
- Maps the volume to a cluster.
required: false
host:
description:
- Maps the volume to a host.
required: false
lun:
description:
- The LUN identifier.
required: false
override:
description:
- Overrides the existing volume mapping.
required: false
extends_documentation_fragment:
- ibm_storage
author:
- Tzur Eliyahu (@tzure)
s
- name: Map volume to host.
ibm_sa_vol_map:
vol: volume_name
lun: 1
host: host_name
username: admin
password: secret
endpoints: hostdev-system
state: present
- name: Map volume to cluster.
ibm_sa_vol_map:
vol: volume_name
lun: 1
cluster: cluster_name
username: admin
password: secret
endpoints: hostdev-system
state: present
- name: Unmap volume.
ibm_sa_vol_map:
host: host_name
username: admin
password: secret
endpoints: hostdev-system
state: absent
t
( t
AnsibleModule( t execute_pyxcli_commandt connect_sslt spectrum_accelerate_spect is_pyxcli_installedc C` sz t � } | j t d t d d d d d g � d t d t � d t � d t � d
t � d t � � � t | � } t | � t | � } t } ya | j j d | j
j d � � j } x6 | D]. } | d
| j
j d
d � k r� t } q� q� WWn t
k
rn X| j
d } t } | d k r?| r?t | d
| � } n | d k rf| rft | d | � } n | j d | � d S( Nt statet defaultt presentt choicest absentt volt requiredt lunt clustert hostt overridet t map_volt unmap_volt changed( R t updatet dictt TrueR R
R t Falset cmdt vol_mapping_listt paramst gett as_listt ExceptionR
t exit_json( t
argument_spect modulet xcli_clientt mappingt mapped_hostsR R t
state_changed( ( sN /usr/lib/python2.7/site-packages/ansible/modules/storage/ibm/ibm_sa_vol_map.pyt maind s:
t __main__N( t
__future__R R R t typet
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.basicR t! ansible.module_utils.ibm_sa_utilsR
R R R
R. t __name__( ( ( sN /usr/lib/python2.7/site-packages/ansible/modules/storage/ibm/ibm_sa_vol_map.pyt <module>
s
." '
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]