diff options
author | Shivanand Tendulker <stendulker@gmail.com> | 2017-11-16 11:43:16 -0500 |
---|---|---|
committer | Shivanand Tendulker <stendulker@gmail.com> | 2018-01-22 11:37:32 -0500 |
commit | fbee0981ad0afe304e58006609eabf35cfe89489 (patch) | |
tree | 1849d42aa982e96e56fbd03f13ac91b4b58473f3 /ironic/common/neutron.py | |
parent | 084da02a324ac9271b678fd029e3352b9bdb04dc (diff) | |
download | ironic-fbee0981ad0afe304e58006609eabf35cfe89489.tar.gz |
Add rescue related methods to network interface
Adds methods `add_rescuing_network` and `remove_rescuing_network`
to add/remove rescuing network to `network` interface.
These methods are not added to `flat` network interface.
The 'flat' network uses same network for tenant and provisioning.
It makes sense to use the same for rescuing as well; as opposed
to a separate network like we have for cleaning.
Change-Id: I8f4123bfe7d293e8ff6f3bfc2f25445a39c94c73
Related-bug: #1526449
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com>
Co-Authored-By: Jesse J. Cook <jesse.j.cook@member.fsf.org>
Co-Authored-By: Aparna <aparnavtce@gmail.com>
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>
Diffstat (limited to 'ironic/common/neutron.py')
-rw-r--r-- | ironic/common/neutron.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ironic/common/neutron.py b/ironic/common/neutron.py index aa30c0a50..aecf73591 100644 --- a/ironic/common/neutron.py +++ b/ironic/common/neutron.py @@ -566,6 +566,7 @@ class NeutronNetworkInterfaceMixin(object): _cleaning_network_uuid = None _provisioning_network_uuid = None + _rescuing_network_uuid = None def get_cleaning_network_uuid(self, context=None): if self._cleaning_network_uuid is None: @@ -580,3 +581,12 @@ class NeutronNetworkInterfaceMixin(object): CONF.neutron.provisioning_network, _('provisioning network'), context=context) return self._provisioning_network_uuid + + def get_rescuing_network_uuid(self, context=None): + # TODO(stendulker): FlatNetwork should not use this method. + # FlatNetwork uses tenant network for rescue operation. + if self._rescuing_network_uuid is None: + self._rescuing_network_uuid = validate_network( + CONF.neutron.rescuing_network, + _('rescuing network'), context=context) + return self._rescuing_network_uuid |