@Path(value="/servers/{containerUid}")
public interface IServer
Server
is the equivalent of Host in core_v1.
Server are items living in an installation
Container. The uid of
the container is determined using the /etc/bm/mcast.id on your bluemind
installation.Modifier and Type | Method and Description |
---|---|
java.util.List<ItemValue<Server>> |
allComplete()
Enumerate all the servers in the installation container.
|
void |
assign(java.lang.String serverUid,
java.lang.String domainUid,
java.lang.String tag)
Assigns a Server's tag to a domain.
|
java.util.List<java.lang.String> |
byAssignment(java.lang.String domainUid,
java.lang.String tag)
Fetches all the servers in a domain container by its assignment
|
TaskRef |
create(java.lang.String uid,
Server srv)
Creates a new server in the database with the given uid.
|
void |
delete(java.lang.String uid)
Deletes a server object in the database with its uid.
|
java.util.List<Assignment> |
getAssignments(java.lang.String domainUid)
Fetches all the server assignments in a domain container
|
ItemValue<Server> |
getComplete(java.lang.String uid)
Fetches a server object from the database with its uid.
|
java.util.List<Assignment> |
getServerAssignments(java.lang.String uid) |
CommandStatus |
getStatus(java.lang.String uid,
java.lang.String commandRef)
Fetches the progress of a command running in bm-node
|
byte[] |
readFile(java.lang.String uid,
java.lang.String path)
Uses bm-node to read a file on a
Server with its uid. |
TaskRef |
setTags(java.lang.String uid,
java.util.List<java.lang.String> tags)
tags server and return ref to Task (
ITask |
java.lang.String |
submit(java.lang.String uid,
java.lang.String command)
Executes a command using bm-node on the server with the given uid.
|
CommandStatus |
submitAndWait(java.lang.String uid,
java.lang.String command)
Executes a command using bm-node on the server with the given uid.
|
void |
unassign(java.lang.String serverUid,
java.lang.String domainUid,
java.lang.String tag)
Undo what assign does.
|
TaskRef |
update(java.lang.String uid,
Server srv)
Updates a server in the database with its uid.
|
void |
writeFile(java.lang.String uid,
java.lang.String path,
byte[] content)
Uses bm-node to write a file on a
Server with its uid. |
@PUT @Path(value="{uid}") TaskRef create(@PathParam(value="uid") java.lang.String uid, Server srv) throws ServerFault
uid
- srv
- ServerFault
@POST @Path(value="{uid}") TaskRef update(@PathParam(value="uid") java.lang.String uid, Server srv) throws ServerFault
uid
- srv
- ServerFault
@GET @Path(value="{uid}/complete") ItemValue<Server> getComplete(@PathParam(value="uid") java.lang.String uid) throws ServerFault
uid
- ServerFault
@DELETE @Path(value="{uid}") void delete(@PathParam(value="uid") java.lang.String uid) throws ServerFault
uid
- ServerFault
@GET @Path(value="_complete") java.util.List<ItemValue<Server>> allComplete() throws ServerFault
ServerFault
@POST @Path(value="{uid}/submit_command") java.lang.String submit(@PathParam(value="uid") java.lang.String uid, java.lang.String command) throws ServerFault
getStatus
calls.uid
- command
- ServerFault
@POST @Path(value="{uid}/submit_command_and_wait") CommandStatus submitAndWait(@PathParam(value="uid") java.lang.String uid, java.lang.String command) throws ServerFault
CommandStatus
).uid
- command
- ServerFault
@GET @Path(value="{uid}/command_status") CommandStatus getStatus(@PathParam(value="uid") java.lang.String uid, @QueryParam(value="ref") java.lang.String commandRef) throws ServerFault
uid
- commandRef
- ServerFault
@GET @Path(value="{uid}/fs/{path}") byte[] readFile(@PathParam(value="uid") java.lang.String uid, @PathParam(value="path") java.lang.String path) throws ServerFault
Server
with its uid.uid
- the server uidpath
- the absolute filename to readServerFault
@PUT @Path(value="{uid}/fs/{path}") void writeFile(@PathParam(value="uid") java.lang.String uid, @PathParam(value="path") java.lang.String path, byte[] content) throws ServerFault
Server
with its uid.uid
- the server uidpath
- the absolute filename to writecontent
- ServerFault
@POST @Path(value="{domainUid}/assignments/{serverUid}/_assign") void assign(@PathParam(value="serverUid") java.lang.String serverUid, @PathParam(value="domainUid") java.lang.String domainUid, @QueryParam(value="tag") java.lang.String tag) throws ServerFault
serverUid
- domainUid
- tag
- ServerFault
@POST @Path(value="{domainUid}/assignments/{serverUid}/_unassign") void unassign(@PathParam(value="serverUid") java.lang.String serverUid, @PathParam(value="domainUid") java.lang.String domainUid, @QueryParam(value="tag") java.lang.String tag) throws ServerFault
serverUid
- domainUid
- tag
- ServerFault
@GET @Path(value="{domainUid}/assignments") java.util.List<Assignment> getAssignments(@PathParam(value="domainUid") java.lang.String domainUid) throws ServerFault
domainUid
- ServerFault
@GET @Path(value="{domainUid}/byAssignment") java.util.List<java.lang.String> byAssignment(@PathParam(value="domainUid") java.lang.String domainUid, @QueryParam(value="tag") java.lang.String tag) throws ServerFault
domainUid
- assignment
- ServerFault
@POST @Path(value="{uid}/tags") TaskRef setTags(@PathParam(value="uid") java.lang.String uid, java.util.List<java.lang.String> tags) throws ServerFault
ITask
uid
- tags
- ServerFault
@GET @Path(value="{uid}/serverAssignments") java.util.List<Assignment> getServerAssignments(@PathParam(value="uid") java.lang.String uid) throws ServerFault
ServerFault
Copyright © 2021. All Rights Reserved.