[1/5] incubator-ariatosca git commit: ARIA-208 Fix models relationships [Forced Update!]

2017-05-24 Thread avia
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-180-convert-parameter-to-one-to-many de48d9989 -> 7b1a6a0a7 
(forced update)


ARIA-208 Fix models relationships


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5798bbfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5798bbfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5798bbfc

Branch: refs/heads/ARIA-180-convert-parameter-to-one-to-many
Commit: 5798bbfc7d1a95965a4c44d2ebad5dad245c824a
Parents: 78d6019
Author: Ran Ziv 
Authored: Sun May 7 14:58:46 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 22 15:17:21 2017 +0300

--
 aria/modeling/service_template.py | 49 --
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5798bbfc/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index 1eb95a3..12195a1 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -211,10 +211,6 @@ class ServiceTemplateBase(TemplateModelMixin):
 return relationship.one_to_many(cls, 'service', dict_key='name')
 
 @declared_attr
-def operation_templates(cls):
-return relationship.one_to_many(cls, 'operation_template')
-
-@declared_attr
 def node_templates(cls):
 return relationship.one_to_many(cls, 'node_template', dict_key='name')
 
@@ -483,6 +479,22 @@ class NodeTemplateBase(TemplateModelMixin):
 def nodes(cls):
 return relationship.one_to_many(cls, 'node')
 
+@declared_attr
+def interface_templates(cls):
+return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
+
+@declared_attr
+def artifact_templates(cls):
+return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
+
+@declared_attr
+def capability_templates(cls):
+return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
+
+@declared_attr
+def requirement_templates(cls):
+return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
+
 # endregion
 
 # region many_to_one relationships
@@ -507,22 +519,6 @@ class NodeTemplateBase(TemplateModelMixin):
 def attributes(cls):
 return relationship.many_to_many(cls, 'parameter', 
prefix='attributes', dict_key='name')
 
-@declared_attr
-def interface_templates(cls):
-return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
-
-@declared_attr
-def artifact_templates(cls):
-return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
-
-@declared_attr
-def capability_templates(cls):
-return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
-
-@declared_attr
-def requirement_templates(cls):
-return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
-
 # endregion
 
 description = Column(Text)
@@ -1209,11 +1205,6 @@ class RequirementTemplateBase(TemplateModelMixin):
 def relationships(cls):
 return relationship.one_to_many(cls, 'relationship')
 
