# # 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. """Stress test that associates/disasssociates floating ips.""" import datetime from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_floating_ips import TestChangeFloatingIp from tempest import clients choice_spec = [ BasherAction(TestChangeFloatingIp(), 100) ] nova = clients.Manager() bash_openstack(nova, choice_spec, duration=datetime.timedelta(seconds=300), test_name="floating_ips", initial_floating_ips=8, initial_vms=8)
# 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. """Test that reboots random instances in a Nova cluster.""" import datetime import time from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_server_actions import TestRebootVM from stress.test_servers import TestCreateVM from tempest import clients choice_spec = [ BasherAction(TestCreateVM(), 50), BasherAction(TestRebootVM(), 50, kargs={'type': 'HARD'}) ] nova = clients.Manager() bash_openstack( nova, choice_spec, duration=datetime.timedelta(seconds=180), sleep_time=500, # in milliseconds seed=int(time.time()), test_name="hard reboots", )
# 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. """Test that reboots random instances in a Nova cluster.""" import datetime import time from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_server_actions import TestRebootVM from stress.test_servers import TestCreateVM from tempest import clients choice_spec = [ BasherAction(TestCreateVM(), 50), BasherAction(TestRebootVM(), 50, kargs={'type': 'HARD'}) ] nova = clients.Manager() bash_openstack(nova, choice_spec, duration=datetime.timedelta(seconds=180), sleep_time=500, # in milliseconds seed=int(time.time()), test_name="hard reboots", )
# 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. """Sample stress test that creates a few virtual machines and then destroys them""" import datetime from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_servers import TestCreateVM from stress.test_servers import TestKillActiveVM from tempest import clients choice_spec = [ BasherAction(TestCreateVM(), 50, kargs={'timeout': '60'}), BasherAction(TestKillActiveVM(), 50) ] nova = clients.Manager() bash_openstack( nova, choice_spec, duration=datetime.timedelta(seconds=10), sleep_time=1000, # in milliseconds seed=None, test_name="simple create and delete", max_vms=4)
# # 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. """More aggressive test that creates and destroys VMs with shorter sleep times""" import datetime import time from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_servers import TestCreateVM from stress.test_servers import TestKillActiveVM from tempest import clients choice_spec = [BasherAction(TestCreateVM(), 50), BasherAction(TestKillActiveVM(), 50)] nova = clients.Manager() bash_openstack( nova, choice_spec, duration=datetime.timedelta(seconds=180), sleep_time=100, # in milliseconds seed=int(time.time()), test_name="create and delete", )
# 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. """More aggressive test that creates and destroys VMs with shorter sleep times""" import datetime import time from stress.basher import BasherAction from stress.driver import bash_openstack from stress.test_servers import TestCreateVM from stress.test_servers import TestKillActiveVM from tempest import clients choice_spec = [ BasherAction(TestCreateVM(), 50), BasherAction(TestKillActiveVM(), 50) ] nova = clients.Manager() bash_openstack( nova, choice_spec, duration=datetime.timedelta(seconds=180), sleep_time=100, # in milliseconds seed=int(time.time()), test_name="create and delete", )