Skip to content

Commit

Permalink
fix in LXD monitoring method (#132)
Browse files Browse the repository at this point in the history
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
  • Loading branch information
gabrik committed Jul 22, 2019
1 parent c49efbf commit 2b1c4f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fos-plugins/LXD/LXD_plugin
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,12 @@ class LXD(RuntimePluginFDU):
ip = ''
# Getting address from LXD if unable from network manager, eg. if connected to physical device/lxd bridge
if ip == '':
lxd_net_info_addrs = cs.network[i['vintf_name']]['addresses']
for a in lxd_net_info_addrs:
if a['family'] == 'inet':
ip = a['address']
if cs.network is not None:
lxd_net_info_addrs = cs.network[i['vintf_name']]['addresses']
for a in lxd_net_info_addrs:
if a['family'] == 'inet':
ip = a['address']

# c_net.append(
# {'name': i['vintf_name'],
# 'mac_address': i.get('mac_address',''),
Expand Down

0 comments on commit 2b1c4f9

Please sign in to comment.