Test error handling for itf creation.
This commit is contained in:
parent
fee663856f
commit
45a78e5a8e
1 changed files with 11 additions and 1 deletions
|
|
@ -281,7 +281,17 @@ class Network(object):
|
|||
if nic['mtu']:
|
||||
params['mtu'] = nic['mtu']
|
||||
|
||||
# interface = self.nb_net.interfaces.create(**params)
|
||||
|
||||
try:
|
||||
interface = self.nb_net.interfaces.create(**params)
|
||||
except:
|
||||
logging.error(
|
||||
'Unable to (re)create NIC {name} ({mac}) on {device}'.format(
|
||||
name=nic['name'], mac=nic['mac'], device=self.device.name
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if nic['vlan']:
|
||||
nb_vlan = self.get_or_create_vlan(nic['vlan'])
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue