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