summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2019-02-19 11:26:08 -0600
committerScott Hussey <sh8121@att.com>2019-02-19 11:26:08 -0600
commit7504c2f907276ce4cc6e48c74755f3f9a9b4159c (patch)
tree4a12c69fd4ce81fd0c4e51e640396a681fd136c2
parent8f7c91fb9dc97824d426d7384ad1b8dbbf0552c9 (diff)
(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
Notes
Notes (review): Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Code-Review+1: Jeffrey Williams <jw2610@att.com> Code-Review+1: Ahmad Mahmoudi <am495p@att.com> Code-Review+2: Sean Eagan <sean.eagan@att.com> Workflow+1: Sean Eagan <sean.eagan@att.com> Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 19 Feb 2019 19:55:02 +0000 Reviewed-on: https://review.openstack.org/637948 Project: openstack/airship-drydock Branch: refs/heads/master
-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()