mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
super_node: remove name setting
This commit is contained in:
parent
335440d8ad
commit
11d1786d9d
2 changed files with 1 additions and 17 deletions
|
@ -78,7 +78,6 @@ protected:
|
|||
|
||||
struct Task task; /**< Task for periodic stats output */
|
||||
|
||||
std::string name; /**< A name of this super node. Usually the hostname. */
|
||||
std::string uri; /**< URI of configuration */
|
||||
|
||||
Config config; /** The configuration file. */
|
||||
|
@ -181,11 +180,6 @@ public:
|
|||
return uri;
|
||||
}
|
||||
|
||||
std::string getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
int getAffinity() const
|
||||
{
|
||||
return affinity;
|
||||
|
|
|
@ -79,11 +79,6 @@ SuperNode::SuperNode() :
|
|||
kernel::nl::init(); /* Fill link cache */
|
||||
#endif /* WITH_NETEM */
|
||||
|
||||
char hname[128];
|
||||
gethostname(hname, 128);
|
||||
|
||||
name = hname;
|
||||
|
||||
logger = logging.get("super_node");
|
||||
}
|
||||
|
||||
|
@ -97,7 +92,6 @@ void SuperNode::parse(const std::string &u)
|
|||
void SuperNode::parse(json_t *root)
|
||||
{
|
||||
int ret;
|
||||
const char *nme = nullptr;
|
||||
|
||||
assert(state != State::STARTED);
|
||||
|
||||
|
@ -108,7 +102,7 @@ void SuperNode::parse(json_t *root)
|
|||
|
||||
json_error_t err;
|
||||
|
||||
ret = json_unpack_ex(root, &err, 0, "{ s?: F, s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: s, s?: b }",
|
||||
ret = json_unpack_ex(root, &err, 0, "{ s?: F, s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: b }",
|
||||
"stats", &statsRate,
|
||||
"http", &json_http,
|
||||
"logging", &json_logging,
|
||||
|
@ -117,15 +111,11 @@ void SuperNode::parse(json_t *root)
|
|||
"hugepages", &hugepages,
|
||||
"affinity", &affinity,
|
||||
"priority", &priority,
|
||||
"name", &nme,
|
||||
"idle_stop", &idleStop
|
||||
);
|
||||
if (ret)
|
||||
throw ConfigError(root, err, "node-config", "Unpacking top-level config failed");
|
||||
|
||||
if (nme)
|
||||
name = nme;
|
||||
|
||||
#ifdef WITH_WEB
|
||||
if (json_http)
|
||||
web.parse(json_http);
|
||||
|
|
Loading…
Add table
Reference in a new issue