|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vhosting.netconf.Operation
com.vhosting.netconf.EditConfig
public class EditConfig
The edit-config Netconf operation. This operation loads all or part of a specified configuration to the specified target configuration. This operation allows the new configuration to be expressed in several ways, such as using a local file, a remote file, or inline. If the target configuration does not exist, it will be created. The device analyzes the source and target configurations and performs the requested changes. Supported server capabilities:
urn:ietf:params:netconf:base:1.0 urn:ietf:params:netconf:capability:url:1.0 urn:ietf:params:netconf:capability:writable-running:1.0 urn:ietf:params:netconf:capability:candidate:1.0 urn:ietf:params:netconf:capability:validate:1.0 urn:ietf:params:netconf:capability:rollback-on-error:1.0
Nested Class Summary | |
---|---|
static class |
EditConfig.DefaultEditOperation
This enumeration lists each type of operation by default when editing configuration data. |
static class |
EditConfig.ErrorOption
This enumeration lists all kinds of error options. |
static class |
EditConfig.TestOption
This enumeration lists all kinds of tests that can be undertaken during the editing of the configuration data. |
Nested classes/interfaces inherited from class com.vhosting.netconf.Operation |
---|
Operation.Reply |
Field Summary |
---|
Fields inherited from class com.vhosting.netconf.Operation |
---|
operation, session |
Constructor Summary | |
---|---|
EditConfig(Session session,
Datastore target,
Config config)
Create the edit-config Netconf operation. |
|
EditConfig(Session session,
Datastore target,
Config config,
EditConfig.DefaultEditOperation defop)
Create the edit-config Netconf operation. |
|
EditConfig(Session session,
Datastore target,
java.net.URL config)
Create the edit-config Netconf operation. |
|
EditConfig(Session session,
Datastore target,
java.net.URL config,
EditConfig.DefaultEditOperation defop)
Create the edit-config Netconf operation. |
Method Summary | |
---|---|
static Config |
createConfig(Capability cap,
java.lang.String config,
java.lang.String... values)
Create an instance of Config for use with the operation. |
void |
setErrorOption(EditConfig.ErrorOption option)
Set the error option. |
void |
setTestOption(EditConfig.TestOption option)
Set the test option on the transaction. |
Methods inherited from class com.vhosting.netconf.Operation |
---|
execute, execute, executeSync |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditConfig(Session session, Datastore target, java.net.URL config, EditConfig.DefaultEditOperation defop) throws CapabilityException, java.lang.IllegalArgumentException
session
- The active session.target
- The target Container.config
- The URL of the data configuration.defop
- The default edit operation.
CapabilityException
- Throw this exception if the server
does not have the :url:1.0 capability.
Throw this exception if the server
does not have the :candidate:1.0 capability and the source
container is 'candidate', also.
Similarly, throw this exception if the server
does not have the :writable-running:1.0 capability and the
source container is 'running'.
java.lang.IllegalArgumentException
- Throw this exception if the URL specified not have a file:
schema.public EditConfig(Session session, Datastore target, java.net.URL config) throws CapabilityException, java.lang.IllegalArgumentException
session
- The active session.target
- The target Container.config
- The URL of the data configuration.
CapabilityException
- Throw this exception if the server
does not have the :url:1.0 capability.
Throw this exception if the server
does not have the :candidate:1.0 capability and the source
container is 'candidate', also.
Similarly, throw this exception if the server
does not have the :writable-running:1.0 capability and the
source container is 'running'.
java.lang.IllegalArgumentException
- Throw this exception if the URL specified not have a file:
schema.public EditConfig(Session session, Datastore target, Config config, EditConfig.DefaultEditOperation defop) throws CapabilityException
session
- The active session.target
- The target Container.config
- The configuration data.defop
- The default edit operation.
CapabilityException
- Throw this exception if the server
does not have the :candidate:1.0 capability and the source
container is 'candidate', also.
Similarly, throw this exception if the server
does not have the :writable-running:1.0 capability and the
source container is 'running'.public EditConfig(Session session, Datastore target, Config config) throws CapabilityException
session
- The active session.target
- The target Container.config
- The configuration data.
CapabilityException
- Throw this exception if the server
does not have the :candidate:1.0 capability and the source
container is 'candidate', also.
Similarly, throw this exception if the server
does not have the :writable-running:1.0 capability and the
source container is 'running'.Method Detail |
---|
public static Config createConfig(Capability cap, java.lang.String config, java.lang.String... values)
cap
- The capability in which the data belong to configure.config
- The configuration string.values
- A set of values that are encoded and introduced into the
filter through the corresponding variables.
Config.Config(Anyxml anyxml, Capability cap, String config,
String... values)
public void setTestOption(EditConfig.TestOption option) throws CapabilityException
option
- The test option.
CapabilityException
- Throw this exception if the server
does not have the :validate:1.0 capability.public void setErrorOption(EditConfig.ErrorOption option) throws CapabilityException
option
- The error option.
CapabilityException
- Throw this exception if the server
does not have the :rollback-on-error:1.0 capability.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |