Package com.tailf.maapi
Class CommitParams
Object
com.tailf.maapi.CommitParams
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet commit queue error option.Get commit queue synchronous mode of operation custom timeout.Get commit-queue tag.Get the outformat to produce when committing with dry-run.Get the the trace id for the transaction.String[]Deprecated.booleanGet commit queue asynchronous mode of operation.booleanCheck if the commit queue item is atomic.booleanCheck if the the commit queue item block other commit queue items for these devices.booleanCheck if the commit should bypass the commit queue, i.e.booleanCheck if the commit queue item is locked.booleanCheck if the commit queue item is non-atomic.booleanGet commit queue synchronous mode of operation.booleanisDryRun()Check if dry-run is enabled.booleanCheck if the dry-run should produce a reverse diff.booleanCheck if service's create method should be invoked or not.booleanisNoLsa()Get no-lsa commit parameter.booleanCheck if the configuration should only be written to CDB, not actually pushed to the device.booleanbooleanbooleanCheck if no-revision-drop commit parameter is set.booleanGet reconcile commit parameter with discard-non-service-config option.booleanGet reconcile commit parameter with keep-non-service-config option.booleanisUseLsa()Get use-lsa commit parameter.voidSet commit queue asynchronous mode of operation.voidMake the commit queue item atomic.voidMake the commit queue item block other commit queue items for these devices.voidMake the commit transactional even if commit queue is default.voidSet commit queue error option.voidMake the commit queue item locked.voidMake the commit queue item non-atomic.voidSet commit queue synchronous mode of operation.voidsetCommitQueueSync(int timeout) Set commit queue synchronous mode of operation with custom timeout.voidsetCommitQueueTag(String tag) Set commit-queue tag.voidCommit with dry-run outformat CLI.voidCommit with dry-run outformat cli-c.voidCommit with dry-run outformat cli-c reverse.voidCommit with dry-run outformat native.voidCommit with dry-run outformat native reverse.voidsetDryRunOutformat(CommitParams.DryRunOutformat outformat) Set the outformat to produce when committing with dry-run.voidMake dry-run produce a reverse diff.voidCommit with dry-run outformat XML.voidDo not invoke service's create method.voidsetNoLsa()Set no-lsa commit parameter.voidOnly write the configuration to CDB, do not actually push it to the device.voidDo not check device sync state before pushing the configuration change.voidCheck that the parts of the device configuration to be modified are are up-to-date in CDB before pushing the configuration change to the device.voidSet no-revision-drop commit parameter.voidSet reconcile commit parameter with discard-non-service-config option.voidSet reconcile commit parameter with keep-non-service-config option.voidsetTraceId(String traceId) Set the trace id for the transaction.voidSet use-lsa commit parameter.voidsetWaitDevice(String[] devices) Deprecated.This is now done automatically for all devices part of the transaction.toString()
-
Constructor Details
-
CommitParams
public CommitParams() -
CommitParams
-
-
Method Details
-
setCommitQueueAsync
public void setCommitQueueAsync()Set commit queue asynchronous mode of operation. -
isCommitQueueAsync
public boolean isCommitQueueAsync()Get commit queue asynchronous mode of operation.- Returns:
- true if the mode of operation is asynchronous, false otherwise.
-
setCommitQueueSync
public void setCommitQueueSync()Set commit queue synchronous mode of operation. -
isCommitQueueSync
public boolean isCommitQueueSync()Get commit queue synchronous mode of operation.- Returns:
- true if the mode of operation is synchronous, false otherwise.
-
setCommitQueueSync
public void setCommitQueueSync(int timeout) Set commit queue synchronous mode of operation with custom timeout.- Parameters:
timeout- Timeout in seconds. -1 means infinity.
-
getCommitQueueSyncTimeout
Get commit queue synchronous mode of operation custom timeout.- Returns:
- The timeout in seconds. -1 means infinity. If no value has been set null is returned.
-
setCommitQueueBypass
public void setCommitQueueBypass()Make the commit transactional even if commit queue is default. -
isCommitQueueBypass
public boolean isCommitQueueBypass()Check if the commit should bypass the commit queue, i.e. it is transactional even though commit queue is the default.- Returns:
- true if the commit queue should be bypassed, false otherwise.
-
setCommitQueueTag
Set commit-queue tag. Implicitly enabled commit-queue commit.- Parameters:
tag- User defined opaque tag attached to the resulting queue item if using theMaapi.COMMIT_NCS_COMMIT_QUEUE_ASYNCorMaapi.COMMIT_NCS_COMMIT_QUEUE_SYNCflag. The tag is present in all notifications and events sent referencing the queue item.
-
getCommitQueueTag
Get commit-queue tag.- Returns:
- The commit-queue tag, or null if there is no tag.
-
setCommitQueueLock
public void setCommitQueueLock()Make the commit queue item locked. Locked commit queue item needs to be unlocked before it can proceed. -
isCommitQueueLock
public boolean isCommitQueueLock()Check if the commit queue item is locked.- Returns:
- true if it is locked, false otherwise.
-
setCommitQueueBlockOthers
public void setCommitQueueBlockOthers()Make the commit queue item block other commit queue items for these devices. -
isCommitQueueBlockOthers
public boolean isCommitQueueBlockOthers()Check if the the commit queue item block other commit queue items for these devices. -
setCommitQueueAtomic
public void setCommitQueueAtomic()Make the commit queue item atomic. -
isCommitQueueAtomic
public boolean isCommitQueueAtomic()Check if the commit queue item is atomic.- Returns:
- true if it is atomic, false if it isn't.
-
setCommitQueueNonAtomic
public void setCommitQueueNonAtomic()Make the commit queue item non-atomic. -
isCommitQueueNonAtomic
public boolean isCommitQueueNonAtomic()Check if the commit queue item is non-atomic.- Returns:
- true if it is non-atomic, false if it isn't.
-
setCommitQueueErrorOption
Set commit queue error option.- Parameters:
errorOption-
-
getCommitQueueErrorOption
Get commit queue error option.- Returns:
- The error option or null if not set.
-
setNoRevisionDrop
public void setNoRevisionDrop()Set no-revision-drop commit parameter. -
isNoRevisionDrop
public boolean isNoRevisionDrop()Check if no-revision-drop commit parameter is set.- Returns:
- true if it is set, false otherwise.
-
setNoNetworking
public void setNoNetworking()Only write the configuration to CDB, do not actually push it to the device. -
isNoNetworking
public boolean isNoNetworking()Check if the configuration should only be written to CDB, not actually pushed to the device.- Returns:
- true if the configuration should not be pused to the device, false otherwise.
-
setNoOverwrite
public void setNoOverwrite()Check that the parts of the device configuration to be modified are are up-to-date in CDB before pushing the configuration change to the device. -
isNoOverwrite
public boolean isNoOverwrite() -
setNoOutOfSyncCheck
public void setNoOutOfSyncCheck()Do not check device sync state before pushing the configuration change. -
isNoOutOfSyncCheck
public boolean isNoOutOfSyncCheck() -
setNoLsa
public void setNoLsa()Set no-lsa commit parameter. -
isNoLsa
public boolean isNoLsa()Get no-lsa commit parameter.- Returns:
- true if set, false otherwise.
-
setUseLsa
public void setUseLsa()Set use-lsa commit parameter. -
isUseLsa
public boolean isUseLsa()Get use-lsa commit parameter.- Returns:
- true if set, false otherwise.
-
setNoDeploy
public void setNoDeploy()Do not invoke service's create method. -
isNoDeploy
public boolean isNoDeploy()Check if service's create method should be invoked or not.- Returns:
- true if it should be invoked, false otherwise.
-
setReconcileKeepNonServiceConfig
public void setReconcileKeepNonServiceConfig()Set reconcile commit parameter with keep-non-service-config option. -
isReconcileKeepNonServiceConfig
public boolean isReconcileKeepNonServiceConfig()Get reconcile commit parameter with keep-non-service-config option.- Returns:
- true if set false otherwise.
-
setReconcileDiscardNonServiceConfig
public void setReconcileDiscardNonServiceConfig()Set reconcile commit parameter with discard-non-service-config option. -
isReconcileDiscardNonServiceConfig
public boolean isReconcileDiscardNonServiceConfig()Get reconcile commit parameter with discard-non-service-config option.- Returns:
- true if set, false otherwise.
-
isDryRun
public boolean isDryRun()Check if dry-run is enabled.- Returns:
- true if dry-run is enabled, false otherwise.
-
setDryRunOutformat
Set the outformat to produce when committing with dry-run.- Parameters:
outformat- The outformat to produce.
-
getDryRunOutformat
Get the outformat to produce when committing with dry-run.- Returns:
- The outformat to produce or null if not set.
-
setDryRunReverse
public void setDryRunReverse()Make dry-run produce a reverse diff. -
isDryRunReverse
public boolean isDryRunReverse()Check if the dry-run should produce a reverse diff.- Returns:
- true if the produced diff should be reverse, false otherwise.
-
setDryRunXml
public void setDryRunXml()Commit with dry-run outformat XML. -
setDryRunCli
public void setDryRunCli()Commit with dry-run outformat CLI. -
setDryRunNative
public void setDryRunNative()Commit with dry-run outformat native. -
setDryRunCliC
public void setDryRunCliC()Commit with dry-run outformat cli-c. -
setDryRunNativeReverse
public void setDryRunNativeReverse()Commit with dry-run outformat native reverse. -
setDryRunCliCReverse
public void setDryRunCliCReverse()Commit with dry-run outformat cli-c reverse. -
setWaitDevice
Deprecated.This is now done automatically for all devices part of the transaction.Wait for device lock before entering transaction critical section. -
getWaitDevice
Deprecated.Get the devices that we need to wait for a device lock for before entering transaction critical section.- Returns:
- An array of device names.
-
getTraceId
Get the the trace id for the transaction.- Returns:
- The the trace id.
-
setTraceId
Set the trace id for the transaction.- Parameters:
traceId- The trace id to use for the transaction.
-
getConfXMLParam
-
toString
-