Allow to specify how many compute nodes need to be used
Change-Id: I84ab43437b8c67ac19042233a28c552b8586560c
This commit is contained in:
parent
b54f5ede47
commit
44f30011b7
21
scenarios/networking/l2_dense.yaml
Normal file
21
scenarios/networking/l2_dense.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
description:
|
||||||
|
This scenario launches several pairs of VMs on pair of compute nodes.
|
||||||
|
VM are plugged into the same private network. Useful for testing performance
|
||||||
|
degradation when the number of VMs grows.
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
template: l2.hot
|
||||||
|
vm_accommodation: [pair, double_room, density: 8, compute_nodes: 2]
|
||||||
|
|
||||||
|
execution:
|
||||||
|
size: 'quadratic_progression'
|
||||||
|
tests:
|
||||||
|
-
|
||||||
|
title: Iperf TCP test
|
||||||
|
class: iperf_graph
|
||||||
|
time: 60
|
||||||
|
-
|
||||||
|
title: Netperf TCP_STREAM
|
||||||
|
class: netperf
|
||||||
|
method: TCP_STREAM
|
||||||
|
time: 60
|
@ -1,20 +0,0 @@
|
|||||||
description:
|
|
||||||
This scenario launches pairs of VMs in the same private network. Every VM is
|
|
||||||
hosted on a separate compute node.
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
template: l2.hot
|
|
||||||
vm_accommodation: [pair, double_room, density: 2]
|
|
||||||
|
|
||||||
execution:
|
|
||||||
size: 'linear_progression'
|
|
||||||
tests:
|
|
||||||
-
|
|
||||||
title: Iperf TCP test
|
|
||||||
class: iperf_graph
|
|
||||||
time: 60
|
|
||||||
-
|
|
||||||
title: Netperf TCP_STREAM
|
|
||||||
class: netperf
|
|
||||||
method: TCP_STREAM
|
|
||||||
time: 60
|
|
@ -27,12 +27,15 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def generate_agents(compute_nodes, vm_accommodation, unique):
|
def generate_agents(compute_nodes, vm_accommodation, unique):
|
||||||
cn_count = len(compute_nodes)
|
density = 1
|
||||||
iterations = cn_count
|
|
||||||
|
|
||||||
for s in vm_accommodation:
|
for s in vm_accommodation:
|
||||||
if isinstance(s, dict) and s.get('density'):
|
if isinstance(s, dict):
|
||||||
iterations *= s.get('density')
|
density = s.get('density', 1)
|
||||||
|
if s.get('compute_nodes'):
|
||||||
|
compute_nodes = compute_nodes[:s.get('compute_nodes')]
|
||||||
|
|
||||||
|
cn_count = len(compute_nodes)
|
||||||
|
iterations = cn_count * density
|
||||||
|
|
||||||
if 'single_room' in vm_accommodation and 'pair' in vm_accommodation:
|
if 'single_room' in vm_accommodation and 'pair' in vm_accommodation:
|
||||||
iterations //= 2
|
iterations //= 2
|
||||||
|
@ -141,6 +141,41 @@ class TestDeploy(testtools.TestCase):
|
|||||||
unique)
|
unique)
|
||||||
self.assertEqual(expected, actual)
|
self.assertEqual(expected, actual)
|
||||||
|
|
||||||
|
def test_generate_agents_alone_single_room_compute_nodes(self):
|
||||||
|
unique = 'UU1D'
|
||||||
|
expected = {
|
||||||
|
'UU1D_agent_0': {
|
||||||
|
'id': 'UU1D_agent_0',
|
||||||
|
'mode': 'alone',
|
||||||
|
'node': 'uno'},
|
||||||
|
'UU1D_agent_1': {
|
||||||
|
'id': 'UU1D_agent_1',
|
||||||
|
'mode': 'alone',
|
||||||
|
'node': 'duo'},
|
||||||
|
}
|
||||||
|
actual = deploy.generate_agents(['uno', 'duo', 'tre'],
|
||||||
|
['single_room', {'compute_nodes': 2}],
|
||||||
|
unique)
|
||||||
|
self.assertEqual(expected, actual)
|
||||||
|
|
||||||
|
def test_generate_agents_alone_single_room_density_compute_nodes(self):
|
||||||
|
unique = 'UU1D'
|
||||||
|
expected = {
|
||||||
|
'UU1D_agent_0': {
|
||||||
|
'id': 'UU1D_agent_0',
|
||||||
|
'mode': 'alone',
|
||||||
|
'node': 'uno'},
|
||||||
|
'UU1D_agent_1': {
|
||||||
|
'id': 'UU1D_agent_1',
|
||||||
|
'mode': 'alone',
|
||||||
|
'node': 'uno'},
|
||||||
|
}
|
||||||
|
actual = deploy.generate_agents(['uno', 'duo', 'tre'],
|
||||||
|
['single_room', {'compute_nodes': 1},
|
||||||
|
{'density': 2}],
|
||||||
|
unique)
|
||||||
|
self.assertEqual(expected, actual)
|
||||||
|
|
||||||
def test_filter_agents_all_deployed(self):
|
def test_filter_agents_all_deployed(self):
|
||||||
agents = {
|
agents = {
|
||||||
'UU1D_agent_0': {
|
'UU1D_agent_0': {
|
||||||
|
Loading…
Reference in New Issue
Block a user