Merge "Verify delete agent response of V2/V3 APIs"
This commit is contained in:
commit
e69c862116
17
tempest/api_schema/compute/v2/agents.py
Normal file
17
tempest/api_schema/compute/v2/agents.py
Normal file
@ -0,0 +1,17 @@
|
||||
# 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.
|
||||
|
||||
delete_agent = {
|
||||
'status_code': [200]
|
||||
}
|
17
tempest/api_schema/compute/v3/agents.py
Normal file
17
tempest/api_schema/compute/v3/agents.py
Normal file
@ -0,0 +1,17 @@
|
||||
# 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.
|
||||
|
||||
delete_agent = {
|
||||
'status_code': [204]
|
||||
}
|
@ -15,6 +15,7 @@
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from tempest.api_schema.compute.v2 import agents as schema
|
||||
from tempest.common import rest_client
|
||||
from tempest import config
|
||||
|
||||
@ -46,7 +47,9 @@ class AgentsClientJSON(rest_client.RestClient):
|
||||
|
||||
def delete_agent(self, agent_id):
|
||||
"""Delete an existing agent build."""
|
||||
return self.delete('os-agents/%s' % str(agent_id))
|
||||
resp, body = self.delete("os-agents/%s" % str(agent_id))
|
||||
self.validate_response(schema.delete_agent, resp, body)
|
||||
return resp, body
|
||||
|
||||
def update_agent(self, agent_id, **kwargs):
|
||||
"""Update an agent build."""
|
||||
|
@ -15,6 +15,7 @@
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from tempest.api_schema.compute.v3 import agents as schema
|
||||
from tempest.common import rest_client
|
||||
from tempest import config
|
||||
|
||||
@ -43,7 +44,9 @@ class AgentsV3ClientJSON(rest_client.RestClient):
|
||||
|
||||
def delete_agent(self, agent_id):
|
||||
"""Delete an existing agent build."""
|
||||
return self.delete('os-agents/%s' % str(agent_id))
|
||||
resp, body = self.delete("os-agents/%s" % str(agent_id))
|
||||
self.validate_response(schema.delete_agent, resp, body)
|
||||
return resp, body
|
||||
|
||||
def update_agent(self, agent_id, **kwargs):
|
||||
"""Update an agent build."""
|
||||
|
Loading…
Reference in New Issue
Block a user