Revision 9394f4d1
b/lib/client/gnt_network.py | ||
---|---|---|
250 | 250 |
|
251 | 251 |
l = lambda value: ", ".join(str(idx) + ":" + str(ip) |
252 | 252 |
for idx, (ip, net) in enumerate(value) |
253 |
if net == name)
|
|
253 |
if net == uuid)
|
|
254 | 254 |
|
255 | 255 |
ToStdout(" %s : %s", inst, l(zip(ips, networks))) |
256 | 256 |
else: |
b/lib/config.py | ||
---|---|---|
1450 | 1450 |
instance = self._UnlockedGetInstanceInfo(instance_name) |
1451 | 1451 |
|
1452 | 1452 |
for nic in instance.nics: |
1453 |
if nic.network is not None and nic.ip is not None: |
|
1454 |
net_uuid = self._UnlockedLookupNetwork(nic.network) |
|
1453 |
if nic.network and nic.ip: |
|
1455 | 1454 |
# Return all IP addresses to the respective address pools |
1456 |
self._UnlockedCommitIp(constants.RELEASE_ACTION, net_uuid, nic.ip)
|
|
1455 |
self._UnlockedCommitIp(constants.RELEASE_ACTION, nic.network, nic.ip)
|
|
1457 | 1456 |
|
1458 | 1457 |
del self._config_data.instances[instance_name] |
1459 | 1458 |
self._config_data.cluster.serial_no += 1 |
... | ... | |
2503 | 2502 |
@raises errors.OpPrereqError: when the target network cannot be found |
2504 | 2503 |
|
2505 | 2504 |
""" |
2505 |
if target is None: |
|
2506 |
return None |
|
2506 | 2507 |
if target in self._config_data.networks: |
2507 | 2508 |
return target |
2508 | 2509 |
for net in self._config_data.networks.values(): |
Also available in: Unified diff