summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/drydock_provisioner/drivers/node/maasdriver/models/fabric.py2
-rw-r--r--python/drydock_provisioner/drivers/node/maasdriver/models/machine.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/drydock_provisioner/drivers/node/maasdriver/models/fabric.py b/python/drydock_provisioner/drivers/node/maasdriver/models/fabric.py
index 70dfe5e..996e62c 100644
--- a/python/drydock_provisioner/drivers/node/maasdriver/models/fabric.py
+++ b/python/drydock_provisioner/drivers/node/maasdriver/models/fabric.py
@@ -26,7 +26,7 @@ class Fabric(model_base.ResourceBase):
26 def __init__(self, api_client, **kwargs): 26 def __init__(self, api_client, **kwargs):
27 super(Fabric, self).__init__(api_client, **kwargs) 27 super(Fabric, self).__init__(api_client, **kwargs)
28 28
29 if hasattr(self, 'resource_id'): 29 if getattr(self, 'resource_id', None):
30 self.refresh_vlans() 30 self.refresh_vlans()
31 31
32 def refresh(self): 32 def refresh(self):
diff --git a/python/drydock_provisioner/drivers/node/maasdriver/models/machine.py b/python/drydock_provisioner/drivers/node/maasdriver/models/machine.py
index 4a92666..8350720 100644
--- a/python/drydock_provisioner/drivers/node/maasdriver/models/machine.py
+++ b/python/drydock_provisioner/drivers/node/maasdriver/models/machine.py
@@ -46,7 +46,7 @@ class Machine(model_base.ResourceBase):
46 super(Machine, self).__init__(api_client, **kwargs) 46 super(Machine, self).__init__(api_client, **kwargs)
47 47
48 # Replace generic dicts with interface collection model 48 # Replace generic dicts with interface collection model
49 if hasattr(self, 'resource_id'): 49 if getattr(self, 'resource_id', None):
50 self.interfaces = maas_interface.Interfaces( 50 self.interfaces = maas_interface.Interfaces(
51 api_client, system_id=self.resource_id) 51 api_client, system_id=self.resource_id)
52 self.interfaces.refresh() 52 self.interfaces.refresh()