Description of problem: Currently when Version-Release number of selected component (if applicable): (overcloud) [stack@undercloud-0 ~]$ yum list installed | grep openstackclient python-openstackclient-lang.noarch python2-openstackclient.noarch 3.14.1-1.el7ost @rhelosp-13.0-puddle How reproducible: 100% Steps to Reproduce: Try to create a server group specifying soft affinity "openstack server group create --policy soft-affinity test" Actual results: An error is thrown that soft-affinity isn't an allowed policy "Invalid input for field/attribute 0. Value: soft-affinity. u'soft-affinity' is not one of ['anti-affinity', 'affinity'] (HTTP 400) (Request-ID: req-64cb0644-1be8-404f-8e5e-ea1a16074d34)" Expected results: A server group should be created with a soft-affinity policy (as it does with the nova cli) "nova server-group-create test soft-affinity +--------------------------------------+------+----------------------------------+----------------------------------+--------------------+---------+----------+ | Id | Name | Project Id | User Id | Policies | Members | Metadata | +--------------------------------------+------+----------------------------------+----------------------------------+--------------------+---------+----------+ | 2eda6fba-ca74-4ff4-a6fd-2e03235e3269 | test | 8fe48d39b6064c07bca9cc8d5aef1bbf | b23ae64def6a4f528c8463d84cd2e040 | [u'soft-affinity'] | [] | {} | +--------------------------------------+------+----------------------------------+----------------------------------+--------------------+---------+----------+" Additional info:
Updating Description, sorry about that: Currently when using the nova CLI we can create server groups using the following policies: Affinity, Anti-Affinity, Soft-Affinity, and Soft-Anti-Affinity. When trying to use the OpenStack CLI, we can only create server groups using Affinity or Anti-Affinity
Looking at https://bugs.launchpad.net/python-openstackclient/+bug/1732938 and also bug 1447798 this should be fixed since 3.12.1. Could you try again with the --os-compute-api-version 2.15 flag? Something like: $ openstack server group create test \ --policy soft-anti-affinity \ --os-compute-api-version 2.15
Thanks Julie. That did the trick, I'll go ahead and close the bug (overcloud) [stack@undercloud-0 ~]$ openstack --os-compute-api-version 2.15 server group create test --policy soft-affinity +------------+--------------------------------------+ | Field | Value | +------------+--------------------------------------+ | id | 402d9359-7df7-4a9b-95da-4efb29bb0710 | | members | | | name | test | | policies | soft-affinity | | project_id | 3d9c35e4ff674ded8fa6a125523af9f1 | | user_id | 405f5080f9874df09f4264f15dcc3590 | +------------+--------------------------------------+