Revision ab5f0e96 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
8540 | 8540 |
" instances", errors.ECODE_STATE) |
8541 | 8541 |
|
8542 | 8542 |
if (self.op.hypervisor is None or |
8543 |
self.op.hypervisor.lower() == constants.VALUE_AUTO):
|
|
8543 |
self.op.hypervisor == constants.VALUE_AUTO): |
|
8544 | 8544 |
self.op.hypervisor = self.cfg.GetHypervisorType() |
8545 | 8545 |
|
8546 | 8546 |
cluster = self.cfg.GetClusterInfo() |
... | ... | |
8568 | 8568 |
# fill and remember the beparams dict |
8569 | 8569 |
default_beparams = cluster.beparams[constants.PP_DEFAULT] |
8570 | 8570 |
for param, value in self.op.beparams.iteritems(): |
8571 |
if value.lower() == constants.VALUE_AUTO:
|
|
8571 |
if value == constants.VALUE_AUTO: |
|
8572 | 8572 |
self.op.beparams[param] = default_beparams[param] |
8573 | 8573 |
utils.ForceDictType(self.op.beparams, constants.BES_PARAMETER_TYPES) |
8574 | 8574 |
self.be_full = cluster.SimpleFillBE(self.op.beparams) |
... | ... | |
8586 | 8586 |
for idx, nic in enumerate(self.op.nics): |
8587 | 8587 |
nic_mode_req = nic.get(constants.INIC_MODE, None) |
8588 | 8588 |
nic_mode = nic_mode_req |
8589 |
if nic_mode is None or nic_mode.lower() == constants.VALUE_AUTO:
|
|
8589 |
if nic_mode is None or nic_mode == constants.VALUE_AUTO: |
|
8590 | 8590 |
nic_mode = cluster.nicparams[constants.PP_DEFAULT][constants.NIC_MODE] |
8591 | 8591 |
|
8592 | 8592 |
# in routed mode, for the first nic, the default ip is 'auto' |
... | ... | |
8630 | 8630 |
|
8631 | 8631 |
# Build nic parameters |
8632 | 8632 |
link = nic.get(constants.INIC_LINK, None) |
8633 |
if link.lower() == constants.VALUE_AUTO:
|
|
8633 |
if link == constants.VALUE_AUTO: |
|
8634 | 8634 |
link = cluster.nicparams[constants.PP_DEFAULT][constants.NIC_LINK] |
8635 | 8635 |
nicparams = {} |
8636 | 8636 |
if nic_mode_req: |
Also available in: Unified diff