예제 #1
0
 def create_xrcd(self):
     """
     Initializes self.xrcd with an XRC Domain object.
     :return: None
     """
     self.temp_file = tempfile.NamedTemporaryFile()
     self.xrcd_fd = os.open(self.temp_file.name, os.O_RDONLY | os.O_CREAT,
                            stat.S_IRUSR | stat.S_IRGRP)
     init = XRCDInitAttr(
         e.IBV_XRCD_INIT_ATTR_FD | e.IBV_XRCD_INIT_ATTR_OFLAGS,
         os.O_CREAT, self.xrcd_fd)
     self.xrcd = XRCD(self.ctx, init)
예제 #2
0
파일: base.py 프로젝트: rian-day/rdma-core
 def create_xrcd(self):
     """
     Initializes self.xrcd with an XRC Domain object.
     :return: None
     """
     self.temp_file = tempfile.NamedTemporaryFile()
     self.xrcd_fd = os.open(self.temp_file.name, os.O_RDONLY | os.O_CREAT,
                            stat.S_IRUSR | stat.S_IRGRP)
     init = XRCDInitAttr(
         e.IBV_XRCD_INIT_ATTR_FD | e.IBV_XRCD_INIT_ATTR_OFLAGS,
         os.O_CREAT, self.xrcd_fd)
     try:
         self.xrcd = XRCD(self.ctx, init)
     except PyverbsRDMAError as ex:
         if ex.error_code == errno.EOPNOTSUPP:
             raise unittest.SkipTest('Create XRCD is not supported')
         raise ex