Commit eea641f2 authored by Spiros Koulouzis's avatar Spiros Koulouzis

disable tests

parent 268ca72f
This diff is collapsed.
......@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (deployer)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.6 (deployer)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (deployer)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (deployer)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
......@@ -23,32 +23,32 @@ class TestDeployer(unittest.TestCase):
out = file.read()
token = ansible_service.parse_dashboard_tokens(out)
def test(self):
logger = logging.getLogger(__name__)
tosca_path = "../../TOSCA/"
input_tosca_file_path = tosca_path + '/message_example_provisioned.json'
if not os.path.exists(input_tosca_file_path):
tosca_path = "../TOSCA/"
input_tosca_file_path = tosca_path + '/message_example_provisioned.json'
with open(input_tosca_file_path, 'r') as stream:
parsed_json_message = json.load(stream)
# parsed_json_message = json.loads(message)
owner = parsed_json_message['owner']
tosca_file_name = 'tosca_template'
tosca_template_json = parsed_json_message['toscaTemplate']
interfaces = tosca.get_interfaces(tosca_template_json)
tmp_path = tempfile.mkdtemp()
vms = tosca.get_vms(tosca_template_json)
inventory_path = ansible_service.write_inventory_file(tmp_path, vms)
paths = ansible_service.write_playbooks_from_tosca_interface(interfaces, tmp_path)
# def test(self):
# logger = logging.getLogger(__name__)
# tosca_path = "../../TOSCA/"
# input_tosca_file_path = tosca_path + '/message_example_provisioned.json'
# if not os.path.exists(input_tosca_file_path):
# tosca_path = "../TOSCA/"
# input_tosca_file_path = tosca_path + '/message_example_provisioned.json'
#
# with open(input_tosca_file_path, 'r') as stream:
# parsed_json_message = json.load(stream)
#
# # parsed_json_message = json.loads(message)
# owner = parsed_json_message['owner']
# tosca_file_name = 'tosca_template'
# tosca_template_json = parsed_json_message['toscaTemplate']
#
# interfaces = tosca.get_interfaces(tosca_template_json)
# tmp_path = tempfile.mkdtemp()
# vms = tosca.get_vms(tosca_template_json)
# inventory_path = ansible_service.write_inventory_file(tmp_path, vms)
# paths = ansible_service.write_playbooks_from_tosca_interface(interfaces, tmp_path)
# for playbook_path in paths:
# out,err = ansible_service.run(inventory_path,playbook_path)
# api_key, join_token, discovery_token_ca_cert_hash = ansible_service.parse_tokens(out.decode("utf-8"))
ansible_playbook_path = k8s_service.write_ansible_k8s_files(tosca_template_json, tmp_path)
# ansible_playbook_path = k8s_service.write_ansible_k8s_files(tosca_template_json, tmp_path)
# out, err = ansible_service.run(inventory_path, ansible_playbook_path)
......
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