Skip to content
Permalink
Browse files

[POC] Add new fake parameter for evacuate

This patch is show the demo how to do back-compatibility change.

Change-Id: I8f9cc1fee312033bb89e74988010bfa9d7f4636f
  • Loading branch information...
soulxu committed Sep 13, 2014
1 parent 295a28f commit 04896d1109b6ce9d213eaf1f270a8c8c34ca04c6
@@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs):
# TODO(eliqiao): Should be responding here with 202 Accept
# because evacuate is an async call, but keep to 200 for
# backwards compatibility reasons.
@wsgi.Controller.version('2.1', max='3.0')
@wsgi.Controller.version('2.1', max='3.1')
@extensions.expected_errors((400, 404, 409))
@wsgi.action('evacuate')
@validation.schema(schema=evacuate)
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.

import copy

from nova.api.validation import parameter_types


@@ -78,3 +80,9 @@
'additionalProperties': False,
'ext:mapping': {'admin_pass': 'admin_pass'}
}

request_3_1 = copy.deepcopy(request_3_0)
request_3_1['properties']['evacuate']['properties'].update(
{'fake_param': {'type': 'string'}})

response_3_1 = response_3_0

0 comments on commit 04896d1

Please sign in to comment.
You can’t perform that action at this time.