PodVIFDriver impl - fix release_vif() signature
Some of the implementations of PodVIFDriver do not have the project_id
and security_groups parameters, resulting in runtime exceptions if these
drivers are used with handlers that expect base class signature to be
followed.
Change-Id: Id1972e02f71238771062cdebec37a3a8a22d768b
Closes-Bug: 1787918
Signed-off-by: Yash Gupta <y.gupta@samsung.com>
(cherry picked from commit b52f8204a8
)
This commit is contained in:
parent
531ed16e5d
commit
eff54762d7
|
@ -53,7 +53,7 @@ class NestedMacvlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
|
|||
# TODO(mchiappe): provide an implementation
|
||||
raise NotImplementedError()
|
||||
|
||||
def release_vif(self, pod, vif):
|
||||
def release_vif(self, pod, vif, project_id=None, security_groups=None):
|
||||
neutron = clients.get_neutron_client()
|
||||
container_port = neutron.show_port(vif.id).get('port')
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class NestedVlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
|
|||
vifs.append(vif)
|
||||
return vifs
|
||||
|
||||
def release_vif(self, pod, vif):
|
||||
def release_vif(self, pod, vif, project_id=None, security_groups=None):
|
||||
neutron = clients.get_neutron_client()
|
||||
parent_port = self._get_parent_port(neutron, pod)
|
||||
trunk_id = self._get_trunk_id(parent_port)
|
||||
|
|
|
@ -70,7 +70,7 @@ class NeutronPodVIFDriver(base.PodVIFDriver):
|
|||
vifs.append(vif)
|
||||
return vifs
|
||||
|
||||
def release_vif(self, pod, vif):
|
||||
def release_vif(self, pod, vif, project_id=None, security_groups=None):
|
||||
neutron = clients.get_neutron_client()
|
||||
|
||||
try:
|
||||
|
|
|
@ -69,7 +69,7 @@ class NoopVIFPool(base.VIFPoolDriver):
|
|||
security_groups)
|
||||
|
||||
def release_vif(self, pod, vif, *argv):
|
||||
self._drv_vif.release_vif(pod, vif)
|
||||
self._drv_vif.release_vif(pod, vif, *argv)
|
||||
|
||||
def activate_vif(self, pod, vif):
|
||||
self._drv_vif.activate_vif(pod, vif)
|
||||
|
|
Loading…
Reference in New Issue