Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
d66cbacd
Commit
d66cbacd
authored
Jan 27, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change defaults
parent
81b15835
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
15 deletions
+24
-15
nodes.yaml
TOSCA/types/nodes.yaml
+3
-3
workspace.xml
drip-planner/.idea/workspace.xml
+11
-1
__init__.py
sure_tosca-flask-server/sure_tosca/models/__init__.py
+1
-0
node_template.py
sure_tosca-flask-server/sure_tosca/models/node_template.py
+1
-3
topology_template.py
...tosca-flask-server/sure_tosca/models/topology_template.py
+2
-2
tosca_template.py
sure_tosca-flask-server/sure_tosca/models/tosca_template.py
+1
-1
tosca_template_service.py
...flask-server/sure_tosca/service/tosca_template_service.py
+2
-2
test_default_controller.py
...a-flask-server/sure_tosca/test/test_default_controller.py
+1
-1
test-requirements.txt
sure_tosca-flask-server/test-requirements.txt
+2
-2
No files found.
TOSCA/types/nodes.yaml
View file @
d66cbacd
...
@@ -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
:
"
E
C2
"
default
:
"
E
xoGENI
"
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
...
...
drip-planner/.idea/workspace.xml
View file @
d66cbacd
<?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"
/>
...
...
sure_tosca-flask-server/sure_tosca/models/__init__.py
View file @
d66cbacd
...
@@ -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
sure_tosca-flask-server/sure_tosca/models/node_template.py
View file @
d66cbacd
...
@@ -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: NodeTemplate
Model
"""
"""
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.
...
...
sure_tosca-flask-server/sure_tosca/models/topology_template.py
View file @
d66cbacd
...
@@ -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: TopologyTemplate
Model
"""
"""
return
util
.
deserialize_model
(
dikt
,
cls
)
return
util
.
deserialize_model
(
dikt
,
cls
)
...
...
sure_tosca-flask-server/sure_tosca/models/tosca_template.py
View file @
d66cbacd
...
@@ -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
):
...
...
sure_tosca-flask-server/sure_tosca/service/tosca_template_service.py
View file @
d66cbacd
...
@@ -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
))
...
...
sure_tosca-flask-server/sure_tosca/test/test_default_controller.py
View file @
d66cbacd
...
@@ -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/"
...
...
sure_tosca-flask-server/test-requirements.txt
View file @
d66cbacd
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment