Can't create server_group in cli when 'policy' isn't specified

Bug #1323909 reported by wingwj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
wingwj

Bug Description

'policy' param is a required param for in nova api. But it's a optional param in cli now and cli doesn't have one default value for it.

# nova help server-group-create
> usage: nova server-group-create [--policy <policy>] <name>

> Create a new server group with the specified details.

> Positional arguments:
> <name> Server group name.

> Optional arguments:
> --policy <policy> Policies for the server groups

Therefore, if you create a server_group without param specified using cli, a 'BadRequest' exception will be raised.

Here's the example:
# nova server-group-create wingwj
> ERROR (BadRequest): Invalid input received: 'policies' is either missing or empty. (HTTP 400) (Request-ID: req-49341cf1-41f5-4786-b825-2655bf1a8dfe)

wingwj (wingwj)
Changed in python-novaclient:
assignee: nobody → wingwj (wingwj)
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/96382

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

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

commit 376fd9f5bb825e2ce01fc9141c7477f25ac10101
Author: wingwj <email address hidden>
Date: Thu May 29 15:31:27 2014 +0800

    'policy' should be required in server_group_create

    The 'policies' param is a required param in nova api now.
    So, we also need to change it in cli.

    After the modification, the 'policy' param will be required now,
    and the old '--policy' style will still be available.

    Change-Id: I97921eef0f635c8d50a04bbdaf3ef4f1bfaa3e9d
    Closes-Bug: #1323909

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.