self.__class__.test_index, inspect.currentframe().f_code.co_name)
self.__class__.test_index += 1
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=network_type)
self.__class__.network_id = network
logger.debug("{}".format(network))
self.__class__.test_index += 1
for net_type in network_types:
self.__class__.network_name = _get_random_string(20)
- network_id = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network_id, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=net_type)
delete_net_ids.append(network_id)
self.__class__.test_index,
inspect.currentframe().f_code.co_name)
self.__class__.test_index += 1
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type='mgmt',
ip_profile=ip_profile)
self.__class__.network_id = network
self.__class__.test_index,
inspect.currentframe().f_code.co_name)
self.__class__.test_index += 1
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type='bridge',
shared=shared)
self.__class__.network_id = network
self.__class__.test_index,
inspect.currentframe().f_code.co_name)
self.__class__.test_index += 1
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type='unknowntype')
self.__class__.network_id = network
logger.debug("{}".format(network))
# creating new network
network_name = _get_random_string(20)
net_type = 'bridge'
- network_id = test_config["vim_conn"].new_network(net_name=network_name,
+ network_id, _ = test_config["vim_conn"].new_network(net_name=network_name,
net_type=net_type)
# refresh net status
net_dict = test_config["vim_conn"].refresh_nets_status([network_id])
# creating new network
self.__class__.network_name = _get_random_string(20)
self.__class__.net_type = 'bridge'
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=self.__class__.net_type)
self.__class__.network_id = network
logger.debug("{}".format(network))
# creating new network
self.__class__.network_name = _get_random_string(20)
self.__class__.net_type = 'bridge'
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=self.__class__.net_type)
self.__class__.network_id = network
logger.debug("{}".format(network))
# Creating network
self.__class__.network_name = _get_random_string(20)
self.__class__.net_type = 'bridge'
- network = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ network, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=self.__class__.net_type)
self.__class__.network_id = network
logger.debug("{}".format(network))
self.assertEqual((context.exception).http_code, 404)
-class test_vimconn_new_image(test_base):
-
- def test_000_new_image(self):
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- image_path = test_config['image_path']
- if image_path:
- self.__class__.image_id = test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : image_path, 'metadata': {'upload_location':None} })
- time.sleep(20)
-
- self.assertIsInstance(self.__class__.image_id, (str, unicode))
- self.assertIsInstance(uuid.UUID(self.__class__.image_id), uuid.UUID)
- else:
- self.skipTest("Skipping test as image file not present at RO container")
-
- def test_010_new_image_negative(self):
- Non_exist_image_path = '/temp1/cirros.ovf'
-
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- with self.assertRaises(Exception) as context:
- test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : Non_exist_image_path})
-
- self.assertEqual((context.exception).http_code, 400)
-
- def test_020_delete_image(self):
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- image_id = test_config["vim_conn"].delete_image(self.__class__.image_id)
-
- self.assertIsInstance(image_id, (str, unicode))
-
- def test_030_delete_image_negative(self):
- Non_exist_image_id = str(uuid.uuid4())
-
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- with self.assertRaises(Exception) as context:
- test_config["vim_conn"].delete_image(Non_exist_image_id)
-
- self.assertEqual((context.exception).http_code, 404)
-
-class test_vimconn_get_image_id_from_path(test_base):
-
- def test_000_get_image_id_from_path(self):
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- image_path = test_config['image_path']
- if image_path:
- image_id = test_config["vim_conn"].get_image_id_from_path( image_path )
- self.assertEqual(type(image_id),str)
- else:
- self.skipTest("Skipping test as image file not present at RO container")
-
- def test_010_get_image_id_from_path_negative(self):
- Non_exist_image_path = '/temp1/cirros.ovf'
-
- self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
- self.__class__.test_index,
- inspect.currentframe().f_code.co_name)
- self.__class__.test_index += 1
-
- with self.assertRaises(Exception) as context:
- test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : Non_exist_image_path })
+# class test_vimconn_new_image(test_base):
+#
+# def test_000_new_image(self):
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# image_path = test_config['image_path']
+# if image_path:
+# self.__class__.image_id = test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : image_path, 'metadata': {'upload_location':None} })
+# time.sleep(20)
+#
+# self.assertIsInstance(self.__class__.image_id, (str, unicode))
+# self.assertIsInstance(uuid.UUID(self.__class__.image_id), uuid.UUID)
+# else:
+# self.skipTest("Skipping test as image file not present at RO container")
+#
+# def test_010_new_image_negative(self):
+# Non_exist_image_path = '/temp1/cirros.ovf'
+#
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# with self.assertRaises(Exception) as context:
+# test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : Non_exist_image_path})
+#
+# self.assertEqual((context.exception).http_code, 400)
+#
+# def test_020_delete_image(self):
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# image_id = test_config["vim_conn"].delete_image(self.__class__.image_id)
+#
+# self.assertIsInstance(image_id, (str, unicode))
+#
+# def test_030_delete_image_negative(self):
+# Non_exist_image_id = str(uuid.uuid4())
+#
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# with self.assertRaises(Exception) as context:
+# test_config["vim_conn"].delete_image(Non_exist_image_id)
+#
+# self.assertEqual((context.exception).http_code, 404)
- self.assertEqual((context.exception).http_code, 400)
+# class test_vimconn_get_image_id_from_path(test_base):
+#
+# def test_000_get_image_id_from_path(self):
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# image_path = test_config['image_path']
+# if image_path:
+# image_id = test_config["vim_conn"].get_image_id_from_path( image_path )
+# self.assertEqual(type(image_id),str)
+# else:
+# self.skipTest("Skipping test as image file not present at RO container")
+#
+# def test_010_get_image_id_from_path_negative(self):
+# Non_exist_image_path = '/temp1/cirros.ovf'
+#
+# self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+# self.__class__.test_index,
+# inspect.currentframe().f_code.co_name)
+# self.__class__.test_index += 1
+#
+# with self.assertRaises(Exception) as context:
+# test_config["vim_conn"].new_image({ 'name': 'TestImage', 'location' : Non_exist_image_path })
+#
+# self.assertEqual((context.exception).http_code, 400)
class test_vimconn_get_image_list(test_base):
image_name = None
self.__class__.network_name = _get_random_string(20)
self.__class__.net_type = 'bridge'
- self.__class__.network_id = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
+ self.__class__.network_id, _ = test_config["vim_conn"].new_network(net_name=self.__class__.network_name,
net_type=self.__class__.net_type)
# find image name and image id
if test_config['image_name']:
network_name = _get_random_string(20)
net_type = 'data'
- network_id = test_config["vim_conn"].new_network(net_name=network_name,
+ network_id, _ = test_config["vim_conn"].new_network(net_name=network_name,
net_type=net_type)
net_list = [{'use': net_type, 'name': name, 'floating_ip': False, 'port_security': True,
'type': _type, 'net_id': network_id}]
# create network
self.network_name = _get_random_string(20)
- self.network_id = test_config["vim_conn"].new_network(net_name=self.network_name,
+ self.network_id, _ = test_config["vim_conn"].new_network(net_name=self.network_name,
net_type='bridge')
def tearDown(self):
i = 0
for i in range(10):
self.network_name = _get_random_string(20)
- network_id = test_config["vim_conn"].new_network(net_name=self.network_name,
+ network_id, _ = test_config["vim_conn"].new_network(net_name=self.network_name,
net_type='bridge')
self.net_ids.append(network_id)
def setUp(self):
# create network
self.network_name = _get_random_string(20)
- self.network_id = test_config["vim_conn"].new_network(net_name=self.network_name,
+ self.network_id, _ = test_config["vim_conn"].new_network(net_name=self.network_name,
net_type='bridge')
def tearDown(self):
def setUp(self):
# create network
self.network_name = _get_random_string(20)
- self.network_id = test_config["vim_conn"].new_network(net_name=self.network_name,
+ self.network_id, _ = test_config["vim_conn"].new_network(net_name=self.network_name,
net_type='bridge')
def tearDown(self):
def setUp(self):
# create network
self.network_name = _get_random_string(20)
- self.network_id = test_config["vim_conn"].new_network(net_name=self.network_name,
+ self.network_id, _ = test_config["vim_conn"].new_network(net_name=self.network_name,
net_type='bridge')
def tearDown(self):