public interface NetconfSession
| Modifier and Type | Method and Description |
|---|---|
void |
addDeviceOutputListener(NetconfDeviceOutputEventListener listener)
Remove a listener from the underlying stream handler implementation.
|
boolean |
close()
Closes the Netconf session with the device.
|
boolean |
copyConfig(String targetConfiguration,
String newConfiguration)
Copies the new configuration, an Url or a complete configuration xml tree
to the target configuration.
|
boolean |
deleteConfig(String targetConfiguration)
Deletes part of the specified configuration based on the filterSchema.
|
String |
doWrappedRpc(String request)
Executes an synchronous RPC to the server and wrap the request in RPC header.
|
boolean |
editConfig(String newConfiguration)
Retrives part of the specified configuration based on the filterSchema.
|
boolean |
editConfig(String targetConfiguration,
String mode,
String newConfiguration)
Retrives part of the specified configuration based on the filterSchema.
|
void |
endSubscription()
Ends subscription to the device's notifications.
|
String |
get(String request)
Retrives the requested configuration, different from get-config.
|
String |
get(String filterSchema,
String withDefaultsMode)
Retrives the requested data.
|
String |
getConfig(String targetConfiguration)
Retrives the specified configuration.
|
String |
getConfig(String targetConfiguration,
String configurationFilterSchema)
Retrives part of the specivied configuration based on the filterSchema.
|
String |
getServerCapabilities()
Gets the capabilities of the Netconf server associated to this session.
|
String |
getSessionId()
Gets the session ID of the Netconf session.
|
boolean |
lock()
Locks the running configuration.
|
boolean |
lock(String configType)
Locks the specified configuration.
|
void |
removeDeviceOutputListener(NetconfDeviceOutputEventListener listener)
Remove a listener from the underlying stream handler implementation.
|
CompletableFuture<String> |
request(String request)
Executes an asynchronous RPC to the server and obtains a future to be completed.
|
String |
requestSync(String request)
Executes an synchronous RPC to the server.
|
void |
setDeviceCapabilities(List<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.
|
boolean |
unlock()
Unlocks the running configuration.
|
boolean |
unlock(String configType)
Unlocks the specified configuration.
|
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 connectionString getConfig(String targetConfiguration) throws NetconfException
targetConfiguration - the type of configuration to retrieve.NetconfException - when there is a problem in the communication process on
the underlying connectionString getConfig(String targetConfiguration, String configurationFilterSchema) throws NetconfException
targetConfiguration - 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 connectionboolean editConfig(String targetConfiguration, String mode, String newConfiguration) throws NetconfException
targetConfiguration - 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 connectionboolean copyConfig(String targetConfiguration, String newConfiguration) throws NetconfException
targetConfiguration - the type of configuration to retrieve.newConfiguration - configuration to setNetconfException - when there is a problem in the communication process on
the underlying connectionboolean deleteConfig(String targetConfiguration) throws NetconfException
targetConfiguration - 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 subscriptionboolean lock(String configType) throws NetconfException
configType - type of configuration to be lockedNetconfException - when there is a problem in the communication process on
the underlying connectionboolean unlock(String configType) throws NetconfException
configType - type of configuration to be lockedNetconfException - when there is a problem in the communication process on
the underlying connectionboolean lock()
throws NetconfException
NetconfException - when there is a problem in the communication process on
the underlying connectionboolean 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()
String getServerCapabilities()
void setDeviceCapabilities(List<String> capabilities)
capabilities - list of capabilities the device has.void addDeviceOutputListener(NetconfDeviceOutputEventListener listener)
listener - event listener.void removeDeviceOutputListener(NetconfDeviceOutputEventListener listener)
listener - event listener.