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()) # initialize the ansible module self.module = AnsibleModule(argument_spec=self.module_params, supports_check_mode=False) # result is a dictionary that contains changed status and # port details self.result = {'changed': False, 'port_details': {}} if HAS_PYU4V is False: self.module.fail_json(msg='Ansible modules for PowerMax ' 'require the PyU4V python library' ' to be installed. Please install' ' the library before using these' ' modules.') if PYU4V_VERSION_CHECK is not None: self.module.fail_json(msg=PYU4V_VERSION_CHECK) LOG.error(PYU4V_VERSION_CHECK) # Getting PyU4V instance for provisioning on to VMAX self.u4v_conn = utils.get_U4V_connection(self.module.params) self.provisioning = self.u4v_conn.provisioning LOG.info('Got PyU4V instance for provisioning on to VMAX')
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_masking_view_parameters()) mutually_exclusive = [['host_name', 'hostgroup_name']] # initialize the ansible module self.module = AnsibleModule(argument_spec=self.module_params, supports_check_mode=False, mutually_exclusive=mutually_exclusive) if HAS_PYU4V is False: self.module.fail_json(msg='Ansible modules for PowerMax ' 'require the PyU4V python library' ' to be installed. Please install' ' the library before using these ' 'modules.') if PYU4V_VERSION_CHECK is not None: self.module.fail_json(msg=PYU4V_VERSION_CHECK) LOG.error(PYU4V_VERSION_CHECK) self.u4v_conn = utils.get_U4V_connection(self.module.params) self.provisioning = self.u4v_conn.provisioning LOG.info('Got PyU4V instance for provisioning on PowerMax')
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, supports_check_mode=False ) if HAS_PYU4V is False: self.module.fail_json(msg='Ansible modules for PowerMax ' 'require the PyU4V python library' ' to be installed. Please install' ' the library before using these ' 'modules.') if PYU4V_VERSION_CHECK is not None: self.module.fail_json(msg=PYU4V_VERSION_CHECK) LOG.error(PYU4V_VERSION_CHECK) self.u4v_conn = utils.get_U4V_connection(self.module.params) self.replication = self.u4v_conn.replication self.common = self.u4v_conn.common LOG.info('Got PyU4V instance for provisioning on PowerMax ')
def __init__(self): """Define all parameters required by this module""" self.module_params = utils.\ get_powermax_management_host_parameters() self.module_params.update(self.get_powermax_hostgroup_parameters()) # initialize the ansible module self.module = AnsibleModule(argument_spec=self.module_params, supports_check_mode=False) # result is a dictionary that contains changed status and # host details self.result = {'changed': False, 'host_details': {}} self.host_flags_list = { 'volume_set_addressing', 'environ_set', 'disable_q_reset_on_ua', 'openvms', 'avoid_reset_broadcast', 'scsi_3', 'spc2_protocol_version', 'scsi_support1' } if HAS_PYU4V is False: self.module.fail_json(msg='Ansible modules for PowerMax ' 'require the PyU4V python library' ' to be installed. Please install' ' the library before using these ' 'modules.') if PYU4V_VERSION_CHECK is not None: self.module.fail_json(msg=PYU4V_VERSION_CHECK) LOG.error(PYU4V_VERSION_CHECK) self.u4v_conn = utils.get_U4V_connection(self.module.params) self.provisioning = self.u4v_conn.provisioning LOG.info('Got PyU4V instance for provisioning on to VMAX ')
def __init__(self): """Define all the parameters required by this module""" self.module_params = get_powermax_gatherfacts_parameters() # initialize the ansible module self.module = AnsibleModule(argument_spec=self.module_params, supports_check_mode=False) serial_no = self.module.params['serial_no'] if HAS_PYU4V is False: self.module.fail_json(msg='Ansible modules for PowerMax ' 'require the PyU4V python ' 'library to be installed. Please ' 'install the library before ' 'using these modules.') if PYU4V_VERSION_CHECK is not None: self.module.fail_json(msg=PYU4V_VERSION_CHECK) LOG.error(PYU4V_VERSION_CHECK) if serial_no is '': self.u4v_unisphere_con = utils.get_u4v_unisphere_connection( self.module.params) self.common = self.u4v_unisphere_con.common LOG.info('Got PyU4V Unisphere instance for common lib ' 'method access on VMAX') else: self.module_params.update( utils.get_powermax_management_host_parameters()) self.u4v_conn = utils.get_U4V_connection(self.module.params) self.provisioning = self.u4v_conn.provisioning self.u4v_conn.set_array_id(serial_no) LOG.info('Got PyU4V instance for provisioning on to VMAX ')