Revision 535b49cb lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
6553 | 6553 |
einfo.has_option(constants.INISECT_INS, name)): |
6554 | 6554 |
self.op.beparams[name] = einfo.get(constants.INISECT_INS, name) |
6555 | 6555 |
|
6556 |
if einfo.has_section(constants.INISECT_OSP): |
|
6557 |
# use the parameters, without overriding |
|
6558 |
for name, value in einfo.items(constants.INISECT_OSP): |
|
6559 |
if name not in self.op.osparams: |
|
6560 |
self.op.osparams[name] = value |
|
6561 |
|
|
6556 | 6562 |
def _RevertToDefaults(self, cluster): |
6557 | 6563 |
"""Revert the instance parameters to the default values. |
6558 | 6564 |
|
... | ... | |
6573 | 6579 |
for name in constants.NICS_PARAMETERS: |
6574 | 6580 |
if name in nic and name in nic_defs and nic[name] == nic_defs[name]: |
6575 | 6581 |
del nic[name] |
6582 |
# osparams |
|
6583 |
os_defs = cluster.SimpleFillOS(self.op.os_type, {}) |
|
6584 |
for name in self.op.osparams.keys(): |
|
6585 |
if name in os_defs and os_defs[name] == self.op.osparams[name]: |
|
6586 |
del self.op.osparams[name] |
|
6576 | 6587 |
|
6577 | 6588 |
def CheckPrereq(self): |
6578 | 6589 |
"""Check prerequisites. |
Also available in: Unified diff