Revision b9eeeb02 test/ganeti.config_unittest.py
b/test/ganeti.config_unittest.py | ||
---|---|---|
55 | 55 |
|
56 | 56 |
def _init_cluster(self, cfg): |
57 | 57 |
"""Initializes the cfg object""" |
58 |
cfg.InitConfig(utils.HostInfo().name, constants.LOCALHOST_IP_ADDRESS, |
|
59 |
None, '', 'aa:00:00', 'xenvg', |
|
60 |
constants.DEFAULT_BRIDGE) |
|
58 |
cluster_config = objects.Cluster( |
|
59 |
serial_no=1, |
|
60 |
rsahostkeypub="", |
|
61 |
highest_used_port=(constants.FIRST_DRBD_PORT - 1), |
|
62 |
mac_prefix="aa:00:00", |
|
63 |
volume_group_name="xenvg", |
|
64 |
default_bridge=constants.DEFAULT_BRIDGE, |
|
65 |
tcpudp_port_pool=set(), |
|
66 |
) |
|
67 |
ip = constants.LOCALHOST_IP_ADDRESS |
|
68 |
master_node_config = objects.Node(name=utils.HostInfo().name, |
|
69 |
primary_ip=ip, |
|
70 |
secondary_ip=ip) |
|
71 |
cfg.InitConfig(cluster_config, master_node_config) |
|
61 | 72 |
|
62 | 73 |
def _create_instance(self): |
63 | 74 |
"""Create and return an instance object""" |
Also available in: Unified diff