Chapter 09/circuit-oneops-1-master/components/cookbooks/couchbase/libraries/couchbase_cli.rb
# This command does not work for version < 3.0 . rest api needs to be used to set autofailover setting
#        def autofailover(enabled, timeout)
#
#            execute_command(autofailover_command(enabled, timeout))
#
#        end
This command does not work for version < 3.0 . rest api needs to be used to set autofailover setting
def autofailover(enabled, timeout)



end
This command does not work for version < 3 . 0 . rest api needs to be used to set autofailover setting def autofailover ( enabled timeout ) end
def alerts(recipients, sender, user, password, host, port, enabled)
            command = "setting-alert"
            command += " --enable-email-alert=#{enabled ? 1 : 0}"
            command += " --email-recipients=#{recipients.join(",")}"
            command += " --email-sender=#{sender}"
            command += " --email-user=#{user}"
            command += " --email-password=#{password}"
            command += " --email-host=#{host}"
            command += " --email-port=#{port}"
            execute_command(build_command(command))
        end
def alerts ( recipients , sender , user , password , host , port , enabled ) command = "setting-alert" command += " --enable-email-alert=#{enabled ? 1 : 0}" command += " --email-recipients=#{recipients.join(",")}" command += " --email-sender=#{sender}" command += " --email-user=#{user}" command += " --email-password=#{password}" command += " --email-host=#{host}" command += " --email-port=#{port}" execute_command ( build_command ( command ) ) end
This command does not work for version < 3.0 .
This command does not work for version < 3 . 0 .
recipients
<not_specific>
sender
<not_specific>
user
<not_specific>
password
<not_specific>
host
<not_specific>
port
<not_specific>
enabled
<not_specific>