[2/5] incubator-ariatosca git commit: Initial refactoring (mostly broken)

2017-02-17 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/storage/modeling/structure.py
--
diff --git a/aria/storage/modeling/structure.py 
b/aria/storage/modeling/structure.py
deleted file mode 100644
index eacdb44..000
--- a/aria/storage/modeling/structure.py
+++ /dev/null
@@ -1,320 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""
-Aria's storage.structures module
-Path: aria.storage.structures
-
-models module holds aria's models.
-
-classes:
-* Field - represents a single field.
-* IterField - represents an iterable field.
-* PointerField - represents a single pointer field.
-* IterPointerField - represents an iterable pointers field.
-* Model - abstract model implementation.
-"""
-
-from sqlalchemy.orm import relationship, backref
-from sqlalchemy.ext import associationproxy
-from sqlalchemy import (
-Column,
-ForeignKey,
-Integer,
-Text,
-Table,
-)
-
-from . import utils
-
-
-class Function(object):
-"""
-An intrinsic function.
-
-Serves as a placeholder for a value that should eventually be derived
-by calling the function.
-"""
-
-@property
-def as_raw(self):
-raise NotImplementedError
-
-def _evaluate(self, context, container):
-raise NotImplementedError
-
-def __deepcopy__(self, memo):
-# Circumvent cloning in order to maintain our state
-return self
-
-
-class ElementBase(object):
-"""
-Base class for :class:`ServiceInstance` elements.
-
-All elements support validation, diagnostic dumping, and representation as
-raw data (which can be translated into JSON or YAML) via :code:`as_raw`.
-"""
-
-@property
-def as_raw(self):
-raise NotImplementedError
-
-def validate(self, context):
-pass
-
-def coerce_values(self, context, container, report_issues):
-pass
-
-def dump(self, context):
-pass
-
-
-class ModelElementBase(ElementBase):
-"""
-Base class for :class:`ServiceModel` elements.
-
-All model elements can be instantiated into :class:`ServiceInstance` 
elements.
-"""
-
-def instantiate(self, context, container):
-raise NotImplementedError
-
-
-class ModelMixin(ModelElementBase):
-
-@utils.classproperty
-def __modelname__(cls):
 # pylint: disable=no-self-argument
-return getattr(cls, '__mapiname__', cls.__tablename__)
-
-@classmethod
-def id_column_name(cls):
-raise NotImplementedError
-
-@classmethod
-def name_column_name(cls):
-raise NotImplementedError
-
-@classmethod
-def _get_cls_by_tablename(cls, tablename):
-"""Return class reference mapped to table.
-
- :param tablename: String with name of table.
- :return: Class reference or None.
- """
-if tablename in (cls.__name__, cls.__tablename__):
-return cls
-
-for table_cls in cls._decl_class_registry.values():
-if tablename == getattr(table_cls, '__tablename__', None):
-return table_cls
-
-@classmethod
-def foreign_key(cls, table_name, nullable=False):
-"""Return a ForeignKey object with the relevant
-
-:param table: Unique id column in the parent table
-:param nullable: Should the column be allowed to remain empty
-"""
-return Column(Integer,
-  
ForeignKey('{tablename}.id'.format(tablename=table_name), ondelete='CASCADE'),
-  nullable=nullable)
-
-@classmethod
-def one_to_one_relationship(cls, table_name, backreference=None):
-return relationship(lambda: cls._get_cls_by_tablename(table_name),
-backref=backref(backreference or 
cls.__tablename__, uselist=False))
-
-@classmethod
-def many_to_one_relationship(cls,
- parent_table_name,
- foreign_key_column=None,
- backreference=None,
- backref_kwargs=None,
- 

[5/5] incubator-ariatosca git commit: Initial refactoring (mostly broken)

2017-02-17 Thread emblemparade
Initial refactoring (mostly broken)


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

Branch: refs/heads/ARIA-105-integrate-modeling
Commit: 58e10523713f08b51181d84f4a303fbc15e23810
Parents: 787d7e7
Author: Tal Liron 
Authored: Fri Feb 17 16:00:40 2017 -0600
Committer: Tal Liron 
Committed: Fri Feb 17 16:00:40 2017 -0600

--
 aria/__init__.py|   68 +-
 aria/modeling/__init__.py   |   40 +
 aria/modeling/elements.py   |  107 ++
 aria/modeling/instance_elements.py  | 1286 
 aria/modeling/model.py  |  225 +++
 aria/modeling/orchestrator_elements.py  |  468 ++
 aria/modeling/structure.py  |  320 
 aria/modeling/template_elements.py  | 1396 ++
 aria/modeling/type.py   |  302 
 aria/modeling/utils.py  |  139 ++
 aria/orchestrator/workflows/api/task.py |2 +-
 aria/orchestrator/workflows/core/engine.py  |2 +-
 aria/orchestrator/workflows/core/task.py|2 +-
 aria/orchestrator/workflows/executor/process.py |2 +-
 aria/parser/modeling/storage.py |2 +-
 aria/storage/__init__.py|   10 -
 aria/storage/instrumentation.py |2 +-
 aria/storage/modeling/__init__.py   |   35 -
 aria/storage/modeling/elements.py   |  106 --
 aria/storage/modeling/instance_elements.py  | 1286 
 aria/storage/modeling/model.py  |  219 ---
 aria/storage/modeling/orchestrator_elements.py  |  468 --
 aria/storage/modeling/structure.py  |  320 
 aria/storage/modeling/template_elements.py  | 1387 -
 aria/storage/modeling/type.py   |  302 
 aria/storage/modeling/utils.py  |  139 --
 .../simple_v1_0/modeling/__init__.py|   36 +-
 tests/mock/models.py|2 +-
 tests/orchestrator/workflows/api/test_task.py   |2 +-
 .../orchestrator/workflows/core/test_engine.py  |2 +-
 .../workflows/executor/test_executor.py |2 +-
 tests/storage/__init__.py   |4 +-
 tests/storage/test_model_storage.py |7 +-
 tests/storage/test_models.py|2 +-
 tests/storage/test_structures.py|4 +-
 35 files changed, 4359 insertions(+), 4337 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 18eaa56..568e04a 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -32,6 +32,7 @@ from . import (
 utils,
 parser,
 storage,
+modeling,
 orchestrator,
 cli
 )
@@ -62,42 +63,43 @@ def application_model_storage(api, api_kwargs=None, 
initiator=None, initiator_kw
 Initiate model storage
 """
 models_to_register = [
-storage.modeling.model.Parameter,
+modeling.model.Parameter,
+modeling.model.Metadata,
 
-storage.modeling.model.MappingTemplate,
-storage.modeling.model.SubstitutionTemplate,
-storage.modeling.model.ServiceTemplate,
-storage.modeling.model.NodeTemplate,
-storage.modeling.model.GroupTemplate,
-storage.modeling.model.InterfaceTemplate,
-storage.modeling.model.OperationTemplate,
-storage.modeling.model.ArtifactTemplate,
-storage.modeling.model.PolicyTemplate,
-storage.modeling.model.GroupPolicyTemplate,
-storage.modeling.model.GroupPolicyTriggerTemplate,
-storage.modeling.model.RequirementTemplate,
-storage.modeling.model.CapabilityTemplate,
+modeling.model.MappingTemplate,
+modeling.model.SubstitutionTemplate,
+modeling.model.ServiceTemplate,
+modeling.model.NodeTemplate,
+modeling.model.GroupTemplate,
+modeling.model.InterfaceTemplate,
+modeling.model.OperationTemplate,
+modeling.model.ArtifactTemplate,
+modeling.model.PolicyTemplate,
+modeling.model.GroupPolicyTemplate,
+modeling.model.GroupPolicyTriggerTemplate,
+modeling.model.RequirementTemplate,
+modeling.model.CapabilityTemplate,
 
-storage.modeling.model.Mapping,
-storage.modeling.model.Substitution,
-

[4/5] incubator-ariatosca git commit: Initial refactoring (mostly broken)

2017-02-17 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/modeling/structure.py
--
diff --git a/aria/modeling/structure.py b/aria/modeling/structure.py
new file mode 100644
index 000..eacdb44
--- /dev/null
+++ b/aria/modeling/structure.py
@@ -0,0 +1,320 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Aria's storage.structures module
+Path: aria.storage.structures
+
+models module holds aria's models.
+
+classes:
+* Field - represents a single field.
+* IterField - represents an iterable field.
+* PointerField - represents a single pointer field.
+* IterPointerField - represents an iterable pointers field.
+* Model - abstract model implementation.
+"""
+
+from sqlalchemy.orm import relationship, backref
+from sqlalchemy.ext import associationproxy
+from sqlalchemy import (
+Column,
+ForeignKey,
+Integer,
+Text,
+Table,
+)
+
+from . import utils
+
+
+class Function(object):
+"""
+An intrinsic function.
+
+Serves as a placeholder for a value that should eventually be derived
+by calling the function.
+"""
+
+@property
+def as_raw(self):
+raise NotImplementedError
+
+def _evaluate(self, context, container):
+raise NotImplementedError
+
+def __deepcopy__(self, memo):
+# Circumvent cloning in order to maintain our state
+return self
+
+
+class ElementBase(object):
+"""
+Base class for :class:`ServiceInstance` elements.
+
+All elements support validation, diagnostic dumping, and representation as
+raw data (which can be translated into JSON or YAML) via :code:`as_raw`.
+"""
+
+@property
+def as_raw(self):
+raise NotImplementedError
+
+def validate(self, context):
+pass
+
+def coerce_values(self, context, container, report_issues):
+pass
+
+def dump(self, context):
+pass
+
+
+class ModelElementBase(ElementBase):
+"""
+Base class for :class:`ServiceModel` elements.
+
+All model elements can be instantiated into :class:`ServiceInstance` 
elements.
+"""
+
+def instantiate(self, context, container):
+raise NotImplementedError
+
+
+class ModelMixin(ModelElementBase):
+
+@utils.classproperty
+def __modelname__(cls):
 # pylint: disable=no-self-argument
+return getattr(cls, '__mapiname__', cls.__tablename__)
+
+@classmethod
+def id_column_name(cls):
+raise NotImplementedError
+
+@classmethod
+def name_column_name(cls):
+raise NotImplementedError
+
+@classmethod
+def _get_cls_by_tablename(cls, tablename):
+"""Return class reference mapped to table.
+
+ :param tablename: String with name of table.
+ :return: Class reference or None.
+ """
+if tablename in (cls.__name__, cls.__tablename__):
+return cls
+
+for table_cls in cls._decl_class_registry.values():
+if tablename == getattr(table_cls, '__tablename__', None):
+return table_cls
+
+@classmethod
+def foreign_key(cls, table_name, nullable=False):
+"""Return a ForeignKey object with the relevant
+
+:param table: Unique id column in the parent table
+:param nullable: Should the column be allowed to remain empty
+"""
+return Column(Integer,
+  
ForeignKey('{tablename}.id'.format(tablename=table_name), ondelete='CASCADE'),
+  nullable=nullable)
+
+@classmethod
+def one_to_one_relationship(cls, table_name, backreference=None):
+return relationship(lambda: cls._get_cls_by_tablename(table_name),
+backref=backref(backreference or 
cls.__tablename__, uselist=False))
+
+@classmethod
+def many_to_one_relationship(cls,
+ parent_table_name,
+ foreign_key_column=None,
+ backreference=None,
+ backref_kwargs=None,
+ **kwargs):
+

[3/5] incubator-ariatosca git commit: Initial refactoring (mostly broken)

2017-02-17 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/orchestrator/workflows/executor/process.py
--
diff --git a/aria/orchestrator/workflows/executor/process.py 
b/aria/orchestrator/workflows/executor/process.py
index 560ac43..ec858ee 100644
--- a/aria/orchestrator/workflows/executor/process.py
+++ b/aria/orchestrator/workflows/executor/process.py
@@ -47,7 +47,7 @@ from aria.utils import imports
 from aria.utils import exceptions
 from aria.orchestrator.workflows.executor import base
 from aria.storage import instrumentation
-from aria.storage.modeling import type as storage_type
+from aria.modeling import type as storage_type
 
 _IS_WIN = os.name == 'nt'
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/parser/modeling/storage.py
--
diff --git a/aria/parser/modeling/storage.py b/aria/parser/modeling/storage.py
index ff1e536..a7230eb 100644
--- a/aria/parser/modeling/storage.py
+++ b/aria/parser/modeling/storage.py
@@ -21,7 +21,7 @@ into one package (aria.modeling?).
 from datetime import datetime
 from threading import RLock
 
-from ...storage.modeling import model
+from ...modeling import model
 from ...orchestrator.decorators import operation
 from ...utils.console import puts, Colored
 from ...utils.formatting import safe_repr

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/storage/__init__.py
--
diff --git a/aria/storage/__init__.py b/aria/storage/__init__.py
index eaadc7e..45af1be 100644
--- a/aria/storage/__init__.py
+++ b/aria/storage/__init__.py
@@ -42,12 +42,6 @@ from .core import (
 ModelStorage,
 ResourceStorage,
 )
-from .modeling import (
-structure,
-model,
-model_base,
-type
-)
 from . import (
 exceptions,
 api,
@@ -58,14 +52,10 @@ from . import (
 
 __all__ = (
 'exceptions',
-'structure',
 'Storage',
 'ModelStorage',
 'ResourceStorage',
 'filesystem_rapi',
 'sql_mapi',
 'api',
-'model',
-'model_base',
-'type',
 )

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/storage/instrumentation.py
--
diff --git a/aria/storage/instrumentation.py b/aria/storage/instrumentation.py
index 57fe9bd..82ac630 100644
--- a/aria/storage/instrumentation.py
+++ b/aria/storage/instrumentation.py
@@ -17,7 +17,7 @@ import copy
 
 import sqlalchemy.event
 
-from .modeling import model as _model
+from ..modeling import model as _model
 
 _STUB = object()
 _INSTRUMENTED = {

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/storage/modeling/__init__.py
--
diff --git a/aria/storage/modeling/__init__.py 
b/aria/storage/modeling/__init__.py
deleted file mode 100644
index 697ed09..000
--- a/aria/storage/modeling/__init__.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from collections import namedtuple
-
-from . import (
-model,
-instance_elements as _instance_base,
-orchestrator_elements as _orchestrator_base,
-template_elements as _template_base,
-)
-
-_ModelBaseCls = namedtuple('ModelBase', 'instance_elements,'
-'orchestrator_elements,'
-'template_elements')
-model_base = _ModelBaseCls(instance_elements=_instance_base,
-   orchestrator_elements=_orchestrator_base,
-   template_elements=_template_base)
-
-__all__ = (
-'model',
-'model_base',
-)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58e10523/aria/storage/modeling/elements.py
--
diff --git a/aria/storage/modeling/elements.py 
b/aria/storage/modeling/elements.py
deleted file mode 100644
index 8c720b9..000
--- a/aria/storage/modeling/elements.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# Licensed to the Apache 

[jira] [Commented] (ARIA-79) Handle attributes update concurrency issues

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872335#comment-15872335
 ] 

ASF subversion and git services commented on ARIA-79:
-

Commit 96581d9f9b00736d3c83ecda20d2e9f81073d4da in incubator-ariatosca's branch 
refs/heads/ARIA-79-concurrent-storage-modifications from [~d...@gigaspaces.com]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=96581d9 ]

ARIA-79-concurrent-modifications


> Handle attributes update concurrency issues
> ---
>
> Key: ARIA-79
> URL: https://issues.apache.org/jira/browse/ARIA-79
> Project: AriaTosca
>  Issue Type: Bug
>Reporter: Ran Ziv
>Assignee: Maxim Orlov
>
> Multiple operations may update a node instance's attributes / 
> runtime-properties concurrently, overriding one another's changes.
> Some form of versioning lock should be used to prevent this from happening.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ARIA-88) Add blueprint examples

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872333#comment-15872333
 ] 

ASF subversion and git services commented on ARIA-88:
-

Commit 787d7e7e6d210adba96dc0057fdf43f4c0034658 in incubator-ariatosca's branch 
refs/heads/ARIA-79-concurrent-storage-modifications from [~emblemparade]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=787d7e7 ]

ARIA-88 Add TOSCA use-case examples


> Add blueprint examples
> --
>
> Key: ARIA-88
> URL: https://issues.apache.org/jira/browse/ARIA-88
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Tal Liron
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[2/3] incubator-ariatosca git commit: ARIA-88 Add TOSCA use-case examples

2017-02-17 Thread mxmrlv
ARIA-88 Add TOSCA use-case examples


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

Branch: refs/heads/ARIA-79-concurrent-storage-modifications
Commit: 787d7e7e6d210adba96dc0057fdf43f4c0034658
Parents: b619335
Author: Tal Liron 
Authored: Wed Feb 15 12:48:56 2017 -0600
Committer: Tal Liron 
Committed: Thu Feb 16 08:49:52 2017 -0600

--
 MANIFEST.in |   1 +
 aria/parser/modeling/instance_elements.py   |   4 +-
 aria/parser/modeling/model_elements.py  |  10 +-
 .../block-storage-1/block-storage-1.yaml|  68 +
 .../block-storage-2/block-storage-2.yaml|  75 +
 .../block-storage-3/block-storage-3.yaml|  68 +
 .../block-storage-4/block-storage-4.yaml|  96 ++
 .../block-storage-5/block-storage-5.yaml| 109 +++
 .../block-storage-6/block-storage-6.yaml| 102 +++
 .../use-cases/compute-1/compute-1.yaml  |  42 +++
 .../use-cases/container-1/container-1.yaml  |  68 +
 .../multi-tier-1/custom_types/collectd.yaml |  10 +
 .../custom_types/elasticsearch.yaml |   6 +
 .../multi-tier-1/custom_types/kibana.yaml   |  10 +
 .../multi-tier-1/custom_types/logstash.yaml |  10 +
 .../multi-tier-1/custom_types/rsyslog.yaml  |  10 +
 .../use-cases/multi-tier-1/multi-tier-1.yaml| 237 +++
 .../use-cases/network-1/network-1.yaml  |  49 +++
 .../use-cases/network-2/network-2.yaml  |  46 +++
 .../use-cases/network-3/network-3.yaml  |  81 +
 .../use-cases/network-4/network-4.yaml  |  70 +
 .../use-cases/non-normative-types.yaml  | 177 +++
 .../object-storage-1/object-storage-1.yaml  |  24 ++
 .../software-component-1.yaml   |  54 
 .../webserver-dbms-1/webserver-dbms-1.yaml  | 122 
 .../paypalpizzastore_nodejs_app.yaml|  15 +
 .../webserver-dbms-2/webserver-dbms-2.yaml  | 115 +++
 .../profiles/tosca-simple-1.0/artifacts.yaml|  12 +-
 .../profiles/tosca-simple-1.0/capabilities.yaml |   4 +-
 .../profiles/tosca-simple-1.0/data.yaml |   4 +-
 .../profiles/tosca-simple-1.0/groups.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/interfaces.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/nodes.yaml|  11 +-
 .../profiles/tosca-simple-1.0/policies.yaml |  10 +-
 .../tosca-simple-1.0/relationships.yaml |   4 +-
 .../tosca-simple-nfv-1.0/capabilities.yaml  |   3 +-
 .../profiles/tosca-simple-nfv-1.0/data.yaml |   2 +-
 .../profiles/tosca-simple-nfv-1.0/groups.yaml   |   2 +-
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml|  12 +-
 .../simple_v1_0/assignments.py  |   2 +-
 .../simple_v1_0/functions.py|  18 +-
 .../aria_extension_tosca/simple_v1_0/misc.py|   1 +
 .../simple_v1_0/modeling/__init__.py|  13 +-
 .../simple_v1_0/modeling/requirements.py|  29 +-
 .../presentation/field_validators.py|  18 +-
 tests/end2end/test_parser.py|  40 ---
 tests/end2end/test_tosca_simple_v1_0.py | 112 +++
 tests/parser/service_templates.py   |  20 +-
 tests/parser/utils.py   |   9 +-
 .../tosca-simple-1.0/node-cellar/inputs.yaml|   3 +
 .../node-cellar/node-cellar.yaml| 299 +++
 .../node-cellar/types/aria.yaml |  93 ++
 .../node-cellar/types/mongodb.yaml  |  73 +
 .../node-cellar/types/nginx.yaml|  27 ++
 .../node-cellar/types/nodejs.yaml   |  69 +
 .../node-cellar/types/openstack.yaml| 201 +
 .../tosca-simple-1.0/node-cellar/types/os.yaml  |  75 +
 .../tosca-simple-1.0/node-cellar/workflows.py   |  16 +
 .../service_templates/node-cellar/inputs.yaml   |   3 -
 .../node-cellar/node-cellar.yaml| 299 ---
 .../node-cellar/types/aria.yaml |  93 --
 .../node-cellar/types/mongodb.yaml  |  73 -
 .../node-cellar/types/nginx.yaml|  27 --
 .../node-cellar/types/nodejs.yaml   |  69 -
 .../node-cellar/types/openstack.yaml| 201 -
 .../service_templates/node-cellar/types/os.yaml |  75 -
 .../service_templates/node-cellar/workflows.py  |  16 -
 67 files changed, 2737 insertions(+), 984 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/MANIFEST.in

[1/3] incubator-ariatosca git commit: ARIA-88 Add TOSCA use-case examples [Forced Update!]

2017-02-17 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-79-concurrent-storage-modifications 1d618e0fc -> 96581d9f9 
(forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/functions.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/functions.py 
b/extensions/aria_extension_tosca/simple_v1_0/functions.py
index d17a960..e385817 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/functions.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/functions.py
@@ -171,15 +171,20 @@ class GetProperty(Function):
 def _evaluate(self, context, container):
 modelable_entities = get_modelable_entities(context, container, 
self.locator,
 self.modelable_entity_name)
-
 req_or_cap_name = self.nested_property_name_or_index[0]
 
 for modelable_entity in modelable_entities:
+properties = None
+
 if hasattr(modelable_entity, 'requirement_templates') \
 and modelable_entity.requirement_templates \
-and (req_or_cap_name in 
modelable_entity.requirement_templates):
-# First argument refers to a requirement
-properties = 
modelable_entity.requirement_templates[req_or_cap_name].properties
+and (req_or_cap_name in [v.name for v in 
modelable_entity.requirement_templates]):
+for requirement_template in 
modelable_entity.requirement_templates:
+if requirement_template.name == req_or_cap_name:
+# First argument refers to a requirement
+# TODO: should follow to matched capability in other 
node...
+raise CannotEvaluateFunctionException()
+break
 nested_property_name_or_index = 
self.nested_property_name_or_index[1:]
 elif hasattr(modelable_entity, 'capability_templates') \
 and modelable_entity.capability_templates \
@@ -501,8 +506,7 @@ def get_host(context, container): # pylint: 
disable=unused-argument
 ends.
 """
 
-print container.relationships
-exit()
+return []
 
 def get_source(context, container): # pylint: disable=unused-argument
 """
@@ -510,6 +514,8 @@ def get_source(context, container): # pylint: 
disable=unused-argument
 source end of the relationship that contains the referencing function.
 """
 
+return []
+
 def get_target(context, container): # pylint: disable=unused-argument
 """
 A TOSCA orchestrator will interpret this keyword as the Node Template 
instance that is at the

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/misc.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/misc.py 
b/extensions/aria_extension_tosca/simple_v1_0/misc.py
index 4453c7a..42fc1ad 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/misc.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/misc.py
@@ -85,6 +85,7 @@ class MetaData(ExtensiblePresentation):
 :rtype: dict
 """
 
+@short_form_field('url')
 @has_fields
 @dsl_specification('3.5.5', 'tosca-simple-1.0')
 class Repository(ExtensiblePresentation):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
index 811da19..f340954 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
@@ -22,6 +22,7 @@ from aria.parser.modeling import (Type, RelationshipType, 
PolicyType, ServiceMod
   ArtifactTemplate, Metadata, Parameter)
 
 from ..data_types import coerce_value
+from platform import node
 
 def create_service_model(context): # pylint: 
disable=too-many-locals,too-many-branches
 model = ServiceModel()
@@ -106,7 +107,8 @@ def create_service_model(context): # pylint: 
disable=too-many-locals,too-many-br
 return model
 
 def create_node_template(context, node_template):
-model = NodeTemplate(name=node_template._name, 
type_name=node_template.type)
+node_type = node_template._get_type(context)
+model = NodeTemplate(name=node_template._name, type_name=node_type._name)
 
 if node_template.description:
 model.description = node_template.description.value
@@ -137,12 +139,11 @@ def create_node_template(context, node_template):
 return model
 
 def create_interface_template(context, interface):
- 

incubator-ariatosca git commit: changed exception msgs [Forced Update!]

2017-02-17 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-79-concurrent-storage-modifications f0e6e6625 -> 1d618e0fc 
(forced update)


changed exception msgs


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

Branch: refs/heads/ARIA-79-concurrent-storage-modifications
Commit: 1d618e0fc32604b36b65340e5bdc69c002e10f86
Parents: ab138d4
Author: mxmrlv 
Authored: Thu Feb 16 17:41:43 2017 +0200
Committer: mxmrlv 
Committed: Fri Feb 17 21:10:54 2017 +0200

--
 aria/.pylintrc  |  2 +-
 aria/orchestrator/workflows/executor/process.py |  7 +++--
 aria/storage/instrumentation.py | 29 
 ...process_executor_concurrent_modifications.py |  1 -
 4 files changed, 24 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d618e0f/aria/.pylintrc
--
diff --git a/aria/.pylintrc b/aria/.pylintrc
index ee4d0ef..b7656a3 100644
--- a/aria/.pylintrc
+++ b/aria/.pylintrc
@@ -250,7 +250,7 @@ docstring-min-length=-1
 [ELIF]
 
 # Maximum number of nested blocks for function / method body
-max-nested-blocks=5
+max-nested-blocks=7
 
 
 [SIMILARITIES]

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d618e0f/aria/orchestrator/workflows/executor/process.py
--
diff --git a/aria/orchestrator/workflows/executor/process.py 
b/aria/orchestrator/workflows/executor/process.py
index 84f5f58..75bbbce 100644
--- a/aria/orchestrator/workflows/executor/process.py
+++ b/aria/orchestrator/workflows/executor/process.py
@@ -53,6 +53,8 @@ _IS_WIN = os.name == 'nt'
 
 _INT_FMT = 'I'
 _INT_SIZE = struct.calcsize(_INT_FMT)
+UPDATE_TRACKED_CHANGES_FAILED_STR = \
+'Some changes failed writing to storage. For more info refer to the log.'
 
 
 class ProcessExecutor(base.BaseExecutor):
@@ -218,6 +220,7 @@ class ProcessExecutor(base.BaseExecutor):
 try:
 self._apply_tracked_changes(task, request)
 except BaseException as e:
+e.message += UPDATE_TRACKED_CHANGES_FAILED_STR
 self._task_failed(task, exception=e)
 else:
 self._task_succeeded(task)
@@ -227,8 +230,8 @@ class ProcessExecutor(base.BaseExecutor):
 try:
 self._apply_tracked_changes(task, request)
 except BaseException as e:
-e.message = \
-'{0} Remote task execution failed due: {1}'.format(str(e), 
request['exception'])
+e.message += 'Task failed due to 
{0}.'.format(request['exception']) + \
+ UPDATE_TRACKED_CHANGES_FAILED_STR
 self._task_failed(task, exception=e)
 else:
 self._task_failed(task, exception=request['exception'])

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d618e0f/aria/storage/instrumentation.py
--
diff --git a/aria/storage/instrumentation.py b/aria/storage/instrumentation.py
index b3ca24a..8fb9d82 100644
--- a/aria/storage/instrumentation.py
+++ b/aria/storage/instrumentation.py
@@ -155,6 +155,10 @@ class _Value(object):
 def __hash__(self):
 return hash((self.initial, self.current))
 
+@property
+def dict(self):
+return {'initial': self.initial, 'current': self.current}.copy()
+
 
 def apply_tracked_changes(tracked_changes, model):
 """Write tracked changes back to the database using provided model storage
@@ -163,12 +167,13 @@ def apply_tracked_changes(tracked_changes, model):
 returned by calling ``track_changes()``
 :param model: The model storage used to actually apply the changes
 """
-successfully_updated_instances = dict()
+successfully_updated_changes = dict()
 try:
 for mapi_name, tracked_instances in tracked_changes.items():
-successfully_updated_instances[mapi_name] = list()
+successfully_updated_changes[mapi_name] = dict()
 mapi = getattr(model, mapi_name)
 for instance_id, tracked_attributes in tracked_instances.items():
+successfully_updated_changes[mapi_name][instance_id] = dict()
 instance = None
 for attribute_name, value in tracked_attributes.items():
 if value.initial != value.current:
@@ -178,16 +183,18 @@ def apply_tracked_changes(tracked_changes, model):
 if instance:
 

[jira] [Commented] (ARIA-88) Add blueprint examples

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872187#comment-15872187
 ] 

