diff --git a/doc/api_samples/servers/server-create-req-v257.json b/doc/api_samples/servers/server-create-req-v257.json new file mode 100644 index 000000000000..c6d8dec24244 --- /dev/null +++ b/doc/api_samples/servers/server-create-req-v257.json @@ -0,0 +1,21 @@ +{ + "server" : { + "accessIPv4": "1.2.3.4", + "accessIPv6": "80fe::", + "name" : "new-server-test", + "imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b", + "flavorRef" : "http://openstack.example.com/flavors/1", + "availability_zone": "nova", + "OS-DCF:diskConfig": "AUTO", + "metadata" : { + "My Server Name" : "Apache1" + }, + "security_groups": [ + { + "name": "default" + } + ], + "user_data": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==", + "networks": "auto" + } +} diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v257.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v257.json.tpl new file mode 100644 index 000000000000..14898309f1ba --- /dev/null +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v257.json.tpl @@ -0,0 +1,21 @@ +{ + "server" : { + "accessIPv4": "%(access_ip_v4)s", + "accessIPv6": "%(access_ip_v6)s", + "name" : "%(name)s", + "imageRef" : "%(image_id)s", + "flavorRef" : "http://openstack.example.com/flavors/1", + "availability_zone": "nova", + "OS-DCF:diskConfig": "AUTO", + "metadata" : { + "My Server Name" : "Apache1" + }, + "security_groups": [ + { + "name": "default" + } + ], + "user_data" : "%(user_data)s", + "networks": "auto" + } +} diff --git a/nova/tests/functional/api_sample_tests/test_servers.py b/nova/tests/functional/api_sample_tests/test_servers.py index b34cfc9061e0..2d6882642ae4 100644 --- a/nova/tests/functional/api_sample_tests/test_servers.py +++ b/nova/tests/functional/api_sample_tests/test_servers.py @@ -33,7 +33,8 @@ class ServersSampleBase(api_sample_base.ApiSampleTestBaseV21): common_req_names = [ (None, '2.36', 'server-create-req'), - ('2.37', None, 'server-create-req-v237') + ('2.37', '2.56', 'server-create-req-v237'), + ('2.57', None, 'server-create-req-v257') ] def _get_request_name(self, use_common):