diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-27 01:25:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-04-27 01:25:34 +0000 |
commit | aaa20289a7089066d2ef751c3c08e8fa7c47fb9e (patch) | |
tree | d7be89b46948dca0eff6e61e76ad40fa02575fdc | |
parent | 1928bf717f9ccd24a34ff749ab0fcf7c157b50ec (diff) | |
parent | c82e9308726eb9105a20d542d1bbd7a2f816a2a8 (diff) |
Merge "bugfix: regex node role"
-rw-r--r-- | qtip/ansible_library/modules/apex_generate_inventory.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qtip/ansible_library/modules/apex_generate_inventory.py b/qtip/ansible_library/modules/apex_generate_inventory.py index 7c6c3b63..b1cc976d 100644 --- a/qtip/ansible_library/modules/apex_generate_inventory.py +++ b/qtip/ansible_library/modules/apex_generate_inventory.py @@ -73,7 +73,7 @@ def generate_inventory(baremetal_info, server_info): for node in baremetal_info: if node['Provisioning State'].lower() == 'active': - role = re.findall('.+profile:(\w+)$', node['Properties']['capabilities'])[0] + role = re.findall('.*profile:(compute|control)', node['Properties']['capabilities'])[0] for server in server_info: if server['ID'] == node['Instance UUID']: node_ip = re.findall('.+=(\d+.\d+.\d+.\d+)$', server['Networks'])[0] |