ASF subversion and git services commented on ARIA-88:
-

Commit 787d7e7e6d210adba96dc0057fdf43f4c0034658 in incubator-ariatosca's branch 
refs/heads/ARIA-108-delete-resource-api from [~emblemparade]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=787d7e7 ]

ARIA-88 Add TOSCA use-case examples


> Add blueprint examples
> --
>
> Key: ARIA-88
> URL: https://issues.apache.org/jira/browse/ARIA-88
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Tal Liron
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ARIA-108) Add "Delete" API for resources API

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872188#comment-15872188
 ] 

ASF subversion and git services commented on ARIA-108:
--

Commit c50557fad30d991afd44c1113bd136369918c204 in incubator-ariatosca's branch 
refs/heads/ARIA-108-delete-resource-api from [~ran]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=c50557f ]

ARIA-108 Add API for deleting a resource for resource storage


> Add "Delete" API for resources API
> --
>
> Key: ARIA-108
> URL: https://issues.apache.org/jira/browse/ARIA-108
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Ran Ziv
>
> Resources API currently only has "Upload", "Download", "Read" - it should 
> also expose "Delete" functionality so removed service template's resources 
> may be removed once the template has been deleted.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ARIA-108) Add "Delete" API for resources API

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872186#comment-15872186
 ] 

