cbfe35322e
By defining the API schema, it is possible to separate the validation code from the API method. The API method can be more simple. In addition, a response of API validation error can be consistent for the whole Nova API. Partially implements blueprint v3-api-schema Change-Id: I495e7538e5d8d67f19792dfa0427ab7a1b0068cf
25 lines
808 B
Python
25 lines
808 B
Python
# Copyright 2014 NEC Corporation. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
server_create = {
|
|
'accessIPv4': {
|
|
'type': 'string',
|
|
'format': 'ipv4',
|
|
},
|
|
'accessIPv6': {
|
|
'type': 'string',
|
|
'format': 'ipv6',
|
|
}
|
|
}
|