|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ProvisioningAPI
The Provisioning API provides remote access to the provisioning module functions.
Applications can access provisioning templates and enables them to populate and execute the configured operations.The templates are XML documents that have parameterized
provisioning
profiles for configuring multiple devices in the network.
Format of Templates is available as Template.dtd under
< Web NMS Home >/provisioningtemplates directory.
The operator while doing the provisioning operation will provide the parameters.
The templates also contain information for automatically rendering the forms
that request these parameters from the operator during provisioning.
Templates can be executed in two different ways:
In addition, it provides access to extension apis. Extension apis provide domain and vendor specific capabilities for remote access. Extension apis need to be specified in the < Web NMS Home >/conf/ProvisioningExtensions.xml in order to access it through ProvisioningAPI.
Once WEBNMS server starts, clients on a remote host can get a handle of ProvisioningAPI using methods available in thecom.adventnet.nms.provisioning.messaging.ProvClientUtils class.
ExtensionAPI,
Template| Method Summary | |
|---|---|
void |
cancelExecution(long prId)
This method is to cancel the execution of the template if the status of the ProvisionResult is in any one of the following states. |
void |
cleanUpResources()
This method is used to clean up resources (memory) that were used by the Provisioning Operation. |
void |
deleteProvisionResult(long prId)
This method is used to delete Provision Result for the given Provision Result ID. |
void |
deleteProvisionResult(long prId,
boolean forcefulDelete)
This method is used to delete Provision Result for the given Provision Result ID. |
void |
deleteScheduledInfo(long id)
This method is used to delete the ScheduledInfo object i.e., cancelling the execution of scheduled template. |
boolean |
deRegisterScheduledInfoListener(com.adventnet.nms.provisioning.ScheduledInfoListener sil)
This method is used to de-register the ScheduledInfoListener which is registered to get the update regarding the ScheduledInfo. |
void |
disableScheduledInfo(long id)
This method is used to disable the scheduled template from execution. |
void |
enableScheduledInfo(long id)
This method is used to enable the disabled scheduled template for future execution. |
java.util.Hashtable |
getAllScheduledInfo()
This method is used to get all the ScheduledInfo details of the scheduled templates. |
ProvisioningAPI |
getExtensionAPI(java.lang.String apiName)
Get an available Provisioning API extension by name. |
java.lang.String |
getProvisionResultDetails(long prId)
This method is used to get the Details of the given Provision Result id. |
java.lang.String |
getProvisionResultStatus(long prId)
This method is used to get the Status of the given Provision Result id. |
java.lang.String |
getResult(java.lang.String operationIdentifier)
Get the result of an asynchronous operation. |
java.lang.String |
getStatus(java.lang.String operationIdentifier)
Get the status of an asynchronous operation. |
java.lang.String |
getTemplate(java.lang.String name)
Get provisioning template from server by name. |
java.lang.String |
getTemplate(java.lang.String name,
java.lang.String params)
Get provisioning template from server by name. |
java.lang.String |
getTemplate(java.lang.String path,
java.lang.String name,
java.lang.String params)
Get provisioning template with the given name in the specified path from server by name. |
java.lang.String[] |
getTemplateList()
Get list of provisioning templates configured on the server. |
java.lang.String[] |
getTemplateList(java.lang.String path)
Get list of provisioning templates from the specified path, configured on the server. |
java.lang.String |
getTemplateParameters(java.lang.String name)
Get provisioning template input parameters, which may be needed for initial population of the template. |
java.lang.String |
getTemplateParameters(java.lang.String path,
java.lang.String name)
Get provisioning template input parameters, which may be needed for initial population of the template given in the specified path. |
java.util.Properties |
getUserInputs(long prId)
This method is used to get the user input properties for the given ProvisionResult Id. |
void |
modifyScheduledInfo(long id,
java.util.Properties prop)
This method is used to modify the scheduled properties in the ScheduledInfo object and the same change will reflect in the scheduled template. |
void |
modifyScheduledInfo(long id,
java.lang.String key,
java.lang.String value)
This method is used to modify single property of the ScheduledInfo object and the same change will reflect in the scheduled template. |
java.lang.String |
provision(java.lang.String template)
The specified template is executed synchronously or asynchronously. |
boolean |
registerScheduledInfoListener(com.adventnet.nms.provisioning.ScheduledInfoListener sil)
This method is used to register the ScheduledInfoListener to get the update regarding the ScheduledInfo. |
void |
setUserInputs(long prId,
java.lang.String templateName,
java.util.Properties userInputs)
This method is used to set the user input properties for the given ProvisionResult Id and template. |
void |
updateDetails(long prId,
java.lang.String details)
This method is used to update the Details of the given Provision Result id. |
void |
updateStatus(long prId,
java.lang.String status)
This method is used to update the Status of the given Provision Result id. |
void |
updateStatusAndDetails(long prId,
java.lang.String status,
java.lang.String details)
This method is used to update the Status and the Details of the given Provision Result id. |
| Method Detail |
|---|
ProvisioningAPI getExtensionAPI(java.lang.String apiName)
throws java.rmi.RemoteException,
ExtensionNotFoundException
apiName - The name of the API extension
java.rmi.RemoteException - if an error occurs
ExtensionNotFoundException - if there is no ExtensionAPI named apiName
in < WEb NMS Home >/conf/ProvisioningExtensions.xml file or
if error occurs in getting extension API named apiName.ExtensionAPI
java.lang.String[] getTemplateList()
throws java.rmi.RemoteException
null if < Web NMS Home >/provisioningtemplates directory does not
contain Template xmls.
java.rmi.RemoteException - if an error occursTemplate
java.lang.String[] getTemplateList(java.lang.String path)
throws java.rmi.RemoteException
path - The path relative to < Web NMS Home >/provisioningtemplates directory.null if the path relative to < Web NMS Home >/provisioningtemplates directory does not
contain Template xmls.
java.rmi.RemoteException - if an error occursgetTemplateList()
java.lang.String getTemplate(java.lang.String name)
throws java.rmi.RemoteException,
TemplateNotFoundException,
TemplateInitializationException
ProvisioningAPIImpl#getTemplate(String, String)
method can be used.
Template.dtd is available under
< Web NMS Home >/provisioningtemplates directory.
name - The name of the template
java.rmi.RemoteException - if an error occurs
TemplateNotFoundException - If the specified name appended with ".xml" file is not present in the
< Web NMS Home >/provisioningtemplates directory.
TemplateInitializationException - if an error occurs during template initialization.Template,
TemplateFilter
java.lang.String getTemplate(java.lang.String name,
java.lang.String params)
throws java.rmi.RemoteException,
TemplateNotFoundException,
TemplateInitializationException
name - The name of the templateparams - Template parameters for initializing the template.
java.rmi.RemoteException - if an error occurs
TemplateNotFoundException - If the specified name appended with ".xml" file is not present in the
< Web NMS Home >/provisioningtemplates directory.
TemplateInitializationException - if an error occurs during template initialization.Template,
TemplateFilter
java.lang.String getTemplate(java.lang.String path,
java.lang.String name,
java.lang.String params)
throws java.rmi.RemoteException,
TemplateNotFoundException,
TemplateInitializationException
path - The path relative to < Web NMS Home >/provisioningtemplates directory
If path is specified as empty string, then the path will be considered as
< Web NMS Home >/provisioningtemplates directoryname - The name of the templateparams - Template parameters for initializing the template.
If there is no template parameters to be initialized, then it should be given as null.
If the template has template input parameters and the params argument is null, then the template
will be returned as an XML string without any template input parameter replacement.
java.rmi.RemoteException - if an error occurs
TemplateNotFoundException - Occurs if the specified name appended with ".xml" file is not present in the
specified path relative to < Web NMS Home >/provisioningtemplates directory.
TemplateInitializationException - if an error occurs during template initialization.getTemplate(String name),
getTemplate(String name, String params)
java.lang.String getTemplateParameters(java.lang.String name)
throws java.rmi.RemoteException,
TemplateNotFoundException
name - The name of the template
java.rmi.RemoteException - if an error occurs
TemplateNotFoundException - Occurs if the specified name appended with ".xml" file is not present in the
< Web NMS Home >/provisioningtemplates directory.TemplateParams
java.lang.String getTemplateParameters(java.lang.String path,
java.lang.String name)
throws java.rmi.RemoteException,
TemplateNotFoundException
path - The path relative to < Web NMS Home >/provisioningtemplates directory
If path is specified as empty string, then the path will be considered as
< Web NMS Home >/provisioningtemplates directory
name - The name of the template
java.rmi.RemoteException - if an error occurs
TemplateNotFoundException - Occurs if the specified name appended with ".xml" file is not present in the
specified path relative to < Web NMS Home >/provisioningtemplates directory.getTemplateParameters(String name)
java.lang.String getStatus(java.lang.String operationIdentifier)
throws java.rmi.RemoteException,
NoSuchOperationException
operationIdentifier - The OperationIdentifier of the operation
java.rmi.RemoteException - if an error occurs
NoSuchOperationException - if there is no operation exists with the specified OperationIdentifier.provision(String template)
java.lang.String getResult(java.lang.String operationIdentifier)
throws java.rmi.RemoteException,
IncompleteOperationException
operationIdentifier - The OperationIdentifier of the operation
java.rmi.RemoteException - if an error occurs
IncompleteOperationException - if the operation identified by the operationidentifier
had not been completed.provision(String template),
TemplateResult
java.lang.String provision(java.lang.String template)
throws java.rmi.RemoteException,
InvalidTemplateException,
OperationFailedException
getTemplate(String)method or
getTemplate(String, String)method and populated with the user inputs.
When the client invokes this method, the server will start execution from the element where it stops
while getTemplate() method for the same template is invoked.
Elements in a Stage will be executed one by one until "ConfigTask" or "InventoryUpdate" element is encountered.
Once it is encountered, PreProvisioningFilters will be applied and then keeps on executing the
"ConfigTask" or "InventoryUpdate" element.
The elements in a Stage after "ConfigTask" or "InventoryUpdate" element should only be
"ConfigTask" or "InventoryUpdate" or "GoTo" element. Otherwise the server will throw InvalidTemplateException.
If a Stage contains a "InventoryUpdate" before "ConfigTask" elements, then the criteria should be "always".
Otherwise InvalidTemplateException will be thrown. Once execution of all the elements in that stage
is completed, PostProvisioning filters will be applied. Then the next stage will be executed.
The special case may be a stage without ConfigTask and InventoryUpdate. In that situation,
PreProvisioningFilters will be applied after finishing execution of all the elements in that stage.
Then PostProvisioningFilters will be invoked.
Whenever "Form" element is encountered inside a Stage, the template will be sent to the client
for collecting user inputs. Client should call this method after collecting the user inputs
and populating them on template. This method will start execution from the next element to the
"Form" element.
At the end of execution of all stages, TemplateResult in string format will be returned to the client.
Definition of TemplateResult is specified in TemplateResult.dtd. It is available under
< Web NMS Home >/provisioningtemplates directory.
template - Template in string format
java.rmi.RemoteException - if an error occurs
OperationFailedException - If Provisioning operation is failed due to some errors occured.
InvalidTemplateException - If the template fails to be fit in the above explained rules.
void cleanUpResources()
throws java.rmi.RemoteException
java.rmi.RemoteException - throws if any Provisioning Operation currently
use the resources.
boolean registerScheduledInfoListener(com.adventnet.nms.provisioning.ScheduledInfoListener sil)
throws java.rmi.RemoteException
sil - The ScheduledInfoListener object which is going to be registered
boolean value to indicate whether the ScheduledInfoListener
object is registered.
java.rmi.RemoteException - if an error occurs
boolean deRegisterScheduledInfoListener(com.adventnet.nms.provisioning.ScheduledInfoListener sil)
throws java.rmi.RemoteException
sil - The ScheduledInfoListener object which is going to be de-registered
boolean value to indicate whether the ScheduledInfoListener
object is de-registered.
java.rmi.RemoteException - if an error occurs
java.util.Hashtable getAllScheduledInfo()
throws java.rmi.RemoteException
Hashtable with ScheduledInfo Id as the key and
the corresponding ScheduledInfo object as the value.
java.rmi.RemoteException - if an error occurs
void modifyScheduledInfo(long id,
java.util.Properties prop)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidScheduledInfoException
id - ScheduledInfo Idprop - Modified scheduled properties. The properties which can be modified are
scheduledTime, period, count, until
Values of scheduledTime & until should be in milliseconds
Values of period should follow Template.dtd
java.rmi.RemoteException - if an error occurs
InvalidScheduledInfoException - if the given id or properties are invalidScheduledInfo
void modifyScheduledInfo(long id,
java.lang.String key,
java.lang.String value)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidScheduledInfoException
id - ScheduledInfo Idkey - Modified scheduled property name.
Property name should be any one of the following :
scheduledTime, period, count, untilvalue - Modified scheduled property value
Values of scheduledTime & until should be in milliseconds
Values of period should follow Template.dtd
java.rmi.RemoteException - if an error occurs
InvalidScheduledInfoException - if the given id or the key, value string are invalidScheduledInfo
void enableScheduledInfo(long id)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidScheduledInfoException
id - ScheduledInfo Id
java.rmi.RemoteException - if an error occurs
InvalidScheduledInfoException - if the given id is invalid
void disableScheduledInfo(long id)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidScheduledInfoException
id - ScheduledInfo Id
java.rmi.RemoteException - if an error occurs
InvalidScheduledInfoException - if the given id is invalid
void deleteScheduledInfo(long id)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidScheduledInfoException
id - ScheduledInfo Id
java.rmi.RemoteException - if an error occurs
InvalidScheduledInfoException - if ther given id is invalid
java.util.Properties getUserInputs(long prId)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the ProvisionResult Id is invalid
NmsStorageException - If any Database related exception occurs.
void setUserInputs(long prId,
java.lang.String templateName,
java.util.Properties userInputs)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult IdtemplateName - Template NameuserInputProp - UserInput properties
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the ProvisionResult Id is invalid
NmsStorageException - If any Database related exception occurs.
java.lang.String getProvisionResultStatus(long prId)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
java.lang.String getProvisionResultDetails(long prId)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
void updateStatus(long prId,
java.lang.String status)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
void updateDetails(long prId,
java.lang.String details)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
void updateStatusAndDetails(long prId,
java.lang.String status,
java.lang.String details)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
void deleteProvisionResult(long prId)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException,
ProvisioningException
prId - ProvisionResult Id
java.rmi.RemoteException - if an error occurs
NmsStorageException - If any Database related exception occurs.
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
ProvisioningException
void deleteProvisionResult(long prId,
boolean forcefulDelete)
throws java.rmi.RemoteException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException,
ProvisioningException
prId - ProvisionResult IdforcefulDelete - boolean value to indicate the deletion of ProvisionResult irrespective of it's current status
java.rmi.RemoteException - if an error occurs
NmsStorageException - If any Database related exception occurs.
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
ProvisioningException
void cancelExecution(long prId)
throws java.rmi.RemoteException,
ProvisioningException,
com.adventnet.nms.provisioning.InvalidProvisionResultException,
NmsStorageException
1. SCHEDULED
2. WAITING
prId - ProvisionResult Id of the template for which the execution has to be cancelled.
java.rmi.RemoteException - if an error occurs
ProvisioningException - thrown if the template is either in execution or completed.
com.adventnet.nms.provisioning.InvalidProvisionResultException - if the given prId is wrong
NmsStorageException - If any Database related exception occurs.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||