Blue Mind
Release 1.0

net.bluemind.core.api.services
Interface ISystem

All Known Implementing Classes:
SystemClient

public interface ISystem

Host services interface


Method Summary
 void assignToDomain(AccessToken at, java.lang.String tag, Host h, java.lang.String domain)
          Attaches a tagged host to a domain.
 java.util.List<java.lang.String> checkCanDelete(AccessToken at, Domain d)
           
 Domain create(AccessToken at, Domain d)
          Creates a domain
 Host create(AccessToken at, Host h)
          Creates a new host
 void createServiceTag(AccessToken at, java.lang.String serviceTag)
          Declares a new system tag, that will be usable to flag hosts.
 void delete(AccessToken at, Domain d)
          Deletes an existing domain
 void delete(AccessToken at, Host h)
          Deletes an existing host
 void deleteServiceTag(AccessToken at, java.lang.String serviceTag)
          Deletes a system tag.
 java.util.List<java.lang.String> fetchTags(AccessToken at, Host h)
          Fetches the tags associated to a host
 ResultList<Domain> find(AccessToken at, DomainQuery dq)
          Find domains matching the given Query object.
 ResultList<Host> find(AccessToken at, HostQuery hq)
          Finds hosts matching the given query
 java.util.List<Host> findAssignedHosts(AccessToken at, java.lang.String tag, java.lang.String domain)
          Finds the server hosts with a tag and attached to a (non-global) domain.
 java.util.List<Host> findTaggedHosts(AccessToken at, java.lang.String tag)
          Find the list of server hosts having a given tag
 Domain getDomainFromId(AccessToken at, int domainId)
          Get domain from ID
 DomainTemplate getDomainTemplate(AccessToken at)
          Get a DomainTemplateImpl that describes the needed servers in a bj domain.
 java.util.Map<java.lang.String,java.lang.String> getParams(AccessToken at, Host h, java.lang.String tag)
           
 java.util.List<java.lang.String> listServiceTags(AccessToken at)
          Returns all the system tags that can be set on a server host.
 java.util.List<java.lang.String> nodeExecuteCommand(AccessToken at, int hostId, java.lang.String cmd)
           
 java.lang.String nodeExecuteCommandNoOut(AccessToken at, int hostId, java.lang.String cmd)
           
 java.lang.String nodeRead(AccessToken at, int hostId, java.lang.String file)
          Read file from a BM host using bm-node
 java.lang.String nodeWrite(AccessToken at, int hostId, java.lang.String fileName, java.lang.String fileContent)
          Write file content to a BM host using bm-node
 java.lang.String resetCustomProperty(AccessToken at, java.lang.String customPropertyName)
           
 void setParams(AccessToken at, Host h, java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> params)
           
 void tag(AccessToken at, Host h, java.lang.String tag)
          Sets a system tag on a server host.
 void unassignFromDomain(AccessToken at, java.lang.String tag, Host h, Domain d)
          detach a tagged host from a domain.
 void untag(AccessToken at, Host h, java.lang.String tag)
          Removes a system tag on a server host.
 Domain update(AccessToken at, Domain d)
          Modifies an existing domain
 Host update(AccessToken at, Host h)
          Modifies an existing host
 void upgrade(AccessToken at, VersionInfo previous, VersionInfo target)
           
 

Method Detail

listServiceTags

java.util.List<java.lang.String> listServiceTags(AccessToken at)
                                                 throws ServerFault,
                                                        AuthFault
Returns all the system tags that can be set on a server host.

Parameters:
at - the user session
Returns:
the list of tag names
Throws:
ServerFault
AuthFault

createServiceTag

void createServiceTag(AccessToken at,
                      java.lang.String serviceTag)
                      throws ServerFault,
                             AuthFault
Declares a new system tag, that will be usable to flag hosts.

Parameters:
at -
serviceTag -
Throws:
ServerFault
AuthFault

deleteServiceTag

void deleteServiceTag(AccessToken at,
                      java.lang.String serviceTag)
                      throws ServerFault,
                             AuthFault
Deletes a system tag. All hosts with this tag will be un-tagged.

Parameters:
at -
serviceTag -
Throws:
ServerFault
AuthFault

findTaggedHosts

java.util.List<Host> findTaggedHosts(AccessToken at,
                                     java.lang.String tag)
                                     throws ServerFault,
                                            AuthFault
Find the list of server hosts having a given tag

Parameters:
at -
tag - the tag you are looking for
Returns:
Throws:
ServerFault
AuthFault

fetchTags

java.util.List<java.lang.String> fetchTags(AccessToken at,
                                           Host h)
                                           throws ServerFault,
                                                  AuthFault
Fetches the tags associated to a host

Parameters:
at -
h -
Returns:
the list of tags (might be empty)
Throws:
ServerFault
AuthFault

findAssignedHosts

java.util.List<Host> findAssignedHosts(AccessToken at,
                                       java.lang.String tag,
                                       java.lang.String domain)
                                       throws ServerFault,
                                              AuthFault
Finds the server hosts with a tag and attached to a (non-global) domain.

Parameters:
at -
tag -
domain -
Returns:
Throws:
ServerFault
AuthFault

tag

void tag(AccessToken at,
         Host h,
         java.lang.String tag)
         throws ServerFault,
                AuthFault
Sets a system tag on a server host. Does nothing if the host is already tagged. The tag is created automatically if it did not exist.

Parameters:
at -
h -
tag -
Throws:
ServerFault
AuthFault

untag

