Applying an immediate or high priority native command set to a device
The following examples of the executable Soap/Java API Methods describes how to call the new interface methods.
Java API Class: WorkFlowManager -> WorkFlowManagerProxy
New Method: executeImmediateNativeCommandBlocking
Parameters: NativeCommandSetCommand command, long timeout, boolean overrideConflicts
For our purposes we will be looking at a new method call at this level that will retrieve an action manager and execute against new methods in that class. We will implement new methods down to the Netcool Configuration Manager functional level to ensure that the path of execution is separate to normal workflow. This will ensure that existing code and functionality is not affected by the change.
How to call the new interface method on the Java API
NetworkResourceCriterion criterion = resourceDF.newNetworkResourceCriterion();
criterion.setRealmKey(container.getKeyAsRealmKey());
criterion.setHostName(criterionHostnameFilter);
criterion.setVendor(criterionVendorFilter);
criterion.setType(criterionTypeFilter);
criterion.setModel(criterionModelFilter);
criterion.setOsVersion(criterionOsFilter);
criterion.setSubrealms(criterionSubRealms);
NativeCommandSetCommand command = resourceDF.newNativeCommandSetCommand();
command.setCriterion(criterion);
command.addCommandSet(ncs1);
command.addCommandSet(ncs2);
command.setReportOnly(reportOnly);
System.out.println("Executing command.......");
command = (NativeCommandSetCommand) workflowManager.executeImmediateCommandBlocking(
command, 1000000, false);
Collection results = command.getInterrogationResults();
How to call the new interface method on the SOAP API
Soap API Class: IntellidenRSeriesSoapBindingImpl -> IntellidenRSeries
New Method: executeImmediateNativeCommandBlocking
Parameters: NativeCommandSetCommand command, long timeout, boolean overrideConflicts
NetworkResourceCriterion criterion = new NetworkResourceCriterion();
criterion.setRealmKey(criterionKey);
criterion.setHostName(criterionHostnameFilter);
criterion.setVendor(criterionVendorFilter);
criterion.setType(criterionTypeFilter);
criterion.setModel(criterionModelFilter);
criterion.setOsVersion(criterionOsFilter);
criterion.setSubrealms(criterionSubRealms);
NativeCommandSetCommand commandRequest = new NativeCommandSetCommand();
NativeCommandSetCommand commandResponse = null;
commandRequest.setCriterion(criterion);
commandRequest.setCommandSets(ncs);
commandRequest.setReportOnly(reportOnly);
commandRequest.setProcessingOrder(CommandSetProcessingOrder.COMMAND_AT_A_TIME);
System.out.println("Executing the command......");
commandResponse = (NativeCommandSetCommand) intelliden.executeImmediateCommandBlocking(
commandRequest, 1000000, false);
InterrogationResult[] results = commandResponse.getInterrogationResults();
Parsing results and response handling
Results parsing and response handling is the same as for the existing native command set execution, the new methods are Blocking so they wait for the completion of the UOW and return the response/results as the return object of the call. If the UOW fails the UOW Status within the results will convey this.