hvparams = dict(opts.hvparams)
beparams = opts.beparams
+ nicparams = opts.nicparams
# prepare beparams dict
beparams = objects.FillDict(constants.BEC_DEFAULTS, beparams)
utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
+ # prepare nicparams dict
+ nicparams = objects.FillDict(constants.NICC_DEFAULTS, nicparams)
+ utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
+
# prepare hvparams dict
for hv in constants.HYPER_TYPES:
if hv not in hvparams:
default_hypervisor=opts.default_hypervisor,
hvparams=hvparams,
beparams=beparams,
+ nicparams=nicparams,
candidate_pool_size=opts.candidate_pool_size,
modify_etc_hosts=opts.modify_etc_hosts,
)
"""
if not (not opts.lvm_storage or opts.vg_name or
opts.enabled_hypervisors or opts.hvparams or
- opts.beparams or opts.candidate_pool_size is not None):
+ opts.beparams or opts.nicparams or
+ opts.candidate_pool_size is not None):
ToStderr("Please give at least one of the parameters.")
return 1
beparams = opts.beparams
utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
+ nicparams = opts.nicparams
+ utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
+
op = opcodes.OpSetClusterParams(vg_name=vg_name,
enabled_hypervisors=hvlist,
hvparams=hvparams,
beparams=beparams,
+ nicparams=nicparams,
candidate_pool_size=opts.candidate_pool_size)
SubmitOpCode(op)
return 0
keyval_option("-B", "--backend-parameters", dest="beparams",
type="keyval", default={},
help="Backend parameters"),
+ keyval_option("-N", "--nic-parameters", dest="nicparams",
+ type="keyval", default={},
+ help="NIC parameters"),
make_option("-C", "--candidate-pool-size",
default=constants.MASTER_POOL_SIZE_DEFAULT,
help="Set the candidate pool size",
keyval_option("-B", "--backend-parameters", dest="beparams",
type="keyval", default={},
help="Backend parameters"),
+ keyval_option("-N", "--nic-parameters", dest="nicparams",
+ type="keyval", default={},
+ help="NIC parameters"),
make_option("-C", "--candidate-pool-size", default=None,
help="Set the candidate pool size",
dest="candidate_pool_size", type="int"),