ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [12/12] incubator-ariatosca git commit: fixed various review issues
Date Tue, 18 Apr 2017 07:56:00 GMT
fixed various review issues


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

Branch: refs/heads/cli-tests
Commit: cf80675f6a48beeebd6bf0321da6d3474a5e800d
Parents: 5996754
Author: Ran Ziv <ran@gigaspaces.com>
Authored: Sun Apr 16 15:54:07 2017 +0300
Committer: Ran Ziv <ran@gigaspaces.com>
Committed: Sun Apr 16 15:54:07 2017 +0300

----------------------------------------------------------------------
 aria/cli/VERSION                     | 3 ---
 aria/cli/cli/aria.py                 | 8 ++++----
 aria/cli/env.py                      | 7 -------
 aria/cli/main.py                     | 4 +---
 aria/orchestrator/workflow_runner.py | 6 +-----
 5 files changed, 6 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cf80675f/aria/cli/VERSION
----------------------------------------------------------------------
diff --git a/aria/cli/VERSION b/aria/cli/VERSION
deleted file mode 100644
index 6a3252e..0000000
--- a/aria/cli/VERSION
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "version": "0.1.0"
-}

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cf80675f/aria/cli/cli/aria.py
----------------------------------------------------------------------
diff --git a/aria/cli/cli/aria.py b/aria/cli/cli/aria.py
index da72833..31d6c9b 100644
--- a/aria/cli/cli/aria.py
+++ b/aria/cli/cli/aria.py
@@ -31,6 +31,7 @@ from ..cli import helptexts
 from ..inputs import inputs_to_dict
 from ..constants import DEFAULT_SERVICE_TEMPLATE_FILENAME
 from ...utils.exceptions import get_exception_as_string
+from ... import __version__
 
 
 CLICK_CONTEXT_SETTINGS = dict(
@@ -75,11 +76,11 @@ class MutuallyExclusiveOption(click.Option):
             ctx, opts, args)
 
 
-def _format_version_data(version_data,
+def _format_version_data(version,
                          prefix=None,
                          suffix=None,
                          infix=None):
-    all_data = version_data.copy()
+    all_data = dict(version=version)
     all_data['prefix'] = prefix or ''
     all_data['suffix'] = suffix or ''
     all_data['infix'] = infix or ''
@@ -93,9 +94,8 @@ def show_version(ctx, param, value):
     if not value:
         return
 
-    cli_version_data = env.get_version_data()
     cli_version = _format_version_data(
-        cli_version_data,
+        __version__,
         prefix='ARIA CLI ',
         infix=' ' * 5,
         suffix='')

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cf80675f/aria/cli/env.py
----------------------------------------------------------------------
diff --git a/aria/cli/env.py b/aria/cli/env.py
index 7fe656f..71cf69a 100644
--- a/aria/cli/env.py
+++ b/aria/cli/env.py
@@ -15,8 +15,6 @@
 
 
 import os
-import json
-import pkgutil
 
 from .config import config
 from .logger import Logging
@@ -78,11 +76,6 @@ class _Environment(object):
             self._plugin_manager = self._init_plugin_manager()
         return self._plugin_manager
 
-    @staticmethod
-    def get_version_data():
-        data = pkgutil.get_data(__package__, 'VERSION')
-        return json.loads(data)
-
     def _init_workdir(self):
         if not os.path.exists(self._workdir):
             os.makedirs(self._workdir)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cf80675f/aria/cli/main.py
----------------------------------------------------------------------
diff --git a/aria/cli/main.py b/aria/cli/main.py
index d06ad8a..9ae41bf 100644
--- a/aria/cli/main.py
+++ b/aria/cli/main.py
@@ -47,11 +47,9 @@ def _register_commands():
     _aria.add_command(commands.logs.logs)
 
 
-_register_commands()
-
-
 def main():
     install_aria_extensions()
+    _register_commands()
     _aria()
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cf80675f/aria/orchestrator/workflow_runner.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflow_runner.py b/aria/orchestrator/workflow_runner.py
index 1cdf1de..7b043c5 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -33,8 +33,6 @@ from ..utils.imports import import_fullname
 
 DEFAULT_TASK_MAX_ATTEMPTS = 1
 DEFAULT_TASK_RETRY_INTERVAL = 1
-# TODO move this constant somewhere in the DSL parser?
-WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('implementation', 'dependencies')
 
 
 class WorkflowRunner(object):
@@ -115,9 +113,7 @@ class WorkflowRunner(object):
         if self._workflow_name in BUILTIN_WORKFLOWS:
             workflow_inputs = dict()  # built-in workflows don't have any inputs
         else:
-            workflow_inputs = dict((k, v) for k, v in
-                                   self.service.workflows[self._workflow_name].inputs.iteritems()
-                                   if k not in WORKFLOW_POLICY_INTERNAL_PROPERTIES)
+            workflow_inputs = self.service.workflows[self._workflow_name].inputs
 
         execution.inputs = modeling_utils.create_inputs(inputs, workflow_inputs)
         # TODO: these two following calls should execute atomically


Mime
View raw message