Revision c270ee07 lib/client/gnt_cluster.py
b/lib/client/gnt_cluster.py | ||
---|---|---|
962 | 962 |
opts.use_external_mip_script is not None or |
963 | 963 |
opts.prealloc_wipe_disks is not None or |
964 | 964 |
opts.hv_state or |
965 |
opts.enabled_storage_types or |
|
965 | 966 |
opts.disk_state or |
966 | 967 |
opts.ispecs_mem_size or |
967 | 968 |
opts.ispecs_cpu_count or |
... | ... | |
994 | 995 |
if hvlist is not None: |
995 | 996 |
hvlist = hvlist.split(",") |
996 | 997 |
|
998 |
enabled_storage_types = opts.enabled_storage_types |
|
999 |
if enabled_storage_types is not None: |
|
1000 |
enabled_storage_types = enabled_storage_types.split(",") |
|
1001 |
|
|
997 | 1002 |
# a list of (name, dict) we can pass directly to dict() (or []) |
998 | 1003 |
hvparams = dict(opts.hvparams) |
999 | 1004 |
for hv_params in hvparams.values(): |
... | ... | |
1061 | 1066 |
|
1062 | 1067 |
hv_state = dict(opts.hv_state) |
1063 | 1068 |
|
1064 |
op = opcodes.OpClusterSetParams(vg_name=vg_name, |
|
1065 |
drbd_helper=drbd_helper, |
|
1066 |
enabled_hypervisors=hvlist, |
|
1067 |
hvparams=hvparams, |
|
1068 |
os_hvp=None, |
|
1069 |
beparams=beparams, |
|
1070 |
nicparams=nicparams, |
|
1071 |
ndparams=ndparams, |
|
1072 |
diskparams=diskparams, |
|
1073 |
ipolicy=ipolicy, |
|
1074 |
candidate_pool_size=opts.candidate_pool_size, |
|
1075 |
maintain_node_health=mnh, |
|
1076 |
uid_pool=uid_pool, |
|
1077 |
add_uids=add_uids, |
|
1078 |
remove_uids=remove_uids, |
|
1079 |
default_iallocator=opts.default_iallocator, |
|
1080 |
prealloc_wipe_disks=opts.prealloc_wipe_disks, |
|
1081 |
master_netdev=opts.master_netdev, |
|
1082 |
master_netmask=opts.master_netmask, |
|
1083 |
reserved_lvs=opts.reserved_lvs, |
|
1084 |
use_external_mip_script=ext_ip_script, |
|
1085 |
hv_state=hv_state, |
|
1086 |
disk_state=disk_state, |
|
1087 |
) |
|
1069 |
op = opcodes.OpClusterSetParams( |
|
1070 |
vg_name=vg_name, |
|
1071 |
drbd_helper=drbd_helper, |
|
1072 |
enabled_hypervisors=hvlist, |
|
1073 |
hvparams=hvparams, |
|
1074 |
os_hvp=None, |
|
1075 |
beparams=beparams, |
|
1076 |
nicparams=nicparams, |
|
1077 |
ndparams=ndparams, |
|
1078 |
diskparams=diskparams, |
|
1079 |
ipolicy=ipolicy, |
|
1080 |
candidate_pool_size=opts.candidate_pool_size, |
|
1081 |
maintain_node_health=mnh, |
|
1082 |
uid_pool=uid_pool, |
|
1083 |
add_uids=add_uids, |
|
1084 |
remove_uids=remove_uids, |
|
1085 |
default_iallocator=opts.default_iallocator, |
|
1086 |
prealloc_wipe_disks=opts.prealloc_wipe_disks, |
|
1087 |
master_netdev=opts.master_netdev, |
|
1088 |
master_netmask=opts.master_netmask, |
|
1089 |
reserved_lvs=opts.reserved_lvs, |
|
1090 |
use_external_mip_script=ext_ip_script, |
|
1091 |
hv_state=hv_state, |
|
1092 |
disk_state=disk_state, |
|
1093 |
enabled_storage_types=enabled_storage_types, |
|
1094 |
) |
|
1088 | 1095 |
SubmitOrSend(op, opts) |
1089 | 1096 |
return 0 |
1090 | 1097 |
|
... | ... | |
1566 | 1573 |
DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, |
1567 | 1574 |
RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT, |
1568 | 1575 |
NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT, |
1569 |
DISK_STATE_OPT, SUBMIT_OPT] + |
|
1576 |
DISK_STATE_OPT, SUBMIT_OPT, ENABLED_STORAGE_TYPES_OPT] +
|
|
1570 | 1577 |
INSTANCE_POLICY_OPTS, |
1571 | 1578 |
"[opts...]", |
1572 | 1579 |
"Alters the parameters of the cluster"), |
Also available in: Unified diff