def __init__(self, http_executor, pdadmin, management_authentication,
              firmware_settings=None, reverseproxy=None):
     self.http_executor = command.get_safe_exec_fn(http_executor)
     self.pdadmin = pdadmin
     self.management_authentication = management_authentication
     self.firmware_settings = firmware_settings
     self.reverseproxy = reverseproxy
     self.application_interface_endpoints_by_junction_id = {}
     self.reverseproxy_by_junction_id = {}
 def __init__(self,
              http_executor,
              pdadmin,
              management_authentication,
              firmware_settings=None,
              reverseproxy=None):
     self.http_executor = command.get_safe_exec_fn(http_executor)
     self.pdadmin = pdadmin
     self.management_authentication = management_authentication
     self.firmware_settings = firmware_settings
     self.reverseproxy = reverseproxy
     self.application_interface_endpoints_by_junction_id = {}
     self.reverseproxy_by_junction_id = {}
示例#3
0
    def get_fc_hbas(self, shell):
        executor = command.cmdlet.executeCommand(shell)
        fcinfo_impl = find_fcinfo_impl(executor)()
        exec_ = command.get_exec_fn(executor)
        safe_exec_ = command.get_safe_exec_fn(executor)

        descriptors = exec_(fcinfo_impl.hba_port())
        result = []
        for fchba_descriptor in descriptors:
            try:
                name = fchba_descriptor.name
                nodewwn = wwn.parse_from_str(fchba_descriptor.node_wwn)
                portwwn = fchba_descriptor.port_wwn
                model = fchba_descriptor.model
                vendor = fchba_descriptor.vendor
                type_ = fchba_descriptor.type
                serialnum = fchba_descriptor.serial_number
                driver_version = fchba_descriptor.driver_version
                fw_version = fchba_descriptor.firmware_version
                port_speed = fchba_descriptor.port_speed
                fchba = fc_hba_model.FcHba(name, name,
                                           wwn=nodewwn,
                                           vendor=vendor, model=model,
                                           serial_number=serialnum,
                                           driver_version=driver_version,
                                           firmware_version=fw_version)
                ports = []
                try:
                    port_id = None
                    port_wwn = wwn.parse_from_str(portwwn)
                    speed = _parse_port_speed(port_speed)
                    remote_port_descriptors = safe_exec_(fcinfo_impl.remote_port.p(portwwn))
                    target_fchbas = self._create_target_fchba_details(remote_port_descriptors)
                    ports.append((fc_hba_model.FcPort(port_id, port_wwn,
                                                      type_, None, speed),
                                  target_fchbas))
                except (command.ExecuteException, TypeError, ValueError), ex:
                    logger.debugException('Failed to create fcport data object')
                result.append((fchba, ports))
            except (command.ExecuteException, TypeError, ValueError), ex:
                logger.debugException('Failed to create fchba data object')