Library: Netconf
Package: Service
Header: Poco/Netconf/ConfigurationService.h
Implementation of the protocol part of Netconf. Note that the generated remote classes for the ConfigurationService (proxy, skeleton, interface) were manually adapted (method names according to Netconf schema have a minus sign in them which C++ doesn't like, also default parameters must be at the end of the method signature and attributes are not explicitely supported by the transport layer, same goes for enums)
Member Functions: closeSession, copyConfig, deleteConfig, editConfig, get, getConfig, killSession, lock, unlock
ConfigurationService(
Persistency * pPersistency
);
Creates the ConfigurationService with the given persistency object.
Destroys the ConfigurationService.
void closeSession();
Implements the close-session operation.
void copyConfig(
const std::string & target,
const std::string & source
);
Implements the copy-config operation.
void deleteConfig(
const std::string & target
);
Implements the delete-config operation.
void editConfig(
const std::string & target,
Poco::AutoPtr < XML::Document > config,
Utility::DefaultOperation defaultOperation = Utility::DOP_MERGE,
Utility::TestOption testOption = Utility::TO_TESTTHENSET,
Utility::ErrorOption errorOption = Utility::EO_STOP
);
Implements the edit-config operation. Note that the default behavior is to try an update/replace first, then an add. This implies that simply adding data to an vector is not possible, one must send the whole vector and use replace as default operation!
Poco::AutoPtr < XML::Document > get(
const Filter & filter = Filter ()
);
Retrieves configuration data from the default datastore ("running") If for filtering the defaultparameter is used, filtering will be switched off.
Poco::AutoPtr < XML::Document > getConfig(
const std::string & source,
const Filter & filter = Filter ()
) const;
Implements the get-config operation. The source defines the configuration datastore which is queried, the filter specifies the filtering criteria on the complete datastore. If for filtering the defaultparameter is used, filtering will be switched off.
void killSession(
Poco::UInt32 sessionId
);
Implements the kill-session operation.
void lock(
const std::string & target
);
Implements the lock operation.
void unlock(
const std::string & target
);
Implements the unlock operation.
static const std::string RUNNING;
the name of the default data store