need to add *kwargs in VnfAbstractDriver.instantiate_vnf()

Bug #1906332 reported by LiangLu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Invalid
Medium
Ashutosh Mishra

Bug Description

Some patch added parameter while invoking instantiate_vnf() in VnfLcmDriver._instantiate_vnf(),

However kubernetes_driver.instantiate_vnf() doesnot have parameter "plugin", this will cause a parameter unmatch in calling kubernetes_driver.instantiate_vnf()

As a walkaround, we added a patch https://review.opendev.org/c/openstack/tacker/+/764138 to add parameter at kuberntets_driver.instantaite_vnf(), however we need to facing other possible paramter changing in VnfLcmDriver._instantiate_vnf(), as it is invoking both kubernetes_driver and openstack_driver here.

A solve is to add **kwargs in VnfAbstractDriver:
https://opendev.org/openstack/tacker/src/branch/master/tacker/vnfm/infra_drivers/abstract_driver.py#L93

This bug report is aim to solve this problems by as solve above

LiangLu (lianglu)
summary: - need to add *kwargs in VfnAbstractDriver.instantiate_vnf()
+ need to add *kwargs in VnfAbstractDriver.instantiate_vnf()
Changed in tacker:
assignee: nobody → LiangLu (lianglu)
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
Revision history for this message
Yasufumi Ogawa (yasufum) wrote :

Any update?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/821530

Changed in tacker:
status: New → In Progress
Revision history for this message
Ashutosh Mishra (ashutosh15) wrote (last edit ):

I am fixing this bug and I want to change to assignment.

Changed in tacker:
assignee: LiangLu (lianglu) → Ashutosh Mishra (ashutosh15)
Revision history for this message
Hiromu Asahina (h-asahina) wrote :

Sorry to interrupt.
I don't think adding **kwargs is the best solution for this problem, instead we need to just add the lacked parameter.
The abstract driver defines interfaces of infra-drivers, but **kwargs make those interfaces unclear.
Also, those interfaces can be determined in advance.
So, we can just define needed parameters without **kwargs.

Revision history for this message
Ashutosh Mishra (ashutosh15) wrote :

Dear Asahina ,

Thanks for your input.
Understand your point, I think adding of **kwargs in the parameter is fine as In some cases the multiple parameters are required and the class which inherit the abstract driver will take care the functional behavior.

Revision history for this message
Hiromu Asahina (h-asahina) wrote :

Thank you for your reply.

> the class which inherit the abstract driver will take care the functional behavior.

That's true.
So, why don't you leave the parameter unmatch?
Even if a subclass has different parameters, the code works correctly in Python.

I say this because an abstract class must not depend on any concrete classes.
A concrete class should depend on an abstract class.

Please kindly tell me if I'm wrong.

Revision history for this message
renu rani (renur) wrote :

Thank you for reply.

I agree with your point.

It seems this bug is only to take care such scenario.

Changed in tacker:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.