anchor.diff:      Hostname = proplists:get_value("hostname", Params),
       Username = proplists:get_value("username", Params),
       Password = proplists:get_value("password", Params),
  +    DemandEncryption = proplists:get_value("demandEncryption", Params, "0"),
  +    Cert = proplists:get_value("certificate", Params, ""),
       NameError = case check_nonempty(Name, <<"name">>, <<"cluster name">>) of
                       X when is_tuple(X) -> X;
                       _ ->
  
positive.code:     Name = misc:expect_prop_value(name, KV),
      Deleted = proplists:get_value(deleted, KV, false),
      URI = menelaus_util:bin_concat_path(["pools", "default", "remoteClusters", Name]),
      {struct, [{name, list_to_binary(Name)},
                {uri, URI},
                {validateURI, iolist_to_binary([URI, <<"?just_validate=1">>])},
                {hostname, list_to_binary(misc:expect_prop_value(hostname, KV))},
                {username, list_to_binary(misc:expect_prop_value(username, KV))},
                {uuid, misc:expect_prop_value(uuid, KV)},
                {deleted, Deleted}]}.
  
  handle_remote_clusters(Req) ->
      RemoteClusters = get_remote_clusters(),
  
negative.code:                     end,
      UsernameError = check_nonempty(Username, <<"username">>, <<"username">>),
      PasswordError = check_nonempty(Password, <<"password">>, <<"password">>),
      EncryptionError = case {DemandEncryption, Cert} of
                            {"0", ""} ->
                                undefined;
                            {"0", _} ->
                                {<<"certificate">>, <<"certificate must not be given if demand encryption is off">>};
                            {_, ""} ->
                                {<<"certificate">>, <<"certificate must be given if demand encryption is on">>};
                            {_, _} ->
                                undefined
                        end,
      Errors0 = lists:filter(fun (undefined) -> false;
                                 (_) -> true
                             end, [NameError, HostnameError, UsernameError, PasswordError, EncryptionError]),
      Errors = case lists:any(fun (KV) ->
                                      lists:keyfind(name, 1, KV) =:= {name, Name} andalso
                                          proplists:get_value(deleted, KV, false) =:= false
  