ASF subversion and git services commented on ARIA-108:
--

Commit dc2dd776730e71b697f2f7c54184f780e5b80d3b in incubator-ariatosca's branch 
refs/heads/ARIA-108-delete-resource-api from [~ran]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=dc2dd77 ]

ARIA-108 Add API for deleting a resource for resource storage


> Add "Delete" API for resources API
> --
>
> Key: ARIA-108
> URL: https://issues.apache.org/jira/browse/ARIA-108
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Ran Ziv
>
> Resources API currently only has "Upload", "Download", "Read" - it should 
> also expose "Delete" functionality so removed service template's resources 
> may be removed once the template has been deleted.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


incubator-ariatosca git commit: ARIA-108 Add API for deleting a resource for resource storage [Forced Update!]

2017-02-17 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-108-delete-resource-api f5750d5fc -> dc2dd7767 (forced update)


ARIA-108 Add API for deleting a resource for resource storage


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

Branch: refs/heads/ARIA-108-delete-resource-api
Commit: dc2dd776730e71b697f2f7c54184f780e5b80d3b
Parents: b619335
Author: Ran Ziv 
Authored: Thu Feb 16 16:38:51 2017 +0200
Committer: Ran Ziv 
Committed: Fri Feb 17 19:40:08 2017 +0200

