Constructor and Description |
---|
ServerService(BmContext context,
Container installation,
java.util.List<IServerHook> serverhooks) |
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. |
public ServerService(BmContext context, Container installation, java.util.List<IServerHook> serverhooks) throws ServerFault
pool
- installation
- securityContext
- nodefactory
- serverhooks
- ServerFault
public TaskRef create(java.lang.String uid, Server srv) throws ServerFault
IServer
create
in interface IServer
ServerFault
public TaskRef update(java.lang.String uid, Server srv) throws ServerFault
IServer
update
in interface IServer
ServerFault
public ItemValue<Server> getComplete(java.lang.String uid) throws ServerFault
IServer
getComplete
in interface IServer
ServerFault
public void delete(java.lang.String uid) throws ServerFault
IServer
delete
in interface IServer
ServerFault
public java.util.List<ItemValue<Server>> allComplete() throws ServerFault
IServer
allComplete
in interface IServer
ServerFault
public java.lang.String submit(java.lang.String uid, java.lang.String command) throws ServerFault
IServer
getStatus
calls.submit
in interface IServer
ServerFault
public CommandStatus getStatus(java.lang.String uid, java.lang.String commandRef) throws ServerFault
IServer
getStatus
in interface IServer
ServerFault
public CommandStatus submitAndWait(java.lang.String uid, java.lang.String command) throws ServerFault
IServer
CommandStatus
).submitAndWait
in interface IServer
ServerFault
public byte[] readFile(java.lang.String uid, java.lang.String path) throws ServerFault
IServer
Server
with its uid.readFile
in interface IServer
uid
- the server uidpath
- the absolute filename to readServerFault
public void writeFile(java.lang.String uid, java.lang.String path, byte[] content) throws ServerFault
IServer
Server
with its uid.writeFile
in interface IServer
uid
- the server uidpath
- the absolute filename to writeServerFault
public void assign(java.lang.String serverUid, java.lang.String domainUid, java.lang.String tag) throws ServerFault
IServer
assign
in interface IServer
ServerFault
public void unassign(java.lang.String serverUid, java.lang.String domainUid, java.lang.String tag) throws ServerFault
IServer
unassign
in interface IServer
ServerFault
public java.util.List<Assignment> getAssignments(java.lang.String domainUid) throws ServerFault
IServer
getAssignments
in interface IServer
ServerFault
public java.util.List<java.lang.String> byAssignment(java.lang.String domainUid, java.lang.String tag) throws ServerFault
IServer
byAssignment
in interface IServer
ServerFault
public TaskRef setTags(java.lang.String uid, java.util.List<java.lang.String> tags) throws ServerFault
IServer
ITask
setTags
in interface IServer
ServerFault
public java.util.List<Assignment> getServerAssignments(java.lang.String uid) throws ServerFault
getServerAssignments
in interface IServer
ServerFault
Copyright © 2021. All Rights Reserved.