17 using boost::optional;
18 namespace boost_po = boost::program_options;
29 boost_po::options_description tor(
"ToR Agent options");
31 (
"TOR.tor_ip", boost_po::value<string>()->default_value(
""),
32 "IP Address of the ToR being managed")
33 (
"TOR.tsn_ip", boost_po::value<string>()->default_value(
""),
34 "IP Address of the ToR Service Node")
35 (
"TOR.tor_id", boost_po::value<string>()->default_value(
""),
36 "Identifier of the TOR")
37 (
"TOR.tor_type", boost_po::value<string>()->default_value(
""),
38 "ToR management scheme")
39 (
"TOR.tor_ovs_protocol", boost_po::value<string>()->default_value(
""),
40 "Protocol to be used for connection to TOR")
41 (
"TOR.tor_ovs_port", boost_po::value<uint16_t>()->default_value(0),
43 (
"TOR.ssl_cert", boost_po::value<string>()->default_value(
""),
44 "SSL Certificate file to be used")
45 (
"TOR.ssl_privkey", boost_po::value<string>()->default_value(
""),
46 "SSL Private Key file to be used")
47 (
"TOR.ssl_cacert", boost_po::value<string>()->default_value(
""),
48 "SSL CA certificate file to be used for peer validations")
49 (
"TOR.tor_keepalive_interval", boost_po::value<int>()->default_value(-1),
50 "Keepalive interval for TOR in milli seconds")
51 (
"TOR.tor_ha_stale_route_interval",
52 boost_po::value<int>()->default_value(-1),
53 "Interval in millisecond for TOR Agent to hold unicast routes as HA Stale");
66 const boost::program_options::variables_map &vars =
var_map();
78 "TOR.tor_keepalive_interval");
80 "TOR.tor_ha_stale_route_interval");
85 LOG(ERROR,
"Configuration error. TSN IP address not specified");
90 LOG(ERROR,
"Configuration error. ToR ID not specified");
95 LOG(ERROR,
"Configuration error. Unsupported ToR type.");
96 LOG(ERROR,
"Supported ToR types : <ovs>");
101 if (
tor_info_.
ip_ == Ip4Address::from_string(
"0.0.0.0")) {
102 LOG(ERROR,
"Configuration error. ToR IP address not specified");
107 LOG(ERROR,
"Configuration error. SSL Certificate not specified");
111 LOG(ERROR,
"Configuration error. SSL Private Key not specified");
115 LOG(ERROR,
"Configuration error. SSL CA certificate not specified");
119 LOG(ERROR,
"Configuration error. Unsupported ToR OVS Protocol.");
120 LOG(ERROR,
"Supported ToR Protocol : <tcp>");
125 LOG(ERROR,
"Configuration error. ToR OVS Protocol Port not specified");
void AddOptions(const boost::program_options::options_description &opt)
const boost::program_options::variables_map & var_map() const
void ParseIpArgument(const boost::program_options::variables_map &var_map, Ip4Address &server, const std::string &key)
virtual void ProcessArguments()
void ConfigAddOptions(const boost::program_options::options_description &opt)
virtual void ProcessArguments()
virtual void ParseTorArguments()
#define LOG(_Level, _Msg)
int ha_stale_route_interval_