Revision 8edcd611 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
5000 | 5000 |
if self.op.hvparams: |
5001 | 5001 |
i_hvdict = copy.deepcopy(instance.hvparams) |
5002 | 5002 |
for key, val in self.op.hvparams.iteritems(): |
5003 |
if val is None:
|
|
5003 |
if val == constants.VALUE_DEFAULT:
|
|
5004 | 5004 |
try: |
5005 | 5005 |
del i_hvdict[key] |
5006 | 5006 |
except KeyError: |
5007 | 5007 |
pass |
5008 |
elif val == constants.VALUE_NONE: |
|
5009 |
i_hvdict[key] = None |
|
5008 | 5010 |
else: |
5009 | 5011 |
i_hvdict[key] = val |
5010 | 5012 |
cluster = self.cfg.GetClusterInfo() |
... | ... | |
5023 | 5025 |
if self.op.beparams: |
5024 | 5026 |
i_bedict = copy.deepcopy(instance.beparams) |
5025 | 5027 |
for key, val in self.op.beparams.iteritems(): |
5026 |
if val is None:
|
|
5028 |
if val == constants.VALUE_DEFAULT:
|
|
5027 | 5029 |
try: |
5028 | 5030 |
del i_bedict[key] |
5029 | 5031 |
except KeyError: |
Also available in: Unified diff