diff options
author | ghanshyam <ghanshyam.mann@nectechnologies.in> | 2015-02-24 11:18:00 +0900 |
---|---|---|
committer | Ken'ichi Ohmichi <ken1ohmichi@gmail.com> | 2015-03-05 05:23:05 +0000 |
commit | fbc45c70313184e42fe14484f6e1e044fd776549 (patch) | |
tree | 8d7a832dec3c7df99747db7127e381d4fd8b7c8b /tempest | |
parent | 1259c1cfa2093b47d840ab4c356556dd9f968d01 (diff) | |
download | tempest-fbc45c70313184e42fe14484f6e1e044fd776549.tar.gz |
Adding 'security_groups' attributes in server schema
If Nova 'os-security-groups' extension is enabled then, server post,
get & detail response will contain 'security_groups' attributes.
So that attributes should be defined in server's schema and it should
not be required as this is present only when sg extension is enabled.
This patch adds the 'security_groups' attributes in necessary schema.
Change-Id: Ibb58a2173171d237156d383ced9c3b58993058bb
Diffstat (limited to 'tempest')
-rw-r--r-- | tempest/api_schema/response/compute/v2/servers.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tempest/api_schema/response/compute/v2/servers.py b/tempest/api_schema/response/compute/v2/servers.py index 09abaed31..0132350da 100644 --- a/tempest/api_schema/response/compute/v2/servers.py +++ b/tempest/api_schema/response/compute/v2/servers.py @@ -30,10 +30,10 @@ create_server = { 'links': parameter_types.links, 'OS-DCF:diskConfig': {'type': 'string'} }, - # NOTE: OS-DCF:diskConfig is API extension, and some - # environments return a response without the attribute. - # So it is not 'required'. - 'required': ['id', 'security_groups', 'links'] + # NOTE: OS-DCF:diskConfig & security_groups are API extension, + # and some environments return a response without these + # attributes.So they are not 'required'. + 'required': ['id', 'links'] } }, 'required': ['server'] @@ -64,6 +64,7 @@ get_server = copy.deepcopy(servers.base_update_get_server) get_server['response_body']['properties']['server']['properties'].update({ 'key_name': {'type': ['string', 'null']}, 'hostId': {'type': 'string'}, + 'security_groups': {'type': 'array'}, # NOTE: Non-admin users also can see "OS-SRV-USG" and "OS-EXT-AZ" # attributes. @@ -288,10 +289,11 @@ list_servers_detail['response_body']['properties']['servers']['items'][ 'properties'].update({ 'hostId': {'type': 'string'}, 'OS-DCF:diskConfig': {'type': 'string'}, + 'security_groups': {'type': 'array'}, 'accessIPv4': parameter_types.access_ip_v4, 'accessIPv6': parameter_types.access_ip_v6 }) -# NOTE(GMann): OS-DCF:diskConfig and accessIPv4/v6 are API +# NOTE(GMann): OS-DCF:diskConfig, security_groups and accessIPv4/v6 are API # extensions, and some environments return a response # without these attributes. So they are not 'required'. list_servers_detail['response_body']['properties']['servers']['items'][ |