incubator-ariatosca git commit: linting

2017-06-14 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 4c723c9c3 -> 600e54e89


linting


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 600e54e89b05bb52a78bf64ec0a603d87656688a
Parents: 4c723c9
Author: max-orlov 
Authored: Wed Jun 14 18:36:38 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 14 18:41:53 2017 +0300

--
 aria/modeling/orchestration.py  |  6 ++--
 aria/orchestrator/workflow_runner.py| 36 ++--
 aria/orchestrator/workflows/executor/base.py|  6 ++--
 .../orchestrator/workflows/core/test_events.py  |  5 +--
 .../orchestrator/workflows/executor/__init__.py |  2 +-
 .../workflows/executor/test_executor.py |  5 +--
 .../workflows/executor/test_process_executor.py | 12 ---
 7 files changed, 38 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/600e54e8/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index c0b7f04..6f69483 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -21,10 +21,8 @@ classes:
 """
 
 # pylint: disable=no-self-argument, no-member, abstract-method
-from contextlib import contextmanager
 from datetime import datetime
 
-from networkx import DiGraph
 from sqlalchemy import (
 Column,
 Integer,
@@ -258,8 +256,8 @@ class TaskBase(mixins.ModelMixin):
 
 __tablename__ = 'task'
 
-__private_fields__ =  ['dependency_operation_task_fk', 
'dependency_stub_task_fk', 'node_fk',
-   'relationship_fk', 'plugin_fk', 'execution_fk']
+__private_fields__ = ['dependency_operation_task_fk', 
'dependency_stub_task_fk', 'node_fk',
+  'relationship_fk', 'plugin_fk', 'execution_fk']
 
 
 START_WORKFLOW = 'start_workflow'

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/600e54e8/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index f09cb79..f0a48ad 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -180,9 +180,9 @@ class WorkflowRunner(object):
 
 def get_execution_graph(execution):
 graph = DiGraph()
-for task in execution.tasks:
-for dependency in task.dependencies:
-graph.add_edge(dependency, task)
+for t in execution.tasks:
+for dependency in t.dependencies:
+graph.add_edge(dependency, t)
 
 return graph
 
@@ -211,8 +211,8 @@ def construct_execution_tasks(execution,
  dependencies=depends_on)
 
 for api_task in task_graph.topological_order(reverse=True):
-operation_dependencies = _get_tasks_from_dependencies(execution,
-task_graph.get_dependencies(api_task), [start_task])
+operation_dependencies = _get_tasks_from_dependencies(
+execution, task_graph.get_dependencies(api_task), [start_task])
 
 if isinstance(api_task, task.OperationTask):
 models.Task.from_api_task(api_task=api_task,
@@ -257,20 +257,20 @@ def _end_graph_suffix(api_id):
 
 def _get_non_dependent_tasks(execution):
 dependency_tasks = set()
-for task in execution.tasks:
-dependency_tasks.update(task.dependencies)
+for t in execution.tasks:
+dependency_tasks.update(t.dependencies)
 return list(set(execution.tasks) - set(dependency_tasks))
 
 
 def _get_tasks_from_dependencies(execution, dependencies, default=()):
-"""
-Returns task list from dependencies.
-"""
-tasks = []
-for dependency in dependencies:
-if getattr(dependency, 'actor', False):
-dependency_name = dependency.id
-else:
-dependency_name = _end_graph_suffix(dependency.id)
-tasks.extend(task for task in execution.tasks if task.api_id == 
dependency_name)
-return tasks or default
+"""
+Returns task list from dependencies.
+"""
+tasks = []
+for dependency in dependencies:
+if getattr(dependency, 'actor', False):
+dependency_name = dependency.id
+else:
+dependency_name = _end_graph_suffix(dependency.id)
+tasks.extend(task for task in execution.tasks if task.api_id == 
dependency_name)
+re

incubator-ariatosca git commit: linting and removed runtime props documentation

2017-05-17 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 6baadc0c9 -> 
5f1bfacf4


linting and removed runtime props documentation


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: 5f1bfacf408abe25a1ea4ad01b6eb95fa4e33459
Parents: 6baadc0
Author: max-orlov 
Authored: Wed May 17 15:04:02 2017 +0300
Committer: max-orlov 
Committed: Wed May 17 15:04:02 2017 +0300

--
 aria/modeling/service_instance.py | 2 --
 tests/mock/models.py  | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5f1bfacf/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index cf9298b..7058969 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -333,8 +333,6 @@ class NodeBase(InstanceModelMixin):
 :vartype inbound_relationships: [:class:`Relationship`]
 :ivar host: Host node (can be self)
 :vartype host: :class:`Node`
-:ivar runtime_properties: TODO: should be replaced with attributes
-:vartype runtime_properties: {}
 :ivar state: The state of the node, according to to the TOSCA-defined node 
states
 :vartype state: string
 :ivar version: Used by `aria.storage.instrumentation`

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5f1bfacf/tests/mock/models.py
--
diff --git a/tests/mock/models.py b/tests/mock/models.py
index 2ec4b7a..98703d5 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -120,7 +120,7 @@ def create_node_with_dependencies(include_attribute=False):
 node_template.service_template.services[0] = 
create_service(node_template.service_template)
 node = create_node(node_template, 
node_template.service_template.services[0])
 if include_attribute:
-node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')
+node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
 return node