Merge "Add Rally test to measure docker create/delete network with/without kuryr."
This commit is contained in:
commit
ba6b15f618
rally-jobs
@ -3,8 +3,8 @@
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 40
|
||||
concurrency: 20
|
||||
times: 20
|
||||
concurrency: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
@ -16,12 +16,29 @@
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Kuryr.create_and_delete_networks:
|
||||
Kuryr.create_and_delete_networks_with_kuryr:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 4
|
||||
times: 20
|
||||
concurrency: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
quotas:
|
||||
neutron:
|
||||
network: -1
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Kuryr.create_and_delete_networks_without_kuryr:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 20
|
||||
concurrency: 1
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
|
@ -43,13 +43,28 @@ class Kuryr(utils.KuryrScenario):
|
||||
self._list_networks(network_list_args or {})
|
||||
|
||||
@scenario.configure(context={"cleanup": ["kuryr"]})
|
||||
def create_and_delete_networks(self, network_create_args=None):
|
||||
"""Create and delete a network.
|
||||
def create_and_delete_networks_with_kuryr(self, network_create_args=None):
|
||||
"""Create and delete a network with kuryr.
|
||||
|
||||
Measure the "docker network create" and "docker network rm" command
|
||||
performance.
|
||||
performance with kuryr driver.
|
||||
|
||||
:param network_create_args: dict as options to create the network
|
||||
"""
|
||||
network = self._create_network(network_create_args or {})
|
||||
network = self._create_network(is_kuryr=True,
|
||||
network_create_args=network_create_args or {})
|
||||
self._delete_network(network)
|
||||
|
||||
@scenario.configure(context={"cleanup": ["kuryr"]})
|
||||
def create_and_delete_networks_without_kuryr(self,
|
||||
network_create_args=None):
|
||||
"""Create and delete a network without kuryr.
|
||||
|
||||
Measure the "docker network create" and "docker network rm" command
|
||||
performance with default driver.
|
||||
|
||||
:param network_create_args: dict as options to create the network
|
||||
"""
|
||||
network = self._create_network(is_kuryr=False,
|
||||
network_create_args=network_create_args or {})
|
||||
self._delete_network(network)
|
||||
|
@ -41,17 +41,32 @@ class KuryrScenario(scenario.OpenStackScenario):
|
||||
return self.docker_client.networks(names, ids)
|
||||
|
||||
@atomic.action_timer("kuryr.create_network")
|
||||
def _create_network(self, network_create_args):
|
||||
"""Create Kuryr network.
|
||||
def _create_network(self, is_kuryr=True, network_create_args=None):
|
||||
"""Create network with kuryr or without kuryr.
|
||||
|
||||
:param network_create_args: dict: name, driver and others
|
||||
:returns: dict of the created network reference object
|
||||
"""
|
||||
name = self.generate_random_name()
|
||||
return self.docker_client.create_network(name=name,
|
||||
driver='kuryr',
|
||||
options=network_create_args
|
||||
)
|
||||
if is_kuryr:
|
||||
ipam = {
|
||||
"Driver": "kuryr",
|
||||
"Options": {},
|
||||
"Config": [
|
||||
{
|
||||
"Subnet": "20.0.0.0/24",
|
||||
"IPRange": "20.0.0.0/24",
|
||||
"Gateway": "20.0.0.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
return self.docker_client.create_network(name=name,
|
||||
driver='kuryr',
|
||||
ipam=ipam,
|
||||
options=network_create_args)
|
||||
else:
|
||||
return self.docker_client.create_network(name=name,
|
||||
options=network_create_args)
|
||||
|
||||
@atomic.action_timer("kuryr.delete_network")
|
||||
def _delete_network(self, network):
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"Kuryr.create_and_delete_networks": [
|
||||
"Kuryr.create_and_delete_networks_with_kuryr": [
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"concurrency": 2,
|
||||
"times": 4
|
||||
"times": 20
|
||||
},
|
||||
"args": {
|
||||
"network_create_args": {}
|
||||
@ -25,4 +25,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"Kuryr.create_and_delete_networks_without_kuryr": [
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"concurrency": 2,
|
||||
"times": 20
|
||||
},
|
||||
"args": {
|
||||
"network_create_args": {}
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"project_domain": "default",
|
||||
"users_per_tenant": 3,
|
||||
"tenants": 3,
|
||||
"resource_management_workers": 10,
|
||||
"user_domain": "default"
|
||||
},
|
||||
"quotas": {
|
||||
"neutron": {
|
||||
"network": -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"concurrency": 10,
|
||||
"times": 100
|
||||
"concurrency": 2,
|
||||
"times": 20
|
||||
},
|
||||
"args": {
|
||||
"network_list_args": {}
|
||||
@ -25,4 +25,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user