Commit f77f926b authored by Spiros Koulouzis's avatar Spiros Koulouzis

renamed Orchestrator type

parent 66eecd36
...@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0 ...@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
capability_types: capability_types:
tosca.capabilities.ARTICONF.Orchestrator: tosca.capabilities.ARTICONF.docker.Orchestrator:
derived_from: tosca.capabilities.Container derived_from: tosca.capabilities.Container
properties: properties:
some_properties: some_properties:
......
...@@ -26,36 +26,10 @@ def get_tosca_files_path(file_name): ...@@ -26,36 +26,10 @@ def get_tosca_files_path(file_name):
class MyTestCase(unittest.TestCase): class MyTestCase(unittest.TestCase):
# def test_planner1(self): def test_planner1(self):
# logger = logging.getLogger(__name__)
#
# input_tosca_file_path = get_tosca_files_path('application_example_updated.yaml')
#
# self.assertEqual(True, os.path.exists(input_tosca_file_path),
# "Input TOSCA file: " + input_tosca_file_path + " not found")
#
# conf = {'url': "http://host"}
# spec_service = SpecService(conf)
# test_planner = Planner(input_tosca_file_path, spec_service)
# test_tosca_template = test_planner.resolve_requirements()
# test_tosca_template = test_planner.set_infrastructure_specifications()
# template_dict = tosca_helper.get_tosca_template_2_topology_template_dictionary(test_tosca_template)
# logger.info("template ----: \n" + yaml.dump(template_dict))
# ToscaTemplate(yaml_dict_tpl=copy.deepcopy(template_dict))
#
# test_response = {'toscaTemplate': template_dict}
#
# response = {'toscaTemplate': template_dict}
# output_current_milli_time = int(round(time.time() * 1000))
# response["creationDate"] = output_current_milli_time
# response["parameters"] = []
# print("Output message:" + json.dumps(response))
# self.assertEqual(True, True)
def test_planner_policies(self):
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
input_tosca_file_path = get_tosca_files_path('lifeWatch_vre1.yaml') input_tosca_file_path = get_tosca_files_path('application_example_updated.yaml')
self.assertEqual(True, os.path.exists(input_tosca_file_path), self.assertEqual(True, os.path.exists(input_tosca_file_path),
"Input TOSCA file: " + input_tosca_file_path + " not found") "Input TOSCA file: " + input_tosca_file_path + " not found")
...@@ -67,7 +41,6 @@ class MyTestCase(unittest.TestCase): ...@@ -67,7 +41,6 @@ class MyTestCase(unittest.TestCase):
test_tosca_template = test_planner.set_infrastructure_specifications() test_tosca_template = test_planner.set_infrastructure_specifications()
template_dict = tosca_helper.get_tosca_template_2_topology_template_dictionary(test_tosca_template) template_dict = tosca_helper.get_tosca_template_2_topology_template_dictionary(test_tosca_template)
logger.info("template ----: \n" + yaml.dump(template_dict)) logger.info("template ----: \n" + yaml.dump(template_dict))
print(yaml.dump(template_dict))
ToscaTemplate(yaml_dict_tpl=copy.deepcopy(template_dict)) ToscaTemplate(yaml_dict_tpl=copy.deepcopy(template_dict))
test_response = {'toscaTemplate': template_dict} test_response = {'toscaTemplate': template_dict}
...@@ -76,6 +49,33 @@ class MyTestCase(unittest.TestCase): ...@@ -76,6 +49,33 @@ class MyTestCase(unittest.TestCase):
output_current_milli_time = int(round(time.time() * 1000)) output_current_milli_time = int(round(time.time() * 1000))
response["creationDate"] = output_current_milli_time response["creationDate"] = output_current_milli_time
response["parameters"] = [] response["parameters"] = []
# print("Output message:" + json.dumps(response)) print("Output message:" + json.dumps(response))
self.assertEqual(True, True) self.assertEqual(True, True)
# def test_planner_policies(self):
# logger = logging.getLogger(__name__)
#
# input_tosca_file_path = get_tosca_files_path('lifeWatch_vre1.yaml')
#
# self.assertEqual(True, os.path.exists(input_tosca_file_path),
# "Input TOSCA file: " + input_tosca_file_path + " not found")
#
# conf = {'url': "http://host"}
# spec_service = SpecService(conf)
# test_planner = Planner(input_tosca_file_path, spec_service)
# test_tosca_template = test_planner.resolve_requirements()
# test_tosca_template = test_planner.set_infrastructure_specifications()
# template_dict = tosca_helper.get_tosca_template_2_topology_template_dictionary(test_tosca_template)
# logger.info("template ----: \n" + yaml.dump(template_dict))
# print(yaml.dump(template_dict))
# ToscaTemplate(yaml_dict_tpl=copy.deepcopy(template_dict))
#
# test_response = {'toscaTemplate': template_dict}
#
# response = {'toscaTemplate': template_dict}
# output_current_milli_time = int(round(time.time() * 1000))
# response["creationDate"] = output_current_milli_time
# response["parameters"] = []
# # print("Output message:" + json.dumps(response))
#
# self.assertEqual(True, True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment