|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.datapower.wamt.clientAPI.Domain
public class Domain
A Domain object corresponds to a domain configuration on a DataPower device.
A domain is a configuration partition on a DataPower device, and is the most granular
configuration object that the manager uses. The constructor for Domain
should not be used directly. Use the createManagedDomain
method on
ManagedSet
or Device
instead. A DataPower device can contain
multiple domains.
A domain is Versionable
- upon successful
deployment the domain configuration is read back off of the device to create a
DomainVersion
object.
The manager has the ability to maintain domain synchronization on Managed Domains. For more
information refer to setSynchronizationMode(DomainSynchronizationMode)
.
Domain synchronization is disabled by default, to enable it refer to
setSynchronizationMode(DomainSynchronizationMode)
Domain quiesce happens automatically for devices with firmware 3.8.1 or later. To
change the domain quiesce timeout change the Configuration.KEY_DOMAIN_QUIESCE_TIMEOUT
value in WAMT.properties, or call setQuiesceTimeout(int)
The default
domain contains some configuration that is unique to
a specific DataPower device. Ethernet interface configuration is an example.
When managing the default
domain for devices with firmware 3.8.1 or later,
a deployment policy should be used to filter out configuration that is unique
to a specific device. The following two filtered configuration rules should
always be used in the deployment policy for the default
domain:
*/default/network/interface?Name=.*
*/default/system/system?Name=.*
default
domain configuration.
DomainVersion
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2013
|
Fields inherited from interface com.ibm.datapower.wamt.clientAPI.Versionable |
---|
COPYRIGHT_2009_2010 |
Method Summary | |
---|---|
void |
addTag(java.lang.String name,
java.lang.String value)
Add a new tag. |
ServiceDeployment |
createServiceDeployment(ServiceConfiguration svcConfig,
boolean importAllFiles)
Create the ServiceDeployment object with service configuration only, no deployment policy for deployment. |
ServiceDeployment |
createServiceDeployment(ServiceConfiguration svcConfig,
URLSource policyURL,
java.lang.String policyDomain,
java.lang.String policyObjName,
boolean importAllFiles)
Create the ServiceDeployment object with service configuration and deployment policy to be deployed in this domain. |
DeleteObjectResult[] |
deleteService(RuntimeService service,
ConfigObject[] excludeObjects,
boolean deleteReferencedFiles)
Delete a RuntimeService, and return the result of each objects in a RuntimeService. |
ProgressContainer |
deployConfiguration()
Push a configuration onto the device that was previously set by calling setSourceConfiguration(URLSource) and setDeploymentPolicy(URLSource, String, String) |
java.lang.String |
getAbsoluteDisplayName()
Get a human-readable name that represents this object. |
AdminStatus |
getAdminStatus()
Get AdminStatus of this domain, enabled (AdminState.ENABLED) or disabled (AdminState.DISABLED). |
java.util.Map<java.lang.String,java.util.List<Status>> |
getAllStatus()
Get all status |
static Domain |
getByPrimaryKey(java.lang.String targetKey)
Retrieve a reference to the Domain that has the specified primary key. |
DeploymentPolicy |
getDeploymentPolicy()
Get the deployment policy owned by this Domain. |
Device |
getDevice()
Get the device that owns this Domain. |
int |
getHighestVersionNumber()
Get the highest version number of all the DomainVersions in this Domain. |
java.lang.String |
getName()
Get the name of this Domain. |
OpStatus |
getOpStatus()
Get OpStatus of this domain, up (OpState.UP) or down (OpState.DOWN). |
java.lang.String |
getPrimaryKey()
|
QuiesceStatus |
getQuiesceStatus()
Get Quiesce Status of this domain. |
int |
getQuiesceTimeout()
Get the persisted timeout value when Domain is quiesced. |
java.lang.String |
getRelativeDisplayName()
Get a human-readable name that represents this object. |
RuntimeService[] |
getServices()
Get all services in this domain. |
URLSource |
getSourceConfiguration()
This method can be used to retrieve the URLSource specified by setSourceConfiguration(URLSource) |
java.util.List<Status> |
getStatus(java.lang.String name)
Get a status |
DomainSynchronizationMode |
getSynchronizationMode()
This method can be used to determine the current synchronization mode for this Domain |
java.util.Set<java.lang.String> |
getTagNames()
Get all of the tag names on the resource. |
java.util.Set<java.lang.String> |
getTagValues(java.lang.String name)
Get the values for a given tag name. |
Version |
getVersion(int targetVersionNumber)
Get the specified Version of this Versionable object. |
Version[] |
getVersions()
Get all the versions that exist of this Versionable object. |
void |
quiesce()
Quiesce a domain The quiece operation is used on firmware versions 3.8.1 or higher to stop a domain before updating it. |
void |
refresh()
Update the latest status of domain and all services in this domain. |
void |
remove(Version version)
Trim the specified DomainVersion from the repository. |
void |
removeTag(java.lang.String name)
Remove all tags with the provided name. |
void |
removeTag(java.lang.String name,
java.lang.String value)
Remove the exactly matching tag. |
void |
removeTags()
Remove all the tags from the resource. |
void |
restart()
To restart this domain |
void |
setDeploymentPolicy(URLSource url,
java.lang.String policyDomain,
java.lang.String policyObjName)
Use this method to specify the deployment policy to apply to this domain during deployment. |
void |
setDeploymentPolicyXML(URLSource url)
Use this method to specify the deployment policy in XML format. |
void |
setQuiesceTimeout(int timeout)
Set the timeout value (in seconds) for checking the status of a domain quiesce or unquiesce operation. |
void |
setSourceConfiguration(URLSource sourceConfiguration)
Use this method to specify the domain configuration URLSource that should be deployed for this Domain. |
void |
setSynchronizationMode(DomainSynchronizationMode synchMode)
Set configuration synchronization mode on the Domain. |
java.lang.String |
toString()
Get a String representation of this object for the purpose of debugging or tracing. |
void |
unquiesce()
Unquiesce a domain The quiece operation is used on firmware versions 3.8.1 or higher to stop a domain before updating it. |
void |
uploadFile(java.lang.String fileName,
URLSource urlSource)
Upload file to device of this domain |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT_2009_2013
Method Detail |
---|
public void setSourceConfiguration(URLSource sourceConfiguration) throws DatastoreException, DeletedException, java.net.URISyntaxException, NotExistException, InvalidParameterException, FullException, NotManagedException
DomainSynchronizationMode.MANUAL
then this URLSource
will not be deployed until the ProgressContainer returned by deployConfiguration()
is invoked, or
if deploySourceConfigurationAction()
is invoked.DomainSynchronizationMode.AUTO
is set then this method
will automatically trigger a deploy action.DomainSynchronizationMode.MANUAL
prior to calling this method and set back to DomainSynchronizationMode.AUTO
after calling
setDeploymentPolicy(URLSource, String, String)
. The domain will be synchronized automatically
after the synchronization mode is set to DomainSynchronizationMode.AUTO
sourceConfiguration
- is a URLSource that points to the configuration that should be
deployed to the Device for this domain. The domain configuration is not persisted in the
repository as a DomainVersion until the configuration is successfully deployedsetSynchronizationMode(DomainSynchronizationMode)
,
setDeploymentPolicy(URLSource, String, String)
public ProgressContainer deployConfiguration() throws DeletedException, FullException, NotManagedException
setSourceConfiguration(URLSource)
and setDeploymentPolicy(URLSource, String, String)
This method returns a long-running task that is wrapped in a ProgressContainer
. The
ProgressContainer
must be used to trigger the actual execution of this task.
This operation will fail if the domain does not belong to a managed device.
Note: To use EXPORT
configuration files for DataPower devices on a firmware prior to 4.0.1,
the domain on the device must be created first via the DataPower WebGUI or CLI. A domain does not need
to be created first on the device if using a entire domain BACKUP
configuration file.
setSourceConfiguration(URLSource sourceConfiguration)
public void quiesce() throws DeletedException, UnsuccessfulOperationException, AMPException, NotExistException
public void unquiesce() throws UnsuccessfulOperationException, DeletedException, AMPException, NotExistException
public java.lang.String getName() throws DeletedException
setName(String)
method.
public Device getDevice() throws DeletedException
Domain
and a Device
is immutable, so there is no
setDevice(Device)
method.
public DeploymentPolicy getDeploymentPolicy() throws DeletedException
A DeploymentPolicy
object is created as a member of the Domain
when the Domain
is created. The DeploymentPolicy
value may be changed
by calling setDeploymentPolicy(URLSource, String, String)
- there is no
setDeploymentPolicy(DeploymentPolicy)
method.
public void setDeploymentPolicy(URLSource url, java.lang.String policyDomain, java.lang.String policyObjName) throws DeletedException, DirtySaveException, DatastoreException, InvalidParameterException, FullException, MissingFeaturesInFirmwareException, NotManagedException
DomainSynchronizationMode.MANUAL
then this policy
will not be deployed until the ProgressContainer returned by deployConfiguration()
is invoked, or
if deploySourceConfigurationAction()
is invoked.DomainSynchronizationMode.AUTO
is set then this method
will automatically trigger a deploy action.DomainSynchronizationMode.MANUAL
prior to calling this method and set back to DomainSynchronizationMode.AUTO
after calling
setDeploymentPolicy(URLSource, String, String)
. The domain will be synchronized automatically
after the synchronization mode is set to DomainSynchronizationMode.AUTO
url
- - is a URLSource that points to a configuration source containing the policy to be used
during deployment. The deployment policy information is not persisted in the
repository until the policy is successfully deployed. This parameter is required.policyDomain
- - this is the first piece of information used to find the deployment policy within
the configuration source specified by the URLSource. This parameter is only required if the
source is a backup, since a backup may contain multiple domains.policyObjName
- - this is the second piece of information used to find the deployment policy within
the configuration source specified by the URLSource. This parameter is required.setSynchronizationMode(DomainSynchronizationMode)
,
setSourceConfiguration(URLSource)
public void setDeploymentPolicyXML(URLSource url) throws DeletedException, DirtySaveException, DatastoreException, InvalidParameterException, FullException, MissingFeaturesInFirmwareException, NotManagedException
setDeploymentPolicy(URLSource, String, String)
for synchronization behavior as related to deployment policy.
url
- - is a URLSource that points to a configuration source containing the policy to be used
during deployment. The deployment policy information is not persisted in the
repository until the policy is successfully deployed. This parameter is required.setDeploymentPolicy(URLSource, String, String)
public void setSynchronizationMode(DomainSynchronizationMode synchMode) throws DeletedException, DirtySaveException, DatastoreException, FullException, NotManagedException
DomainSynchronizationMode.MANUAL
.
Valid synchronization modes are DomainSynchronizationMode.MANUAL
and DomainSynchronizationMode.AUTO
.
DomainSynchronizationMode.AUTO
The manager checks periodically to see if the domain configuration is out of synch with the domain on
a DataPower device device.
The manager is designed to make the following checks:
Conditions that cause the manager to invoke the synchronization logic:
ConfigurationDEFAULT_DOMAIN_SYNCHRONIZATION_INTERVAL
unless overridden in
WAMT.properties with the value of DomainSynchronizationInterval
The timer event calls synch(false) because it does not want to always compare deployed
domains to the source configuration, because the manager should be notified of such changes.
synchMode
- the synchronization mode this device should adhere toDomainSynchronizationMode
public void remove(Version version) throws InvalidParameterException, NotExistException, DeletedException, LockBusyException, DatastoreException
DeploymentPolicyVersion
is also deleted. This could be
user-initiated or invoked by an agent. It will remove the specified
DomainVersion, but will not delete the Domain object.
version
- the version to remove from the repositorypublic java.lang.String getPrimaryKey() throws DeletedException
public static Domain getByPrimaryKey(java.lang.String targetKey)
targetKey
- the primary key to search for
null
if no Domain with the specified primary key
was found.getPrimaryKey()
public Version[] getVersions() throws DeletedException
Versionable
This object should implement the Versionable
interface,
and versions of this object should implement the Version
interface.
getVersions
in interface Versionable
Versionable.getVersion(int)
public Version getVersion(int targetVersionNumber) throws DeletedException
Versionable
getVersion
in interface Versionable
targetVersionNumber
- the specified version to get of this object.
Versionable.getVersions()
public int getHighestVersionNumber() throws DeletedException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRelativeDisplayName()
public java.lang.String getAbsoluteDisplayName()
public URLSource getSourceConfiguration() throws DeletedException
setSourceConfiguration(URLSource)
public DomainSynchronizationMode getSynchronizationMode() throws DeletedException
public int getQuiesceTimeout()
public void setQuiesceTimeout(int timeout) throws DeletedException, AlreadyExistsInRepositoryException, DatastoreException, InvalidParameterException
Quiesce only pertains to Firmware levels 3.8.1.0 or later. Earlier levels of firmware do not support quiesce so calling this method has no effect. Note: An exception will not be thrown if you call this method for a domain on a device that has a firmware level below 3.8.1.0 - so this value will be available if firmware is ever upgraded.
If a value of zero is set then the quiesce operation will be initiated on supported firmware, but the quiesce or unquiesce status will not be checked. If a nonzero value less than 60 is set, then the value will automatically be set to a minimum of 60 seconds. Values higher than 60 are OK.
timeout
- value in secondspublic RuntimeService[] getServices() throws DeletedException, UnsuccessfulOperationException
public DeleteObjectResult[] deleteService(RuntimeService service, ConfigObject[] excludeObjects, boolean deleteReferencedFiles) throws AMPException, DeletedException, UnsuccessfulOperationException
service
- The service which is returned from getServices()
to be deletedexcludeObjects
- The ConfigObject array for ConfigObjects of Service to be excluded (not to be deleted)deleteReferencedFiles
- true is to delete referenced files of service
public void refresh() throws DeletedException
public ServiceDeployment createServiceDeployment(ServiceConfiguration svcConfig, URLSource policyURL, java.lang.String policyDomain, java.lang.String policyObjName, boolean importAllFiles) throws DeletedException, UnsuccessfulOperationException, NotExistException, InUseException, InvalidParameterException, AMPException, java.io.IOException, DirtySaveException, DatastoreException, FullException, MissingFeaturesInFirmwareException, NotManagedException
createServiceDeployment(ServiceConfiguration, boolean)
instead if no deployment policy is for deployment.
Note: If ServiceConfiguration.setServicesForDeployment(ConfigService[])
is not invoked, then assume all services
and files in the source configuration will be deployed, the importAllFiles will be treated as true, meaning all files
in the source configuration will be deployed to the target domain no matter what the importAllFiles is set.
svcConfig
- The ServiceConfiguration objectpolicyURL
- is a URLSource that points to a configuration source containing the policy to be used
during deployment. The deployment policy information is not persisted in the
repository until the policy is successfully deployed. This parameter is required.policyDomain
- this is the first piece of information used to find the deployment policy within
the configuration source specified by the URLSource. This parameter is only required if the
source is a backup, since a backup may contain multiple domains.policyObjName
- this is the second piece of information used to find the deployment policy within
the configuration source specified by the URLSource. This parameter is required.importAllFiles
- true to import all files in a configuration source
createServiceDeployment(ServiceConfiguration, boolean)
public ServiceDeployment createServiceDeployment(ServiceConfiguration svcConfig, boolean importAllFiles) throws DeletedException, UnsuccessfulOperationException, NotExistException, java.io.IOException, InUseException, InvalidParameterException, AMPException
svcConfig
- The ServiceConfiguration objectimportAllFiles
- true to import all files in a configuration source
createServiceDeployment(ServiceConfiguration, URLSource, String, String, boolean)
public AdminStatus getAdminStatus() throws InvalidParameterException, DeletedException
AdminStatus
public OpStatus getOpStatus() throws InvalidParameterException, DeletedException
OpStatus
public QuiesceStatus getQuiesceStatus() throws InvalidParameterException, DeletedException
QuiesceStatus
public void addTag(java.lang.String name, java.lang.String value) throws DeletedException, AlreadyExistsInRepositoryException, DatastoreException, InvalidParameterException
Taggable
Add a new tag.
addTag
in interface Taggable
name
- the tag namevalue
- the tag valuepublic void removeTag(java.lang.String name, java.lang.String value) throws DeletedException, DirtySaveException, DatastoreException, InvalidParameterException
Taggable
Remove the exactly matching tag. no error if you try to remove a tag that isn't there
removeTag
in interface Taggable
name
- the tag namevalue
- the tag valuepublic void removeTag(java.lang.String name) throws DeletedException, DirtySaveException, DatastoreException, InvalidParameterException
Taggable
Remove all tags with the provided name. no error if you try to remove a tag that isn't there
removeTag
in interface Taggable
name
- the tag namepublic void removeTags() throws DeletedException, DirtySaveException, DatastoreException
Taggable
Remove all the tags from the resource. No error if none exist
removeTags
in interface Taggable
public java.util.Set<java.lang.String> getTagNames() throws DeletedException
Taggable
Get all of the tag names on the resource. return an empty set if no tags have been added
getTagNames
in interface Taggable
public java.util.Set<java.lang.String> getTagValues(java.lang.String name) throws DeletedException, InvalidParameterException
Taggable
Get the values for a given tag name. return an empty set if the resource hasn't been tagged with the requested tag name
getTagValues
in interface Taggable
name
- the tag name
public void uploadFile(java.lang.String fileName, URLSource urlSource) throws DeletedException, AMPException, java.io.IOException, java.net.URISyntaxException, NotExistException, UnsuccessfulOperationException
fileName
- the name of the file in the format used by the device, i.e., store:///myfile.
The folder must exist in the device, otherwise, the exception is thrownurlSource
- an URLSource that points to the file that is copied to the Device,
the schemes of url only support "file:///", "http://", "https://". URISyntaxException exception is thrown if the urlSource is not valid.public void restart() throws DeletedException, AMPException, LockBusyException, UnsuccessfulOperationException, NotExistException
public java.util.Map<java.lang.String,java.util.List<Status>> getAllStatus() throws DeletedException, SOMAException, SOMAIOException
public java.util.List<Status> getStatus(java.lang.String name) throws DeletedException, SOMAException, SOMAIOException
name
- The name of operation to get status
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |