Browse Source

[5019_rebase] createGlobalDhcpXConfigParser removed

Tomek Mrugalski 8 years ago
parent
commit
a47e82236b

+ 0 - 37
src/bin/dhcp4/json_config_parser.cc

@@ -435,43 +435,6 @@ private:
 namespace isc {
 namespace dhcp {
 
-/// @brief creates global parsers
-///
-/// This method creates global parsers that parse global parameters, i.e.
-/// those that take format of Dhcp4/param1, Dhcp4/param2 and so forth.
-///
-/// @param config_id pointer to received global configuration entry
-/// @param element pointer to the element to be parsed
-/// @return parser for specified global DHCPv4 parameter
-/// @throw NotImplemented if trying to create a parser for unknown
-/// config element
-DhcpConfigParser* createGlobalDhcp4ConfigParser(const std::string& config_id,
-                                                ConstElementPtr element) {
-    DhcpConfigParser* parser = NULL;
-    // valife-lifetime, renew-timer, rebind-timer, decline-probation-period
-    // have been migrated to SimpleParser already.
-    // subnet4 has been migrated to SimpleParser already.
-    // interface-config has been migrated to SimpleParser already.
-    // option-data and option-def have been converted to SimpleParser already.
-
-    // next-server migrated
-    // echo-client-id migrated
-    // lease-database migrated
-    // hosts-database migrated
-
-    // dhcp-ddns has been converted to SimpleParser.
-    // match-client-id has been migrated to SimpleParser already.
-    // control-socket has been converted to SimpleParser already.
-    // expired-leases-processing has been converted to SimpleParser already.
-    // client-classes has been converted to SimpleParser already.
-    // host-reservation-identifiers have been converted to SimpleParser already.
-    isc_throw(DhcpConfigError,
-              "unsupported global configuration parameter: "
-              << config_id << " (" << element->getPosition() << ")");
-
-    return (parser);
-}
-
 /// @brief Initialize the command channel based on the staging configuration
 ///
 /// Only close the current channel, if the new channel configuration is

+ 0 - 5
src/bin/dhcp6/dhcp6_messages.mes

@@ -502,11 +502,6 @@ server configuration, a set of parsers were successfully created, but
 one of them failed to commit its changes.  The reason for the failure
 is given in the message.
 
-% DHCP6_PARSER_CREATED created parser for configuration element %1
-A debug message output during a configuration update of the IPv6 DHCP
-server, notifying that the parser for the specified configuration element
-has been successfully created.
-
 % DHCP6_PARSER_EXCEPTION failed to create or run parser for configuration element %1
 On receipt of message containing details to a change of its configuration,
 the IPv6 DHCP server failed to create a parser to decode the contents of

+ 4 - 26
src/bin/dhcp6/json_config_parser.cc

@@ -770,17 +770,6 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
     // for option definitions. This is equivalent to commiting empty container.
     LibDHCP::setRuntimeOptionDefs(OptionDefSpaceContainer());
 
-    // Some of the values specified in the configuration depend on
-    // other values. Typically, the values in the subnet6 structure
-    // depend on the global values. Also, option values configuration
-    // must be performed after the option definitions configurations.
-    // Thus we group parsers and will fire them in the right order:
-    // all parsers other than lease-database, subnet6 and
-    // option-data parser, then option-data parser, subnet6 parser,
-    // lease-database parser.
-    // Please do not change this order!
-    ParserCollection independent_parsers;
-
     // Some of the parsers alter state of the system that can't easily
     // be undone. (Or alter it in a way such that undoing the change
     // has the same risk of failure as doing the change.)
@@ -956,21 +945,10 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
                 continue;
             }
 
-            /// @todo: 5116 ticket: remove this chunk below once all parser
-            /// tickets are done.
-            ParserPtr parser(createGlobal6DhcpConfigParser(config_pair.first,
-                                                           config_pair.second));
-            LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_PARSER_CREATED)
-                      .arg(config_pair.first);
-
-            // Those parsers should be started before other
-            // parsers so we can call build straight away.
-            independent_parsers.push_back(parser);
-            parser->build(config_pair.second);
-            // The commit operation here may modify the global storage
-            // but we need it so as the subnet6 parser can access the
-            // parsed data.
-            parser->commit();
+            // If we got here, no code handled this parameter, so we bail out.
+            isc_throw(DhcpConfigError,
+                      "unsupported global configuration parameter: " << config_pair.first
+                      << " (" << config_pair.second->getPosition() << ")");
         }
 
         // Setup the command channel.