示例#1
0
 def __init__(self, methodName='runTest'):
     super().__init__(methodName)
     # Hold the command line arguments
     self.config = parser.get_config()
     self.ctx = None
     self.attr = None
     self.attr_ex = None
示例#2
0
 def __init__(self, methodName='runTest', dev_name=None, ib_port=None,
              gid_index=None, pkey_index=None, gid_type=None):
     """
     Initialize a RDMA test unit based on unittest.TestCase.
     If no device was provided, it iterates over the existing devices, for
     each port of each device, it checks which GID indexes are valid (in RoCE,
     only IPv4 and IPv6 based GIDs are used). Each <dev, port, gid> is added
     to an array and one entry is selected.
     If a device was provided, the same process is done for all ports of this
     device (in case they're not provided), and so on.
     If gid_type is provided by the user, only GIDs of that type would be
     be chosen (valid only if gid_index was not provided).
     :param methodName: The base method to be used by the unittest
     :param dev_name: Device name to use
     :param ib_port: IB port of the device to use
     :param gid_index: GID index to use
     :param pkey_index: PKEY index to use
     :param gid_type: If provided, only GIDs of gid_type will be chosen
                      (ignored if gid_index is provided by the user)
     """
     super(RDMATestCase, self).__init__(methodName)
     # Hold the command line arguments
     self.config = parser.get_config()
     dev = self.config['dev']
     self.dev_name = dev_name if dev_name else dev
     self.ib_port = ib_port if ib_port else self.config['port']
     self.gid_index = gid_index
     self.pkey_index = pkey_index
     self.gid_type = gid_type if gid_index is None else None
     self.ip_addr = None
     self.pre_environment = {}
     self.server = None
     self.client = None
示例#3
0
文件: base.py 项目: nzmsv/rdma-core
 def __init__(self, methodName='runTest', dev_name=None, ib_port=None,
              gid_index=None, pkey_index=None):
     super(RDMATestCase, self).__init__(methodName)
     # Hold the command line arguments
     self.config = parser.get_config()
     dev = self.config['dev']
     self.dev_name = dev_name if dev_name else dev
     self.ib_port = ib_port
     self.gid_index = gid_index
     self.pkey_index = pkey_index
     self.ip_addr = None