Network configuration info added to stats
Change-Id: Ieffcdd66e1b1adf36ba375aeb2398216eba93b42 Closes-Bug: #1410274
This commit is contained in:
parent
f714797f5b
commit
d60bf4e852
|
@ -66,7 +66,18 @@
|
|||
}
|
||||
},
|
||||
"status": {"type": "string"},
|
||||
"attributes": {"type": "object"}
|
||||
"attributes": {"type": "object"},
|
||||
"network_configuration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"segmentation_type": {"type": "string"},
|
||||
"net_l23_provider": {"type": "string"},
|
||||
"net_manager": {"type": "string"},
|
||||
"fixed_networks_vlan_start": {"type": ["integer", "null"]},
|
||||
"fixed_network_size": {"type": "integer"},
|
||||
"fixed_networks_amount": {"type": "integer"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["id", "nodes_num", "nodes", "mode", "release", "status", "attributes"]
|
||||
}
|
||||
|
|
|
@ -75,7 +75,11 @@ class TestInstallationStructure(DbTest):
|
|||
{'id': 35, 'roles': ['c'], 'status': 's'}
|
||||
],
|
||||
"status": "new",
|
||||
"attributes": {}
|
||||
"attributes": {},
|
||||
"network_configuration": {
|
||||
"segmentation_type": "vlan",
|
||||
"net_l23_provider": "ovs"
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 32,
|
||||
|
|
|
@ -135,6 +135,17 @@ MAPPING_FUEL = {
|
|||
"manufacturer": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"network_configuration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"segmentation_type": {"type": "string"},
|
||||
"net_l23_provider": {"type": "string"},
|
||||
"net_manager": {"type": "string"},
|
||||
"fixed_networks_vlan_start": {"type": "integer"},
|
||||
"fixed_network_size": {"type": "integer"},
|
||||
"fixed_networks_amount": {"type": "integer"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,10 +119,29 @@ class ElasticTest(TestCase):
|
|||
'libvirt_type': random.choice(libvirt_names)
|
||||
}
|
||||
}
|
||||
network_configuration = self.generate_network_configuration()
|
||||
cluster.update(network_configuration)
|
||||
for _ in xrange(nodes_num):
|
||||
cluster['nodes'].append(self.generate_node())
|
||||
return cluster
|
||||
|
||||
def generate_network_configuration(self):
|
||||
return random.choice((
|
||||
{'network_configuration': {
|
||||
'segmentation_type': random.choice(("gre", "vlan")),
|
||||
'net_l23_provider': random.choice(("ovw", "nsx")),
|
||||
}},
|
||||
{'network_configuration': {
|
||||
'net_manager': random.choice(('FlatDHCPManager',
|
||||
'VlanManager')),
|
||||
'fixed_networks_vlan_start': random.choice((2, 3, None)),
|
||||
'fixed_network_size': random.randint(0, 255),
|
||||
'fixed_networks_amount': random.randint(0, 10),
|
||||
}},
|
||||
{'network_configuration': {}},
|
||||
{}
|
||||
))
|
||||
|
||||
def generate_structure(
|
||||
self,
|
||||
clusters_num_range=(0, 10),
|
||||
|
|
Loading…
Reference in New Issue