#include <d2/d2_controller.h>
#include <d2/d2_process.h>
#include <d2/parser_context.h>
-#include <process/spec_config.h>
#include <stdlib.h>
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
#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>
// 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());
// 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_() {
}
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
/// 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
+++ /dev/null
-// 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"
#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>
// 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());
#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>
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
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.