Exemple #1
0
      user: "******"
      password: "******"
      serial_no: "{{serial_no}}"
      sg_name: "ansible_sg":
      new_sg_name: "ansible_sg_renamed"
      state: "present"                                                
'''

RETURN = r'''
'''

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils import dellemc_ansible_utils as utils
import logging

LOG = utils.get_logger('dellemc_powermax_storagegroup', log_devel=logging.INFO)
HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()


class PowerMaxStorageGroup(object):
    """Class with Storage Group operations"""
    def __init__(self):
        """Define all the parameters required by this module"""
        self.module_params = utils.get_powermax_management_host_parameters()
        self.module_params.update(get_powermax_storage_group_parameters())

        # initialize the Ansible module
        self.module = AnsibleModule(argument_spec=self.module_params,
                                    supports_check_mode=True)
- name: Get list of Maskng Views
    dellemc_powermax_gatherfacts:
      unispherehost: "{{unispherehost}}"
      universion: "{{universion}}"
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      serial_no: "{{serial_no}}"
      gather_subset:
         - mv

'''

RETURN = r'''  '''

LOG = utils.get_logger('dellemc_powermax_gatherfacts', log_devel=logging.INFO)

HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()


class PowerMaxGatherFacts(object):
    """Class with Gather Fact operations"""
    def __init__(self):
        """Define all the parameters required by this module"""

        self.module_params = get_powermax_gatherfacts_parameters()
        self.module = AnsibleModule(argument_spec=self.module_params,
                                    supports_check_mode=True)
        serial_no = self.module.params['serial_no']
                "host_state": "present-in-group",
                "hostgroup_id": null,
                "hostgroup_name": "Ansible_Test_Hostgroup",
                "hosts": [
                    "host3",
                    "01dedad0-375b-4b6d-901d-94a054d60afe"
                ],
                "new_name": null,
                "password": "******",
                "state": "present",
                "user": "******"
            }
    }

'''
LOG = utils.get_logger('dellemc_powerstore_hostgroup', log_devel=logging.INFO)

py4ps_sdk = utils.has_pyu4ps_sdk()
HAS_PY4PS = py4ps_sdk['HAS_Py4PS']
IMPORT_ERROR = py4ps_sdk['Error_message']

py4ps_version = utils.py4ps_version_check()
IS_SUPPORTED_PY4PS_VERSION = py4ps_version['supported_version']
VERSION_ERROR = py4ps_version['unsupported_version_message']

# Application type
APPLICATION_TYPE = 'Ansible/1.0'

class PowerStoreHostgroup(object):
    '''Class with host group operations'''
      unispherehost: "{{unispherehost}}"
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      serial_no: "{{array_id}}"
      ports:
      - director_id: "FA-1D"
        port_id: "5"
      - director_id: "SE-1F"
        port_id: "29"
"""

RETURN = r"""
"""

LOG = utils.get_logger("dellemc_powermax_port", log_devel=logging.INFO)

HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()

# Application Type
APPLICATION_TYPE = 'ansible_v1.1'


class PowerMaxPort(object):
    """ Class with port operations"""
    def __init__(self):
        """ Define all the parameters required by this module"""
        self.module_params = utils.get_powermax_management_host_parameters()
        self.module_params.update(get_powermax_port_parameters())
      unispherehost: "{{unispherehost}}"
      universion: "{{universion}}"
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      serial_no: "{{serial_no}}"
      register: result      
'''

SLOPROVISIONING = constants.SLOPROVISIONING

HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()

LOG = utils.get_logger('dellemc_powermax_unmapvolume', log_devel=logging.INFO)
# Application Type
APPLICATION_TYPE = 'ansible_v1.1'


