Example #1
0
 def __init__(self, sp, port_id, vport_id=None):
     super(VNXHbaPort, self).__init__()
     self._sp = VNXSPEnum.parse(sp)
     self._port_id = check_int(port_id)
     self._vport_id = check_int(vport_id, allow_none=True)
     self._type = VNXPortType.FC
     self._host_initiator_list = []
Example #2
0
 def __init__(self, sp, port_id, vport_id=0):
     super(VNXHbaPort, self).__init__()
     self._sp = VNXSPEnum.from_str(sp)
     self._port_id = check_int(port_id)
     self._vport_id = check_int(vport_id)
     self._type = VNXPortType.FC
     self._host_initiator_list = []
Example #3
0
 def __init__(self, sp, port_id, vport_id=0):
     super(VNXHbaPort, self).__init__()
     self._sp = VNXSPEnum.from_str(sp)
     self._port_id = check_int(port_id)
     self._vport_id = check_int(vport_id)
     self._type = VNXPortType.FC
     self._host_initiator_list = []
Example #4
0
 def __init__(self, sp, port_id, vport_id=None):
     super(VNXHbaPort, self).__init__()
     self._sp = VNXSPEnum.parse(sp)
     self._port_id = check_int(port_id)
     self._vport_id = check_int(vport_id, allow_none=True)
     self._type = VNXPortType.FC
     self._host_initiator_list = []
Example #5
0
 def get_id(fs):
     if isinstance(fs, VNXFileSystem):
         fs = fs.get_fs_id()
     try:
         ret = check_int(fs)
     except ValueError:
         raise ValueError('invalid fs id supplied: {}'.format(fs))
     return ret
Example #6
0
 def get_id(pool):
     if isinstance(pool, VNXNasPool):
         pool = pool.get_pool_id()
     try:
         ret = check_int(pool)
     except ValueError:
         raise ValueError('invalid pool id supplied: {}'.format(pool))
     return ret
Example #7
0
 def get_id(pool):
     if isinstance(pool, VNXNasPool):
         pool = pool.get_pool_id()
     try:
         ret = check_int(pool)
     except ValueError:
         raise ValueError('invalid pool id supplied: {}'
                          .format(pool))
     return ret
Example #8
0
 def get_id(fs):
     if isinstance(fs, VNXFileSystem):
         fs = fs.get_fs_id()
     try:
         ret = check_int(fs)
     except ValueError:
         raise ValueError('invalid fs id supplied: {}'
                          .format(fs))
     return ret
Example #9
0
 def get_id(lun):
     if isinstance(lun, VNXLun):
         if lun._lun_id is not None:
             lun = lun._lun_id
         else:
             lun = lun.lun_id
     try:
         lun = check_int(lun)
     except ValueError:
         raise ValueError('invalid lun number supplied: {}'.format(lun))
     return lun
Example #10
0
File: lun.py Project: crook/storops
 def get_id(lun):
     if isinstance(lun, VNXLun):
         if lun._lun_id is not None:
             lun = lun._lun_id
         else:
             lun = lun.lun_id
     try:
         lun = check_int(lun)
     except ValueError:
         raise ValueError('invalid lun number supplied: {}'
                          .format(lun))
     return lun
Example #11
0
    def get_interconnect_id(self, source=None, destination=None):
        if source is None:
            source = self.name
        if destination is None:
            destination = self.name

        out = self._cli.get_mover_interconnect_id_list()

        for line in out.strip().split('\n'):
            _id, name, src, dest_system, dest = line.strip().split()
            if src == source and dest == destination:
                conn_id = check_int(_id)
                break
        else:
            conn_id = None

        return conn_id
Example #12
0
    def get_interconnect_id(self, source=None, destination=None):
        if source is None:
            source = self.name
        if destination is None:
            destination = self.name

        out = self._cli.get_mover_interconnect_id_list()

        for line in out.strip().split('\n'):
            _id, name, src, dest_system, dest = line.strip().split()
            if src == source and dest == destination:
                conn_id = check_int(_id)
                break
        else:
            conn_id = None

        return conn_id
Example #13
0
 def get_id(cls, item):
     if isinstance(item, VNXMoverRef):
         ret = item.get_mover_id()
     else:
         ret = check_int(item)
     return ret
Example #14
0
 def member_converter(member):
     return six.text_type(check_int(member))
Example #15
0
 def set_ssh_timeout(self, value):
     self._ssh_timeout = check_int(value)
Example #16
0
 def get_id(cls, item):
     if isinstance(item, VNXMoverRef):
         ret = item.get_mover_id()
     else:
         ret = check_int(item)
     return ret
Example #17
0
 def member_converter(member):
     return six.text_type(check_int(member))
Example #18
0
 def set_ssh_timeout(self, value):
     self._ssh_timeout = check_int(value)