Fix get_nodes_hash_by_roles parser function

for using 'node_roles' list

Change-Id: I1f1ffd154f1d5f3d6af8f1097400db88393df28d
blueprint: templates-for-networking
This commit is contained in:
Sergey Vasilenko 2015-06-30 15:37:13 +03:00
parent 8c938ea365
commit 5b9ac8c357
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ EOS
raise(Puppet::ParseError, "#{errmsg}: 2nd argument should be an list of roles") if !roles.is_a?(Array)
nodes = n_metadata['nodes']
nodes.reject do |node_name|
(roles & nodes[node_name]['network_roles']).empty?
(roles & nodes[node_name]['node_roles']).empty?
end
end
end

View File

@ -7,18 +7,18 @@ YAML.load("
---
nodes:
node-55:
network_roles:
node_roles:
- controller
- mongo
- cinder
node-66:
network_roles:
node_roles:
- compute
- cinder
- xxx
- yyy
node-77:
network_roles:
node_roles:
- mongo
- cinder
- xxx