Permit infrastructure test only if node is online
Permit sanity infrastructure tests only if node is online
Change-Id: I174120b313fd907e2c41c85dc3cf57a2ea0f35bd
Related-Bug: #1323252
(cherry picked from commit ab76323cdb
)
This commit is contained in:
parent
3c9f5da8bf
commit
0105f1444f
@ -144,6 +144,9 @@ ComputeGroup = [
|
||||
cfg.ListOpt('compute_nodes',
|
||||
default=[],
|
||||
help="IP addresses of compute nodes"),
|
||||
cfg.ListOpt('online_computes',
|
||||
default=[],
|
||||
help="IP addresses of online compute nodes"),
|
||||
cfg.ListOpt('ceph_nodes',
|
||||
default=[],
|
||||
help="IP addresses of nodes with ceph-osd role"),
|
||||
@ -573,6 +576,10 @@ class NailgunConfig(object):
|
||||
|
||||
compute_nodes = filter(lambda node: 'compute' in node['roles'],
|
||||
data)
|
||||
online_computes = filter(
|
||||
lambda node: 'compute' in node['roles']
|
||||
and node['online'] is True, data)
|
||||
self.compute.online_computes = online_computes
|
||||
compute_ips = []
|
||||
for node in compute_nodes:
|
||||
compute_ips.append(node['ip'])
|
||||
|
@ -36,8 +36,8 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SanityInfrastructureTest, cls).setUpClass()
|
||||
cls.controllers = cls.config.compute.controller_nodes
|
||||
cls.computes = cls.config.compute.compute_nodes
|
||||
cls.controllers = cls.config.compute.online_controllers
|
||||
cls.computes = cls.config.compute.online_computes
|
||||
cls.usr = cls.config.compute.controller_node_ssh_user
|
||||
cls.pwd = cls.config.compute.controller_node_ssh_password
|
||||
cls.key = cls.config.compute.path_to_private_key
|
||||
|
Loading…
Reference in New Issue
Block a user