Poco::Netconf

class ConfigurationService

Library: Netconf
Package: Service
Header: Poco/Netconf/ConfigurationService.h

Description

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 Summary

Member Functions: closeSession, copyConfig, deleteConfig, editConfig, get, getConfig, killSession, lock, unlock

Constructors

ConfigurationService

ConfigurationService(
    Persistency * pPersistency
);

Creates the ConfigurationService with the given persistency object.

Destructor

~ConfigurationService

~ConfigurationService();

Destroys the ConfigurationService.

Member Functions

closeSession

void closeSession();

Implements the close-session operation.

copyConfig

void copyConfig(
    const std::string & target,
    const std::string & source
);

Implements the copy-config operation.

deleteConfig

void deleteConfig(
    const std::string & target
);

Implements the delete-config operation.

editConfig

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!

get

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.

getConfig

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.

killSession

void killSession(
    Poco::UInt32 sessionId
);

Implements the kill-session operation.

lock

void lock(
    const std::string & target
);

Implements the lock operation.

unlock

void unlock(
    const std::string & target
);

Implements the unlock operation.

Variables

RUNNING static

static const std::string RUNNING;

the name of the default data store