@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.enabled == '1'):
        opts.enabled = 'true'
    elif (opts.enabled == '0'):
        opts.enabled = 'false'
    if ((opts.enabled == 'true') and (opts.max_nodes is None)):
        _exit_if_errors(['--max-nodes must be specified if auto-reprovision is enabled'])
    if (not (opts.enabled or opts.max_nodes)):
        _exit_if_errors(['No settings specified to be changed'])
    if (((opts.enabled is None) or (opts.enabled == 'false')) and opts.max_nodes):
        _warning('--max-servers will not take affect because auto-reprovision is being disabled')
    (_, errors) = self.rest.set_autoreprovision_settings(opts.enabled, opts.max_nodes)
    _exit_if_errors(errors)
    _success('Auto-reprovision settings modified')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.enabled == '1'):
        opts.enabled = 'true'
    elif (opts.enabled == '0'):
        opts.enabled = 'false'
    if ((opts.enabled == 'true') and (opts.max_nodes is None)):
        _exit_if_errors(['--max-nodes must be specified if auto-reprovision is enabled'])
    if (not (opts.enabled or opts.max_nodes)):
        _exit_if_errors(['No settings specified to be changed'])
    if (((opts.enabled is None) or (opts.enabled == 'false')) and opts.max_nodes):
        _warning('--max-servers will not take affect because auto-reprovision is being disabled')
    (_, errors) = self.rest.set_autoreprovision_settings(opts.enabled, opts.max_nodes)
    _exit_if_errors(errors)
    _success('Auto-reprovision settings modified')