(fix) Support non-present networks
- Drydock should support defined networks that MAAS cannot see. This fixes an issue that caused this use-case to fail by ensuring that the MAAS client models with no internal resource IDs work. Change-Id: I1a20d4730e94eee7268ff0cc3451e4b459a1e62b
This commit is contained in:
parent
8f7c91fb9d
commit
7504c2f907
@ -26,7 +26,7 @@ class Fabric(model_base.ResourceBase):
|
||||
def __init__(self, api_client, **kwargs):
|
||||
super(Fabric, self).__init__(api_client, **kwargs)
|
||||
|
||||
if hasattr(self, 'resource_id'):
|
||||
if getattr(self, 'resource_id', None):
|
||||
self.refresh_vlans()
|
||||
|
||||
def refresh(self):
|
||||
|
@ -46,7 +46,7 @@ class Machine(model_base.ResourceBase):
|
||||
super(Machine, self).__init__(api_client, **kwargs)
|
||||
|
||||
# Replace generic dicts with interface collection model
|
||||
if hasattr(self, 'resource_id'):
|
||||
if getattr(self, 'resource_id', None):
|
||||
self.interfaces = maas_interface.Interfaces(
|
||||
api_client, system_id=self.resource_id)
|
||||
self.interfaces.refresh()
|
||||
|
Loading…
Reference in New Issue
Block a user