37 {
"expired-leases-processing.flush-reclaimed-timer-wait-time",
Element::integer },
89ConfigCmdsDhcp6Impl::initGlobalContainersParameters() {
95 auto globals_copy = globals;
96 for (
auto const& key : globals_copy) {
100 globals.erase(key.first);
108ConfigCmdsDhcp6Impl::getGlobalContainersParameters() {
109 static SimpleKeywords parameters = ConfigCmdsDhcp6Impl::initGlobalContainersParameters();
119 createUpdateGlobalParameter6(backend_selector, server_selector,
122 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
130 const std::string& name) {
132 deleteGlobalParameter6(backend_selector, server_selector, name));
134 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
142 const std::string& name) {
146 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
157 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
167 createUpdateSubnet6(backend_selector, server_selector, subnet);
180 deleteSubnet6(backend_selector, server_selector, subnet_id));
189 const std::string& subnet_prefix) {
191 deleteSubnet6(backend_selector, server_selector, subnet_prefix));
202 getSubnet6(backend_selector, server_selector, subnet_id));
211 const std::string& subnet_prefix) {
213 getSubnet6(backend_selector, server_selector, subnet_prefix));
223 getAllSubnets6(backend_selector, server_selector));
234 createUpdateSharedNetwork6(backend_selector, server_selector, shared_network);
237 (callout_handle, AF_INET6, create_update_fun);
244 const std::string& name) {
246 deleteSharedNetwork6(backend_selector, server_selector, name));
250 const std::string& name) {
252 deleteSharedNetworkSubnets6(backend_selector, server_selector, name);
261 const std::string& name) {
268 const std::string& name) {
270 getSharedNetworkSubnets6(backend_selector, server_selector, name));
273 (callout_handle, AF_INET6, get_fun, get_all_fun);
281 getAllSharedNetworks6(backend_selector, server_selector));
284 (callout_handle, AF_INET6, get_all_fun);
292 const std::string& follow_class_name) {
294 createUpdateClientClass6(backend_selector, server_selector, client_class,
304 const std::string& name) {
306 deleteClientClass6(backend_selector, server_selector, name));
315 const std::string& name) {
339 createUpdateOptionDef6(backend_selector, server_selector, option_def);
341 setOptionDef(callout_handle, AF_INET6, create_update_fun);
349 const std::string& space,
352 deleteOptionDef6(backend_selector, server_selector,
353 code, space, force));
363 const std::string& space) {
390 createUpdateOption6(backend_selector, server_selector, option);
400 const std::string& space,
403 deleteOption6(backend_selector, server_selector, code,
404 space, client_classes));
414 const std::string& space,
417 getOption6(backend_selector, server_selector, code,
418 space, client_classes));
428 getAllOptions6(backend_selector, server_selector));
438 createUpdateServer6(backend_selector, server);
440 setServer(callout_handle, AF_INET6, create_update_fun);
448 deleteServer6(backend_selector, server_tag));
450 delServer(callout_handle, AF_INET6, delete_fun);
460 getServer(callout_handle, AF_INET6, get_fun);
476 const std::string& shared_network_name,
481 createUpdateOption6(backend_selector, server_selector,
482 shared_network_name, option);
491 const std::string& shared_network_name,
493 const std::string& space,
496 deleteOption6(backend_selector, server_selector,
497 shared_network_name, code, space, client_classes));
511 createUpdateOption6(backend_selector, server_selector,
523 const std::string& space,
526 deleteOption6(backend_selector, server_selector,
527 subnet_id, code, space, client_classes));
542 createUpdateOption6(backend_selector, server_selector,
543 pool_start_address, pool_end_address,
556 const std::string& space,
559 deleteOption6(backend_selector, server_selector,
560 pool_start_address, pool_end_address,
561 code, space, client_classes));
570 std::pair<asiolink::IOAddress, uint8_t> pd_pool_prefix =
575 (callout_handle,
"pd-pools", pd_pool_prefix,
576 backend_selector, server_selector,
581 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
585 (callout_handle,
"options", AF_INET6,
589 auto option_descriptor = option_pair.first;
590 option_descriptor.space_name_ = option_pair.second;
596 createUpdateOption6(backend_selector, server_selector,
597 pd_pool_prefix.first, pd_pool_prefix.second,
602 option_info->set(
"code",
604 (option_descriptor.option_->getType())));
605 option_info->set(
"space",
610 response_list->add(option_info);
613 response_arguments->set(
"options", response_list);
616 std::ostringstream msg;
617 msg <<
"DHCPv6 option successfully set.";
620 msg.str(), response_arguments);
621 callout_handle.setArgument(
"response", response);
623 }
catch (
const std::exception& ex) {
635 std::pair<asiolink::IOAddress, uint8_t> pd_pool_prefix =
640 (callout_handle,
"pd-pools", pd_pool_prefix,
641 backend_selector, server_selector,
647 (callout_handle,
"options", AF_INET6, option_tuple);
651 deleteOption6(backend_selector, server_selector,
652 pd_pool_prefix.first, pd_pool_prefix.second,
653 std::get<0>(option_tuple),
654 std::get<1>(option_tuple),
655 std::get<2>(option_tuple));
658 response_arguments->set(
"count",
662 std::ostringstream msg;
663 msg << count <<
" DHCPv6 option(s) deleted.";
668 callout_handle.setArgument(
"response", response);
670 }
catch (
const std::exception& ex) {
Parsers for a subset of an object specification, e.g.
The IOAddress class represents an IP addresses (version agnostic).
static const IOAddress & IPV6_ZERO_ADDRESS()
Returns an IPv6 zero address.
ConfigBackendPoolPtr getPool() const
Returns underlying config backend pool.
Implements a parser for parsing the option code and space and client-classes.
Implements a parser for a prefix delegation pool prefix.
void getSubnet6Id(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-get-by-id command.
void listSubnets6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-list command.
void delSubnet6Id(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-del-by-id command.
void delOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-del command.
void getGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-get command.
void delSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-del command.
void listSharedNetworks6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-list command.
void getClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-get command.
void setGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-set command.
void delGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-del command.
void delGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-del command.
static const data::SimpleKeywords GLOBAL6_MAP_PARAMETERS
Supported global maps parameters (scalars only).
void delSharedNetworkOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-network-del command.
void getOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-get command.
void getAllOptionDefs6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-get-all command.
void getGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-get command.
void delPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pool-del command.
void getAllGlobalOptions6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-get-all command.
void delServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-del command.
void setSubnetOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-subnet-set command.
void getServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-get command.
void getAllClientClasses6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-get-all command.
void delPdPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pd-pool-del command.
void setOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-set command.
void delClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-del command.
void setClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-set command.
void getAllGlobalParameters6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-get-all command.
void delSubnet6Prefix(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-del-by-prefix command.
void setServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-set command.
void setSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-set command.
void setGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-set command.
void getAllServers6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-get-all command.
void setPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pool-set command.
void delSubnetOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-subnet-del command.
void getSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-get command.
void setSubnet6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-set command.
void getSubnet6Prefix(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-get-by-prefix command.
void setPdPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pd-pool-set command.
void setSharedNetworkOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-network-set command.
void setClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-class[46]-set command.
void getSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-id command.
void getGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option[46]-global-get command.
void delPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-pool-del command.
void getClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-class[46]-get command.
void getSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun, FunType2 get_all)
Implements handler for remote-shared-network[46]-get command.
void setSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-network-set command.
void setSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-subnet-set command.
void getAllServers(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-server[46]-get-all command.
void setServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-server[46]-set command.
void delGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-global-parameter[46]-del command.
void delSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun, FunType2 delete_all_fun)
Implements handler for remote-shared-network[46]-del command.
void getGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_fun)
Implements handler for remote-global-parameter[46]-get command.
void getServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-server[46]-get command.
void delSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-subnet-del command.
void getOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option-def[46]-get command.
void setGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-global-set command.
void getAllGlobalParameters(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-global-parameter[46]-get-all command.
void delOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option-def[46]-del command.
void delSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-prefix command.
void delSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-network-del command.
void delClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-class[46]-del command.
void getSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-prefix command.
void setPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-pool-set command.
void listSubnets(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-subnet[46]-list command.
void getAllClientClasses(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-class[46]-get-all command.
void getAllOptionDefs(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option-def[46]-get-all command.
void getAllGlobalOptions(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option[46]-global-get-all command.
boost::shared_ptr< ConfigCmdsParser > parser_
Shared pointer to the commands parser.
void delGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-global-del command.
void delSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-id command.
void setSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-shared-network[46]-set command.
void delServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-server[46]-del command.
void listSharedNetworks(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-shared-network[46]-list command.
void setSubnet(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-subnet[46]-set command.
void setGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const data::SimpleKeywords &list_keywords, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-global-parameter[46]-set command.
void setOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option-def[46]-set command.
@ TAGS_FORBIDDEN
server-tags is not allowed
static ElementPtr create(const Position &pos=ZERO_POSITION())
Create a NullElement.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
Server selector for associating objects in a database with specific servers.
static ServerSelector UNASSIGNED()
Factory returning "unassigned" server selector.
static CfgMgr & instance()
returns a single instance of Configuration Manager
SrvConfigPtr getCurrentCfg()
Returns a pointer to the current configuration.
static ConfigBackendDHCPv6Mgr & instance()
Returns a sole instance of the ConfigBackendDHCPv6Mgr.
Parser for option data value.
static const isc::data::SimpleKeywords GLOBAL6_PARAMETERS
This table defines all global parameters in DHCPv6.
static const isc::data::SimpleKeywords GLOBAL6_LIST_PARAMETERS
static const isc::data::SimpleKeywords GLOBAL6_LIST_PARAMETER_TYPES
Per-packet callout handle.
void setArgument(const std::string &name, T value)
Set argument.
std::tuple< uint16_t, std::string, ClientClassesPtr > CBOptionTuple
Defines a tuple for the three values that may be used as a key for an option.
const int CONTROL_RESULT_EMPTY
Status code indicating that the specified command was completed correctly, but failed to produce any ...
const int CONTROL_RESULT_ERROR
Status code indicating a general failure.
ConstElementPtr createAnswer()
Creates a standard config/command level success answer message (i.e.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
boost::shared_ptr< ClientClasses > ClientClassesPtr
Smart pointer to ClientClasses object.
boost::shared_ptr< ClientClassDef > ClientClassDefPtr
a pointer to an ClientClassDef
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
boost::shared_ptr< SharedNetwork6 > SharedNetwork6Ptr
Pointer to SharedNetwork6 object.
boost::shared_ptr< OptionDescriptor > OptionDescriptorPtr
A pointer to option descriptor.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Defines the logger used by the top-level component of kea-lfc.