Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINIFICPP-2157 Move response node implementations to source files #1602

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
543 changes: 20 additions & 523 deletions libminifi/include/core/state/nodes/AgentInformation.h

Large diffs are not rendered by default.

79 changes: 2 additions & 77 deletions libminifi/include/core/state/nodes/BuildInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,7 @@
#include <utility>
#include <vector>

#ifndef WIN32

#if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD))
#include <net/if_dl.h>
#include <net/if_types.h>
#endif

#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <net/if.h>
#include <netdb.h>
#include <unistd.h>

#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <functional>
#include <map>
#include <sstream>

#include "../../../agent/agent_version.h"
#include "../nodes/MetricsBase.h"
#include "Connection.h"
#include "core/ClassLoader.h"
#include "io/ClientSocket.h"
#include "core/state/nodes/MetricsBase.h"

namespace org::apache::nifi::minifi::state::response {

Expand All @@ -74,52 +44,7 @@ class BuildInformation : public DeviceInformation {
return "BuildInformation";
}

std::vector<SerializedResponseNode> serialize() override {
std::vector<SerializedResponseNode> serialized;

SerializedResponseNode build_version;
build_version.name = "build_version";
build_version.value = AgentBuild::VERSION;

SerializedResponseNode build_rev;
build_rev.name = "build_rev";
build_rev.value = AgentBuild::BUILD_REV;

SerializedResponseNode build_date;
build_date.name = "build_date";
build_date.value = AgentBuild::BUILD_DATE;

SerializedResponseNode compiler;
compiler.name = "compiler";
{
SerializedResponseNode compiler_command;
compiler_command.name = "compiler_command";
compiler_command.value = AgentBuild::COMPILER;

SerializedResponseNode compiler_version;
compiler_version.name = "compiler_version";
compiler_version.value = AgentBuild::COMPILER_VERSION;

SerializedResponseNode compiler_flags;
compiler_flags.name = "compiler_flags";
compiler_flags.value = AgentBuild::COMPILER_FLAGS;

compiler.children.push_back(compiler_command);
compiler.children.push_back(compiler_version);
compiler.children.push_back(compiler_flags);
}
SerializedResponseNode device_id;
device_id.name = "device_id";
device_id.value = AgentBuild::BUILD_IDENTIFIER;

serialized.push_back(build_version);
serialized.push_back(build_rev);
serialized.push_back(build_date);
serialized.push_back(compiler);
serialized.push_back(device_id);

return serialized;
}
std::vector<SerializedResponseNode> serialize() override;
};

} // namespace org::apache::nifi::minifi::state::response
Loading
Loading