_create_subnet mehod in scenario manager fails if cidr is included in **kwargs

Bug #1414702 reported by Xavi León
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Won't Fix
Low
Joshua White

Bug Description

We have an internal test which passes a specific cdir to the private method tempest.scenario.manager._create_subnet(**kwargs). Internally, this method creates a dict with some fields already populated and includes the argument kwargs:

subnet = dict(
                name=data_utils.rand_name(namestart),
                network_id=network.id,
                tenant_id=network.tenant_id,
                cidr=str_cidr,
                ip_version=ip_version,
                **kwargs
            )

If kwargs contains the key cidr, this dict creation fails with:

Traceback (most recent call last):
TypeError: type object got multiple values for keyword argument 'cidr'

Changing the above subnet dict creation by a two-step create/update solves the problem:

subnet = dict(
                name=data_utils.rand_name(namestart),
                network_id=network.id,
                tenant_id=network.tenant_id,
                cidr=str_cidr,
                ip_version=ip_version
            )
subnet.update(**kwargs)

I have a patch ready, but wanted to share it in case I missed something.

Revision history for this message
Mauro S M Rodrigues (maurorodrigues) wrote :

Hey Xavi, thanks for reporting this! Yeah the bug exists, you're not missing anything.
Please assign yourself and submit the patch if you're still willing to work on the fix

Changed in tempest:
status: New → Confirmed
importance: Undecided → Low
Xavi León (xleon)
Changed in tempest:
assignee: nobody → Xavi León (xavi-leon)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/151692

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Ken'ichi Ohmichi (<email address hidden>) on branch: master
Review: https://review.openstack.org/151692
Reason: As http://lists.openstack.org/pipermail/openstack-dev/2016-May/096204.html , we start abandoning patches have gotten old without any updating after negative feedback. Please restore if necessary to restart this again.

Changed in tempest:
assignee: Xavi León (xleon) → Joshua White (joshua-l-white)
Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

The method is not public/stable interface, and it is difficult to apply requirements of companies' internal tests to upstream dev.
This needs to be marked as "Won't fix" then.

Changed in tempest:
status: In Progress → Won't Fix
Revision history for this message
Xavi León (xleon) wrote :

Sounds good to me. However, if internal tests uncover upstream bugs/not reliable code, I don't see the problem in merging the fix (even more if it doesn't impact other upstream tests). Anyway, I'm ok with abandoning it. Thanks for taking the time to review and update the issue.

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.