]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5389] References to spec_config.h removed. trac5389
authorTomek Mrugalski <tomasz@isc.org>
Fri, 15 Dec 2017 14:54:31 +0000 (15:54 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 15 Dec 2017 14:54:31 +0000 (15:54 +0100)
src/bin/d2/d2_controller.cc
src/bin/d2/tests/d2_controller_unittests.cc
src/lib/process/d_controller.cc
src/lib/process/d_controller.h
src/lib/process/spec_config.h.pre.in [deleted file]
src/lib/process/tests/d_controller_unittests.cc
src/lib/process/testutils/d_test_stubs.cc
src/lib/process/testutils/d_test_stubs.h

index a830722af3d331935b626abf1fc7b316dd5bb43a..d86857db09ec83ed3df41d0d1519e4813a5ff113 100644 (file)
@@ -9,7 +9,6 @@
 #include <d2/d2_controller.h>
 #include <d2/d2_process.h>
 #include <d2/parser_context.h>
-#include <process/spec_config.h>
 
 #include <stdlib.h>
 
@@ -45,14 +44,6 @@ DProcessBase* D2Controller::createProcess() {
 
 D2Controller::D2Controller()
     : DControllerBase(d2_app_name_, d2_bin_name_) {
-    // set the spec file either from the environment or
-    // use the production value.
-    if (getenv("KEA_FROM_BUILD")) {
-        setSpecFileName(std::string(getenv("KEA_FROM_BUILD")) +
-            "/src/bin/d2/dhcp-ddns.spec");
-    } else {
-        setSpecFileName(D2_SPECFILE_LOCATION);
-    }
 }
 
 isc::data::ConstElementPtr 
index 856a88a7c55c0ace0d0fc00b8098c31be9934b8e..1f09d330a08cd89b2fb1c1cf900695f27ed3ff10 100644 (file)
@@ -9,7 +9,6 @@
 #include <cc/command_interpreter.h>
 #include <d2/d2_controller.h>
 #include <d2/d2_process.h>
-#include <process/spec_config.h>
 #include <d2/tests/nc_test_utils.h>
 #include <process/testutils/d_test_stubs.h>
 
@@ -95,9 +94,6 @@ TEST_F(D2ControllerTest, basicInstanceTesting) {
     // Verify that controller's bin name is correct.
     EXPECT_TRUE(checkBinName(D2Controller::d2_bin_name_));
 
-    // Verify that controller's spec file name is correct.
-    EXPECT_TRUE(checkSpecFileName(D2_SPECFILE_LOCATION));
-
     // Verify that controller's IOService exists.
     EXPECT_TRUE(checkIOService());
 
index 6f31a83fe88bc2dadb07a9869d83034147358b0f..10eb43574e0318ae6108defb282df53a68ea19b3 100644 (file)
@@ -39,7 +39,7 @@ DControllerBasePtr DControllerBase::controller_;
 // Note that the constructor instantiates the controller's primary IOService.
 DControllerBase::DControllerBase(const char* app_name, const char* bin_name)
     : app_name_(app_name), bin_name_(bin_name),
-      verbose_(false), check_only_(false), spec_file_name_(""),
+      verbose_(false), check_only_(false),
       io_service_(new isc::asiolink::IOService()),
       io_signal_queue_() {
 }
index 4d781331c529a69e2622259f11b584f4521e940d..e5de1aa7c567a88c7f5ddf648be50e9a49949148 100644 (file)
@@ -413,21 +413,6 @@ protected:
         return (io_service_);
     }
 
-    /// @brief Getter for fetching the name of the controller's config spec
-    /// file.
-    ///
-    /// @return returns the file name string.
-    const std::string getSpecFileName() const {
-        return (spec_file_name_);
-    }
-
-    /// @brief Setter for setting the name of the controller's config spec file.
-    ///
-    /// @param spec_file_name the file name string.
-    void setSpecFileName(const std::string& spec_file_name) {
-        spec_file_name_ = spec_file_name;
-    }
-
     /// @brief Static getter which returns the singleton instance.
     ///
     /// @return returns a pointer reference to the private singleton instance
@@ -614,9 +599,6 @@ private:
     /// is enabled (usually specified by the command line -t argument).
     bool check_only_;
 
-    /// @brief The absolute file name of the JSON spec file.
-    std::string spec_file_name_;
-
     /// @brief Pointer to the instance of the process.
     ///
     /// This is required for config and command handlers to gain access to
diff --git a/src/lib/process/spec_config.h.pre.in b/src/lib/process/spec_config.h.pre.in
deleted file mode 100644 (file)
index 41a7add..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#define D2_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/dhcp-ddns.spec"
index d8b7697772dda8ea840fe85584d7697ea000cae9..72f24ee116bf2c4ff0279b28661eefce105daa45 100644 (file)
@@ -7,7 +7,6 @@
 #include <config.h>
 
 #include <cc/command_interpreter.h>
-#include <process/spec_config.h>
 #include <process/testutils/d_test_stubs.h>
 
 #include <boost/date_time/posix_time/posix_time.hpp>
@@ -52,9 +51,6 @@ TEST_F(DStubControllerTest, basicInstanceTesting) {
     // Verify that controller's bin name is correct.
     EXPECT_TRUE(checkBinName(DStubController::stub_bin_name_));
 
-    // Verify that controller's spec file name is correct.
-    EXPECT_TRUE(checkSpecFileName(D2_SPECFILE_LOCATION));
-
     // Verify that controller's IOService exists.
     EXPECT_TRUE(checkIOService());
 
index b73f6346ef5507ae86b36257a5eff1d0f62897b5..8da62fb98101d2bf821f0c485993f26a78e34d95 100644 (file)
@@ -7,7 +7,6 @@
 #include <config.h>
 #include <asiolink/io_service.h>
 #include <process/d_log.h>
-#include <process/spec_config.h>
 #include <process/testutils/d_test_stubs.h>
 #include <cc/command_interpreter.h>
 
@@ -103,13 +102,6 @@ DStubController::instance() {
 DStubController::DStubController()
     : DControllerBase(stub_app_name_, stub_bin_name_),
       processed_signals_(), record_signal_only_(false), use_alternate_parser_(false) {
-
-    if (getenv("KEA_FROM_BUILD")) {
-        setSpecFileName(std::string(getenv("KEA_FROM_BUILD")) +
-            "/src/bin/d2/dhcp-ddns.spec");
-    } else {
-        setSpecFileName(D2_SPECFILE_LOCATION);
-    }
 }
 
 bool
index 6cc5b9aaae15f269d7c81247544ec84f24b611c1..c30695eaeaef9eb99893be72f9f8bbb38a5d0226 100644 (file)
@@ -384,16 +384,6 @@ public:
         return (getController()->getBinName().compare(should_be) == 0);
     }
 
-    /// @brief Returns true if the Controller's spec file name matches the
-    /// given value.
-    ///
-    /// @param should_be is the value to compare against.
-    ///
-    /// @return returns true if the values are equal.
-    bool checkSpecFileName(const std::string& should_be) {
-        return (getController()->getSpecFileName().compare(should_be) == 0);
-    }
-
     /// @brief Tests the existence of the Controller's application process.
     ///
     /// @return returns true if the process instance exists.