Allow modify_etc_hosts to be changed
[ganeti-local] / lib / client / gnt_cluster.py
index 287ae31..a6d3d01 100644 (file)
@@ -974,7 +974,8 @@ def SetClusterParams(opts, args):
           opts.ipolicy_std_specs is not None or
           opts.ipolicy_disk_templates is not None or
           opts.ipolicy_vcpu_ratio is not None or
-          opts.ipolicy_spindle_ratio is not None):
+          opts.ipolicy_spindle_ratio is not None or
+          opts.modify_etc_hosts is not None):
     ToStderr("Please give at least one of the parameters.")
     return 1
 
@@ -1079,6 +1080,7 @@ def SetClusterParams(opts, args):
     ipolicy=ipolicy,
     candidate_pool_size=opts.candidate_pool_size,
     maintain_node_health=mnh,
+    modify_etc_hosts=opts.modify_etc_hosts,
     uid_pool=uid_pool,
     add_uids=add_uids,
     remove_uids=remove_uids,
@@ -1597,7 +1599,7 @@ commands = {
      RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT,
      NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT,
      DISK_STATE_OPT, SUBMIT_OPT, ENABLED_DISK_TEMPLATES_OPT,
-     IPOLICY_STD_SPECS_OPT] + INSTANCE_POLICY_OPTS,
+     IPOLICY_STD_SPECS_OPT, MODIFY_ETCHOSTS_OPT] + INSTANCE_POLICY_OPTS,
     "[opts...]",
     "Alters the parameters of the cluster"),
   "renew-crypto": (