class PowerMaxUnmapVolume(object):
    def __init__(self):
        """Define all the parameters required by this module"""

        self.module_params = utils.get_powermax_management_host_parameters()
        self.array_id = self.module_params['serial_no']
        serial_no = self.module_params['serial_no']

        # initialize the ansible module
        self.module = AnsibleModule(
            argument_spec=self.module_params,
Exemple #6
0
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      serial_no: "{{serial_no}}"
      sg_name: "ansible_sg"
      snapshot_name: "ansible_snap_new"
      generation: 1
      target_sg_name: "ansible_sg_target"
      link_status: "unlinked"
      state: "present"
'''

RETURN = r'''
'''

LOG = utils.get_logger('dellemc_powermax_snapshot', log_devel=logging.INFO)

HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()


class PowerMaxSnapshot(object):
    """Class with Snapshot operations"""
    def __init__(self):
        """Define all the parameters required by this module"""
        self.module_params = utils.get_powermax_management_host_parameters()
        self.module_params.update(get_powermax_snapshot_parameters())

        # initialize the Ansible module
        self.module = AnsibleModule(argument_spec=self.module_params,
- name: Delete host masking view
    dellemc_powermax_maskingview:
      unispherehost: "{{unispherehost}}"
      universion: "{{universion}}"
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      serial_no: "{{serial_no}}"
      mv_name: "Ansible_Testing_mv_renamed"
      state: "absent"
'''

RETURN = r'''
'''

LOG = utils.get_logger('dellemc_powermax_maskingview',
                       log_devel=logging.INFO)
HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()

# Application Type
APPLICATION_TYPE = 'ansible_v1.1'


class PowerMaxMaskingView(object):
    """Class with masking view operations"""

    def __init__(self):
        """Define all the parameters required by this module"""
        self.module_params = utils.get_powermax_management_host_parameters()
        self.module_params.update(
    state: "present"

- name: Delete an existing snapshot rule by name
  dellemc_powerstore_snapshotrule:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "******"
    password: "******"
    name: "{{name}}"
    state: "absent"

'''

RETURN = r'''  '''

LOG = utils.get_logger('dellemc_powerstore_snapshotrule',
                       log_devel=logging.INFO)

py4ps_sdk = utils.has_pyu4ps_sdk()
HAS_PY4PS = py4ps_sdk['HAS_Py4PS']
IMPORT_ERROR = py4ps_sdk['Error_message']

py4ps_version = utils.py4ps_version_check()
IS_SUPPORTED_PY4PS_VERSION = py4ps_version['supported_version']
VERSION_ERROR = py4ps_version['unsupported_version_message']

# Application type
APPLICATION_TYPE = 'Ansible/1.0'


class PowerstoreSnapshotrule(object):
    """Snapshot Rule operations"""
Exemple #9
0
    host: 'host2'

- name: Delete volume
  dellemc_powerstore_volume:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "******"
    password: "******"
    vol_id: "{{result.volume_details.id}}"
    state: "absent"
'''

RETURN = r'''
'''

LOG = utils.get_logger('dellemc_powerstore_volume', log_devel=logging.INFO)

py4ps_sdk = utils.has_pyu4ps_sdk()
HAS_PY4PS = py4ps_sdk['HAS_Py4PS']
IMPORT_ERROR = py4ps_sdk['Error_message']

py4ps_version = utils.py4ps_version_check()
IS_SUPPORTED_PY4PS_VERSION = py4ps_version['supported_version']
VERSION_ERROR = py4ps_version['unsupported_version_message']

# Application type
APPLICATION_TYPE = 'Ansible/1.0'

class PowerStoreVolume(object):
    """Class with volume operations"""
Exemple #10
0
            "remote_serial_no": "xx",
            "serial_no": "xx",
            "sg_name": "Ansible_Test_SRDF",
            "srdf_mode": "Asynchronous",
            "srdf_state": "Establish",
            "state": "present",
            "unispherehost": "xx",
            "universion": 90,
            "user": "******",
            "verifycert": false
        }
    }
}
'''
LOG = utils.get_logger(
    module_name='dellemc_powermax_srdf',
    log_devel=logging.INFO)

HAS_PYU4V = utils.has_pyu4v_sdk()

PYU4V_VERSION_CHECK = utils.pyu4v_version_check()

# Application Type
APPLICATION_TYPE = 'ansible_v1.1'


class PowerMax_SRDF(object):

    '''Class with srdf operations'''

    def __init__(self):
  - name : Delete protection policy
    dellemc_powerstore_protectionpolicy:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "******"
      password: "******"
      name: "{{name}}"
      state: "absent"

'''

RETURN = r'''  '''


LOG = utils.get_logger(
    'dellemc_powerstore_protectionpolicy',
    log_devel=logging.INFO)

py4ps_sdk = utils.has_pyu4ps_sdk()
HAS_PY4PS = py4ps_sdk['HAS_Py4PS']
IMPORT_ERROR = py4ps_sdk['Error_message']

py4ps_version = utils.py4ps_version_check()
IS_SUPPORTED_PY4PS_VERSION = py4ps_version['supported_version']
VERSION_ERROR = py4ps_version['unsupported_version_message']

# Application type
APPLICATION_TYPE = 'Ansible/1.0'

class PowerstoreProtectionpolicy(object):
    """Protectionpolicy operations"""