Commit eea641f2 authored by Spiros Koulouzis's avatar Spiros Koulouzis

disable tests

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