Exemplo n.º 1
0
 def test_add_resources_tpl_for_flavor(self):
     dummy_heat_dict = yaml.safe_load(_get_template(
         'hot_flavor_and_capabilities.yaml'))
     expected_dict = yaml.safe_load(_get_template('hot_flavor.yaml'))
     dummy_heat_res = {
         "flavor": {
             "VDU1": {
                 "vcpus": 2,
                 "ram": 512,
                 "disk": 10
             }
         }
     }
     toscautils.add_resources_tpl(dummy_heat_dict, dummy_heat_res)
     self.assertEqual(expected_dict, dummy_heat_dict)
Exemplo n.º 2
0
 def test_add_resources_tpl_for_flavor(self):
     dummy_heat_dict = yaml.load(_get_template(
         'hot_flavor_and_capabilities.yaml'))
     expected_dict = yaml.load(_get_template('hot_flavor.yaml'))
     dummy_heat_res = {
         "flavor": {
             "VDU1": {
                 "vcpus": 2,
                 "ram": 512,
                 "disk": 10
             }
         }
     }
     toscautils.add_resources_tpl(dummy_heat_dict, dummy_heat_res)
     self.assertEqual(expected_dict, dummy_heat_dict)
Exemplo n.º 3
0
 def test_add_resources_tpl_for_image(self):
     dummy_heat_dict = yaml.safe_load(_get_template(
         'hot_image_before_processed_image.yaml'))
     expected_dict = yaml.safe_load(_get_template(
         'hot_image_after_processed_image.yaml'))
     dummy_heat_res = {
         "image": {
             "VDU1": {
                 "location": "http://URL/v1/openwrt.qcow2",
                 "container_format": "bare",
                 "disk_format": "raw"
             }
         }
     }
     toscautils.add_resources_tpl(dummy_heat_dict, dummy_heat_res)
     self.assertEqual(expected_dict, dummy_heat_dict)
Exemplo n.º 4
0
 def test_add_resources_tpl_for_image(self):
     dummy_heat_dict = yaml.load(_get_template(
         'hot_image_before_processed_image.yaml'))
     expected_dict = yaml.load(_get_template(
         'hot_image_after_processed_image.yaml'))
     dummy_heat_res = {
         "image": {
             "VDU1": {
                 "location": "http://URL/v1/openwrt.qcow2",
                 "container_format": "bare",
                 "disk_format": "raw"
             }
         }
     }
     toscautils.add_resources_tpl(dummy_heat_dict, dummy_heat_res)
     self.assertEqual(expected_dict, dummy_heat_dict)