void untag(AccessToken at,
           Host h,
           java.lang.String tag)
           throws ServerFault,
                  AuthFault
Removes a system tag on a server host.

Parameters:
at -
h -
tag -
Throws:
ServerFault
AuthFault

setParams

void setParams(AccessToken at,
               Host h,
               java.lang.String tag,
               java.util.Map<java.lang.String,java.lang.String> params)
               throws ServerFault,
                      AuthFault
Throws:
ServerFault
AuthFault

getParams

java.util.Map<java.lang.String,java.lang.String> getParams(AccessToken at,
                                                           Host h,
                                                           java.lang.String tag)
                                                           throws ServerFault,
                                                                  AuthFault
Throws:
ServerFault
AuthFault

assignToDomain

void assignToDomain(AccessToken at,
                    java.lang.String tag,
                    Host h,
                    java.lang.String domain)
                    throws ServerFault,
                           AuthFault
Attaches a tagged host to a domain. If the host has multiple tag, only the given tag is used, eg. a server can be 'mail/imap' for zz.com and 'mail/smtp_in' for foo.org.

Parameters:
at -
tag -
h -
domain -
Throws:
ServerFault
AuthFault

unassignFromDomain

void unassignFromDomain(AccessToken at,
                        java.lang.String tag,
                        Host h,
                        Domain d)
                        throws ServerFault,
                               AuthFault
detach a tagged host from a domain. If the host has multiple tag, only the given tag is used.

Parameters:
at -
tag -
h -
domain -
Throws:
ServerFault
AuthFault

create

Host create(AccessToken at,
            Host h)
            throws ServerFault,
                   AuthFault
Creates a new host

Parameters:
at -
h -
Returns:
Throws:
ServerFault
AuthFault

delete

void delete(AccessToken at,
            Host h)
            throws ServerFault,
                   AuthFault
Deletes an existing host

Parameters:
at -
h -
Throws:
ServerFault
AuthFault

update

Host update(AccessToken at,
            Host h)
            throws ServerFault,
                   AuthFault
Modifies an existing host

Parameters:
at -
h -
Returns:
Throws:
ServerFault
AuthFault

find

ResultList<Host> find(AccessToken at,
                      HostQuery hq)
                      throws ServerFault,
                             AuthFault
Finds hosts matching the given query

Parameters:
at -
hq -
Returns:
Throws:
ServerFault
AuthFault

create

Domain create(AccessToken at,
              Domain d)
              throws ServerFault,
                     AuthFault
Creates a domain

Parameters:
at -
d -
Returns:
Throws:
ServerFault
AuthFault

update

Domain update(AccessToken at,
              Domain d)
              throws ServerFault,
                     AuthFault
Modifies an existing domain

Parameters:
at -
d -
Returns:
Throws:
ServerFault
AuthFault

delete

void delete(AccessToken at,
            Domain d)
            throws ServerFault,
                   AuthFault
Deletes an existing domain

Parameters:
at -
d -
Throws:
ServerFault
AuthFault

find

ResultList<Domain> find(AccessToken at,
                        DomainQuery dq)
                        throws ServerFault,
                               AuthFault
Find domains matching the given Query object.

Parameters:
at -
dq -
Returns:
Throws:
ServerFault
AuthFault

getDomainTemplate

DomainTemplate getDomainTemplate(AccessToken at)
                                 throws ServerFault,
                                        AuthFault
Get a DomainTemplateImpl that describes the needed servers in a bj domain.

Parameters:
at -
Returns:
Throws:
ServerFault
AuthFault

checkCanDelete

java.util.List<java.lang.String> checkCanDelete(AccessToken at,
                                                Domain d)
                                                throws ServerFault
Throws:
ServerFault

upgrade

void upgrade(AccessToken at,
             VersionInfo previous,
             VersionInfo target)
             throws ServerFault,
                    AuthFault
Throws:
ServerFault
AuthFault

nodeRead

java.lang.String nodeRead(AccessToken at,
                          int hostId,
                          java.lang.String file)
                          throws ServerFault
Read file from a BM host using bm-node

Parameters:
at - bm-core global admin token
hostId - read file from this host ID
file - file to read
Returns:
file content
Throws:
ServerFault

nodeWrite

java.lang.String nodeWrite(AccessToken at,
                           int hostId,
                           java.lang.String fileName,
                           java.lang.String fileContent)
                           throws ServerFault
Write file content to a BM host using bm-node

Parameters:
at - bm-core global admin token
hostId - write file to this host ID
fileName - file name to write
fileContent - file content
Returns:
string like: "OK: file <filename> writed on node: <hostname> (<hostid>)"
Throws:
ServerFault

nodeExecuteCommand

java.util.List<java.lang.String> nodeExecuteCommand(AccessToken at,
                                                    int hostId,
                                                    java.lang.String cmd)
                                                    throws ServerFault
Throws:
ServerFault

nodeExecuteCommandNoOut

java.lang.String nodeExecuteCommandNoOut(AccessToken at,
                                         int hostId,
                                         java.lang.String cmd)
                                         throws ServerFault
Throws:
ServerFault

resetCustomProperty

java.lang.String resetCustomProperty(AccessToken at,
                                     java.lang.String customPropertyName)
                                     throws ServerFault
Throws:
ServerFault

getDomainFromId

Domain getDomainFromId(AccessToken at,
                       int domainId)
                       throws ServerFault
Get domain from ID

Parameters:
at -
parseInt -
Returns:
Throws:
ServerFault

Blue Mind
Release 1.0