--
 aria/storage/api.py| 15 -
 aria/storage/filesystem_rapi.py| 41 -
 tests/storage/test_resource_storage.py | 90 -
 3 files changed, 129 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/dc2dd776/aria/storage/api.py
--
diff --git a/aria/storage/api.py b/aria/storage/api.py
index 09a4dd9..ed8a2ff 100644
--- a/aria/storage/api.py
+++ b/aria/storage/api.py
@@ -135,7 +135,7 @@ class ResourceAPI(StorageAPI):
 """
 return self._name
 
-def read(self, entry_id, path=None, **kwargs):
+def read(self, entry_id, path, **kwargs):
 """
 Get a bytesteam from the storage.
 
@@ -144,7 +144,18 @@ class ResourceAPI(StorageAPI):
 :param kwargs:
 :return:
 """
-raise NotImplementedError('Subclass must implement abstract data 
method')
+raise NotImplementedError('Subclass must implement abstract read 
method')
+
+def delete(self, entry_id, path, **kwargs):
+"""
+Delete a resource from the storage.
+
+:param entry_id:
+:param path:
+:param kwargs:
+:return:
+"""
+raise NotImplementedError('Subclass must implement abstract delete 
method')
 
 def download(self, entry_id, destination, path=None, **kwargs):
 """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/dc2dd776/aria/storage/filesystem_rapi.py
