public class TopologyClient extends NodeManagerClient
debug
Constructor and Description |
---|
TopologyClient(ConnectionContext cc) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
createCSR(java.lang.String groupID,
int servicesPort,
java.lang.String signAlg,
java.lang.String keyPassphrase,
Service service) |
java.lang.String[] |
createCSRByName(java.lang.String hostName,
java.lang.String groupName,
int servicesPort,
java.lang.String signAlg,
java.lang.String keyPassphrase,
Service service) |
Group |
createGroup(Group group)
Create an empty group in the topology.
|
Group |
createGroupByName(java.lang.String groupName)
Create an empty group in the topology.
|
Host |
createHost(Host host)
Create a host in the topology.
|
Service |
createService(java.lang.String groupID,
int servicesPort,
Service service,
java.lang.String[] certificates,
java.lang.String passphrase,
java.lang.String keyPassphrase) |
Service |
createService(java.lang.String groupID,
int servicesPort,
Service service,
java.lang.String signAlg,
java.lang.String domainPassphrase)
Create a new service, meaning API Server (or Node Manager) in the the domain topology.
|
Service |
createServiceByName(java.lang.String hostName,
java.lang.String groupName,
int servicesPort,
Service service,
java.lang.String[] certificates,
java.lang.String passphrase,
java.lang.String keyPassphrase) |
Service |
createServiceByName(java.lang.String hostName,
java.lang.String groupName,
int servicesPort,
Service service,
java.lang.String signAlg,
java.lang.String domainPassphrase)
Create a new service, meaning API Server (or Node Manager) in the the domain topology.
|
Service |
createServiceWithGroup(java.lang.String hostName,
Group group,
int servicesPort,
Service service,
java.lang.String[] certificates,
java.lang.String passphrase,
java.lang.String keyPassphrase)
Create a new service, meaning API Server (or Node Manager) in the the domain topology
within a given group.
|
void |
deleteGroup(java.lang.String groupID,
boolean deleteDiskGroup)
Delete a Group from the Topology.
|
void |
deleteGroupByName(java.lang.String groupName,
boolean deleteDiskGroup)
Delete a Group from the Topology.
|
void |
deleteHost(java.lang.String hostID)
Delete a host from the topology.
|
void |
deleteHostByName(java.lang.String hostName)
Delete a host from the topology.
|
void |
deleteService(java.lang.String groupID,
java.lang.String serviceID,
boolean deleteDiskInstance)
Delete a service (API Server or Node Manager) from the topology.
|
void |
deleteServiceByName(java.lang.String groupName,
java.lang.String serviceName,
boolean deleteDiskInstance)
Delete a service (API Server or Node Manager) from the topology.
|
void |
forceUnlockGroup(java.lang.String groupID) |
Group |
getGroup(java.lang.String groupID)
Get a group from the topology.
|
Group |
getGroupByName(java.lang.String groupName)
Get a group from the topology.
|
java.lang.String |
getGroupID(java.lang.String groupName)
Get the topology id of a group.
|
java.util.Collection<Group> |
getGroups()
Get all groups in the topology.
|
Host |
getHost(java.lang.String hostID)
Get a host from the topology.
|
Host |
getHostByName(java.lang.String hostName)
Get a host from the topology.
|
java.lang.String |
getHostID(java.lang.String hostName)
Get the topology id of a host.
|
java.util.Collection<Host> |
getHosts()
Get all hosts in the topology.
|
java.lang.String |
getNextTopologyId(Topology.EntityType type) |
Service |
getService(java.lang.String groupID,
java.lang.String serviceID)
Get a service from the topology.
|
Service |
getServiceByName(java.lang.String groupName,
java.lang.String serviceName)
Get a service from the topology.
|
java.lang.String |
getServiceID(java.lang.String groupName,
java.lang.String serviceName)
Get the topology id of a service, i.e.
|
java.util.Collection<Service> |
getServices(java.lang.String groupID)
Get all services in a group from the topology.
|
java.util.Collection<Service> |
getServicesByName(java.lang.String groupName)
Get all services in a group from the topology.
|
boolean |
getServiceStatus(java.lang.String groupID,
java.lang.String serviceID)
Get the status of a service (API Server/Node Manager).
|
boolean |
getServiceStatusByName(java.lang.String groupName,
java.lang.String serviceName)
Get the status of a service (API Server/Node Manager).
|
Topology |
getTopology()
Get the full domain topology.
|
com.vordel.api.topology.model.TopologyVersion |
getTopologyVersion()
Get the Topology version.
|
boolean |
isServerAvailable()
Checks to see if Admin Node Manager is available or not.
|
void |
lockGroup(java.lang.String groupID) |
Topology |
mergeTopology(Topology hostTopology) |
java.lang.String[] |
signCSR(java.lang.String csr,
java.lang.String signCertAlg,
java.lang.String domainPassphrase) |
void |
unlockGroup(java.lang.String groupID,
java.lang.String username) |
Group |
updateGroup(Group group)
Update a Group's name or tags.
|
Host |
updateHost(Host host)
Update a host in the topology.
|
Service |
updateService(java.lang.String groupID,
Service service)
Update a service's name, tags, management port, or scheme in the topology.
|
Service |
updateServiceByName(java.lang.String groupName,
Service service)
Update a service's name, tags, management port, or scheme in the topology.
|
Topology |
updateTopology(Topology topology,
boolean detectConflict,
boolean commit)
Aimed at internal use only.
|
Topology |
updateTopology(Topology topology,
boolean detectConflict,
boolean commit,
boolean propagateTopology)
Allow topology updates to an Admin NM without the Admin NM propagating the toplogy change
to other NMs in the domain.
|
createConnectionContext, createConnectionContext, createConnectionContext, getRootWebResource, getUrl, handleError, logDebug, path, setConnectTimeout, setDebug, setReadTimeout
public TopologyClient(ConnectionContext cc) throws NodeManagerAPIException
NodeManagerAPIException
public boolean isServerAvailable() throws NodeManagerAPIException
NodeManagerAPIException
- if user is unauthorized or the resource is unavailablepublic Topology getTopology() throws NodeManagerAPIException
NodeManagerAPIException
- if user is unauthorized or the resource is unavailablepublic Topology updateTopology(Topology topology, boolean detectConflict, boolean commit) throws NodeManagerAPIException
topology
- The new topologydetectConflict
- If this flag is true the Node Manager should only accept
in-synch updates, i.e. if the current version is n, the new version must be n+1.commit
- Set to false if this is a pending update. Set to true
if the update should be committed. A commit=false is sent before a commit=true request.NodeManagerAPIException
- If the Topology cannot be updated.public Topology updateTopology(Topology topology, boolean detectConflict, boolean commit, boolean propagateTopology) throws NodeManagerAPIException
topology
- The new topologydetectConflict
- If this flag is true the Node Manager should only accept
in-synch updates, i.e. if the current version is n, the new version must be n+1.commit
- Set to false if this is a pending update. Set to true
if the update should be committed. A commit=false is sent before a commit=true request.propagateTopology
- True if propagation is required, false otherwise.NodeManagerAPIException
- If the Topology cannot be updated.public Host createHost(Host host) throws NodeManagerAPIException
host
- The Host to create.NodeManagerAPIException
- If the Host couldn't be created.public java.util.Collection<Host> getHosts() throws NodeManagerAPIException
NodeManagerAPIException
- If the collection of Hosts cannot be determined.public Host getHostByName(java.lang.String hostName) throws NodeManagerAPIException
hostName
- The topology hostname.NodeManagerAPIException
- If a Host cannot be identified for the specified host name.public Host getHost(java.lang.String hostID) throws NodeManagerAPIException
hostID
- The host id, for example host-1
NodeManagerAPIException
- If a Host doesn't exist for the specified HostID.public Host updateHost(Host host) throws NodeManagerAPIException
host
- The Host with updated details.NodeManagerAPIException
- If the Host cannot be successfully updated.public void deleteHostByName(java.lang.String hostName) throws NodeManagerAPIException
hostName
- The topology name of the host to delete.NodeManagerAPIException
- If a Host cannot be located for the specified host name.public void deleteHost(java.lang.String hostID) throws NodeManagerAPIException
hostID
- The id of the host to delete, for example host-1
.NodeManagerAPIException
- If a Host for the specified ID can't be found, or deletion failed.public Group createGroup(Group group) throws NodeManagerAPIException
group
- The GroupNodeManagerAPIException
- If the specified Group cannot be added to the Topology.public Group createGroupByName(java.lang.String groupName) throws NodeManagerAPIException
groupName
- The name of the group to create.NodeManagerAPIException
- If a new Group cannot be created for the specified name.public java.util.Collection<Group> getGroups() throws NodeManagerAPIException
NodeManagerAPIException
- If the Groups in the domain cannot be identified.public Group getGroupByName(java.lang.String groupName) throws NodeManagerAPIException
groupName
- The group name.NodeManagerAPIException
- If a Group for the specified name does not exist.public Group getGroup(java.lang.String groupID) throws NodeManagerAPIException
groupID
- The group id, for example group-2
NodeManagerAPIException
- If the Group cannot be found for the specified groupID.public Group updateGroup(Group group) throws NodeManagerAPIException
group
- The updated Group.NodeManagerAPIException
- If the Group could not be updated.public void lockGroup(java.lang.String groupID) throws NodeManagerAPIException
NodeManagerAPIException
public void unlockGroup(java.lang.String groupID, java.lang.String username) throws NodeManagerAPIException
NodeManagerAPIException
public void forceUnlockGroup(java.lang.String groupID) throws NodeManagerAPIException
NodeManagerAPIException
public void deleteGroupByName(java.lang.String groupName, boolean deleteDiskGroup) throws NodeManagerAPIException
groupName
- The name of the Group to delete.deleteDiskGroup
- If true the Group related files are removed off disk on all hosts that run API Servers in this Group.NodeManagerAPIException
- If the named Group does not exist.public void deleteGroup(java.lang.String groupID, boolean deleteDiskGroup) throws NodeManagerAPIException
groupID
- The id of the Group to delete, for example group-2
.deleteDiskGroup
- If true the Group related files are
removed off disk on all hosts that run API Servers in this group.NodeManagerAPIException
- If the specified Group cannot be deleted from the Topology.public Service createServiceByName(java.lang.String hostName, java.lang.String groupName, int servicesPort, Service service, java.lang.String signAlg, java.lang.String domainPassphrase) throws NodeManagerAPIException
hostName
- The name of the host that the new API Server should run on.groupName
- The name of the group that the new API Server should run in.servicesPort
- The business services port of the new API Serverservice
- The details of the new API Server that will be held in the domain topologysignAlg
- The signing algorithmdomainPassphrase
- The domain passphraseNodeManagerAPIException
- If a Service cannot be created in the specified Group.public Service createServiceByName(java.lang.String hostName, java.lang.String groupName, int servicesPort, Service service, java.lang.String[] certificates, java.lang.String passphrase, java.lang.String keyPassphrase) throws NodeManagerAPIException
hostName
- The name of a Host in the Topology domain.groupName
- The name of a Group in the Topology domain.servicesPort
- The management port for the new Service.service
- The new Service's details.certificates
- The Certificates which protect this Service.passphrase
- The entity store passphrase. Passed here if is set to (prompt) so that certs.xml is properly encrypted.keyPassphrase
- The passphrase used to encrypt temporary key files.NodeManagerAPIException
- If the new Service cannot be added to the Topology domain.public Service createServiceWithGroup(java.lang.String hostName, Group group, int servicesPort, Service service, java.lang.String[] certificates, java.lang.String passphrase, java.lang.String keyPassphrase) throws NodeManagerAPIException
hostName
- The name of the host that the new API Server should run on.group
- The existing group within which to place the new API ServerservicesPort
- The business services port of the new API Serverservice
- The details of the new API Server that will be held in the domain topologycertificates
- Protection certificates for the Servicepassphrase
- A passphrasekeyPassphrase
- A key passphraseNodeManagerAPIException
- If the specified Service cannot be added to the Topology.public Service createService(java.lang.String groupID, int servicesPort, Service service, java.lang.String signAlg, java.lang.String domainPassphrase) throws NodeManagerAPIException
groupID
- The id of the group that the new API Server should run in.servicesPort
- The business services port of the new API Serverservice
- The details of the new API Server that will be held in the domain topologysignAlg
- The signing algorithmdomainPassphrase
- the domain passphraseNodeManagerAPIException
- If the Service cannot be added to the Specified Group.public Service createService(java.lang.String groupID, int servicesPort, Service service, java.lang.String[] certificates, java.lang.String passphrase, java.lang.String keyPassphrase) throws NodeManagerAPIException
groupID
- An ID for the Group to which this Service is to be added.servicesPort
- The management port for the new Service.service
- The Service object to add.certificates
- Protection certificates for the new Service.passphrase
- The entity store passphrase. Passed here if is set to (prompt) so that certs.xml is properly encrypted.keyPassphrase
- The key passphrase.NodeManagerAPIException
- If the Service could not be created in the specified Group.public java.util.Collection<Service> getServicesByName(java.lang.String groupName) throws NodeManagerAPIException
groupName
- The name of the group.NodeManagerAPIException
- If the specified Group does not exist in the Topology.public java.util.Collection<Service> getServices(java.lang.String groupID) throws NodeManagerAPIException
groupID
- The id of the group, for example group-2
NodeManagerAPIException
- If the Services in the specified Group could not be determined.public Service getServiceByName(java.lang.String groupName, java.lang.String serviceName) throws NodeManagerAPIException
groupName
- The name of the group the service resides in.serviceName
- The name of the service, i.e. API Server/Node Manager.NodeManagerAPIException
- If the groupName doesn't identify a Group, or the serviceName doesn't identify a Service.public Service getService(java.lang.String groupID, java.lang.String serviceID) throws NodeManagerAPIException
groupID
- The id of the group the service resides in, e.g. group-2
.serviceID
- The name of the service, i.e. API Server/Node Manager, e.g. instance-1
.NodeManagerAPIException
- If the specified serviceID doesn't represent a Service in the specified Group, or the Group doesn't exist.public Service updateServiceByName(java.lang.String groupName, Service service) throws NodeManagerAPIException
groupName
- The name of the group that the service resides inservice
- The name of the service to updateNodeManagerAPIException
- If the specified Group cannot be created.public Service updateService(java.lang.String groupID, Service service) throws NodeManagerAPIException
groupID
- The id of the group that the service resides in, e.g. group-2
service
- The id of the service to update, e.g. instance-1
NodeManagerAPIException
- If the specified Service couldn't be updated.public void deleteServiceByName(java.lang.String groupName, java.lang.String serviceName, boolean deleteDiskInstance) throws NodeManagerAPIException
groupName
- Name of the group the service to delete resides in.serviceName
- Name of service tio delete.deleteDiskInstance
- If true the disk files relating to the API Server are to be removed.NodeManagerAPIException
- If the specified Group or Service don't exist.public void deleteService(java.lang.String groupID, java.lang.String serviceID, boolean deleteDiskInstance) throws NodeManagerAPIException
groupID
- Id of the group the service to delete resides in, e.g. group-2
serviceID
- Id of service to delete, e.g. instance-1
deleteDiskInstance
- If true the disk files relating to the API Server are to be removed.NodeManagerAPIException
- If the specified Service couldn't be deleted.public java.lang.String getHostID(java.lang.String hostName)
hostName
- The name of the hosthost-1
public java.lang.String getGroupID(java.lang.String groupName)
groupName
- The name of the groupgroup-1
public java.lang.String getServiceID(java.lang.String groupName, java.lang.String serviceName)
groupName
- The group nameserviceName
- The service nameinstance-1
or nodemanager-1
, or null if unknown.public boolean getServiceStatusByName(java.lang.String groupName, java.lang.String serviceName) throws NodeManagerAPIException
groupName
- The name of the group that the service runs withinserviceName
- The name of the serviceNodeManagerAPIException
- If the specified Group or Service don't exist.public boolean getServiceStatus(java.lang.String groupID, java.lang.String serviceID) throws NodeManagerAPIException
groupID
- The id of the group that the service runs withinserviceID
- The id of the serviceNodeManagerAPIException
- If the Group or Service are unknown.public java.lang.String[] createCSRByName(java.lang.String hostName, java.lang.String groupName, int servicesPort, java.lang.String signAlg, java.lang.String keyPassphrase, Service service) throws NodeManagerAPIException
hostName
- The name of the HostgroupName
- The name of the GroupservicesPort
- The management port for the ServicesignAlg
- The signing algorithmkeyPassphrase
- the key passphraseservice
- The ServiceNodeManagerAPIException
- If the CSR cannot be created.public java.lang.String[] createCSR(java.lang.String groupID, int servicesPort, java.lang.String signAlg, java.lang.String keyPassphrase, Service service) throws NodeManagerAPIException
groupID
- The ID of the Group for which we want to create the CSR.servicesPort
- The Service's Management port.signAlg
- The signing algorithm to use.keyPassphrase
- The passphrase.service
- The Service for which we want to create the CSR.NodeManagerAPIException
- If the CSR cannot be created.public java.lang.String[] signCSR(java.lang.String csr, java.lang.String signCertAlg, java.lang.String domainPassphrase) throws NodeManagerAPIException
csr
- The CSR which we want to sign.signCertAlg
- The signing algorithm for signing the certificate.domainPassphrase
- The domain passphrase.NodeManagerAPIException
- If the CSR cannot be signed.public java.lang.String getNextTopologyId(Topology.EntityType type) throws NodeManagerAPIException
NodeManagerAPIException
public com.vordel.api.topology.model.TopologyVersion getTopologyVersion() throws NodeManagerAPIException
NodeManagerAPIException
- If the version cannot be determined.public Topology mergeTopology(Topology hostTopology) throws NodeManagerAPIException
NodeManagerAPIException
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel