def validate_connector(self, connector): """Check connector.""" if 'FC' == self._protocol and 'wwpns' not in connector: msg = _LE('The connector does not contain the ' 'required information: wwpns is missing') LOG.error(msg) raise exception.InvalidConnectorException(missing='wwpns')
def validate_connector(self, connector): required = 'initiator' if self._protocol == 'iSCSI' else 'wwpns' if required not in connector: LOG.error( 'The volume driver requires %(data)s ' 'in the connector.', {'data': required}) raise exception.InvalidConnectorException(missing=required)
def validate_connector(self, connector): """Check connector for at least one enabled iSCSI protocol.""" if 'initiator' not in connector: LOG.error('The connector does not contain the required ' 'information.') raise exception.InvalidConnectorException( missing='initiator')
def validate_connector(self, connector): if 'initiator' not in connector: LOG.error('The volume driver requires the NVMe initiator ' 'name in the connector.') raise exception.InvalidConnectorException( missing='initiator') return True
def validate_connector(self, connector): """Check for wwpns in connector.""" if 'wwpns' not in connector: err_msg = (_LE('validate_connector: The FC driver requires the' ' wwpns in the connector.')) LOG.error(err_msg) raise exception.InvalidConnectorException(missing='wwpns')
def validate_connector(self, connector): """Check connector for at least one enabled FC protocol.""" if 'FC' == self._storage_protocol and 'wwpns' not in connector: LOG.error( _LE('The connector does not contain the required ' 'information.')) raise exception.InvalidConnectorException(missing='wwpns')
def validate_connector(self, connector): # NOTE(jdg): api passes in connector which is initiator info if 'initiator' not in connector: err_msg = (_LE('The volume driver requires the iSCSI initiator ' 'name in the connector.')) LOG.error(err_msg) raise exception.InvalidConnectorException(missing='initiator') return True
def validate_connector(self, connector): """Check connector for enabled protocol.""" valid = False if 'iSCSI' == self._protocol and 'initiator' in connector: valid = True if not valid: LOG.error('The connector does not contain the ' 'required information: initiator is missing') raise exception.InvalidConnectorException(missing=('initiator'))
def validate_connector(self, connector): """Fail if connector doesn't contain all the data needed by the driver. :param connector: Connector information """ required_data = ['host', 'initiator'] for required in required_data: if required not in connector: LOG.error("The volume driver requires %(data)s " "in the connector.", {'data': required}) raise cinder_exception.InvalidConnectorException( missing=required)
def validate_connector(self, connector): """Check connector for at least one enabled protocol (iSCSI/FC).""" valid = False if ('iSCSI' in self._state['enabled_protocols'] and 'initiator' in connector): valid = True if 'FC' in self._state['enabled_protocols'] and 'wwpns' in connector: valid = True if not valid: LOG.error(_LE('The connector does not contain the required ' 'information.')) raise exception.InvalidConnectorException( missing='initiator or wwpns')
def _storpool_client_id(self, connector): try: hostname = connector['host'] except Exception as e: raise exception.InvalidConnectorException(missing='host') try: cfg = spconfig.SPConfig(section=hostname) return int(cfg['SP_OURID']) except KeyError: raise exception.StorPoolConfigurationMissing(section=hostname, param='SP_OURID') except Exception as e: raise exception.StorPoolConfigurationInvalid(section=hostname, param='SP_OURID', error=e)
def validate_connector(self, connector): """Check connector for at least one enabled FC protocol.""" if 'wwpns' not in connector: LOG.error('The connector does not ' 'contain the required information.') raise exception.InvalidConnectorException(missing='wwpns')