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
1a5b5b27
Commit
1a5b5b27
authored
Oct 31, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed serialization problem
parent
c4e39763
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
4 deletions
+28
-4
.requirements.txt.kate-swp
sure_tosca-flask-server/.requirements.txt.kate-swp
+0
-0
base_model_.py
sure_tosca-flask-server/sure_tosca/models/base_model_.py
+9
-0
node_template.py
sure_tosca-flask-server/sure_tosca/models/node_template.py
+2
-1
topology_template.py
...tosca-flask-server/sure_tosca/models/topology_template.py
+6
-1
tosca_template.py
sure_tosca-flask-server/sure_tosca/models/tosca_template.py
+11
-2
No files found.
sure_tosca-flask-server/.requirements.txt.kate-swp
deleted
100644 → 0
View file @
c4e39763
File deleted
sure_tosca-flask-server/sure_tosca/models/base_model_.py
View file @
1a5b5b27
...
...
@@ -64,3 +64,12 @@ class Model(object):
def
__ne__
(
self
,
other
):
"""Returns true if both objects are not equal"""
return
not
self
==
other
# def __hash__(self):
# return hash(self.__dict__.keys())
def
__key
(
self
):
return
tuple
(
sorted
(
self
.
to_dict
()))
def
__hash__
(
self
):
return
hash
(
self
.
__key
())
\ No newline at end of file
sure_tosca-flask-server/sure_tosca/models/node_template.py
View file @
1a5b5b27
...
...
@@ -15,7 +15,8 @@ class NodeTemplate(Model):
Do not edit the class manually.
"""
def
__init__
(
self
,
derived_from
=
None
,
properties
=
None
,
requirements
=
None
,
interfaces
=
None
,
capabilities
=
None
,
type
=
None
,
description
=
None
,
directives
=
None
,
attributes
=
None
,
artifacts
=
None
):
# noqa: E501
def
__init__
(
self
,
derived_from
=
None
,
properties
=
None
,
requirements
=
None
,
interfaces
=
None
,
capabilities
=
None
,
type
=
None
,
description
=
None
,
directives
=
None
,
attributes
=
None
,
artifacts
=
None
):
# noqa: E501
"""NodeTemplate - a model defined in Swagger
:param derived_from: The derived_from of this NodeTemplate. # noqa: E501
...
...
sure_tosca-flask-server/sure_tosca/models/topology_template.py
View file @
1a5b5b27
...
...
@@ -3,9 +3,9 @@
from
__future__
import
absolute_import
from
datetime
import
date
,
datetime
# noqa: F401
from
toscaparser.nodetemplate
import
NodeTemplate
from
typing
import
List
,
Dict
# noqa: F401
from
sure_tosca.models
import
NodeTemplate
from
sure_tosca.models.base_model_
import
Model
from
sure_tosca
import
util
...
...
@@ -245,3 +245,8 @@ class TopologyTemplate(Model):
"""
self
.
_policies
=
policies
def
__eq__
(
self
,
other
):
if
isinstance
(
other
,
TopologyTemplate
):
return
self
.
__key
()
==
other
.
__key
()
return
NotImplemented
\ No newline at end of file
sure_tosca-flask-server/sure_tosca/models/tosca_template.py
View file @
1a5b5b27
...
...
@@ -3,9 +3,9 @@
from
__future__
import
absolute_import
from
datetime
import
date
,
datetime
# noqa: F401
from
toscaparser.topology_template
import
TopologyTemplate
from
typing
import
List
,
Dict
# noqa: F401
from
sure_tosca.models
import
TopologyTemplate
from
sure_tosca.models.base_model_
import
Model
from
sure_tosca
import
util
...
...
@@ -16,7 +16,11 @@ class ToscaTemplate(Model):
Do not edit the class manually.
"""
def
__init__
(
self
,
tosca_definitions_version
=
None
,
tosca_default_namespace
=
None
,
template_name
=
None
,
topology_template
=
None
,
template_author
=
None
,
template_version
=
None
,
description
=
None
,
imports
=
None
,
dsl_definitions
=
None
,
node_types
=
None
,
relationship_types
=
None
,
relationship_templates
=
None
,
capability_types
=
None
,
artifact_types
=
None
,
data_types
=
None
,
interface_types
=
None
,
policy_types
=
None
,
group_types
=
None
,
repositories
=
None
):
# noqa: E501
def
__init__
(
self
,
tosca_definitions_version
=
None
,
tosca_default_namespace
=
None
,
template_name
=
None
,
topology_template
=
None
,
template_author
=
None
,
template_version
=
None
,
description
=
None
,
imports
=
None
,
dsl_definitions
=
None
,
node_types
=
None
,
relationship_types
=
None
,
relationship_templates
=
None
,
capability_types
=
None
,
artifact_types
=
None
,
data_types
=
None
,
interface_types
=
None
,
policy_types
=
None
,
group_types
=
None
,
repositories
=
None
):
# noqa: E501
"""ToscaTemplate - a model defined in Swagger
:param tosca_definitions_version: The tosca_definitions_version of this ToscaTemplate. # noqa: E501
...
...
@@ -531,3 +535,8 @@ class ToscaTemplate(Model):
"""
self
.
_repositories
=
repositories
def
__eq__
(
self
,
other
):
if
isinstance
(
other
,
ToscaTemplate
):
return
self
.
__key
()
==
other
.
__key
()
return
NotImplemented
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