-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue: When both discovery IP and service IP is configured in contrai…
…l-vrouter-agent.conf, the expected_connections count (used by NodeStatus UVE to declare whether agent is Functional or not) computed by agent was incorrect. Fix: While updating expected_connections count we should consider whether agent has subscribed for a given discovery service or not. Closes-Bug: #1396164 Change-Id: I93837ea036276580c55903f7b2d8e36bbd66ca7d
- Loading branch information
Showing
10 changed files
with
182 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. | ||
*/ | ||
|
||
#include <agent_param_test.h> | ||
|
||
AgentParamTest::AgentParamTest(Agent *agent) : AgentParam(agent) { | ||
} | ||
|
||
AgentParamTest::~AgentParamTest() { | ||
} | ||
|
||
Ip4Address AgentParamTest::StrToIp(const char *ip) { | ||
boost::system::error_code ec; | ||
Ip4Address addr = Ip4Address::from_string(ip, ec); | ||
if (ec.value() == 0) { | ||
return addr; | ||
} else { | ||
return Ip4Address(0); | ||
} | ||
} | ||
|
||
void AgentParamTest::set_xmpp_server_1(const char *ip) { | ||
xmpp_server_1_ = StrToIp(ip); | ||
} | ||
|
||
void AgentParamTest::set_xmpp_server_2(const char *ip) { | ||
xmpp_server_2_ = StrToIp(ip); | ||
} | ||
|
||
void AgentParamTest::set_dns_server_1(const char *ip) { | ||
dns_server_1_ = StrToIp(ip); | ||
} | ||
|
||
void AgentParamTest::set_dns_server_2(const char *ip) { | ||
dns_server_2_ = StrToIp(ip); | ||
} | ||
|
||
void AgentParamTest::set_collector_server_list(const char *ip) { | ||
std::string element(ip); | ||
if (element.length()) { | ||
collector_server_list_.push_back(element); | ||
} else { | ||
collector_server_list_.clear(); | ||
} | ||
} | ||
|
||
void AgentParamTest::set_discovery_server(const char *ip) { | ||
dss_server_ = StrToIp(ip); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. | ||
*/ | ||
|
||
#ifndef vnsw_agent_param_test_hpp | ||
#define vnsw_agent_param_test_hpp | ||
|
||
#include <cmn/agent_cmn.h> | ||
#include <cmn/agent_param.h> | ||
|
||
// Class handling agent configuration parameters from config file and | ||
// arguments | ||
class AgentParamTest : public AgentParam { | ||
public: | ||
AgentParamTest(Agent *agent); | ||
virtual ~AgentParamTest(); | ||
Ip4Address StrToIp(const char *ip); | ||
void set_xmpp_server_1(const char*); | ||
void set_xmpp_server_2(const char*); | ||
void set_dns_server_1(const char*); | ||
void set_dns_server_2(const char*); | ||
void set_discovery_server(const char*); | ||
void set_collector_server_list(const char*); | ||
}; | ||
|
||
#endif // vnsw_agent_param_test_hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters