Commit d66cbacd authored by Spiros Koulouzis's avatar Spiros Koulouzis

change defaults

parent 81b15835
...@@ -112,12 +112,12 @@ node_types: ...@@ -112,12 +112,12 @@ node_types:
domain: domain:
type: string type: string
required: true required: true
default: "Frankfurt" default: "UvA (Amsterdam, The Netherlands) XO Rack"
description: the domain of this topology e.g. California, UvA (Amsterdam, The Netherlands) XO Rack, etc description: the domain of this topology e.g. California, UvA (Amsterdam, The Netherlands) XO Rack, Frankfurt, etc
provider: provider:
type: string type: string
required: true required: true
default: "EC2" default: "ExoGENI"
description: The name of the provider e.g. EC2, ExoGENI etc. description: The name of the provider e.g. EC2, ExoGENI etc.
coordinates: coordinates:
type: tosca.datatypes.ARTICONF.coordinates type: tosca.datatypes.ARTICONF.coordinates
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="" /> <list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/../TOSCA/application_example_updated.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/../TOSCA/application_example_updated.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/node_template.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/node_template.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/topology_template.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/topology_template.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/tosca_template.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/models/tosca_template.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/service/tosca_template_service.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/service/tosca_template_service.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/test/test_default_controller.py" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/sure_tosca/test/test_default_controller.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/test-requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/test-requirements.txt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
......
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
from __future__ import absolute_import from __future__ import absolute_import
# import models into model package # import models into model package
from sure_tosca.models.node_template import NodeTemplateModel from sure_tosca.models.node_template import NodeTemplateModel
from sure_tosca.models.node_template_map import NodeTemplateMapModel
from sure_tosca.models.topology_template import TopologyTemplateModel from sure_tosca.models.topology_template import TopologyTemplateModel
from sure_tosca.models.tosca_template import ToscaTemplateModel from sure_tosca.models.tosca_template import ToscaTemplateModel
...@@ -83,12 +83,10 @@ class NodeTemplateModel(Model): ...@@ -83,12 +83,10 @@ class NodeTemplateModel(Model):
:param dikt: A dict. :param dikt: A dict.
:type: dict :type: dict
:return: The NodeTemplate of this NodeTemplate. # noqa: E501 :return: The NodeTemplate of this NodeTemplate. # noqa: E501
:rtype: NodeTemplate :rtype: NodeTemplateModel
""" """
return util.deserialize_model(dikt, cls) return util.deserialize_model(dikt, cls)
@property @property
def derived_from(self): def derived_from(self):
"""Gets the derived_from of this NodeTemplate. """Gets the derived_from of this NodeTemplate.
......
...@@ -5,9 +5,9 @@ from datetime import date, datetime # noqa: F401 ...@@ -5,9 +5,9 @@ from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401 from typing import List, Dict # noqa: F401
from sure_tosca.models import NodeTemplateModel
from sure_tosca.models.base_model_ import Model from sure_tosca.models.base_model_ import Model
from sure_tosca import util from sure_tosca import util
from sure_tosca.models.node_template import NodeTemplateModel
class TopologyTemplateModel(Model): class TopologyTemplateModel(Model):
...@@ -74,7 +74,7 @@ class TopologyTemplateModel(Model): ...@@ -74,7 +74,7 @@ class TopologyTemplateModel(Model):
:param dikt: A dict. :param dikt: A dict.
:type: dict :type: dict
:return: The TopologyTemplate of this TopologyTemplate. # noqa: E501 :return: The TopologyTemplate of this TopologyTemplate. # noqa: E501
:rtype: TopologyTemplate :rtype: TopologyTemplateModel
""" """
return util.deserialize_model(dikt, cls) return util.deserialize_model(dikt, cls)
......
...@@ -5,9 +5,9 @@ from datetime import date, datetime # noqa: F401 ...@@ -5,9 +5,9 @@ from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401 from typing import List, Dict # noqa: F401
from sure_tosca.models import TopologyTemplateModel
from sure_tosca.models.base_model_ import Model from sure_tosca.models.base_model_ import Model
from sure_tosca import util from sure_tosca import util
from sure_tosca.models.topology_template import TopologyTemplateModel
class ToscaTemplateModel(Model): class ToscaTemplateModel(Model):
......
...@@ -104,8 +104,8 @@ def save(file): ...@@ -104,8 +104,8 @@ def save(file):
logger.info("Got request for tosca template") logger.info("Got request for tosca template")
purge_all_tables() purge_all_tables()
# dictionary = yaml.safe_load(file.stream) dictionary = yaml.safe_load(file.stream)
dictionary = yaml.load(file.stream) # dictionary = yaml.load(file.stream)
logger.info("tosca template: \n" + str(yaml.dump(dictionary))) logger.info("tosca template: \n" + str(yaml.dump(dictionary)))
# print(yaml.dump(dictionary)) # print(yaml.dump(dictionary))
tosca_template = ToscaTemplate(yaml_dict_tpl=copy.deepcopy(dictionary)) tosca_template = ToscaTemplate(yaml_dict_tpl=copy.deepcopy(dictionary))
......
...@@ -318,7 +318,7 @@ class TestDefaultController(BaseTestCase): ...@@ -318,7 +318,7 @@ class TestDefaultController(BaseTestCase):
def upload_file(self): def upload_file(self):
tosca_path = "../../../TOSCA/" tosca_path = "../../../TOSCA/"
file_name = 'application_example_updated.yaml' # 'application_example_2_topologies.yaml' file_name = 'application_example_2_topologies.yaml' #'application_example_updated.yaml' # 'application_example_2_topologies.yaml'
input_tosca_file_path = tosca_path + '/' + file_name input_tosca_file_path = tosca_path + '/' + file_name
if not os.path.exists(input_tosca_file_path): if not os.path.exists(input_tosca_file_path):
tosca_path = "../TOSCA/" tosca_path = "../TOSCA/"
......
wheel==0.33.6 wheel==0.33.6
flask-testing==0.7.1 flask-testing==0.7.1
coverage==4.5.4 coverage==5.0.3
nose>=1.3.7 nose>=1.3.7
pluggy>=0.13.0 pluggy>=0.13.1
randomize>=0.14 randomize>=0.14
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