Add boot server scenario for EC2 API

Add ec2 client to osclients and add boot server scenario

Change-Id: I78b3feced22071f62b1a2bd03c3b093402954c50
This commit is contained in:
Wataru Takase 2015-01-15 16:07:00 +01:00
parent 09530eb627
commit a9022bb3bd
6 changed files with 91 additions and 7 deletions

View File

@ -365,6 +365,16 @@
# Cluster status polling interval in seconds (integer value)
#job_check_interval = 5
# Time to sleep after boot before polling for status (floating point
# value)
#ec2_server_boot_prepoll_delay = 1.0
# Server boot timeout (floating point value)
#ec2_server_boot_timeout = 300.0
# Server boot poll interval (floating point value)
#ec2_server_boot_poll_interval = 1.0
[database]
@ -455,19 +465,20 @@
# lost. (boolean value)
#use_db_reconnect = false
# Seconds between database connection retries. (integer value)
# Seconds between retries of a database transaction. (integer value)
#db_retry_interval = 1
# If True, increases the interval between database connection retries
# up to db_max_retry_interval. (boolean value)
# If True, increases the interval between retries of a database
# operation up to db_max_retry_interval. (boolean value)
#db_inc_retry_interval = true
# If db_inc_retry_interval is set, the maximum seconds between
# database connection retries. (integer value)
# If db_inc_retry_interval is set, the maximum seconds between retries
# of a database operation. (integer value)
#db_max_retry_interval = 10
# Maximum database connection retries before error is raised. Set to
# -1 to specify an infinite retry count. (integer value)
# Maximum retries in case of connection error or deadlock error before
# error is raised. Set to -1 to specify an infinite retry count.
# (integer value)
#db_max_retries = 20

View File

@ -1448,3 +1448,22 @@
sla:
failure_rate:
max: 0
EC2Servers.boot_server:
-
args:
flavor:
name: "m1.tiny"
image:
name: {{image_name}}
runner:
type: "constant"
times: 3
concurrency: 3
context:
users:
tenants: 3
users_per_tenant: 1
sla:
failure_rate:
max: 0

View File

@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
Babel>=1.3
boto>=2.32.1
decorator>=3.4.0
fixtures>=0.3.14
iso8601>=0.1.9

View File

@ -0,0 +1,25 @@
{
"EC2Servers.boot_server": [
{
"args": {
"flavor": {
"name": "m1.nano"
},
"image": {
"name": "^cirros.*uec$"
}
},
"runner": {
"type": "constant",
"times": 10,
"concurrency": 2
},
"context": {
"users": {
"tenants": 3,
"users_per_tenant": 2
}
}
}
]
}

View File

@ -0,0 +1,16 @@
---
EC2Servers.boot_server:
-
args:
flavor:
name: "m1.nano"
image:
name: "^cirros.*uec$"
runner:
type: "constant"
times: 10
concurrency: 2
context:
users:
tenants: 3
users_per_tenant: 2

View File

@ -1304,6 +1304,12 @@ class FakeSwiftClient(FakeObjectManager):
pass
class FakeEC2Client(object):
def __init__(self):
pass
class FakeClients(object):
def __init__(self, endpoint_=None):
@ -1321,6 +1327,7 @@ class FakeClients(object):
self._mistral = None
self._swift = None
self._murano = None
self._ec2 = None
self._endpoint = endpoint_ or objects.Endpoint(
"http://fake.example.org:5000/v2.0/",
"fake_username",
@ -1400,6 +1407,11 @@ class FakeClients(object):
self._murano = FakeMuranoClient()
return self._murano
def ec2(self):
if not self._ec2:
self._ec2 = FakeEC2Client()
return self._ec2
class FakeRunner(object):