Commit a57876d8 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5389] References to spec_config.h removed.

parent eb0bb176
......@@ -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
......
......@@ -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());
......
......@@ -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_() {
}
......
......@@ -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
......
// 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"
......@@ -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());
......
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment