Esempio n. 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 = []
Esempio n. 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 = []
Esempio n. 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 = []
Esempio n. 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 = []
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 10
0
File: lun.py Progetto: 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
Esempio n. 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
Esempio n. 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
Esempio n. 13
0
 def get_id(cls, item):
     if isinstance(item, VNXMoverRef):
         ret = item.get_mover_id()
     else:
         ret = check_int(item)
     return ret
Esempio n. 14
0
 def member_converter(member):
     return six.text_type(check_int(member))
Esempio n. 15
0
 def set_ssh_timeout(self, value):
     self._ssh_timeout = check_int(value)
Esempio n. 16
0
 def get_id(cls, item):
     if isinstance(item, VNXMoverRef):
         ret = item.get_mover_id()
     else:
         ret = check_int(item)
     return ret
Esempio n. 17
0
 def member_converter(member):
     return six.text_type(check_int(member))
Esempio n. 18
0
 def set_ssh_timeout(self, value):
     self._ssh_timeout = check_int(value)