You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by av...@apache.org on 2017/04/03 14:45:11 UTC

[1/2] incubator-ariatosca git commit: Fix issue where a service name was passed instead of a service id

Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-48-aria-cli 7b3b13b31 -> aa75638a2


Fix issue where a service name was passed instead of a service id


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

Branch: refs/heads/ARIA-48-aria-cli
Commit: e1000c3d6a829f0f61cd47fac35bf47af8a07ec2
Parents: 7b3b13b
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Mon Apr 3 17:09:25 2017 +0300
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Mon Apr 3 17:09:25 2017 +0300

----------------------------------------------------------------------
 aria/cli/commands/services.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e1000c3d/aria/cli/commands/services.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index e73c43b..9f9d104 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -97,7 +97,8 @@ def create(service_template_name,
 
     try:
         core = Core(model_storage, resource_storage, plugin_manager)
-        service = core.create_service(service_template_name, inputs, service_name)
+        service_template = model_storage.service_template.get_by_name(service_template_name)
+        service = core.create_service(service_template.id, inputs, service_name)
     except storage_exceptions.StorageError as e:
         handle_storage_exception(e, 'service', service_name)
     except AriaException as e:


[2/2] incubator-ariatosca git commit: fix handling storage errors

Posted by av...@apache.org.
fix handling storage errors

We tried to access a wrong attribute of the exception.


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

Branch: refs/heads/ARIA-48-aria-cli
Commit: aa75638a25befaa3b7f5b476bee27b011c888fe0
Parents: e1000c3
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Mon Apr 3 17:10:17 2017 +0300
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Mon Apr 3 17:10:17 2017 +0300

----------------------------------------------------------------------
 aria/cli/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa75638a/aria/cli/utils.py
----------------------------------------------------------------------
diff --git a/aria/cli/utils.py b/aria/cli/utils.py
index fff8e3a..950c295 100644
--- a/aria/cli/utils.py
+++ b/aria/cli/utils.py
@@ -153,7 +153,7 @@ def generate_progress_handler(file_path, action='', max_bar_length=80):
 
 
 def handle_storage_exception(e, model_class, name):
-    if 'UNIQUE constraint failed' in e.msg:
+    if 'UNIQUE constraint failed' in e.message:
         msg = 'Could not store {model_class} `{name}`\n' \
               'There already a exists a {model_class} with the same name' \
               .format(model_class=model_class, name=name)