cloud roster: Fix extracting instance's info

The cloud roster expects an additional nest level when extracting an
instance's info from the result of the show_instance action. It looks
for (which is what show_instance of EC2 driver returned prior to
2016.3):

    info[provider][driver][name][name]

whereas the correct location is

    info[provider][driver][name]

Fix it.
This commit is contained in:
Sergei Zviagintsev 2017-03-02 14:26:40 +01:00
parent dd1d3aac74
commit 637930b2b3

View file

@ -70,7 +70,7 @@ def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
'profile': profile,
}
full_info = info.get(provider, {}).get(driver, {}).get(tgt, {}).get(tgt, {})
full_info = info.get(provider, {}).get(driver, {}).get(tgt, {})
public_ips = full_info.get('public_ips', [])
private_ips = full_info.get('private_ips', [])
ip_list = []