Exemple #1
0
    def setUp(self):
        super(TestSubnet, self).setUp()

        if TestSubnet.subnet_192_168_100 is None:
            TestSubnet.subnet_192_168_100 = "subnet-192168100"
            Subnet.delete({'name': TestSubnet.subnet_192_168_100})
            Subnet.create_minimal(TestSubnet.subnet_192_168_100)
Exemple #2
0
 def test_create(self):
     """
     @Feature: Subnet - Create
     @Test: Check if Subnet can be created
     @Assert: Subnet is created
     """
     result = Subnet.create_minimal()
     self.assertTrue(result.return_code == 0,
                     "Subnet create - exit code %d" %
                     result.return_code)
Exemple #3
0
 def test_delete(self):
     """
     @Feature: Subnet - Delete
     @Test: Check if Subnet can be deleted
     @Assert: Subnet is deleted
     """
     name = generate_name()
     options = {}
     options['name'] = name
     result = Subnet.create_minimal(name)
     self.assertTrue(result.return_code == 0,
                     "Subnet create - exit code %d" %
                     result.return_code)
     result = Subnet.delete(options)
     self.assertTrue(result.return_code == 0,
                     "Subnet delete - exit code %d" %
                     result.return_code)