@Path(value="/rm")
public interface RMRestInterface
Modifier and Type | Method and Description |
---|---|
Set<String> |
acquireNodes(String sessionId,
String sourceName,
int numberNodes,
boolean synchronous,
long timeout,
String nodeConfigJson)
Acquire new nodes of a specified node source
|
boolean |
addNode(String sessionId,
String url,
String nodesource)
Add an existing node to a particular node source.
|
void |
addNodeToken(String sessionId,
String nodeUrl,
String token)
Add access token to the given node.
|
boolean |
checkNodePermission(String sessionId,
String nodeUrl,
boolean provider)
Check if the user has admin permission for the given nodes or it is a node source provider
|
boolean |
checkNodeSourcePermission(String sessionId,
String nodeSourceName,
boolean provider)
Check if the user has permission for the given nodes or it is a node source provider
|
NSState |
createNodeSource(String sessionId,
String nodeSourceName,
String infrastructureType,
String[] infrastructureParameters,
String[] infrastructureFileParameters,
String policyType,
String[] policyParameters,
String[] policyFileParameters)
Deprecated.
As of version 8.1, replaced by
defineNodeSource(String, String, String, String[], String[],
String, String[], String[], String) and deployNodeSource(String, String) |
NSState |
createNodeSource(String sessionId,
String nodeSourceName,
String infrastructureType,
String[] infrastructureParameters,
String[] infrastructureFileParameters,
String policyType,
String[] policyParameters,
String[] policyFileParameters,
String nodesRecoverable)
Deprecated.
As of version 8.1, replaced by
defineNodeSource(String, String,String, String[], String[],
String, String[], String[], String) and deployNodeSource(String, String)
Create a NodeSource
|
NSState |
defineNodeSource(String sessionId,
String nodeSourceName,
String infrastructureType,
String[] infrastructureParameters,
String[] infrastructureFileParameters,
String policyType,
String[] policyParameters,
String[] policyFileParameters,
String nodesRecoverable)
Create/define a node source
|
NSState |
deployNodeSource(String sessionId,
String nodeSourceName)
Deploy a node source.
|
NSState |
editNodeSource(String sessionId,
String nodeSourceName,
String infrastructureType,
String[] infrastructureParameters,
String[] infrastructureFileParameters,
String policyType,
String[] policyParameters,
String[] policyFileParameters,
String nodesRecoverable)
Edit parameters of an un-deployed node source.
|
ScriptResult<Object> |
executeHostScript(String sessionId,
String host,
String script,
String scriptEngine)
Execute a script on the given machine.
|
ScriptResult<Object> |
executeNodeScript(String sessionId,
String nodeUrl,
String script,
String scriptEngine)
Execute a script on the given node.
|
List<ScriptResult<Object>> |
executeNodeSourceScript(String sessionId,
String nodeSource,
String script,
String scriptEngine)
Execute a script on all machines connected to the given node source.
|
List<String> |
getDomains()
Returns the domains configured on the resource manager server.
|
List<RMNodeSourceEvent> |
getExistingNodeSources(String sessionId)
List existing node sources.
|
Map<String,List<String>> |
getInfrasToPoliciesMapping(String sessionId)
Supported infrastructures mapping to policies.
|
String |
getLoginFromSessionId(String sessionId)
Get Login of a session.
|
Object |
getMBeanInfo(String sessionId,
ObjectName name,
List<String> attrs)
JMX Mbean information.
|
String |
getModelHosts(String name,
String noEmpty)
List of registered node hosts as variable model.
|
String |
getModelNodeSources(String name,
String infrastructure,
String policy,
String noDefault,
String noEmpty)
list of node sources as variable model.
|
String |
getModelTokens(String name,
String nodeSource,
String noEmpty)
List of registered tokens as variable model.
|
String |
getNodeMBeanHistory(String sessionId,
String nodeJmxUrl,
String objectName,
List<String> attrs,
String range)
Statistic history of a single node.
|
Object |
getNodeMBeanInfo(String sessionId,
String nodeJmxUrl,
String objectName,
List<String> attrs)
Retrieves attributes of the specified JMX MBean.
|
Object |
getNodeMBeansHistory(String sessionId,
String nodeJmxUrl,
String objectNames,
List<String> attrs,
String range)
Retrieves history of specified MBean attributes on a single node.
|
Object |
getNodeMBeansInfo(String sessionId,
String nodeJmxUrl,
String objectNames,
List<String> attrs)
Retrieves attributes of the specified JMX MBeans.
|
Map<String,Map<String,Map<String,List<RMNodeHistory>>>> |
getNodesHistory(String sessionId,
long windowStart,
long windowEnd)
Get usage history for all Nodes.
|
Map<String,Map<String,Object>> |
getNodesMBeanHistory(String sessionId,
List<String> nodesJmxUrl,
String objectName,
List<String> attrs,
String range)
Statistic history of a list of nodes for a single MBean.
|
NodeSourceConfiguration |
getNodeSourceConfiguration(String sessionId,
String nodeSourceName)
Get Node Source configuration.
|
int |
getNodeSourcePingFrequency(String sessionId,
String sourceName)
Ping frequency of a node source.
|
Set<String> |
getNodeTags(String sessionId)
Get the set of all tags present in all nodes
|
Set<String> |
getNodeTags(String sessionId,
String url)
Get the tags of a specific node
|
String |
getNodeThreadDump(String sessionId,
String nodeUrl)
Node Thread Dump.
|
RMStateDelta |
getRMStateDelta(String sessionId,
String clientCounter)
Delta state of Resource Manager.
|
RMStateFull |
getRMStateFull(String sessionId)
Full state of the resource manager.
|
String |
getRMThreadDump(String sessionId)
Resource Manager Thread Dump.
|
RMState |
getState(String sessionId)
Minimal state of the Resource Manager.
|
String |
getStatHistory(String sessionId,
String range,
String function)
Statistics history.
|
RMStatistics |
getStatistics(String sessionId)
Resource Manager statistics.
|
Collection<PluginDescriptorData> |
getSupportedNodeSourceInfrastructures(String sessionId)
Supported infrastructures list.
|
Collection<PluginDescriptorData> |
getSupportedNodeSourcePolicies(String sessionId)
Returns the list of supported node source policies descriptors.
|
TopologyData |
getTopology(String sessionId) |
String |
getUrl()
RM server URL.
|
UserData |
getUserDataFromSessionId(String sessionId)
Get User Data of a session.
|
String |
getVersion()
Returns the version of the rest api.
|
boolean |
isActive(String sessionId)
Check Resource Manager availability.
|
boolean |
lockNodes(String sessionId,
Set<String> nodeUrls)
Prevent other users from using a set of locked nodes.
|
String |
loginWithCredential(LoginForm multipart)
Login to the resource manager using a multipart form.
|
boolean |
nodeIsAvailable(String sessionId,
String url)
Check node availability.
|
boolean |
releaseNode(String sessionId,
String url)
Release a node.
|
boolean |
removeNode(String sessionId,
String nodeUrl,
boolean preempt)
Delete a node.
|
boolean |
removeNodeSource(String sessionId,
String sourceName,
boolean preempt)
Delete a node source.
|
void |
removeNodeToken(String sessionId,
String nodeUrl,
String token)
Remove access token from the given node.
|
String |
rmConnect(String username,
String password)
Login with username/password.
|
void |
rmDisconnect(String sessionId)
Resource Manager disconnect.
|
Set<String> |
searchNodes(String sessionId,
List<String> tags,
boolean all)
Search the nodes with specific tags.
|
void |
setMBeanInfo(String sessionId,
ObjectName name,
String type,
String attr,
String value)
Set a JMX Mbean single attribute.
|
void |
setNodeTokens(String sessionId,
String nodeUrl,
List<String> tokens)
Set all node tokens to the given node.
|
boolean |
shutdown(String sessionId,
boolean preempt)
Initiate the shutdown of the resource manager.
|
NSState |
undeployNodeSource(String sessionId,
String nodeSourceName,
boolean preempt)
Un-deploy a node source.
|
boolean |
unlockNodes(String sessionId,
Set<String> nodeUrls)
Allow other users to use a set of previously locked nodes.
|
NSState |
updateDynamicParameters(String sessionId,
String nodeSourceName,
String infrastructureType,
String[] infrastructureParameters,
String[] infrastructureFileParameters,
String policyType,
String[] policyParameters,
String[] policyFileParameters)
Update dynamic parameters of a deployed node source.
|
@GET @Path(value="url") @Produces(value="text/plain") String getUrl()
@GET @Path(value="domains") @Produces(value="application/json") List<String> getDomains()
@POST @Path(value="login") @Produces(value={"text/plain","application/json"}) String rmConnect(@FormParam(value="username") String username, @FormParam(value="password") String password) throws KeyException, LoginException, RMException, RMActiveObjectCreationException, RMNodeException
username
- user namepassword
- passwordKeyException
LoginException
RMException
RMActiveObjectCreationException
RMNodeException
@POST @Path(value="disconnect") @Produces(value="application/json") void rmDisconnect(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException
sessionId
- current sessionNotConnectedException
@POST @Consumes(value="multipart/form-data") @Path(value="login") @Produces(value={"text/plain","application/json"}) String loginWithCredential(LoginForm multipart) throws RMActiveObjectCreationException, RMNodeException, KeyException, IOException, LoginException, RMException
multipart
- multipart formLoginException
- if the authentication failsKeyException
- if the credentials file cannot be decryptedIOException
- if an I/O error occur while reading credentialsRMException
- if any other error occursRMActiveObjectCreationException
RMNodeException
@GET @Path(value="logins/sessionid/{sessionId}") @Produces(value="text/plain") String getLoginFromSessionId(@PathParam(value="sessionId") String sessionId)
sessionId
if it exists
In case that the given sessionId doesn't have an associated login (session id expired, or invalid),
this endpoint will return an empty stringsessionId
- with which the endpoint is going to look for the login value@GET @Path(value="logins/sessionid/{sessionId}/userdata") @Produces(value="application/json") UserData getUserDataFromSessionId(@PathParam(value="sessionId") String sessionId)
sessionId
In case that the given sessionId doesn't have an associated login (session id expired, or invalid),
this endpoint will return nullsessionId
- with which the endpoint is going to look for the login value@GET @Path(value="statistics") @Produces(value="application/json") RMStatistics getStatistics(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException
{ "availableNodesCount", "freeNodesCount", "busyNodesCount", "deployingNodesCount", "configNodesCount", "downNodesCount", "lostNodesCount", "toBeRemovedNodesCount", "neededNodesCount" };
sessionId
- current sessionNotConnectedException
@GET @Path(value="state") @Produces(value="application/json") RMState getState(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException
sessionId
- current sessionNotConnectedException
@GET @Path(value="monitoring") @Produces(value="application/json") RMStateDelta getRMStateDelta(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="clientCounter") @DefaultValue(value="-1") String clientCounter) throws NotConnectedException, PermissionRestException
sessionId
- current sessionclientCounter
- (optional) is the latest counter client has, if parameter is not provided then
method returns all eventsNotConnectedException
PermissionRestException
@GET @Path(value="monitoring/full") @Produces(value="application/json") RMStateFull getRMStateFull(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
sessionId
- current sessionNotConnectedException
PermissionRestException
@GET @Path(value="model/hosts") @Produces(value={"text/plain","application/json"}) String getModelHosts(@QueryParam(value="name") String name, @QueryParam(value="noEmpty") String noEmpty) throws PermissionRestException
name
- a regular expression which will accept hosts based on their name. Example: host.*
noEmpty
- if 'true', an empty value will not be included in the returned model.PermissionRestException
@GET @Path(value="model/nodesources") @Produces(value={"text/plain","application/json"}) String getModelNodeSources(@QueryParam(value="name") String name, @QueryParam(value="infrastructure") String infrastructure, @QueryParam(value="policy") String policy, @QueryParam(value="noDefault") String noDefault, @QueryParam(value="noEmpty") String noEmpty) throws PermissionRestException
name
- a regular expression which will accept node sources based on their name. Example: Internal_.*
infrastructure
- node source infrastructure regexp. All node sources whose infrastructure name matches the given regular expression will be returned.
For example: Local.*
will return all node sources with a LocalInfrastructure, Azure
will return all node sources with AzureInfrastructure or AzureVMScaleSetInfrastructure types. See Node Source Infrastructures for a complete list of infrastructure types.policy
- node source policy regexp. All node sources whose policy name matches the given regular expression will be returned.
For example: Static.*
will return all node sources with a StaticPolicy, Dynamic.*
will return all node sources with DynamicPolicy. See Node Source Policies for a complete list of policy types.noDefault
- if 'true' the Default node source (which is automatically defined by the Resource Manager) will be excluded from the result.noEmpty
- if 'true', an empty value will not be included in the returned model.PermissionRestException
@GET @Path(value="model/tokens") @Produces(value={"text/plain","application/json"}) String getModelTokens(@QueryParam(value="name") String name, @QueryParam(value="nodeSource") String nodeSource, @QueryParam(value="noEmpty") String noEmpty) throws PermissionRestException
name
- a regular expression which will accept tokens based on their name. Example: token.*
nodeSource
- the name of a node source considered for the token list. Only tokens defined for this node source or for any node which belongs to this node source will be returned.
* @param noEmpty if 'true', an empty value will not be included in the returned model.PermissionRestException
@GET @Path(value="isactive") @Produces(value="application/json") boolean isActive(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException
sessionId
- current sessionNotConnectedException
@POST @Path(value="node") @Produces(value="application/json") boolean addNode(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeurl") String url, @FormParam(value="nodesource") String nodesource) throws NotConnectedException
sessionId
- current sessionurl
- the URL of the nodenodesource
- the node source, can be nullNotConnectedException
@GET @Path(value="node/isavailable") @Produces(value="application/json") boolean nodeIsAvailable(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodeurl") String url) throws NotConnectedException
sessionId
- current sessionurl
- the URL of the nodeNotConnectedException
@GET @Path(value="nodesource") @Produces(value="application/json") List<RMNodeSourceEvent> getExistingNodeSources(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
sessionId
- current sessionNotConnectedException
PermissionRestException
@POST @Path(value="nodesource") @Produces(value="application/json") NSState defineNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="infrastructureType") String infrastructureType, @FormParam(value="infrastructureParameters") String[] infrastructureParameters, @FormParam(value="infrastructureFileParameters") String[] infrastructureFileParameters, @FormParam(value="policyType") String policyType, @FormParam(value="policyParameters") String[] policyParameters, @FormParam(value="policyFileParameters") String[] policyFileParameters, @FormParam(value="nodesRecoverable") String nodesRecoverable) throws NotConnectedException
sessionId
- current sessionnodeSourceName
- name of the node sourceinfrastructureType
- infrastructure class nameinfrastructureParameters
- infrastructure non-file parametersinfrastructureFileParameters
- infrastructure file parameterspolicyType
- policy class namepolicyParameters
- policy non-file parameterspolicyFileParameters
- policy file parametersnodesRecoverable
- Whether the nodes can be recovered after a crash of the RMNotConnectedException
@PUT @Path(value="nodesource/edit") @Produces(value="application/json") NSState editNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="infrastructureType") String infrastructureType, @FormParam(value="infrastructureParameters") String[] infrastructureParameters, @FormParam(value="infrastructureFileParameters") String[] infrastructureFileParameters, @FormParam(value="policyType") String policyType, @FormParam(value="policyParameters") String[] policyParameters, @FormParam(value="policyFileParameters") String[] policyFileParameters, @FormParam(value="nodesRecoverable") String nodesRecoverable) throws NotConnectedException
sessionId
- current sessionnodeSourceName
- name of the node source to editinfrastructureType
- fully qualified class name of the infrastructure to editinfrastructureParameters
- string parameters of the infrastructure, without the
parameters containing files or credentialsinfrastructureFileParameters
- infrastructure file or credential parameterspolicyType
- fully qualified class name of the policy to editpolicyParameters
- string parameters of the policy, without the parameters
containing files or credentialspolicyFileParameters
- policy file or credential parametersnodesRecoverable
- Whether the nodes can be recovered after a crash of the RMNotConnectedException
@PUT @Path(value="nodesource/parameter") @Produces(value="application/json") NSState updateDynamicParameters(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="infrastructureType") String infrastructureType, @FormParam(value="infrastructureParameters") String[] infrastructureParameters, @FormParam(value="infrastructureFileParameters") String[] infrastructureFileParameters, @FormParam(value="policyType") String policyType, @FormParam(value="policyParameters") String[] policyParameters, @FormParam(value="policyFileParameters") String[] policyFileParameters) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeSourceName
- name of the node source to editinfrastructureType
- fully qualified class name of the infrastructure to editinfrastructureParameters
- string parameters of the infrastructure, without the
parameters containing files or credentialsinfrastructureFileParameters
- infrastructure file or credential parameterspolicyType
- fully qualified class name of the policy to editpolicyParameters
- string parameters of the policy, without the parameters
containing files or credentialspolicyFileParameters
- policy file or credential parametersNotConnectedException
PermissionRestException
@Deprecated @POST @Path(value="nodesource/create") @Produces(value="application/json") NSState createNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="infrastructureType") String infrastructureType, @FormParam(value="infrastructureParameters") String[] infrastructureParameters, @FormParam(value="infrastructureFileParameters") String[] infrastructureFileParameters, @FormParam(value="policyType") String policyType, @FormParam(value="policyParameters") String[] policyParameters, @FormParam(value="policyFileParameters") String[] policyFileParameters) throws NotConnectedException, PermissionRestException
defineNodeSource(String, String, String, String[], String[],
String, String[], String[], String)
and deployNodeSource(String, String)
@Deprecated @POST @Path(value="nodesource/create/recovery") @Produces(value="application/json") NSState createNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="infrastructureType") String infrastructureType, @FormParam(value="infrastructureParameters") String[] infrastructureParameters, @FormParam(value="infrastructureFileParameters") String[] infrastructureFileParameters, @FormParam(value="policyType") String policyType, @FormParam(value="policyParameters") String[] policyParameters, @FormParam(value="policyFileParameters") String[] policyFileParameters, @FormParam(value="nodesRecoverable") String nodesRecoverable) throws NotConnectedException
defineNodeSource(String, String,String, String[], String[],
String, String[], String[], String)
and deployNodeSource(String, String)
Create a NodeSource
sessionId
- current sessionnodeSourceName
- name of the node source to createinfrastructureType
- fully qualified class name of the infrastructure to createinfrastructureParameters
- String parameters of the infrastructure, without the
parameters containing files or credentialsinfrastructureFileParameters
- File or credential parameterspolicyType
- fully qualified class name of the policy to createpolicyParameters
- String parameters of the policy, without the parameters
containing files or credentialspolicyFileParameters
- File or credential parametersnodesRecoverable
- Whether the nodes can be recovered after a crash of the RMNotConnectedException
@PUT @Path(value="nodesource/deploy") @Produces(value="application/json") NSState deployNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeSourceName
- the name of the node source to startNotConnectedException
PermissionRestException
@PUT @Path(value="nodesource/undeploy") @Produces(value="application/json") NSState undeployNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeSourceName") String nodeSourceName, @FormParam(value="preempt") boolean preempt) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeSourceName
- the name of the node source to undeployNotConnectedException
PermissionRestException
@POST @Path(value="nodesource/pingfrequency") @Produces(value="application/json") int getNodeSourcePingFrequency(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="sourcename") String sourceName) throws NotConnectedException, PermissionRestException
sessionId
- current sessionsourceName
- a node sourceNotConnectedException
PermissionRestException
@POST @Path(value="nodesource/{sourcename}/nodes") @Consumes(value="application/json") @Produces(value="application/json") Set<String> acquireNodes(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="sourcename") String sourceName, @QueryParam(value="numbernodes") int numberNodes, @QueryParam(value="sync") @DefaultValue(value="false") boolean synchronous, @QueryParam(value="timeout") @DefaultValue(value="600") long timeout, String nodeConfigJson) throws NotConnectedException, RestException
sessionId
- current sessionsourceName
- the name of the node sourcenumberNodes
- the number of nodes to be acquiredsynchronous
- whether the request is synchronous or asynchronous, when true, the request returns the url of acquired nodes after the nodes are successfully deployed.timeout
- the maximum duration of the request, in seconds.nodeConfigJson
- the specific configuration of nodes to be acquired, in json formatNotConnectedException
RestException
@POST @Path(value="node/release") @Produces(value="application/json") boolean releaseNode(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="url") String url) throws RMNodeException, NotConnectedException, PermissionRestException
sessionId
- current sessionurl
- node's URLRMNodeException
NotConnectedException
PermissionRestException
@POST @Path(value="node/remove") @Produces(value="application/json") boolean removeNode(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="url") String nodeUrl, @FormParam(value="preempt") boolean preempt) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeUrl
- node's URLpreempt
- if true remove node source immediatly whithout waiting for nodes to be freedNotConnectedException
PermissionRestException
@POST @Path(value="nodesource/remove") @Produces(value="application/json") boolean removeNodeSource(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="name") String sourceName, @FormParam(value="preempt") boolean preempt) throws NotConnectedException, PermissionRestException
sessionId
- current sessionsourceName
- a node source namepreempt
- if true remove node source immediatly whithout waiting for nodes to be freedNotConnectedException
PermissionRestException
@POST @Path(value="node/lock") @Produces(value="application/json") boolean lockNodes(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeurls") Set<String> nodeUrls) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeUrls
- set of node urls to lockNotConnectedException
PermissionRestException
@POST @Path(value="node/unlock") @Produces(value="application/json") boolean unlockNodes(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeurls") Set<String> nodeUrls) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeUrls
- set of node urls to unlockNotConnectedException
PermissionRestException
@GET @Path(value="node/mbean") @Produces(value="application/json") Object getNodeMBeanInfo(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodejmxurl") String nodeJmxUrl, @QueryParam(value="objectname") String objectName, @QueryParam(value="attrs") List<String> attrs) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, PermissionRestException
sessionId
- current sessionnodeJmxUrl
- mbean server urlobjectName
- name of mbeanattrs
- set of mbean attributesInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MalformedObjectNameException
NullPointerException
PermissionRestException
@GET @Path(value="node/mbean/history") @Produces(value="application/json") String getNodeMBeanHistory(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodejmxurl") String nodeJmxUrl, @QueryParam(value="objectname") String objectName, @QueryParam(value="attrs") List<String> attrs, @QueryParam(value="range") String range) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, MBeanException
sessionId
- a valid sessionnodeJmxUrl
- mbean server urlobjectName
- name of mbeanattrs
- set of mbean attributesrange
- a String of 5 chars, one for each stat history source, indicating the time range to fetch
for each source. Each char can be:InstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MalformedObjectNameException
NullPointerException
MBeanException
@GET @Path(value="nodes/mbean/history") @Produces(value="application/json") Map<String,Map<String,Object>> getNodesMBeanHistory(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodesjmxurl") List<String> nodesJmxUrl, @QueryParam(value="objectname") String objectName, @QueryParam(value="attrs") List<String> attrs, @QueryParam(value="range") String range) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, MBeanException
sessionId
- a valid sessionnodesJmxUrl
- a set of mbean server urlsobjectName
- name of mbeanattrs
- set of mbean attributesrange
- a String of 5 chars, one for each stat history source, indicating the time range to fetch
for each source. Each char can be:InstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MalformedObjectNameException
NullPointerException
MBeanException
@GET @Path(value="node/mbeans") @Produces(value="application/json") Object getNodeMBeansInfo(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodejmxurl") String nodeJmxUrl, @QueryParam(value="objectname") String objectNames, @QueryParam(value="attrs") List<String> attrs) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, PermissionRestException
sessionId
- current sessionobjectNames
- mbean names (@see ObjectName format)nodeJmxUrl
- mbean server urlattrs
- set of mbean attributesInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MalformedObjectNameException
NullPointerException
PermissionRestException
@GET @Path(value="node/mbeans/history") @Produces(value="application/json") Object getNodeMBeansHistory(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodejmxurl") String nodeJmxUrl, @QueryParam(value="objectname") String objectNames, @QueryParam(value="attrs") List<String> attrs, @QueryParam(value="range") String range) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MalformedObjectNameException, NullPointerException, MBeanException, PermissionRestException
sessionId
- current sessionnodeJmxUrl
- mbean server urlobjectNames
- mbean names (@see ObjectName format)attrs
- set of mbean attributesrange
- a String of 5 chars, one for each stat history source, indicating the time range to fetch
for each source. Each char can be:InstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MalformedObjectNameException
NullPointerException
MBeanException
PermissionRestException
@GET @Path(value="shutdown") @Produces(value="application/json") boolean shutdown(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="preempt") @DefaultValue(value="false") boolean preempt) throws NotConnectedException, PermissionRestException
sessionId
- a valid sessionpreempt
- if true shutdown immediatly whithout waiting for nodes to be freed, default value is falseNotConnectedException
PermissionRestException
@GET @Path(value="topology") @Produces(value="application/json") TopologyData getTopology(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
@GET @Path(value="infrastructures") @Produces(value="application/json") Collection<PluginDescriptorData> getSupportedNodeSourceInfrastructures(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
sessionId
- a valid sessionNotConnectedException
PermissionRestException
@GET @Path(value="infrastructures/mapping") @Produces(value="application/json") Map<String,List<String>> getInfrasToPoliciesMapping(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
sessionId
- a valid sessionNotConnectedException
PermissionRestException
@GET @Path(value="policies") @Produces(value="application/json") Collection<PluginDescriptorData> getSupportedNodeSourcePolicies(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, PermissionRestException
sessionId
- current sessionNotConnectedException
PermissionRestException
@GET @Path(value="nodesource/configuration") @Produces(value="application/json") NodeSourceConfiguration getNodeSourceConfiguration(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodeSourceName") String nodeSourceName) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeSourceName
- node source nameNotConnectedException
PermissionRestException
@GET @Path(value="info/{name}") @Produces(value="application/json") Object getMBeanInfo(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="name") ObjectName name, @QueryParam(value="attr") List<String> attrs) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, PermissionRestException
attr
of the mbean
registered as name
.sessionId
- a valid sessionname
- mbean's object nameattrs
- attributes to enumerateInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
PermissionRestException
@POST @Path(value="info/{name}") @Produces(value="application/json") void setMBeanInfo(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="name") ObjectName name, @QueryParam(value="type") String type, @QueryParam(value="attr") String attr, @QueryParam(value="value") String value) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, NotConnectedException, MBeanException, InvalidAttributeValueException, AttributeNotFoundException
name
.
Only integer and string attributes are currently supported, see type
.sessionId
- a valid session IDname
- the object name of the MBeantype
- the type of the attribute to set ('integer' and 'string' are currently supported, see RMProxyUserInterface
)attr
- the name of the attribute to setvalue
- the new value of the attribute (defined as a String, it is automatically converted according to type
)InstanceNotFoundException
IntrospectionException
ReflectionException
IOException
NotConnectedException
MBeanException
InvalidAttributeValueException
AttributeNotFoundException
@GET @Path(value="stathistory") @Produces(value="application/json") String getStatHistory(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="range") String range, @QueryParam(value="function") String function) throws ReflectionException, InterruptedException, IntrospectionException, NotConnectedException, InstanceNotFoundException, MalformedObjectNameException, IOException
{ AvailableNodesCount", "FreeNodesCount", "NeededNodesCount", "BusyNodesCount", "DeployingNodesCount", "ConfigNodesCount", "DownNodesCount", "LostNodesCount", "AverageActivity" };
sessionId
- a valid sessionrange
- a String of 9 chars, one for each stat history source, indicating the time range to fetch
for each source. Each char can be:function
- function applying to statistics, one of: ReflectionException
InterruptedException
IntrospectionException
NotConnectedException
InstanceNotFoundException
MalformedObjectNameException
IOException
@GET @Path(value="version") @Produces(value="text/plain") String getVersion()
@POST @Path(value="node/script") @Produces(value="application/json") ScriptResult<Object> executeNodeScript(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodeurl") String nodeUrl, @FormParam(value="script") String script, @FormParam(value="scriptEngine") String scriptEngine) throws Throwable
sessionId
- current sessionnodeUrl
- URL of the node where the script will be executedscript
- content of the script to executescriptEngine
- script engine name (language of the script)Throwable
- if the script connot be executed@POST @Path(value="nodesource/script") @Produces(value="application/json") List<ScriptResult<Object>> executeNodeSourceScript(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="nodesource") String nodeSource, @FormParam(value="script") String script, @FormParam(value="scriptEngine") String scriptEngine) throws Throwable
sessionId
- current sessionnodeSource
- node source namescript
- content of the script to executescriptEngine
- script engine name (language of the script)Throwable
- if the script connot be executed@POST @Path(value="host/script") @Produces(value="application/json") ScriptResult<Object> executeHostScript(@HeaderParam(value="sessionid") String sessionId, @FormParam(value="host") String host, @FormParam(value="script") String script, @FormParam(value="scriptEngine") String scriptEngine) throws Throwable
sessionId
- current sessionhost
- machine hostnamescript
- content of the script to executescriptEngine
- script engine name (language of the script)Throwable
- if the script connot be executed@GET @Path(value="threaddump") @Produces(value={"text/plain","application/json"}) String getRMThreadDump(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException
sessionId
- current sessionNotConnectedException
@GET @Path(value="node/threaddump") @Produces(value={"text/plain","application/json"}) String getNodeThreadDump(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodeurl") String nodeUrl) throws NotConnectedException
sessionId
- current sessionnodeUrl
- node URLNotConnectedException
@GET @Path(value="nodes/history") @Produces(value="application/json") Map<String,Map<String,Map<String,List<RMNodeHistory>>>> getNodesHistory(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="windowStart") long windowStart, @HeaderParam(value="windowEnd") long windowEnd) throws NotConnectedException
sessionId
- current sessionwindowStart
- EPOCH start timewindowEnd
- EPOCH end timeNotConnectedException
@POST @Path(value="node/token") @Produces(value="application/json") void addNodeToken(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="nodeurl") String nodeUrl, @HeaderParam(value="token") String token) throws NotConnectedException, RestException
sessionId
- current sessionnodeUrl
- URL of the Nodetoken
- single tokenNotConnectedException
RestException
@DELETE @Path(value="node/token") @Produces(value="application/json") void removeNodeToken(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="nodeurl") String nodeUrl, @HeaderParam(value="token") String token) throws NotConnectedException, RestException
sessionId
- current sessionnodeUrl
- URL of the Nodetoken
- single tokenNotConnectedException
RestException
@POST @Path(value="node/tokens") @Produces(value="application/json") void setNodeTokens(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="nodeurl") String nodeUrl, @QueryParam(value="tokens") List<String> tokens) throws NotConnectedException, RestException
sessionId
- current sessionnodeUrl
- URL of the Nodetokens
- list of tokens to setNotConnectedException
RestException
@GET @Path(value="node/tags") @Produces(value="application/json") Set<String> getNodeTags(@HeaderParam(value="sessionid") String sessionId) throws NotConnectedException, RestException
sessionId
- current sessionNotConnectedException
RestException
@GET @Path(value="node/tags/search") @Produces(value="application/json") Set<String> getNodeTags(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="nodeurl") String url) throws NotConnectedException, RestException
sessionId
- current sessionurl
- the url of the requested nodeNotConnectedException
RestException
@GET @Path(value="nodes/search") @Produces(value="application/json") Set<String> searchNodes(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="tags") List<String> tags, @QueryParam(value="all") @DefaultValue(value="true") boolean all) throws NotConnectedException, RestException
sessionId
- current sessiontags
- a list of tags which the nodes should contain. When not specified or an empty list, all the nodes known urls are returnedall
- When true, the search return nodes which contain all tags;
when false, the search return nodes which contain any tag among the list tags.NotConnectedException
RestException
@POST @Path(value="nodes/permission") @Consumes(value="application/json") @Produces(value="application/json") boolean checkNodePermission(@HeaderParam(value="sessionid") String sessionId, String nodeUrl, @QueryParam(value="provider") @DefaultValue(value="false") boolean provider) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeUrl
- node url to check the permission forNotConnectedException
PermissionRestException
@POST @Path(value="nodeSource/permission") @Produces(value="application/json") boolean checkNodeSourcePermission(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="nodeSourceName") String nodeSourceName, @QueryParam(value="provider") @DefaultValue(value="false") boolean provider) throws NotConnectedException, PermissionRestException
sessionId
- current sessionnodeSourceName
- name of the nodeSource to check the permission forNotConnectedException
PermissionRestException