Skip to content

Commit

Permalink
Fix bug in LXD plugin when creating container connected to a physical…
Browse files Browse the repository at this point in the history
…/unmanaged interfaces (#59)

# Bugfix
- LXD Plugin, fixed bug when creating a container connected to a physical/unmanaged interface
  • Loading branch information
gabrik committed Apr 8, 2019
1 parent 8fa9bc1 commit 7cb83ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fos-plugins/LXD/LXD_plugin
Original file line number Diff line number Diff line change
Expand Up @@ -833,14 +833,15 @@ class LXD(RuntimePluginFDU):
self.call_os_plugin_function('set_interface_unaviable', {'intf_name': real_intf_name})
else:
nw_v = json.loads(str(template_value_bridge_mac % (intf_name, real_intf_name, mac)))
interfaces.append(real_intf_name)
else:
intf_id = 'lxd-{}-{}'.format(fdu.get_short_id(), i)
intf_data = self.call_nw_plugin_function('create_virtual_interface', {'intf_id':intf_id, 'descriptor': intf})
self.logger.info('__generate_custom_profile_userdata_configuration()','LXD Plugin - Interface info {}'.format(intf_data))
dev_name = intf_data.get('int_name')
nw_v = json.loads(str(template_vintf % (intf_name, dev_name, mac)))
interfaces.append(intf_id)
devices.update({intf_name: nw_v})
interfaces.append(intf_id)
i += 1

lxd_version = self.conn.host_info['environment']['server_version']
Expand Down

0 comments on commit 7cb83ec

Please sign in to comment.