Revision e7323b5e lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
2527 | 2527 |
"""Verify that the passed name is a valid one. |
2528 | 2528 |
|
2529 | 2529 |
""" |
2530 |
hostname = netutils.GetHostname(name=self.op.name) |
|
2530 |
hostname = netutils.GetHostname(name=self.op.name, |
|
2531 |
family=self.cfg.GetPrimaryIPFamily()) |
|
2531 | 2532 |
|
2532 | 2533 |
new_name = hostname.name |
2533 | 2534 |
self.ip = new_ip = hostname.ip |
... | ... | |
4117 | 4118 |
if hv_name in cluster.enabled_hypervisors: |
4118 | 4119 |
os_hvp[os_name][hv_name] = hv_params |
4119 | 4120 |
|
4121 |
# Convert ip_family to ip_version |
|
4122 |
primary_ip_version = constants.IP4_VERSION |
|
4123 |
if cluster.primary_ip_family == netutils.IP6Address.family: |
|
4124 |
primary_ip_version = constants.IP6_VERSION |
|
4125 |
|
|
4120 | 4126 |
result = { |
4121 | 4127 |
"software_version": constants.RELEASE_VERSION, |
4122 | 4128 |
"protocol_version": constants.PROTOCOL_VERSION, |
... | ... | |
4147 | 4153 |
"uid_pool": cluster.uid_pool, |
4148 | 4154 |
"default_iallocator": cluster.default_iallocator, |
4149 | 4155 |
"reserved_lvs": cluster.reserved_lvs, |
4156 |
"primary_ip_version": primary_ip_version, |
|
4150 | 4157 |
} |
4151 | 4158 |
|
4152 | 4159 |
return result |
Also available in: Unified diff