|
@@ -185,7 +185,7 @@ public:
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"option-data\": [ {";
|
|
" \"option-data\": [ {";
|
|
bool first = true;
|
|
bool first = true;
|
|
@@ -520,7 +520,7 @@ TEST_F(Dhcp4ParserTest, unspecifiedRenewTimer) {
|
|
string config = "{ \"interfaces\": [ \"*\" ],"
|
|
string config = "{ \"interfaces\": [ \"*\" ],"
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -554,7 +554,7 @@ TEST_F(Dhcp4ParserTest, unspecifiedRebindTimer) {
|
|
string config = "{ \"interfaces\": [ \"*\" ],"
|
|
string config = "{ \"interfaces\": [ \"*\" ],"
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -589,7 +589,7 @@ TEST_F(Dhcp4ParserTest, subnetGlobalDefaults) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -624,20 +624,20 @@ TEST_F(Dhcp4ParserTest, multipleSubnets) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" "
|
|
" \"subnet\": \"192.0.2.0/24\" "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"id\": 0 "
|
|
" \"id\": 0 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\" "
|
|
" \"subnet\": \"192.0.4.0/24\" "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\" "
|
|
" \"subnet\": \"192.0.5.0/24\" "
|
|
" } ],"
|
|
" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
@@ -675,22 +675,22 @@ TEST_F(Dhcp4ParserTest, multipleSubnetsExplicitIDs) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"id\": 1024 "
|
|
" \"id\": 1024 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"id\": 100 "
|
|
" \"id\": 100 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"id\": 1 "
|
|
" \"id\": 1 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"id\": 34 "
|
|
" \"id\": 34 "
|
|
" } ],"
|
|
" } ],"
|
|
@@ -726,22 +726,22 @@ TEST_F(Dhcp4ParserTest, multipleSubnetsOverlapingIDs) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"id\": 1024 "
|
|
" \"id\": 1024 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"id\": 100 "
|
|
" \"id\": 100 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"id\": 1024 "
|
|
" \"id\": 1024 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"id\": 34 "
|
|
" \"id\": 34 "
|
|
" } ],"
|
|
" } ],"
|
|
@@ -764,22 +764,22 @@ TEST_F(Dhcp4ParserTest, reconfigureRemoveSubnet) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"id\": 1 "
|
|
" \"id\": 1 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"id\": 2 "
|
|
" \"id\": 2 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"id\": 3 "
|
|
" \"id\": 3 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"id\": 4 "
|
|
" \"id\": 4 "
|
|
" } ],"
|
|
" } ],"
|
|
@@ -790,17 +790,17 @@ TEST_F(Dhcp4ParserTest, reconfigureRemoveSubnet) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"id\": 1 "
|
|
" \"id\": 1 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"id\": 2 "
|
|
" \"id\": 2 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"id\": 3 "
|
|
" \"id\": 3 "
|
|
" } ],"
|
|
" } ],"
|
|
@@ -811,17 +811,17 @@ TEST_F(Dhcp4ParserTest, reconfigureRemoveSubnet) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"id\": 1 "
|
|
" \"id\": 1 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"id\": 3 "
|
|
" \"id\": 3 "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"subnet\": \"192.0.5.0/24\", "
|
|
" \"id\": 4 "
|
|
" \"id\": 4 "
|
|
" } ],"
|
|
" } ],"
|
|
@@ -889,7 +889,7 @@ TEST_F(Dhcp4ParserTest, nextServerGlobal) {
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"next-server\": \"1.2.3.4\", "
|
|
"\"next-server\": \"1.2.3.4\", "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -918,7 +918,7 @@ TEST_F(Dhcp4ParserTest, nextServerSubnet) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"next-server\": \"1.2.3.4\", "
|
|
" \"next-server\": \"1.2.3.4\", "
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
@@ -949,7 +949,7 @@ TEST_F(Dhcp4ParserTest, nextServerNegative) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"rebind-timer\": 2000, "
|
|
" \"rebind-timer\": 2000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"next-server\": \"a.b.c.d\", "
|
|
" \"next-server\": \"a.b.c.d\", "
|
|
@@ -961,7 +961,7 @@ TEST_F(Dhcp4ParserTest, nextServerNegative) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"rebind-timer\": 2000, "
|
|
" \"rebind-timer\": 2000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"next-server\": \"2001:db8::1\", "
|
|
" \"next-server\": \"2001:db8::1\", "
|
|
@@ -973,7 +973,7 @@ TEST_F(Dhcp4ParserTest, nextServerNegative) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"rebind-timer\": 2000, "
|
|
" \"rebind-timer\": 2000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"renew-timer\": 1000, "
|
|
" \"next-server\": \"\", "
|
|
" \"next-server\": \"\", "
|
|
@@ -1009,7 +1009,7 @@ TEST_F(Dhcp4ParserTest, nextServerOverride) {
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"next-server\": \"192.0.0.1\", "
|
|
"\"next-server\": \"192.0.0.1\", "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"next-server\": \"1.2.3.4\", "
|
|
" \"next-server\": \"1.2.3.4\", "
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
@@ -1039,7 +1039,7 @@ TEST_F(Dhcp4ParserTest, echoClientId) {
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"echo-client-id\": false,"
|
|
"\"echo-client-id\": false,"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -1048,7 +1048,7 @@ TEST_F(Dhcp4ParserTest, echoClientId) {
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"echo-client-id\": true,"
|
|
"\"echo-client-id\": true,"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -1080,7 +1080,7 @@ TEST_F(Dhcp4ParserTest, subnetLocal) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"renew-timer\": 1, "
|
|
" \"renew-timer\": 1, "
|
|
" \"rebind-timer\": 2, "
|
|
" \"rebind-timer\": 2, "
|
|
" \"valid-lifetime\": 4,"
|
|
" \"valid-lifetime\": 4,"
|
|
@@ -1112,7 +1112,7 @@ TEST_F(Dhcp4ParserTest, poolOutOfSubnet) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.4.0/28\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.0/28\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -1137,7 +1137,7 @@ TEST_F(Dhcp4ParserTest, poolPrefixLen) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.128/28\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.128/28\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
@@ -1714,7 +1714,7 @@ TEST_F(Dhcp4ParserTest, optionDataDefaults) {
|
|
" \"csv-format\": False"
|
|
" \"csv-format\": False"
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|
|
@@ -1796,7 +1796,7 @@ TEST_F(Dhcp4ParserTest, optionDataTwoSpaces) {
|
|
" \"encapsulate\": \"\""
|
|
" \"encapsulate\": \"\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ]"
|
|
" } ]"
|
|
"}";
|
|
"}";
|
|
@@ -1950,7 +1950,7 @@ TEST_F(Dhcp4ParserTest, optionDataEncapsulate) {
|
|
" \"encapsulate\": \"\""
|
|
" \"encapsulate\": \"\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ]"
|
|
" } ]"
|
|
"}";
|
|
"}";
|
|
@@ -2005,7 +2005,7 @@ TEST_F(Dhcp4ParserTest, optionDataInSingleSubnet) {
|
|
" \"csv-format\": False"
|
|
" \"csv-format\": False"
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"option-data\": [ {"
|
|
" \"option-data\": [ {"
|
|
" \"name\": \"dhcp-message\","
|
|
" \"name\": \"dhcp-message\","
|
|
@@ -2152,7 +2152,7 @@ TEST_F(Dhcp4ParserTest, optionDataInMultipleSubnets) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"option-data\": [ {"
|
|
" \"option-data\": [ {"
|
|
" \"name\": \"dhcp-message\","
|
|
" \"name\": \"dhcp-message\","
|
|
@@ -2163,7 +2163,7 @@ TEST_F(Dhcp4ParserTest, optionDataInMultipleSubnets) {
|
|
" } ]"
|
|
" } ]"
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"option-data\": [ {"
|
|
" \"option-data\": [ {"
|
|
" \"name\": \"default-ip-ttl\","
|
|
" \"name\": \"default-ip-ttl\","
|
|
@@ -2519,7 +2519,7 @@ TEST_F(Dhcp4ParserTest, stdOptionDataEncapsulate) {
|
|
" \"encapsulate\": \"\""
|
|
" \"encapsulate\": \"\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ]"
|
|
" } ]"
|
|
"}";
|
|
"}";
|
|
@@ -2602,7 +2602,7 @@ TEST_F(Dhcp4ParserTest, vendorOptionsHex) {
|
|
" \"csv-format\": False"
|
|
" \"csv-format\": False"
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1-192.0.2.10\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1-192.0.2.10\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ]"
|
|
" } ]"
|
|
"}";
|
|
"}";
|
|
@@ -2663,7 +2663,7 @@ TEST_F(Dhcp4ParserTest, vendorOptionsCsv) {
|
|
" \"encapsulate\": \"\""
|
|
" \"encapsulate\": \"\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" "
|
|
" \"subnet\": \"192.0.2.0/24\" "
|
|
" } ]"
|
|
" } ]"
|
|
"}";
|
|
"}";
|
|
@@ -2747,7 +2747,7 @@ buildHooksLibrariesConfig(const std::vector<std::string>& libraries) {
|
|
" \"encapsulate\": \"\""
|
|
" \"encapsulate\": \"\""
|
|
" } ],"
|
|
" } ],"
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" \"subnet\": \"192.0.2.0/24\""
|
|
" } ]"
|
|
" } ]"
|
|
"}");
|
|
"}");
|
|
@@ -2915,7 +2915,7 @@ TEST_F(Dhcp4ParserTest, d2ClientConfig) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"dhcp-ddns\" : {"
|
|
" \"dhcp-ddns\" : {"
|
|
" \"enable-updates\" : true, "
|
|
" \"enable-updates\" : true, "
|
|
@@ -2980,7 +2980,7 @@ TEST_F(Dhcp4ParserTest, invalidD2ClientConfig) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\" } ],"
|
|
" \"dhcp-ddns\" : {"
|
|
" \"dhcp-ddns\" : {"
|
|
" \"enable-updates\" : true, "
|
|
" \"enable-updates\" : true, "
|
|
@@ -3026,7 +3026,7 @@ TEST_F(Dhcp4ParserTest, subnetRelayInfo) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"renew-timer\": 1, "
|
|
" \"renew-timer\": 1, "
|
|
" \"rebind-timer\": 2, "
|
|
" \"rebind-timer\": 2, "
|
|
" \"valid-lifetime\": 4,"
|
|
" \"valid-lifetime\": 4,"
|
|
@@ -3057,22 +3057,22 @@ TEST_F(Dhcp4ParserTest, classifySubnets) {
|
|
"\"rebind-timer\": 2000, "
|
|
"\"rebind-timer\": 2000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"renew-timer\": 1000, "
|
|
"\"subnet4\": [ { "
|
|
"\"subnet4\": [ { "
|
|
- " \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"subnet\": \"192.0.2.0/24\", "
|
|
" \"client-class\": \"alpha\" "
|
|
" \"client-class\": \"alpha\" "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"subnet\": \"192.0.3.0/24\", "
|
|
" \"client-class\": \"beta\" "
|
|
" \"client-class\": \"beta\" "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"subnet\": \"192.0.4.0/24\", "
|
|
" \"client-class\": \"gamma\" "
|
|
" \"client-class\": \"gamma\" "
|
|
" },"
|
|
" },"
|
|
" {"
|
|
" {"
|
|
- " \"pool\": [ \"192.0.5.101 - 192.0.5.150\" ],"
|
|
|
|
|
|
+ " \"pools\": [ { \"pool\": \"192.0.5.101 - 192.0.5.150\" } ],"
|
|
" \"subnet\": \"192.0.5.0/24\" "
|
|
" \"subnet\": \"192.0.5.0/24\" "
|
|
" } ],"
|
|
" } ],"
|
|
"\"valid-lifetime\": 4000 }";
|
|
"\"valid-lifetime\": 4000 }";
|