Implemented node based scope

This commit is contained in:
Evgeniy L 2015-04-23 17:12:41 +03:00
parent 071c3b4d90
commit 79e9d96d14
3 changed files with 5 additions and 2 deletions

View File

@ -7,3 +7,5 @@
ip: 10.0.0.3 ip: 10.0.0.3
ssh_user: vagrant ssh_user: vagrant
ssh_private_key_path: /vagrant/tmp/keys/ssh_private ssh_private_key_path: /vagrant/tmp/keys/ssh_private
attrs:
keystone_admin_port: 77777

View File

@ -15,7 +15,7 @@ input:
db_host: db_host:
first_with_tags: ["entrypoint/mariadb"] first_with_tags: ["entrypoint/mariadb"]
item: '{{ item.node.ip }}' item: '{{ item.node.ip }}'
admin_port: 35357 admin_port: '{{ this.node.keystone_admin_port|d(35357) }}'
public_port: 5000 public_port: 5000
name: solar.keystone-test name: solar.keystone-test
image: kollaglue/centos-rdo-keystone image: kollaglue/centos-rdo-keystone

View File

@ -1,3 +1,4 @@
import copy
import io import io
import os import os
@ -38,7 +39,7 @@ class Discovery(base.BaseExtension):
nodes_resources = [] nodes_resources = []
for node in nodes_list: for node in nodes_list:
node_resource = {} node_resource = copy.deepcopy(node.get('attrs', {}))
node_resource['id'] = node['id'] node_resource['id'] = node['id']
node_resource['name'] = node['id'] node_resource['name'] = node['id']
node_resource['handler'] = 'data' node_resource['handler'] = 'data'