From 97e3f95fdb394cd949deef6cf7c9f048a1d3c7c3 Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Tue, 15 Sep 2015 10:30:25 +0300 Subject: [PATCH] Resolve several problems after conflicts --- resources/hosts_file/meta.yaml | 4 ++-- solar/solar/cli/main.py | 1 - solar/solar/events/api.py | 2 +- solar/solar/orchestration/graph.py | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/hosts_file/meta.yaml b/resources/hosts_file/meta.yaml index 096d1b13..d14f308b 100644 --- a/resources/hosts_file/meta.yaml +++ b/resources/hosts_file/meta.yaml @@ -13,8 +13,8 @@ input: schema: str! value: hosts_names: - schema: [{value: str!}] + schema: [str!] value: [] hosts_ips: - schema: [{value: str!}] + schema: [str!] value: [] diff --git a/solar/solar/cli/main.py b/solar/solar/cli/main.py index 08b08e7f..85d0c07b 100644 --- a/solar/solar/cli/main.py +++ b/solar/solar/cli/main.py @@ -350,7 +350,6 @@ def run(): init_actions() init_cli_connect() init_cli_connections() - init_cli_deployment_config() init_cli_resource() main.add_command(orchestration) diff --git a/solar/solar/events/api.py b/solar/solar/events/api.py index a4e71c29..7d5eace4 100644 --- a/solar/solar/events/api.py +++ b/solar/solar/events/api.py @@ -19,7 +19,7 @@ import networkx as nx from solar.core.log import log from solar.interfaces.db import get_db -from solar.events.controls import Dep, React +from solar.events.controls import Dep, React, StateChange db = get_db() diff --git a/solar/solar/orchestration/graph.py b/solar/solar/orchestration/graph.py index 17fa301d..ca871af3 100644 --- a/solar/solar/orchestration/graph.py +++ b/solar/solar/orchestration/graph.py @@ -43,10 +43,10 @@ def save_graph(name, graph): def get_graph(uid): dg = nx.MultiDiGraph() collection = db.COLLECTIONS.plan_node.name + ':' + uid - type_ = db.RELATION_TYPES.plan_edge.name + ': ' + uid - db.graph = db.get(uid, collection=db.COLLECTIONS.plan_graph).properties - db.add_nodes_from([(n.uid, n.properties) for n in db.all(collection=collection)]) - db.add_edges_from([(i['source'], i['dest'], i['properties']) + type_ = db.RELATION_TYPES.plan_edge.name + ':' + uid + dg.graph = db.get(uid, collection=db.COLLECTIONS.plan_graph).properties + dg.add_nodes_from([(n.uid, n.properties) for n in db.all(collection=collection)]) + dg.add_edges_from([(i['source'], i['dest'], i['properties']) for i in db.all_relations(type_=type_, db_convert=False)]) return dg