--
diff --git a/aria/storage/filesystem_rapi.py b/aria/storage/filesystem_rapi.py
index 6693dbd..3ddc520 100644
--- a/aria/storage/filesystem_rapi.py
+++ b/aria/storage/filesystem_rapi.py
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """
-SQLalchemy based RAPI
+File system based RAPI
 """
 import os
 import shutil
@@ -92,14 +92,13 @@ class FileSystemResourceAPI(api.ResourceAPI):
 except (OSError, IOError):
 pass
 
-def read(self, entry_id, path=None, **_):
+def read(self, entry_id, path, **_):
 """
 Retrieve the content of a file system storage resource.
 
-:param str entry_type: the type of the entry.
 :param str entry_id: the id of the entry.
-:param str path: a path to a specific resource.
-:return: the content of the file
+:param str path: a path to the specific resource to read.
+:return: the content of the file.
 :rtype: bytes
 """
 resource_relative_path = os.path.join(self.name, entry_id, path or '')
@@ -110,7 +109,9 @@ class FileSystemResourceAPI(api.ResourceAPI):
 if not os.path.isfile(resource):
 resources = os.listdir(resource)
 if len(resources) != 1:
-raise exceptions.StorageError('No resource in path: 
{0}'.format(resource))
+raise exceptions.StorageError(
+'Failed to read {0}; Reading a directory is '
+'only allowed when it contains a single 
resource'.format(resource))
 resource = os.path.join(resource, resources[0])
 with open(resource, 'rb') as resource_file:
 return resource_file.read()
@@ -119,10 +120,9 @@ class FileSystemResourceAPI(api.ResourceAPI):
 """
 Download a specific file or dir from the file system resource storage.
 
-:param str entry_type: the name of the entry.
-:param str entry_id: the id of the entry
-:param str destination: the destination of the files.
-:param str path: a path on the remote machine relative to the root of 
the entry.
+:param str entry_id: the id of the entry.
+:param str destination: the destination to download to
+:param str path: the path to download relative to the root of the 
entry (otherwise all).
 """
 resource_relative_path = 

[incubator-ariatosca] Git Push Summary

2017-02-17 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-88-tosca-examples [deleted] 787d7e7e6


[jira] [Closed] (ARIA-88) Add blueprint examples

2017-02-17 Thread Tal Liron (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIA-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tal Liron closed ARIA-88.
-
Resolution: Done

> Add blueprint examples
> --
>
> Key: ARIA-88
> URL: https://issues.apache.org/jira/browse/ARIA-88
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Tal Liron
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ARIA-88) Add blueprint examples

2017-02-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872101#comment-15872101
 ] 

ASF GitHub Bot commented on ARIA-88:


Github user asfgit closed the pull request at:

https://github.com/apache/incubator-ariatosca/pull/70


> Add blueprint examples
> --
>
> Key: ARIA-88
> URL: https://issues.apache.org/jira/browse/ARIA-88
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Tal Liron
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[1/2] incubator-ariatosca git commit: ARIA-88 Add TOSCA use-case examples

2017-02-17 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master b61933592 -> 787d7e7e6


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/functions.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/functions.py 
b/extensions/aria_extension_tosca/simple_v1_0/functions.py
index d17a960..e385817 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/functions.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/functions.py
@@ -171,15 +171,20 @@ class GetProperty(Function):
 def _evaluate(self, context, container):
 modelable_entities = get_modelable_entities(context, container, 
self.locator,
 self.modelable_entity_name)
-
 req_or_cap_name = self.nested_property_name_or_index[0]
 
 for modelable_entity in modelable_entities:
+properties = None
+
 if hasattr(modelable_entity, 'requirement_templates') \
 and modelable_entity.requirement_templates \
-and (req_or_cap_name in 
modelable_entity.requirement_templates):
-# First argument refers to a requirement
-properties = 
modelable_entity.requirement_templates[req_or_cap_name].properties
+and (req_or_cap_name in [v.name for v in 
modelable_entity.requirement_templates]):
+for requirement_template in 
modelable_entity.requirement_templates:
+if requirement_template.name == req_or_cap_name:
+# First argument refers to a requirement
+# TODO: should follow to matched capability in other 
node...
+raise CannotEvaluateFunctionException()
+break
 nested_property_name_or_index = 
self.nested_property_name_or_index[1:]
 elif hasattr(modelable_entity, 'capability_templates') \
 and modelable_entity.capability_templates \
@@ -501,8 +506,7 @@ def get_host(context, container): # pylint: 
disable=unused-argument
 ends.
 """
 
-print container.relationships
-exit()
+return []
 
 def get_source(context, container): # pylint: disable=unused-argument
 """
@@ -510,6 +514,8 @@ def get_source(context, container): # pylint: 
disable=unused-argument
 source end of the relationship that contains the referencing function.
 """
 
+return []
+
 def get_target(context, container): # pylint: disable=unused-argument
 """
 A TOSCA orchestrator will interpret this keyword as the Node Template 
instance that is at the

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/misc.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/misc.py 
b/extensions/aria_extension_tosca/simple_v1_0/misc.py
index 4453c7a..42fc1ad 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/misc.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/misc.py
@@ -85,6 +85,7 @@ class MetaData(ExtensiblePresentation):
 :rtype: dict
 """
 
+@short_form_field('url')
 @has_fields
 @dsl_specification('3.5.5', 'tosca-simple-1.0')
 class Repository(ExtensiblePresentation):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
index 811da19..f340954 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
@@ -22,6 +22,7 @@ from aria.parser.modeling import (Type, RelationshipType, 
PolicyType, ServiceMod
   ArtifactTemplate, Metadata, Parameter)
 
 from ..data_types import coerce_value
+from platform import node
 
 def create_service_model(context): # pylint: 
disable=too-many-locals,too-many-branches
 model = ServiceModel()
@@ -106,7 +107,8 @@ def create_service_model(context): # pylint: 
disable=too-many-locals,too-many-br
 return model
 
 def create_node_template(context, node_template):
-model = NodeTemplate(name=node_template._name, 
type_name=node_template.type)
+node_type = node_template._get_type(context)
+model = NodeTemplate(name=node_template._name, type_name=node_type._name)
 
 if node_template.description:
 model.description = node_template.description.value
@@ -137,12 +139,11 @@ def create_node_template(context, node_template):
 return model
 
 def create_interface_template(context, interface):
-the_type = interface._get_type(context)
+

[GitHub] incubator-ariatosca pull request #70: ARIA-88 Add TOSCA use-case examples

2017-02-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-ariatosca/pull/70


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ARIA-88) Add blueprint examples

2017-02-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIA-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872099#comment-15872099
 ] 

ASF subversion and git services commented on ARIA-88:
-

Commit 787d7e7e6d210adba96dc0057fdf43f4c0034658 in incubator-ariatosca's branch 
refs/heads/master from [~emblemparade]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-ariatosca.git;h=787d7e7 ]

ARIA-88 Add TOSCA use-case examples


> Add blueprint examples
> --
>
> Key: ARIA-88
> URL: https://issues.apache.org/jira/browse/ARIA-88
> Project: AriaTosca
>  Issue Type: Story
>Reporter: Ran Ziv
>Assignee: Tal Liron
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[2/2] incubator-ariatosca git commit: ARIA-88 Add TOSCA use-case examples

2017-02-17 Thread emblemparade
ARIA-88 Add TOSCA use-case examples


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

Branch: refs/heads/master
Commit: 787d7e7e6d210adba96dc0057fdf43f4c0034658
Parents: b619335
Author: Tal Liron 
Authored: Wed Feb 15 12:48:56 2017 -0600
Committer: Tal Liron 
Committed: Thu Feb 16 08:49:52 2017 -0600

--
 MANIFEST.in |   1 +
 aria/parser/modeling/instance_elements.py   |   4 +-
 aria/parser/modeling/model_elements.py  |  10 +-
 .../block-storage-1/block-storage-1.yaml|  68 +
 .../block-storage-2/block-storage-2.yaml|  75 +
 .../block-storage-3/block-storage-3.yaml|  68 +
 .../block-storage-4/block-storage-4.yaml|  96 ++
 .../block-storage-5/block-storage-5.yaml| 109 +++
 .../block-storage-6/block-storage-6.yaml| 102 +++
 .../use-cases/compute-1/compute-1.yaml  |  42 +++
 .../use-cases/container-1/container-1.yaml  |  68 +
 .../multi-tier-1/custom_types/collectd.yaml |  10 +
 .../custom_types/elasticsearch.yaml |   6 +
 .../multi-tier-1/custom_types/kibana.yaml   |  10 +
 .../multi-tier-1/custom_types/logstash.yaml |  10 +
 .../multi-tier-1/custom_types/rsyslog.yaml  |  10 +
 .../use-cases/multi-tier-1/multi-tier-1.yaml| 237 +++
 .../use-cases/network-1/network-1.yaml  |  49 +++
 .../use-cases/network-2/network-2.yaml  |  46 +++
 .../use-cases/network-3/network-3.yaml  |  81 +
 .../use-cases/network-4/network-4.yaml  |  70 +
 .../use-cases/non-normative-types.yaml  | 177 +++
 .../object-storage-1/object-storage-1.yaml  |  24 ++
 .../software-component-1.yaml   |  54 
 .../webserver-dbms-1/webserver-dbms-1.yaml  | 122 
 .../paypalpizzastore_nodejs_app.yaml|  15 +
 .../webserver-dbms-2/webserver-dbms-2.yaml  | 115 +++
 .../profiles/tosca-simple-1.0/artifacts.yaml|  12 +-
 .../profiles/tosca-simple-1.0/capabilities.yaml |   4 +-
 .../profiles/tosca-simple-1.0/data.yaml |   4 +-
 .../profiles/tosca-simple-1.0/groups.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/interfaces.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/nodes.yaml|  11 +-
 .../profiles/tosca-simple-1.0/policies.yaml |  10 +-
 .../tosca-simple-1.0/relationships.yaml |   4 +-
 .../tosca-simple-nfv-1.0/capabilities.yaml  |   3 +-
 .../profiles/tosca-simple-nfv-1.0/data.yaml |   2 +-
 .../profiles/tosca-simple-nfv-1.0/groups.yaml   |   2 +-
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml|  12 +-
 .../simple_v1_0/assignments.py  |   2 +-
 .../simple_v1_0/functions.py|  18 +-
 .../aria_extension_tosca/simple_v1_0/misc.py|   1 +
 .../simple_v1_0/modeling/__init__.py|  13 +-
 .../simple_v1_0/modeling/requirements.py|  29 +-
 .../presentation/field_validators.py|  18 +-
 tests/end2end/test_parser.py|  40 ---
 tests/end2end/test_tosca_simple_v1_0.py | 112 +++
 tests/parser/service_templates.py   |  20 +-
 tests/parser/utils.py   |   9 +-
 .../tosca-simple-1.0/node-cellar/inputs.yaml|   3 +
 .../node-cellar/node-cellar.yaml| 299 +++
 .../node-cellar/types/aria.yaml |  93 ++
 .../node-cellar/types/mongodb.yaml  |  73 +
 .../node-cellar/types/nginx.yaml|  27 ++
 .../node-cellar/types/nodejs.yaml   |  69 +
 .../node-cellar/types/openstack.yaml| 201 +
 .../tosca-simple-1.0/node-cellar/types/os.yaml  |  75 +
 .../tosca-simple-1.0/node-cellar/workflows.py   |  16 +
 .../service_templates/node-cellar/inputs.yaml   |   3 -
 .../node-cellar/node-cellar.yaml| 299 ---
 .../node-cellar/types/aria.yaml |  93 --
 .../node-cellar/types/mongodb.yaml  |  73 -
 .../node-cellar/types/nginx.yaml|  27 --
 .../node-cellar/types/nodejs.yaml   |  69 -
 .../node-cellar/types/openstack.yaml| 201 -
 .../service_templates/node-cellar/types/os.yaml |  75 -
 .../service_templates/node-cellar/workflows.py  |  16 -
 67 files changed, 2737 insertions(+), 984 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/MANIFEST.in