Expand shell test coverage for security groups

Bug #1250501 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Abhishek Chanda

Bug Description

Need to build on the shell unit tests added in this review:

https://review.openstack.org/#/c/55546/

1. Add a test case for the NoUniqueMatch found exception in _get_secgroup.
2. Add coverage for the v3 shell.

Matt Riedemann (mriedem)
tags: added: low-hanging-fruit
Changed in python-novaclient:
assignee: nobody → Abhishek Chanda (abhishek-i)
Revision history for this message
Abhishek Chanda (abhishek-i) wrote :

Hi Matt, Nova does not allow adding two security groups of the same name. Thus, the whole logic of checking if two matches with same name exists will never be executed. Am I missing something here?

Revision history for this message
Matt Riedemann (mriedem) wrote :

Hi Abhishek, I think my point is:

1. The novaclient v1.1 shell test doesn't cover this case for duplicate names:

https://github.com/openstack/python-novaclient/blob/master/novaclient/v1_1/shell.py#L2125

2. There is no security group test coverage for v3 in novaclient that I can tell. I think it should be trivial to port the test(s) that were added in the review linked above to the v3 shell in novaclient. I opened the bug rather than require the author of that review to write those tests since his change didn't impact the v3 shell.

Changed in python-novaclient:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: Triaged → In Progress
Revision history for this message
Joe Gordon (jogo) wrote :

patch was abandoned due to a blocker, looks like that is resolved and the patch can be brought back. but the patch isn't actively in progress anymore.

Changed in python-novaclient:
assignee: Abhishek Chanda (abhishek-i) → nobody
status: In Progress → Confirmed
Revision history for this message
Abhishek Chanda (abhishek-i) wrote :

This seems to be done. Do we think there is more work required here? I will update my review to remove the v3 api stuff, will also update the commit message.

Changed in python-novaclient:
assignee: nobody → Abhishek Chanda (abhishek-i)
Changed in python-novaclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/62011
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=a20284ebe8973beb5f80bb54458c2c817e184c42
Submitter: Jenkins
Branch: master

commit a20284ebe8973beb5f80bb54458c2c817e184c42
Author: Abhishek Chanda <email address hidden>
Date: Fri Dec 13 20:34:25 2013 +0530

    Add some security group tests for the V1_1 API

    This patch adds a test for NoUniqueMatch exception
    to the v1_1 API

    Change-Id: Ic9947eaed34be100c529f021432f0c388a7c3ddb
    Closes-Bug: #1250501

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
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.