1
0
Fork 0

Fix documentation.

This commit is contained in:
Wilfried Goesgens 2015-11-03 11:58:33 +01:00
parent c430a0ba36
commit 8e4231e17a
1 changed files with 44 additions and 45 deletions

View File

@ -894,34 +894,34 @@ actions.defineHttp({
/// (intentionally not in manual)
/// @brief gets the secondary of a primary DBserver
///
/// @RESTHEADER{GET /_admin/cluster/getSecondary, Get secondary of a primary DBServer}
/// @ RESTHEADER{GET /_admin/cluster/getSecondary, Get secondary of a primary DBServer}
///
/// @RESTQUERYPARAMETERS
/// @ RESTQUERYPARAMETERS
///
/// @RESTDESCRIPTION Gets the configuration in the agency of the secondary
/// @ RESTDESCRIPTION Gets the configuration in the agency of the secondary
/// replicating a primary.
///
/// @RESTQUERYPARAMETERS
/// @ RESTQUERYPARAMETERS
///
/// @RESTQUERYPARAM{primary,string,required}
/// @ RESTQUERYPARAM{primary,string,required}
/// is the ID of the primary whose secondary we would like to get.
///
/// @RESTQUERYPARAM{timeout,number,optional}
/// @ RESTQUERYPARAM{timeout,number,optional}
/// the timeout to use in HTTP requests to the agency, default is 60.
///
/// @RESTRETURNCODES
/// @ RESTRETURNCODES
///
/// @RESTRETURNCODE{200} is returned when everything went well.
/// @ RESTRETURNCODE{200} is returned when everything went well.
///
/// @RESTRETURNCODE{400} the primary was not given as URL parameter.
/// @ RESTRETURNCODE{400} the primary was not given as URL parameter.
///
/// @RESTRETURNCODE{403} server is not a coordinator or method was not GET.
/// @ RESTRETURNCODE{403} server is not a coordinator or method was not GET.
///
/// @RESTRETURNCODE{404} the given primary name is not configured in Agency.
/// @ RESTRETURNCODE{404} the given primary name is not configured in Agency.
///
/// @RESTRETURNCODE{408} there was a timeout in the Agency communication.
/// @ RESTRETURNCODE{408} there was a timeout in the Agency communication.
///
/// @RESTRETURNCODE{500} the get operation did not work.
/// @ RESTRETURNCODE{500} the get operation did not work.
///
/// @end Docu Block
////////////////////////////////////////////////////////////////////////////////
@ -973,7 +973,7 @@ actions.defineHttp({
"Primary with the given ID is not configured in Agency.");
return;
}
oldValue = oldValue["Plan/DBServers/" + primary];
actions.resultOk(req, res, actions.HTTP_OK, { primary: primary,
@ -985,51 +985,50 @@ actions.defineHttp({
}
});
////////////////////////////////////////////////////////////////////////////////
/// @start Docu Block JSF_replaceSecondary
/// (intentionally not in manual)
/// @brief exchanges the secondary of a primary DBserver
///
/// @RESTHEADER{PUT /_admin/cluster/replaceSecondary, Replace secondary of a primary DBServer}
/// @ RESTHEADER{PUT /_admin/cluster/replaceSecondary, Replace secondary of a primary DBServer}
///
/// @RESTDESCRIPTION Replaces the configuration in the agency of the secondary
/// @ RESTDESCRIPTION Replaces the configuration in the agency of the secondary
/// replicating a primary. Use with care, because the old secondary will
/// relatively quickly delete its data. For security reasons and to avoid
/// races, the ID of the old secondary must be given as well.
///
/// @RESTBODYPARAM{primary,string,required,string}
/// @ RESTBODYPARAM{primary,string,required,string}
/// is the ID of the primary whose secondary is to be changed.
///
/// @RESTBODYPARAM{oldSecondary,string,required,string}
/// @ RESTBODYPARAM{oldSecondary,string,required,string}
/// is the old ID of the secondary.
///
/// @RESTBODYPARAM{newSecondary,string,required,string}
/// @ RESTBODYPARAM{newSecondary,string,required,string}
/// is the new ID of the secondary.
///
/// @RESTBODYPARAM{ttl,number,optional,number}
/// @ RESTBODYPARAM{ttl,number,optional,number}
/// the time to live in seconds for the write lock, default is 60.
///
/// @RESTBODYPARAM{timeout,number,optional,number}
/// @ RESTBODYPARAM{timeout,number,optional,number}
/// the timeout to use in HTTP requests to the agency, default is 60.
///
/// @RESTRETURNCODES
/// @ RESTRETURNCODES
///
/// @RESTRETURNCODE{200} is returned when everything went well.
/// @ RESTRETURNCODE{200} is returned when everything went well.
///
/// @RESTRETURNCODE{400} either one of the required body parameters was
/// @ RESTRETURNCODE{400} either one of the required body parameters was
/// not given or no server with this ID exists.
///
/// @RESTRETURNCODE{403} server is not a coordinator or method was not PUT.
/// @ RESTRETURNCODE{403} server is not a coordinator or method was not PUT.
///
/// @RESTRETURNCODE{404} the given primary name is not configured in Agency.
/// @ RESTRETURNCODE{404} the given primary name is not configured in Agency.
///
/// @RESTRETURNCODE{408} there was a timeout in the Agency communication.
/// @ RESTRETURNCODE{408} there was a timeout in the Agency communication.
///
/// @RESTRETURNCODE{412} the given oldSecondary was not the current secondary
/// @ RESTRETURNCODE{412} the given oldSecondary was not the current secondary
/// of the given primary.
///
/// @RESTRETURNCODE{500} the change operation did not work.
/// @ RESTRETURNCODE{500} the change operation did not work.
///
/// @end Docu Block
////////////////////////////////////////////////////////////////////////////////
@ -1107,7 +1106,7 @@ actions.defineHttp({
"Cannot change secondary of given primary.");
return;
}
try {
ArangoAgency.increaseVersion("Plan/Version");
}
@ -1116,7 +1115,7 @@ actions.defineHttp({
"Cannot increase Plan/Version.");
return;
}
actions.resultOk(req, res, actions.HTTP_OK, body);
}
finally {
@ -1179,7 +1178,7 @@ function changeAllShardReponsibilities (oldServer, newServer) {
/// (intentionally not in manual)
/// @brief swaps the roles of a primary and secondary pair
///
/// @RESTHEADER{PUT /_admin/cluster/swapPrimaryAndSecondary, Swaps the roles of a primary and secondary pair.}
/// @ RESTHEADER{PUT /_admin/cluster/swapPrimaryAndSecondary, Swaps the roles of a primary and secondary pair.}
///
/// @RESTDESCRIPTION Swaps the roles of a primary and replicating secondary
/// pair. This includes changing the entry for all shards for which the
@ -1190,35 +1189,35 @@ function changeAllShardReponsibilities (oldServer, newServer) {
/// For security reasons and to avoid races, the ID of the old secondary
/// must be given as well.
///
/// @RESTBODYPARAM{primary,string,required,string}
/// @ RESTBODYPARAM{primary,string,required,string}
/// is the ID of the primary whose secondary is to be changed.
///
/// @RESTBODYPARAM{secondary,string,required,string}
/// @ RESTBODYPARAM{secondary,string,required,string}
/// is the ID of the secondary, which must be the secondary of this primay.
///
/// @RESTBODYPARAM{ttl,number,optional,number}
/// @ RESTBODYPARAM{ttl,number,optional,number}
/// the time to live in seconds for the write lock, default is 60.
///
/// @RESTBODYPARAM{timeout,number,optional,number}
/// @ RESTBODYPARAM{timeout,number,optional,number}
/// the timeout to use in HTTP requests to the agency, default is 60.
///
/// @RESTRETURNCODES
/// @ RESTRETURNCODES
///
/// @RESTRETURNCODE{200} is returned when everything went well.
/// @ RESTRETURNCODE{200} is returned when everything went well.
///
/// @RESTRETURNCODE{400} either one of the required body parameters was
/// @ RESTRETURNCODE{400} either one of the required body parameters was
/// not given or no server with this ID exists.
///
/// @RESTRETURNCODE{403} server is not a coordinator or method was not PUT.
/// @ RESTRETURNCODE{403} server is not a coordinator or method was not PUT.
///
/// @RESTRETURNCODE{404} the given primary name is not configured in Agency.
/// @ RESTRETURNCODE{404} the given primary name is not configured in Agency.
///
/// @RESTRETURNCODE{408} there was a timeout in the Agency communication.
/// @ RESTRETURNCODE{408} there was a timeout in the Agency communication.
///
/// @RESTRETURNCODE{412} the given secondary was not the current secondary
/// @ RESTRETURNCODE{412} the given secondary was not the current secondary
/// of the given primary.
///
/// @RESTRETURNCODE{500} the change operation did not work.
/// @ RESTRETURNCODE{500} the change operation did not work.
///
/// @end Docu Block
////////////////////////////////////////////////////////////////////////////////