Merge "Convert request schema (servers)"
This commit is contained in:
commit
9cfa75e3af
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "get-console-output",
|
|
||||||
"http-method": "POST",
|
|
||||||
"url": "servers/%s/action",
|
|
||||||
"resources": [
|
|
||||||
{"name":"server", "expected_result": 404}
|
|
||||||
],
|
|
||||||
"json-schema": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"os-getConsoleOutput": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"length": {
|
|
||||||
"type": ["integer", "string"],
|
|
||||||
"minimum": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false
|
|
||||||
}
|
|
||||||
}
|
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from tempest.api.compute import base
|
from tempest.api.compute import base
|
||||||
|
from tempest.api_schema.request.compute.v2 import servers
|
||||||
from tempest import test
|
from tempest import test
|
||||||
|
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ load_tests = test.NegativeAutoTest.load_tests
|
|||||||
class GetConsoleOutputNegativeTestJSON(base.BaseV2ComputeTest,
|
class GetConsoleOutputNegativeTestJSON(base.BaseV2ComputeTest,
|
||||||
test.NegativeAutoTest):
|
test.NegativeAutoTest):
|
||||||
_service = 'compute'
|
_service = 'compute'
|
||||||
_schema_file = 'compute/servers/get_console_output.json'
|
_schema = servers.get_console_output
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
36
tempest/api_schema/request/compute/servers.py
Normal file
36
tempest/api_schema/request/compute/servers.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# (c) 2014 Deutsche Telekom AG
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
common_get_console_output = {
|
||||||
|
"name": "get-console-output",
|
||||||
|
"http-method": "POST",
|
||||||
|
"url": "servers/%s/action",
|
||||||
|
"resources": [
|
||||||
|
{"name": "server", "expected_result": 404}
|
||||||
|
],
|
||||||
|
"json-schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"os-getConsoleOutput": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"length": {
|
||||||
|
"type": ["integer", "string"],
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": False
|
||||||
|
}
|
||||||
|
}
|
18
tempest/api_schema/request/compute/v2/servers.py
Normal file
18
tempest/api_schema/request/compute/v2/servers.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# (c) 2014 Deutsche Telekom AG
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
import copy
|
||||||
|
|
||||||
|
from tempest.api_schema.request.compute import servers
|
||||||
|
|
||||||
|
get_console_output = copy.deepcopy(servers.common_get_console_output)
|
Loading…
x
Reference in New Issue
Block a user