-@declared_attr
-def target_node_type(cls):
-return relationship.many_to_one(
-cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
-
 # endregion
 
 # region many_to_one relationships
@@ -1222,6 +1213,11 @@ class RequirementTemplateBase(TemplateModelMixin):
 def node_template(cls):
 return relationship.many_to_one(cls, 'node_template', 
fk='node_template_fk')
 
+@declared_attr
+def target_node_type(cls):
+return relationship.many_to_one(
+cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
+
 # endregion
 
 # region many_to_many relationships
@@ -1845,7 +1841,8 @@ class OperationTemplateBase(TemplateModelMixin):
 
 @declared_attr
 def service_template(cls):
-return relationship.many_to_one(cls, 'service_template')
+return relationship.many_to_one(cls, 'service_template',
+back_populates='workflow_templates')
 
 @declared_attr
 def interface_template(cls):



[1/4] incubator-ariatosca git commit: ARIA-208 Fix models relationships [Forced Update!]

2017-05-22 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration b1c97e244 -> 
84d8da592 (forced update)


ARIA-208 Fix models relationships


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5798bbfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5798bbfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5798bbfc

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 5798bbfc7d1a95965a4c44d2ebad5dad245c824a
Parents: 78d6019
Author: Ran Ziv 
Authored: Sun May 7 14:58:46 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 22 15:17:21 2017 +0300

--
 aria/modeling/service_template.py | 49 --
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5798bbfc/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index 1eb95a3..12195a1 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -211,10 +211,6 @@ class ServiceTemplateBase(TemplateModelMixin):
 return relationship.one_to_many(cls, 'service', dict_key='name')
 
 @declared_attr
-def operation_templates(cls):
-return relationship.one_to_many(cls, 'operation_template')
-
-@declared_attr
 def node_templates(cls):
 return relationship.one_to_many(cls, 'node_template', dict_key='name')
 
@@ -483,6 +479,22 @@ class NodeTemplateBase(TemplateModelMixin):
 def nodes(cls):
 return relationship.one_to_many(cls, 'node')
 
+@declared_attr
+def interface_templates(cls):
+return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
+
+@declared_attr
+def artifact_templates(cls):
+return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
+
+@declared_attr
+def capability_templates(cls):
+return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
+
+@declared_attr
+def requirement_templates(cls):
+return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
+
 # endregion
 
 # region many_to_one relationships
@@ -507,22 +519,6 @@ class NodeTemplateBase(TemplateModelMixin):
 def attributes(cls):
 return relationship.many_to_many(cls, 'parameter', 
prefix='attributes', dict_key='name')
 
-@declared_attr
-def interface_templates(cls):
-return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
-
-@declared_attr
-def artifact_templates(cls):
-return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
-
-@declared_attr
-def capability_templates(cls):
-return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
-
-@declared_attr
-def requirement_templates(cls):
-return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
-
 # endregion
 
 description = Column(Text)
@@ -1209,11 +1205,6 @@ class RequirementTemplateBase(TemplateModelMixin):
 def relationships(cls):
 return relationship.one_to_many(cls, 'relationship')
 
-@declared_attr
-def target_node_type(cls):
-return relationship.many_to_one(
-cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
-
 # endregion
 
 # region many_to_one relationships
@@ -1222,6 +1213,11 @@ class RequirementTemplateBase(TemplateModelMixin):
 def node_template(cls):
 return relationship.many_to_one(cls, 'node_template', 
fk='node_template_fk')
 
+@declared_attr
+def target_node_type(cls):
+return relationship.many_to_one(
+cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
+
 # endregion
 
 # region many_to_many relationships
@@ -1845,7 +1841,8 @@ class OperationTemplateBase(TemplateModelMixin):
 
 @declared_attr
 def service_template(cls):
-return relationship.many_to_one(cls, 'service_template')
+return relationship.many_to_one(cls, 'service_template',
+back_populates='workflow_templates')
 
 @declared_attr
 def interface_template(cls):



incubator-ariatosca git commit: ARIA-208 Fix models relationships [Forced Update!]

2017-05-22 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-208-Missing-back-refrences-for-models 890a2a4a2 -> d1628c395 
(forced update)


ARIA-208 Fix models relationships


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d1628c39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d1628c39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d1628c39

Branch: refs/heads/ARIA-208-Missing-back-refrences-for-models
Commit: d1628c39558c57f8889e8fef57a4b6a28ff32e77
Parents: 8553977
Author: Ran Ziv 
Authored: Sun May 7 14:58:46 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 22 15:14:47 2017 +0300

--
 aria/modeling/service_template.py | 49 --
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d1628c39/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index 7fab4fc..644b8f4 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -210,10 +210,6 @@ class ServiceTemplateBase(TemplateModelMixin):
 return relationship.one_to_many(cls, 'service')
 
 @declared_attr
-def operation_templates(cls):
-return relationship.one_to_many(cls, 'operation_template')
-
-@declared_attr
 def node_templates(cls):
 return relationship.one_to_many(cls, 'node_template', dict_key='name')
 
@@ -482,6 +478,22 @@ class NodeTemplateBase(TemplateModelMixin):
 def nodes(cls):
 return relationship.one_to_many(cls, 'node')
 
+@declared_attr
+def interface_templates(cls):
+return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
+
+@declared_attr
+def artifact_templates(cls):
+return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
+
+@declared_attr
+def capability_templates(cls):
+return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
+
+@declared_attr
+def requirement_templates(cls):
+return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
+
 # endregion
 
 # region many_to_one relationships
@@ -502,22 +514,6 @@ class NodeTemplateBase(TemplateModelMixin):
 def properties(cls):
 return relationship.many_to_many(cls, 'parameter', 
prefix='properties', dict_key='name')
 
-@declared_attr
-def interface_templates(cls):
-return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
-
-@declared_attr
-def artifact_templates(cls):
-return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
-
-@declared_attr
-def capability_templates(cls):
-return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
-
-@declared_attr
-def requirement_templates(cls):
-return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
-
 # endregion
 
 description = Column(Text)
@@ -1190,11 +1186,6 @@ class RequirementTemplateBase(TemplateModelMixin):
 def relationships(cls):
 return relationship.one_to_many(cls, 'relationship')
 
-@declared_attr
-def target_node_type(cls):
-return relationship.many_to_one(
-cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
-
 # endregion
 
 # region many_to_one relationships
@@ -1203,6 +1194,11 @@ class RequirementTemplateBase(TemplateModelMixin):
 def node_template(cls):
 return relationship.many_to_one(cls, 'node_template', 
fk='node_template_fk')
 
+@declared_attr
+def target_node_type(cls):
+return relationship.many_to_one(
+cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
+
 # endregion
 
 # region many_to_many relationships
@@ -1826,7 +1822,8 @@ class OperationTemplateBase(TemplateModelMixin):
 
 @declared_attr
 def service_template(cls):
-return relationship.many_to_one(cls, 'service_template')
+return relationship.many_to_one(cls, 'service_template',
+back_populates='workflow_templates')
 
 @declared_attr
 def interface_template(cls):