Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-48-aria-cli fa48c8f76 -> 7a107a85f
Fix issue in creating services with existing name Up until now, creating a service with a name that already existed resulted in a null service stored in the storage. I noticed it while thinking about tests to the `services list` command. Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/7a107a85 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/7a107a85 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/7a107a85 Branch: refs/heads/ARIA-48-aria-cli Commit: 7a107a85fea3fc26326df6a3e74ce40dad1d5dc0 Parents: fa48c8f Author: Avia Efrat <[email protected]> Authored: Sun Apr 2 23:27:55 2017 +0300 Committer: Avia Efrat <[email protected]> Committed: Sun Apr 2 23:27:55 2017 +0300 ---------------------------------------------------------------------- aria/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7a107a85/aria/core.py ---------------------------------------------------------------------- diff --git a/aria/core.py b/aria/core.py index f2dfb09..5368f9c 100644 --- a/aria/core.py +++ b/aria/core.py @@ -80,10 +80,8 @@ class Core(object): service.inputs = modeling_utils.create_inputs(inputs, template_inputs) # TODO: now that we have inputs, we should scan properties and inputs and evaluate functions - # first put the service model so it could have an id, as fallback for setting its name - self.model_storage.service.put(service) service.name = service_name or '{0}_{1}'.format(service_template_name, service.id) - self.model_storage.service.update(service) + self.model_storage.service.put(service) return service def delete_service(self, service_name, force=False):
