You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.2 KiB

# Copyright 2012 OpenStack Foundation
# 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
# 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.
from oslo_log import log as logging
import testtools
from tempest.common import utils
from tempest.common import waiters
from tempest import config
from tempest.lib import decorators
from tempest.scenario import manager
CONF = config.CONF
LOG = logging.getLogger(__name__)
class TestServerAdvancedOps(manager.ScenarioTest):
"""The test suite for server advanced operations
This test case stresses some advanced server instance operations:
* Sequence suspend resume
def setup_credentials(cls):
super(TestServerAdvancedOps, cls).setup_credentials()
'Suspend is not available.')'compute')
def test_server_sequence_suspend_resume(self):
# We create an instance for use in this test
instance_id = self.create_server()['id']
for _ in range(2):
LOG.debug("Suspending instance %s", instance_id)
waiters.wait_for_server_status(self.servers_client, instance_id,
LOG.debug("Resuming instance %s", instance_id)
waiters.wait_for_server_status(self.servers_client, instance_id,