7 #ifndef NETCONF_CONFIG_H
8 #define NETCONF_CONFIG_H
17 #include <boost/foreach.hpp>
137 const std::string name_;
156 CfgServer(
const std::string& model, CfgControlSocketPtr ctrl_sock);
172 return (control_socket_);
179 return (boot_update_);
186 boot_update_ = boot_update;
193 return (subscribe_changes_);
200 subscribe_changes_ = subscribe_changes;
207 return (validate_changes_);
214 validate_changes_ = validate_changes;
218 std::string
toText()
const;
227 const std::string model_;
239 bool subscribe_changes_;
245 bool validate_changes_;
248 CfgControlSocketPtr control_socket_;
307 #endif // NETCONF_CONFIG_H
CfgServer(const std::string &model, CfgControlSocketPtr ctrl_sock)
Constructor.
bool getValidateChanges() const
Getter which returns the validate-changes flag.
static const std::string typeToString(CfgControlSocket::Type type)
Converts CfgControlSocket::Type to string.
const isc::http::Url getUrl() const
Getter which returns the HTTP server URL.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Parser for CfgControlSocket.
Base class for user context.
std::pair< std::string, CfgServerPtr > CfgServersMapPair
Defines a iterator pairing of name and CfgServer.
std::string toText() const
Returns a text representation for the server.
bool getSubscribeChanges() const
Getter which returns the subscribe-changes flag.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< CfgServer > CfgServerPtr
Defines a pointer for CfgServer instances.
static Type stringToType(const std::string &type)
Converts socket type name to CfgControlSocket::Type.
CfgControlSocketPtr parse(data::ConstElementPtr ctrl_sock_config)
Performs the actual parsing of the given "control-socket" element.
std::map< std::string, CfgServerPtr > CfgServersMap
Defines a map of CfgServers, keyed by the name.
Abstract class for configuration Cfg_* classes.
boost::shared_ptr< const Element > ConstElementPtr
Type
Defines the list of possible constrol socket types.
const std::string getModel() const
Getter which returns the model name.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setBootUpdate(bool boot_update)
Set the boot-update flag.
void setSubscribeChanges(bool subscribe_changes)
Set the subscribe-changes flag.
virtual ~CfgServer()
Destructor (doing nothing).
CfgControlSocket(Type type, const std::string &name, const isc::http::Url &url)
Constructor.
Represents a Control Socket.
virtual ~CfgControlSocket()
Destructor (doing nothing).
Represents a Managed CfgServer.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
ostream & operator<<(ostream &os, const CfgServer &server)
Dumps the contents of a CfgServer as text to a output stream.
bool getBootUpdate() const
Getter which returns the boot-update flag.
boost::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
const std::string getName() const
Getter which returns the Unix socket name.
CfgServerPtr parse(data::ConstElementPtr server_config)
Performs the actual parsing of the given value from the "managed-servers" map.
void setValidateChanges(bool validate_changes)
Set the validate-changes flag.
const CfgControlSocketPtr & getCfgControlSocket() const
Getter which returns the control socket.
boost::shared_ptr< CfgServersMap > CfgServersMapPtr
Defines a pointer to map of CfgServers.
Type getType() const
Getter which returns the socket type.