public interface NetconfSession
| Modifier and Type | Method and Description |
|---|---|
void |
addDeviceOutputListener(NetconfDeviceOutputEventListener listener)
Remove a listener from the underlying stream handler implementation.
|
default void |
checkAndReestablish()
Checks the state of the underlying SSH session and connection
and if necessary it reestablishes it.
|
boolean |
close()
Closes the Netconf session with the device.
|
default boolean |
copyConfig(DatastoreId destination,
DatastoreId source)
Copies the configuration between configuration datastores.
|
default boolean |
copyConfig(DatastoreId netconfTargetConfig,
String newConfiguration)
Copies the new configuration, an Url or a complete configuration xml tree
to the target configuration.
|
boolean |
copyConfig(String netconfTargetConfig,
String newConfiguration)
Copies the new configuration, an Url or a complete configuration xml tree
to the target configuration.
|
default boolean |
copyConfig(TargetConfig netconfTargetConfig,
String newConfiguration)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration enum parameter instead
|
default boolean |
deleteConfig(DatastoreId netconfTargetConfig)
Deletes part of the specified configuration based on the filterSchema.
|
default boolean |
deleteConfig(String netconfTargetConfig)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration enum parameter instead
|
default boolean |
deleteConfig(TargetConfig netconfTargetConfig)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration enum parameter instead
|
String |
doWrappedRpc(String request)
Executes an synchronous RPC to the server and wrap the request in RPC header.
|
default boolean |
editConfig(DatastoreId netconfTargetConfig,
String mode,
String newConfiguration)
Retrieves part of the specified configuration based on the filterSchema.
|
boolean |
editConfig(String newConfiguration)
Retrieves part of the specified configuration based on the filterSchema.
|
default boolean |
editConfig(String netconfTargetConfig,
String mode,
String newConfiguration)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration enum parameter instead
|
default boolean |
editConfig(TargetConfig netconfTargetConfig,
String mode,
String newConfiguration)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration enum parameter instead
|
void |
endSubscription()
Ends subscription to the device's notifications.
|
String |
get(String request)
Retrieves the requested configuration, different from get-config.
|
String |
get(String filterSchema,
String withDefaultsMode)
Retrieves the requested data.
|
default String |
getConfig(DatastoreId netconfTargetConfig)
Retrieves the specified configuration.
|
default String |
getConfig(DatastoreId netconfTargetConfig,
String configurationFilterSchema)
Retrieves part of the specified configuration based on the filterSchema.
|
default String |
getConfig(String netconfTargetConfig)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration parameter instead
|
default String |
getConfig(String netconfTargetConfig,
String configurationFilterSchema)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfig enum parameter instead
|
default String |
getConfig(TargetConfig netconfTargetConfig)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration parameter instead
|
default String |
getConfig(TargetConfig netconfTargetConfig,
String configurationFilterSchema)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfig enum parameter instead
|
default Set<String> |
getDeviceCapabilitiesSet()
Gets the capabilities of the remote Netconf device associated to this
session.
|
String |
getServerCapabilities()
Deprecated.
1.10.0 use
getDeviceCapabilitiesSet() instead |
String |
getSessionId()
Gets the session ID of the Netconf session.
|
default boolean |
lock()
Locks the running configuration.
|
default boolean |
lock(DatastoreId datastore)
Locks the specified configuration.
|
default boolean |
lock(String configType)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration parameter instead
|
void |
removeDeviceOutputListener(NetconfDeviceOutputEventListener listener)
Remove a listener from the underlying stream handler implementation.
|
CompletableFuture<String> |
request(String request)
Deprecated.
- 1.10.0 do not remove needs reworking
|
String |
requestSync(String request)
Executes an synchronous RPC to the server.
|
void |
setDeviceCapabilities(List<String> capabilities)
Deprecated.
1.10.0 use
setOnosCapabilities(Iterable) instead |
default void |
setOnosCapabilities(Iterable<String> capabilities)
Sets the ONOS side capabilities.
|
void |
startSubscription()
Starts subscription to the device's notifications.
|
void |
startSubscription(String filterSchema)
Starts subscription to the device's notifications.
|
default boolean |
unlock()
Unlocks the running configuration.
|
default boolean |
unlock(DatastoreId datastore)
Unlocks the specified configuration.
|
default boolean |
unlock(String configType)
Deprecated.
- 1.10.0 Kingfisher use method overload that accepts
org.onosproject.netconf.TargetConfiguration parameter instead
|
@Deprecated CompletableFuture<String> request(String request) throws NetconfException
request - the XML containing the RPC for the server.NetconfException - when there is a problem in the communication process on
the underlying connectionString get(String request) throws NetconfException
request - the XML containing the request to the server.NetconfException - when there is a problem in the communication process on
the underlying connectionString get(String filterSchema, String withDefaultsMode) throws NetconfException
filterSchema - XML subtrees to include in the replywithDefaultsMode - with-defaults modeNetconfException - when there is a problem in the communication process on
the underlying connectionString doWrappedRpc(String request) throws NetconfException
request - the XML containing the request to the server.NetconfException - when there is a problem in the communication process on
the underlying connectionString requestSync(String request) throws NetconfException
request - the XML containing the RPC for the server.NetconfException - when there is a problem in the communication process on
the underlying connectiondefault String getConfig(DatastoreId netconfTargetConfig) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.NetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default String getConfig(TargetConfig netconfTargetConfig) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.NetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default String getConfig(String netconfTargetConfig) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.NetconfException - when there is a problem in the communication process on
the underlying connectiondefault String getConfig(DatastoreId netconfTargetConfig, String configurationFilterSchema) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.configurationFilterSchema - XML schema to filter the configuration
elements we are interested inNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default String getConfig(String netconfTargetConfig, String configurationFilterSchema) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.configurationFilterSchema - XML schema to filter the configuration
elements we are interested inNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default String getConfig(TargetConfig netconfTargetConfig, String configurationFilterSchema) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.configurationFilterSchema - XML schema to filter the configuration
elements we are interested inNetconfException - when there is a problem in the communication process on
the underlying connectionboolean editConfig(String newConfiguration) throws NetconfException
newConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean editConfig(DatastoreId netconfTargetConfig, String mode, String newConfiguration) throws NetconfException
netconfTargetConfig - the targetConfiguration to changemode - selected mode to change the configurationnewConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean editConfig(String netconfTargetConfig, String mode, String newConfiguration) throws NetconfException
netconfTargetConfig - the targetConfiguration to changemode - selected mode to change the configurationnewConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean editConfig(TargetConfig netconfTargetConfig, String mode, String newConfiguration) throws NetconfException
netconfTargetConfig - the targetConfiguration to changemode - selected mode to change the configurationnewConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean copyConfig(DatastoreId destination, DatastoreId source) throws NetconfException
The target configuration can't be the running one
destination - configuration datastoresource - configuration datastoreNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean copyConfig(DatastoreId netconfTargetConfig, String newConfiguration) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.newConfiguration - configuration XML to set or URL tag to the configurationNetconfException - when there is a problem in the communication process on
the underlying connectionboolean copyConfig(String netconfTargetConfig, String newConfiguration) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.newConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean copyConfig(TargetConfig netconfTargetConfig, String newConfiguration) throws NetconfException
netconfTargetConfig - the type of configuration to retrieve.newConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean deleteConfig(DatastoreId netconfTargetConfig) throws NetconfException
netconfTargetConfig - the name of the configuration to deleteNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean deleteConfig(String netconfTargetConfig) throws NetconfException
netconfTargetConfig - the name of the configuration to deleteNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean deleteConfig(TargetConfig netconfTargetConfig) throws NetconfException
netconfTargetConfig - the name of the configuration to deleteNetconfException - when there is a problem in the communication process on
the underlying connectionvoid startSubscription()
throws NetconfException
NetconfException - when there is a problem starting the subscription@Beta void startSubscription(String filterSchema) throws NetconfException
filterSchema - XML subtrees to indicate specific notificationNetconfException - when there is a problem starting the subscriptionvoid endSubscription()
throws NetconfException
NetconfException - when there is a problem ending the subscriptiondefault boolean lock(DatastoreId datastore) throws NetconfException
datastore - configuration datastore to be lockedNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean lock(String configType) throws NetconfException
configType - type of configuration to be lockedNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean unlock(DatastoreId datastore) throws NetconfException
datastore - configuration datastore to be unlockedNetconfException - when there is a problem in the communication process on
the underlying connection@Deprecated default boolean unlock(String configType) throws NetconfException
configType - type of configuration to be lockedNetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean lock()
throws NetconfException
NetconfException - when there is a problem in the communication process on
the underlying connectiondefault boolean unlock()
throws NetconfException
NetconfException - when there is a problem in the communication process on
the underlying connectionboolean close()
throws NetconfException
NetconfException - when there is a problem in the communication process on
the underlying connectionString getSessionId()
default Set<String> getDeviceCapabilitiesSet()
getServerCapabilities() reaches
deprecation grace period.@Deprecated String getServerCapabilities()
getDeviceCapabilitiesSet() instead@Deprecated void setDeviceCapabilities(List<String> capabilities)
setOnosCapabilities(Iterable) insteadcapabilities - list of capabilities the device has.default void checkAndReestablish()
throws NetconfException
NetconfException - when there is a problem in reestablishing
the connection or the session to the device.default void setOnosCapabilities(Iterable<String> capabilities)
capabilities - list of capabilities ONOS has.void addDeviceOutputListener(NetconfDeviceOutputEventListener listener)
listener - event listener.void removeDeviceOutputListener(NetconfDeviceOutputEventListener listener)
listener - event listener.