[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137047729
  
--- Diff: examples/clearwater/clearwater-live-test-existing.yaml ---
@@ -0,0 +1,54 @@
+# 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.
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >-
+  Project Clearwater is an open-source IMS core, developed by Metaswitch 
Networks and released under
+  the GNU GPLv3.
+
+metadata:
+  template_name: clearwater-live-test-existing
+  template_author: ARIA
+  template_version: '1.0'
+  aria_version: '0.1.2'
--- End diff --

+1


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137048061
  
--- Diff: examples/clearwater/clearwater-single-existing.yaml ---
@@ -0,0 +1,147 @@
+# 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.
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >-
+  Project Clearwater is an open-source IMS core, developed by Metaswitch 
Networks and released under
+  the GNU GPLv3.
+
+metadata:
+  template_name: clearwater-single-existing
+  template_author: ARIA
+  template_version: '1.0'
+  aria_version: '0.1.2'
--- End diff --

+1


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137049267
  
--- Diff: examples/clearwater/scripts/ralf/create.sh ---
@@ -0,0 +1,15 @@
+#!/bin/bash
--- End diff --

In terms of software installation, installing Dime will install 
Ralf+Homestead. However, those components run entirely differently in terms of 
configuration, logging, networking, etc. I imagine that in the multi-node 
Clearwater there will be things in this script to configure networking (open 
ports) for Ralf specifically. So, again, this is left here as a TODO.


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137052935
  
--- Diff: 
extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py ---
@@ -159,10 +159,6 @@ def get_data_type(context, presentation, field_name, 
allow_none=False):
 else:
 return str
 
-# Make sure not derived from self
-if type_name == presentation._name:
--- End diff --

The previous code was broken and threw an exception when reaching those 
lines. I found the bug by accident while working on this so just decided to do 
a spot fix.


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137048035
  
--- Diff: examples/clearwater/clearwater-live-test-existing.yaml ---
@@ -0,0 +1,54 @@
+# 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.
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >-
+  Project Clearwater is an open-source IMS core, developed by Metaswitch 
Networks and released under
+  the GNU GPLv3.
+
+metadata:
+  template_name: clearwater-live-test-existing
+  template_author: ARIA
+  template_version: '1.0'
+  aria_version: '0.1.2'
+
+imports:
+  - types/clearwater.yaml
+  - aria-1.0
+
+topology_template:
+
+  inputs:
+hosts.ssh.user:
+  type: string
+hosts.ssh.password:
--- End diff --

I was thinking forward here to the future template that will have multiple 
hosts. For consistency, I thought to call "hosts." so it would apply to all 
hosts. This is a simpler example with only one host.


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137048198
  
--- Diff: examples/clearwater/scripts/bono/delete.sh ---
@@ -0,0 +1,15 @@
+#!/bin/bash
+# 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.
--- End diff --

I'm leaving that as TODOs -- we do need a way to uininstall, too, no?


---


[GitHub] incubator-ariatosca pull request #191: ARIA-321 Provide Clearwater IMS examp...

2017-09-05 Thread tliron
Github user tliron commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/191#discussion_r137070505
  
--- Diff: aria/modeling/service_instance.py ---
@@ -228,6 +228,80 @@ def service_template_fk(cls):
 :type: :class:`~datetime.datetime`
 """)
 
+def get_node_by_type(self, type_name):
+"""
+Finds the first node of a type (or descendent type).
+"""
+service_template = self.service_template
+
+if service_template is not None:
+node_types = service_template.node_types
+if node_types is not None:
+for node in self.nodes.itervalues():
+if node_types.is_descendant(type_name, node.type.name):
+return node
+
+return None
+
+def get_policy_by_type(self, type_name):
+"""
+Finds the first policy of a type (or descendent type).
+"""
+service_template = self.service_template
+
+if service_template is not None:
+policy_types = service_template.policy_types
+if policy_types is not None:
+for policy in self.policies.itervalues():
+if policy_types.is_descendant(type_name, 
policy.type.name):
+return policy
+
+return None
+
+def satisfy_requirements(self):
+satisfied = True
+for node in self.nodes.itervalues():
+if not node.satisfy_requirements():
+satisfied = False
+return satisfied
+
+def validate_capabilities(self):
+satisfied = True
+for node in self.nodes.itervalues():
+if not node.validate_capabilities():
+satisfied = False
+return satisfied
+
+def find_hosts(self):
+for node in self.nodes.itervalues():
+node.find_host()
+
+def configure_operations(self):
+for node in self.nodes.itervalues():
+node.configure_operations()
+for group in self.groups.itervalues():
+group.configure_operations()
+for operation in self.workflows.itervalues():
+operation.configure()
+
+def is_node_a_target(self, target_node):
+for node in self.nodes.itervalues():
+if self._is_node_a_target(node, target_node):
+return True
+return False
+
+def _is_node_a_target(self, source_node, target_node):
--- End diff --

This is a leftover utility function from a previous experiment of mine (for 
solving an SMTP config challenge). It's not needed anymore, so I will just 
remove it.


---


[6/6] incubator-ariatosca git commit: Requested changes

2017-09-05 Thread emblemparade
Requested changes


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

Branch: refs/heads/ARIA-321-clearwater
Commit: fe48186855ca4a4da979099afd943724471b5e86
Parents: c5601c1
Author: Tal Liron 
Authored: Tue Sep 5 13:21:26 2017 -0500
Committer: Tal Liron 
Committed: Tue Sep 5 13:48:47 2017 -0500

--
 aria/modeling/service_instance.py | 18 --
 .../clearwater/clearwater-live-test-existing.yaml |  2 +-
 .../clearwater/clearwater-single-existing.yaml|  2 +-
 3 files changed, 2 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fe481868/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index 589bd6b..df16bb8 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -284,24 +284,6 @@ class ServiceBase(InstanceModelMixin):
 for operation in self.workflows.itervalues():
 operation.configure()
 
-def is_node_a_target(self, target_node):
-for node in self.nodes.itervalues():
-if self._is_node_a_target(node, target_node):
-return True
-return False
-
-def _is_node_a_target(self, source_node, target_node):
-if source_node.outbound_relationships:
-for relationship_model in source_node.outbound_relationships:
-if relationship_model.target_node.name == target_node.name:
-return True
-else:
-node = relationship_model.target_node
-if node is not None:
-if self._is_node_a_target(node, target_node):
-return True
-return False
-
 @property
 def as_raw(self):
 return collections.OrderedDict((

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fe481868/examples/clearwater/clearwater-live-test-existing.yaml
--
diff --git a/examples/clearwater/clearwater-live-test-existing.yaml 
b/examples/clearwater/clearwater-live-test-existing.yaml
index 7d21df0..0e6a11c 100644
--- a/examples/clearwater/clearwater-live-test-existing.yaml
+++ b/examples/clearwater/clearwater-live-test-existing.yaml
@@ -23,7 +23,7 @@ metadata:
   template_name: clearwater-live-test-existing
   template_author: ARIA
   template_version: '1.0'
-  aria_version: '0.1.2'
+  aria_version: '0.2.0'
 
 imports:
   - types/clearwater.yaml

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fe481868/examples/clearwater/clearwater-single-existing.yaml
--
diff --git a/examples/clearwater/clearwater-single-existing.yaml 
b/examples/clearwater/clearwater-single-existing.yaml
index e2f41a0..72b882a 100644
--- a/examples/clearwater/clearwater-single-existing.yaml
+++ b/examples/clearwater/clearwater-single-existing.yaml
@@ -23,7 +23,7 @@ metadata:
   template_name: clearwater-single-existing
   template_author: ARIA
   template_version: '1.0'
-  aria_version: '0.1.2'
+  aria_version: '0.2.0'
 
 imports:
   - types/clearwater.yaml



[3/6] incubator-ariatosca git commit: ARIA-353 Add node template directives

2017-09-05 Thread emblemparade
ARIA-353 Add node template directives

The directives field already existed in the presentation level, but it
needed to be added to the node template model.


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

Branch: refs/heads/ARIA-321-clearwater
Commit: 969149bd98a9f2b60b98b2d0f1e64392d7c9f2da
Parents: a048f70
Author: Avia Efrat 
Authored: Wed Aug 30 17:54:46 2017 +0300
Committer: Avia Efrat 
Committed: Wed Aug 30 17:58:16 2017 +0300

--
 aria/modeling/service_template.py  | 6 ++
 aria/parser/presentation/fields.py | 5 +++--
 .../aria_extension_tosca/simple_v1_0/modeling/__init__.py  | 6 --
 3 files changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/969149bd/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index d988d21..cd0adb4 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -457,6 +457,12 @@ class NodeTemplateBase(TemplateModelMixin):
 :type: :obj:`basestring`
 """)
 
+directives = Column(PickleType, doc="""
+Directives that apply to this node template.
+
+:type: [:obj:`basestring`]
+""")
+
 default_instances = Column(Integer, default=1, doc="""
 Default number nodes that will appear in the service.
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/969149bd/aria/parser/presentation/fields.py
--
diff --git a/aria/parser/presentation/fields.py 
b/aria/parser/presentation/fields.py
index 5c08d4a..5c3e074 100644
--- a/aria/parser/presentation/fields.py
+++ b/aria/parser/presentation/fields.py
@@ -437,7 +437,7 @@ class Field(object):
 raw = deepcopy_with_locators(default_raw)
 merge(raw, presentation._raw)
 
-# Handle unknown fields
+# Handle unknown fields (only dict can have unknown fields, lists 
can't have them)
 
 if self.field_variant == 'primitive_dict_unknown_fields':
 return self._get_primitive_dict_unknown_fields(presentation, raw, 
context)
@@ -473,7 +473,8 @@ class Field(object):
 
 # Handle get according to variant
 
-getter = getattr(self, '_get_%s' % self.field_variant, None)
+getter = getattr(self, 
'_get_{field_variant}'.format(field_variant=self.field_variant),
+ None)
 
 if getter is None:
 locator = self.get_locator(raw)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/969149bd/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 1f90d29..d960e05 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
@@ -163,12 +163,14 @@ def create_metadata_models(context, service_template, 
metadata):
 def create_node_template_model(context, service_template, node_template):
 node_type = node_template._get_type(context)
 node_type = service_template.node_types.get_descendant(node_type._name)
-model = NodeTemplate(name=node_template._name,
- type=node_type)
+model = NodeTemplate(name=node_template._name, type=node_type)
 
 if node_template.description:
 model.description = node_template.description.value
 
+if node_template.directives:
+model.directives = node_template.directives
+
 model.properties.update(create_property_models_from_values(
 template_properties=node_template._get_property_values(context)))
 model.attributes.update(create_attribute_models_from_values(



[4/6] incubator-ariatosca git commit: ARIA-321 Provide Clearwater IMS example

2017-09-05 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c5601c1f/examples/clearwater/types/ims.yaml
--
diff --git a/examples/clearwater/types/ims.yaml 
b/examples/clearwater/types/ims.yaml
new file mode 100644
index 000..687ad58
--- /dev/null
+++ b/examples/clearwater/types/ims.yaml
@@ -0,0 +1,446 @@
+# 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.
+
+capability_types:
+
+  # https://en.wikipedia.org/wiki/IP_Multimedia_Subsystem#Core_network
+
+  ims.functions.Root:
+derived_from: tosca.capabilities.Root
+
+  ims.functions.CTF: # not mentioned in Wikipedia
+description: >-
+  Charging Trigger Function.
+derived_from: ims.functions.Root
+
+  ims.functions.XDMS: # not mentioned in Wikipedia
+description: >-
+  XML Document Management Server
+derived_from: ims.functions.Root
+
+  ims.functions.HSS:
+description: >-
+  The home subscriber server (HSS), or user profile server function 
(UPSF), is a master user
+  database that supports the IMS network entities that actually handle 
calls. It contains the
+  subscription-related information (subscriber profiles), performs 
authentication and
+  authorization of the user, and can provide information about the 
subscriber's location and IP
+  information. It is similar to the GSM home location register (HLR) and 
Authentication centre
+  (AuC).
+
+  A subscriber location function (SLF) is needed to map user addresses 
when multiple HSSs are
+  used.
+derived_from: ims.functions.Root
+
+  ims.functions.CSCF:
+description: >-
+  Several roles of SIP servers or proxies, collectively called Call 
Session Control Function
+  (CSCF), are used to process SIP signalling packets in the IMS.
+derived_from: ims.functions.Root
+
+  ims.functions.P-CSCF:
+description: >-
+  A Proxy-CSCF (P-CSCF) is a SIP proxy that is the first point of contact 
for the IMS terminal.
+  It can be located either in the visited network (in full IMS networks) 
or in the home network
+  (when the visited network is not IMS compliant yet). Some networks may 
use a Session Border
+  Controller (SBC) for this function. The P-CSCF is at its core a 
specialized SBC for the
+  User–network interface which not only protects the network, but also 
the IMS terminal. The use
+  of an additional SBC between the IMS terminal and the P-CSCF is 
unnecessary and infeasible due
+  to the signaling being encrypted on this leg. The terminal discovers its 
P-CSCF with either
+  DHCP, or it may be configured (e.g. during initial provisioning or via a 
3GPP IMS Management
+  Object (MO)) or in the ISIM or assigned in the PDP Context (in General 
Packet Radio Service
+  (GPRS)).
+derived_from: ims.functions.CSCF
+
+  ims.functions.I-CSCF:
+description: >-
+  An Interrogating-CSCF (I-CSCF) is another SIP function located at the 
edge of an
+  administrative domain. Its IP address is published in the Domain Name 
System (DNS) of the
+  domain (using NAPTR and SRV type of DNS records), so that remote servers 
can find it, and use
+  it as a forwarding point (e.g., registering) for SIP packets to this 
domain.
+derived_from: ims.functions.CSCF
+
+  ims.functions.S-CSCF:
+description: >-
+  A Serving-CSCF (S-CSCF) is the central node of the signalling plane. It 
is a SIP server, but
+  performs session control too. It is always located in the home network. 
It uses Diameter Cx
+  and Dx interfaces to the HSS to download user profiles and upload 
user-to-S-CSCF associations
+  (the user profile is only cached locally for processing reasons only and 
is not changed). All
+  necessary subscriber profile information is loaded from the HSS.
+derived_from: ims.functions.CSCF
+
+  ims.functions.AS:
+description: >-
+  SIP Application servers (AS) host and execute services, and interface 
with the S-CSCF using
+  SIP. An example of an application server that is being developed in 3GPP 
is the Voice call
+  continuity Function (VCC Server). Depending on the actual service, the 
AS can operate in SIP
+  proxy mode, SIP 

[5/6] incubator-ariatosca git commit: ARIA-321 Provide Clearwater IMS example

2017-09-05 Thread emblemparade
ARIA-321 Provide Clearwater IMS example

Related fixes included in this commit:

* Allows capabilities, interfaces, and properties to override parent
definition types only if the new type is a descendant of the overridden
type
* Fix to get_property intrinsic function
* Fix the "required" field for parameters (it wasn't working)
* Don't let scalar values be negative
* Doc fixes related to ARIA-277


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

Branch: refs/heads/ARIA-321-clearwater
Commit: c5601c1f3c5d0b27a32ce2ba7bb099d0d7fcc4be
Parents: 969149b
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Tue Sep 5 13:48:47 2017 -0500

--
 README.rst  |   2 +-
 aria/modeling/functions.py  |   4 +-
 aria/modeling/service_common.py |   2 +-
 aria/modeling/service_instance.py   | 104 ++-
 aria/orchestrator/topology/template_handler.py  |  17 +-
 aria/orchestrator/topology/topology.py  |  12 +-
 .../clearwater-live-test-existing.yaml  |  54 ++
 .../clearwater/clearwater-single-existing.yaml  | 147 
 examples/clearwater/scripts/bono/create.sh  |  20 +
 examples/clearwater/scripts/bono/delete.sh  |  15 +
 examples/clearwater/scripts/dime/create.sh  |  21 +
 examples/clearwater/scripts/dime/delete.sh  |  15 +
 examples/clearwater/scripts/ellis/configure.sh  |  29 +
 examples/clearwater/scripts/ellis/create.sh |  19 +
 examples/clearwater/scripts/ellis/delete.sh |  15 +
 examples/clearwater/scripts/homer/create.sh |  27 +
 examples/clearwater/scripts/homer/delete.sh |  15 +
 examples/clearwater/scripts/homestead/create.sh |  25 +
 examples/clearwater/scripts/homestead/delete.sh |  15 +
 .../clearwater/scripts/host-base/configure.sh   |  23 +
 examples/clearwater/scripts/host/configure.sh   | 183 +
 examples/clearwater/scripts/live-test/create.sh |  69 ++
 examples/clearwater/scripts/live-test/delete.sh |  23 +
 examples/clearwater/scripts/memento/create.sh   |  20 +
 examples/clearwater/scripts/memento/delete.sh   |  15 +
 examples/clearwater/scripts/ralf/create.sh  |  15 +
 examples/clearwater/scripts/ralf/delete.sh  |  15 +
 examples/clearwater/scripts/sprout/create.sh|  19 +
 examples/clearwater/scripts/sprout/delete.sh|  15 +
 examples/clearwater/scripts/vellum/create.sh|  23 +
 examples/clearwater/scripts/vellum/delete.sh|  15 +
 examples/clearwater/types/cassandra.yaml|  30 +
 examples/clearwater/types/clearwater.yaml   | 728 +++
 examples/clearwater/types/ims.yaml  | 446 
 examples/clearwater/types/smtp.yaml |  35 +
 examples/hello-world/hello-world.yaml   |  38 +
 examples/hello-world/helloworld.yaml|  38 -
 .../block-storage-1/block-storage-1.yaml|   6 +-
 .../block-storage-2/block-storage-2.yaml|   6 +-
 .../block-storage-3/block-storage-3.yaml|   4 +-
 .../block-storage-4/block-storage-4.yaml|   2 +-
 .../use-cases/non-normative-types.yaml  |   6 +-
 .../webserver-dbms-1/webserver-dbms-1.yaml  |  10 +-
 .../profiles/tosca-simple-1.0/artifacts.yaml|  18 +-
 .../profiles/tosca-simple-1.0/capabilities.yaml |   8 +-
 .../profiles/tosca-simple-1.0/data.yaml |  10 +-
 .../profiles/tosca-simple-1.0/interfaces.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/nodes.yaml|  18 +-
 .../profiles/tosca-simple-1.0/policies.yaml |   8 +-
 .../tosca-simple-1.0/relationships.yaml |  16 +-
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml|   4 +-
 .../simple_v1_0/assignments.py  |   8 +-
 .../simple_v1_0/data_types.py   |  15 +-
 .../simple_v1_0/modeling/capabilities.py|  14 +-
 .../simple_v1_0/modeling/data_types.py  |   4 -
 .../simple_v1_0/modeling/functions.py   |  18 +-
 .../simple_v1_0/modeling/interfaces.py  |  14 +-
 .../simple_v1_0/modeling/parameters.py  |  47 +-
 .../simple_v1_0/presentation/types.py   |   8 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  25 +-
 tests/end2end/test_hello_world.py   |   2 +-
 .../node-cellar/node-cellar.yaml|  18 +-
 .../node-cellar/types/mongodb.yaml  |   2 +-
 .../node-cellar/types/nodejs.yaml   |   2 +-
 .../node-cellar/types/openstack.yaml|   4 +-
 .../types/shorthand-1/shorthand-1.yaml  |   6 +-
 .../types/typequalified-1/typequalified-1.yaml  |   6 +-
 67 files changed, 2427 insertions(+), 192 

[2/6] incubator-ariatosca git commit: ARIA-348 Validate substitution_mapping field

2017-09-05 Thread emblemparade
ARIA-348 Validate substitution_mapping field


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

Branch: refs/heads/ARIA-321-clearwater
Commit: a048f70491ff0dfa3a6f0d41be6d1294e2ee7061
Parents: a5b450a
Author: Avia Efrat 
Authored: Wed Aug 16 18:54:57 2017 +0300
Committer: Avia Efrat 
Committed: Thu Aug 24 11:30:48 2017 +0300

--
 .travis.yml |   1 +
 .../aria_extension_tosca/simple_v1_0/misc.py|   8 +-
 .../modeling/substitution_mappings.py   | 175 +++
 .../aria_extension_tosca/simple_v1_0/types.py   |   9 +-
 4 files changed, 116 insertions(+), 77 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a048f704/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index c8b7645..a7362e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,6 +14,7 @@ sudo: false
 
 language: python
 
+dist: precise
 python:
   - '2.7'
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a048f704/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 a65ff41..221163c 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/misc.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/misc.py
@@ -25,8 +25,8 @@ from aria.parser.presentation import (AsIsPresentation, 
has_fields, allow_unknow
 
 from .modeling.data_types import (get_data_type, get_data_type_value, 
get_property_constraints,
   apply_constraint_to_value)
-from .modeling.substitution_mappings import 
(validate_subtitution_mappings_requirement,
- 
validate_subtitution_mappings_capability)
+from .modeling.substitution_mappings import 
(validate_substitution_mappings_requirement,
+ 
validate_substitution_mappings_capability)
 from .presentation.extensible import ExtensiblePresentation
 from .presentation.field_validators import (constraint_clause_field_validator,
 
constraint_clause_in_range_validator,
@@ -380,7 +380,7 @@ class SubstitutionMappingsRequirement(AsIsPresentation):
 
 def _validate(self, context):
 super(SubstitutionMappingsRequirement, self)._validate(context)
-validate_subtitution_mappings_requirement(context, self)
+validate_substitution_mappings_requirement(context, self)
 
 
 class SubstitutionMappingsCapability(AsIsPresentation):
@@ -400,7 +400,7 @@ class SubstitutionMappingsCapability(AsIsPresentation):
 
 def _validate(self, context):
 super(SubstitutionMappingsCapability, self)._validate(context)
-validate_subtitution_mappings_capability(context, self)
+validate_substitution_mappings_capability(context, self)
 
 
 @has_fields

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a048f704/extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py
index 8f7ec4c..e2af4b8 100644
--- 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py
+++ 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/substitution_mappings.py
@@ -17,88 +17,113 @@ from aria.utils.formatting import safe_repr
 from aria.parser.validation import Issue
 
 
-def validate_subtitution_mappings_requirement(context, presentation):
-if not validate_format(context, presentation, 'requirement'):
-return
+def validate_substitution_mappings_requirement(context, presentation):
 
-node_template = get_node_template(context, presentation, 'requirement')
-if node_template is None:
+# validate that the requirement in substitution_mapping is defined in the 
substitution node type
+substitution_node_type = presentation._container._get_type(context)
+if substitution_node_type is None:
+return
+for req_name, req in substitution_node_type._get_requirements(context):
+if req_name == presentation._name:
+substitution_type_requirement = req
+break
+else:
+context.validation.report(
+'substitution 

[1/6] incubator-ariatosca git commit: ARIA-352 Fixed package name aria[ssh] incorrect in the installation document link [Forced Update!]

2017-09-05 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-321-clearwater 3d6ffe1f0 -> fe4818685 (forced update)


ARIA-352 Fixed package name aria[ssh] incorrect in the installation document 
link


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

Branch: refs/heads/ARIA-321-clearwater
Commit: a5b450aa66c816a6334c00be96d7f50cb6b248e6
Parents: 8981791
Author: Vishwanath Jayaraman 
Authored: Mon Aug 21 13:50:55 2017 +
Committer: Vishwanath Jayaraman 
Committed: Mon Aug 21 13:50:55 2017 +

--
 README.rst | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a5b450aa/README.rst
--
diff --git a/README.rst b/README.rst
index b9a8213..b1a48c2 100644
--- a/README.rst
+++ b/README.rst
@@ -53,22 +53,22 @@ To install ARIA from source, download the source tarball 
from
 **Ubuntu/Debian** (tested on Ubuntu14.04, Ubuntu16.04)::
 
 apt-get install -y python-dev gcc libffi-dev libssl-dev
-pip install aria[ssh]
+pip install apache-ariatosca[ssh]
 
 **Centos** (tested on Centos6.6, Centos7)::
 
 yum install -y python-devel gcc libffi-devel openssl-devel
-pip install aria[ssh]
+pip install apache-ariatosca[ssh]
 
 **Archlinux**::
 
 pacman -Syu --noconfirm python2 gcc libffi openssl
-pip2 install aria[ssh]
+pip2 install apache-ariatosca[ssh]
 
 **Windows** (tested on Win10)::
 
 # no additional system requirements are needed
-pip install aria[ssh]
+pip install apache-ariatosca[ssh]
 
 **MacOS**::