← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1656479] Re: nova-manage cell_v2 verify_instance has unnecessary uuid check

 

Reviewed:  https://review.openstack.org/420261
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a649311af7d01335aa7cf00fc180ba35ee77f6f3
Submitter: Jenkins
Branch:    master

commit a649311af7d01335aa7cf00fc180ba35ee77f6f3
Author: Matt Riedemann <mriedem@xxxxxxxxxx>
Date:   Fri Jan 13 20:42:11 2017 -0500

    Remove redundant arg check in nova-manage cell_v2 verify_instance
    
    argparse will validate that the --uuid is provided, we don't need
    an explicit manual check for that in the code, plus the manual
    check was violating the --quiet option by printing out an error
    message anyway.
    
    This also removes the unit test which we don't really need as
    argparse is going to do it's job.
    
    Change-Id: Id1cb79c9be8ff6b94f5a7fcab99e960ad774ceac
    Closes-Bug: #1656479


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1656479

Title:
  nova-manage cell_v2 verify_instance has unnecessary uuid check

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) newton series:
  Confirmed

Bug description:
  The nova-manage cell_v2 verify_instance command has a check to see if
  the uuid argument is not provided and then fails, breaking it's own
  rule about not printing anything if --quiet is used. However, it
  doesn't even need that check because argparse will handle the
  validation of --uuid not being provided:

  https://github.com/openstack/nova/blob/a18f601753f92ff4a2a42be0962a188f583bbfb9/nova/cmd/manage.py#L1338

  stack@ocata:~$ nova-manage cell_v2 verify_instance --quiet
  usage: nova-manage cell_v2 verify_instance [-h] --uuid <uuid> [--quiet]
  nova-manage cell_v2 verify_instance: error: argument --uuid is required
  stack@ocata:~$ echo $?
  2

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1656479/+subscriptions


References