From 9c7857bc3b14bf4047e3b158a06b52b5fb8b070e Mon Sep 17 00:00:00 2001 From: Przemyslaw Kaminski Date: Thu, 11 Jun 2015 08:14:03 +0200 Subject: [PATCH] Some fixes & cleanup Fixed keystone to use juno images --- resources/glance_api_service/actions/run.yml | 2 +- resources/keystone_service/meta.yaml | 2 +- solar/solar/cli.py | 8 ++++---- solar/solar/core/handlers/ansible.py | 3 --- solar/solar/core/handlers/base.py | 1 + solar/solar/interfaces/db/redis_db.py | 3 +++ 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/resources/glance_api_service/actions/run.yml b/resources/glance_api_service/actions/run.yml index 292fe6bd..0ac21e60 100644 --- a/resources/glance_api_service/actions/run.yml +++ b/resources/glance_api_service/actions/run.yml @@ -28,4 +28,4 @@ {% endif %} - name: wait for glance api - wait_for: host={{ ip }} port=9393 timeout=20 + wait_for: host={{ ip }} port={{ ports.value[0]['value']['value'] }} timeout=20 diff --git a/resources/keystone_service/meta.yaml b/resources/keystone_service/meta.yaml index 0a24811d..1afa7f4c 100644 --- a/resources/keystone_service/meta.yaml +++ b/resources/keystone_service/meta.yaml @@ -4,7 +4,7 @@ version: 1.0.0 input: image: schema: str! - value: kollaglue/centos-rdo-k-keystone + value: kollaglue/centos-rdo-j-keystone config_dir: schema: str! value: /etc/solar/keystone diff --git a/solar/solar/cli.py b/solar/solar/cli.py index 8f216ca1..218d25bd 100644 --- a/solar/solar/cli.py +++ b/solar/solar/cli.py @@ -189,10 +189,6 @@ def init_cli_connections(): def connections(): pass - @connections.command() - def show(): - print json.dumps(signals.Connections.read_clients(), indent=2) - # TODO: this requires graphing libraries @connections.command() def graph(): @@ -210,6 +206,10 @@ def init_cli_connections(): #plt.axis('off') #plt.savefig('graph.png') + @connections.command() + def show(): + print json.dumps(signals.Connections.read_clients(), indent=2) + def init_cli_deployment_config(): @main.command() diff --git a/solar/solar/core/handlers/ansible.py b/solar/solar/core/handlers/ansible.py index 7ce7f456..f62ca04b 100644 --- a/solar/solar/core/handlers/ansible.py +++ b/solar/solar/core/handlers/ansible.py @@ -31,9 +31,6 @@ class Ansible(BaseHandler): def _render_inventory(self, r): inventory = '{0} ansible_ssh_host={1} ansible_connection=ssh ansible_ssh_user={2} ansible_ssh_private_key_file={3}' host, user, ssh_key = r.args['ip'].value, r.args['ssh_user'].value, r.args['ssh_key'].value - print host - print user - print ssh_key inventory = inventory.format(host, host, user, ssh_key) print inventory return inventory diff --git a/solar/solar/core/handlers/base.py b/solar/solar/core/handlers/base.py index 914a6a58..20a96bb5 100644 --- a/solar/solar/core/handlers/base.py +++ b/solar/solar/core/handlers/base.py @@ -37,6 +37,7 @@ class BaseHandler(object): action_file = resource.metadata['actions'][action] action_file = os.path.join(resource.metadata['actions_path'], action_file) + print 'action file: ', action_file args = self._make_args(resource) with open(action_file) as f: diff --git a/solar/solar/interfaces/db/redis_db.py b/solar/solar/interfaces/db/redis_db.py index fec1e947..8af0e294 100644 --- a/solar/solar/interfaces/db/redis_db.py +++ b/solar/solar/interfaces/db/redis_db.py @@ -56,4 +56,7 @@ class RedisDB(object): self._r.delete(self._make_key(collection, uid)) def _make_key(self, collection, _id): + if isinstance(collection, self.COLLECTIONS): + collection = collection.name + return '{0}:{1}'.format(collection, _id)