public class DryRunResult extends ApplyResult implements Iterable<DryRunResult.DryRunEntry>
Maapi#applyTransWithResult(int,boolean,int,String,int)
method.
The purpose of this class is to represent the result of a transaction
without actually having committed the changes.Modifier and Type | Class and Description |
---|---|
static class |
DryRunResult.DryRunEntry |
static class |
DryRunResult.Format |
Constructor and Description |
---|
DryRunResult(ConfResponse result) |
Modifier and Type | Method and Description |
---|---|
DryRunResult.Format |
getFormat()
Return the format of the dry-run result.
|
String |
getFormatAsString()
Return the format as a string.
|
Iterator<DryRunResult.DryRunEntry> |
iterator()
Retrieves an iterator from which one could iterate over the
result.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DryRunResult(ConfResponse result) throws MaapiException, ConfException
MaapiException
ConfException
public DryRunResult.Format getFormat()
The format could be any of the following:
DryRunResult.Format.XML
means that all changes in the whole data model is
displayed in NETCONF XML edit-config format, i.e., the edit-config
that would be applied locally (at NCS) to get a config that is equal
to that of the managed device.
DryRunResult.Format.CLI
means that all changes in the whole data model is
displayed in NCS CLI curly bracket format.
DryRunResult.Format.CLI_C
means that all changes in the whole data model
is displayed in Cisco style CLI format.
DryRunResult.Format.NATIVE
means that only changes under
/devices/device/config is displayed in native device format.
public String getFormatAsString()
public Iterator<DryRunResult.DryRunEntry> iterator()
iterator
in interface Iterable<DryRunResult.DryRunEntry>