示例#1
0
 def setUp(self):
     """
     @summary: 初始化测试数据、测试环境。
     """
     # 初始化测试数据
     self.dm = super(self.__class__, self).setUp()
     self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#2
0
 def setUp(self):
     '''
     @summary: 初始化测试数据、测试环境。
     '''
     # 初始化测试数据
     self.dm = super(self.__class__, self).setUp()
     self.assertTrue(
         smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#3
0
    def setUp(self):
        """
        @summary: 测试用例执行前的环境初始化(前提)
        """
        # 调用父类方法,获取该用例所对应的测试数据模块
        self.dm = super(self.__class__, self).setUp()

        # 前提1: 创建一个集群
        LogPrint().info("Pre-Test: Create a cluster '%s' for this TC." % self.dm.cluster_name)
        self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#4
0
 def setUp(self):
     """
     @summary: 测试用例执行前的环境初始化(前提)
     """
     # 初始化测试数据
     self.dm = super(self.__class__, self).setUp()
     # 前提1:首先创建一个集群
     self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     # 前提2:创建一个主机
     self.assertTrue(smart_create_host(self.dm.host_name, self.dm.host_info))
示例#5
0
    def setUp(self):
        """
        @summary: 初始化测试数据、测试环境。
        """
        # 初始化测试数据
        self.dm = super(self.__class__, self).setUp()

        # 前提1:创建一个集群
        LogPrint().info("Pre-Test: Create cluster '%s' for this TC." % self.dm.cluster_name)
        self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#6
0
 def setUp(self):
     """
     @summary: 测试用例执行前的环境初始化(前提)
     """
     # 调用父类方法,获取该用例所对应的测试数据模块
     self.dm = super(self.__class__, self).setUp()
     # step1:创建一个集群
     LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name)
     self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     # step2:创建一个逻辑网络
     LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name)
     self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
示例#7
0
    def setUp(self):
        '''
        @summary: 测试用例执行前的环境初始化(前提)
        '''
        # 调用父类方法,获取该用例所对应的测试数据模块
        self.dm = super(self.__class__, self).setUp()

        # 前提1: 创建一个集群
        LogPrint().info("Pre-Test: Create a cluster '%s' for this TC." %
                        self.dm.cluster_name)
        self.assertTrue(
            smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#8
0
 def setUp(self):
     '''
     @summary: 测试用例执行前的环境初始化(前提)
     '''
     # 初始化测试数据
     self.dm = super(self.__class__, self).setUp()
     # 前提1:首先创建一个集群
     self.assertTrue(
         smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     # 前提2:创建一个主机
     self.assertTrue(smart_create_host(self.dm.host_name,
                                       self.dm.host_info))
示例#9
0
    def setUp(self):
        '''
        @summary: 初始化测试数据、测试环境。
        '''
        # 初始化测试数据
        self.dm = super(self.__class__, self).setUp()

        # 前提1:创建一个集群
        LogPrint().info("Pre-Test: Create cluster '%s' for this TC." %
                        self.dm.cluster_name)
        self.assertTrue(
            smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
示例#10
0
 def setUp(self):
     '''
     @summary: 测试用例执行前的环境初始化(前提)
     '''
     # 调用父类方法,获取该用例所对应的测试数据模块
     self.dm = super(self.__class__, self).setUp()
     #step1:创建一个集群
     LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." %
                     self.dm.cluster_name)
     self.assertTrue(
         smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     #step2:创建一个逻辑网络
     LogPrint().info("Pre-Test-2: Create network '%s' for this TC." %
                     self.dm.nw_name)
     self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
示例#11
0
 def setUp(self):
     """
     @summary: 测试用例执行前的环境初始化(前提)
     """
     # 调用父类方法,获取该用例所对应的测试数据模块
     self.dm = super(self.__class__, self).setUp()
     # step1:创建一个集群
     LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name)
     self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     # step2:创建一个逻辑网络
     LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name)
     self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
     # step3:附加该网络到集群上
     LogPrint().info(
         "Pre-Test-3: Attach network '%s'to cluster '%s' for this TC." % (self.dm.nw_name, self.dm.cluster_name)
     )
     self.clusterapi = ClusterAPIs()
     self.clusterapi.attachNetworkToCluster(self.dm.cluster_name, self.dm.nw_info)
示例#12
0
 def setUp(self):
     '''
     @summary: 测试用例执行前的环境初始化(前提)
     '''
     # 调用父类方法,获取该用例所对应的测试数据模块
     self.dm = super(self.__class__, self).setUp()
     # step1:创建一个集群
     LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." %
                     self.dm.cluster_name)
     self.assertTrue(
         smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
     # step2:创建一个逻辑网络
     LogPrint().info("Pre-Test-2: Create network '%s' for this TC." %
                     self.dm.nw_name)
     self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
     # step3:附加该网络到集群上
     LogPrint().info(
         "Pre-Test-3: Attach network '%s'to cluster '%s' for this TC." %
         (self.dm.nw_name, self.dm.cluster_name))
     self.clusterapi = ClusterAPIs()
     self.clusterapi.attachNetworkToCluster(self.dm.cluster_name,
                                            self.dm.nw_info)