fix azure_rm.py not showing nic info for vmss (#53496)

* fix vmss nic

* resolve comments
This commit is contained in:
Yunge Zhu 2019-03-21 07:01:50 +08:00 committed by Matt Davis
parent d71ca02d60
commit 710b05fae7

View file

@ -593,7 +593,6 @@ class AzureHost(object):
for s in vm_instanceview_model.get('statuses', []) if self._powerstate_regex.match(s.get('code', ''))), 'unknown')
def _on_nic_response(self, nic_model, is_primary=False):
if nic_model.get('type') == 'Microsoft.Network/networkInterfaces':
nic = AzureNic(nic_model=nic_model, inventory_client=self._inventory_client, is_primary=is_primary)
self.nics.append(nic)
@ -606,6 +605,7 @@ class AzureNic(object):
self.public_ips = {}
if nic_model.get('properties', {}).get('ipConfigurations'):
for ipc in nic_model['properties']['ipConfigurations']:
pip = ipc['properties'].get('publicIPAddress')
if pip: