|
@@ -205,10 +205,7 @@ public:
|
|
|
" \"name\": \"bool-option\","
|
|
|
" \"code\": 1000,"
|
|
|
" \"type\": \"boolean\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"dhcp6\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"dhcp6\""
|
|
|
"} ],"
|
|
|
"\"subnet6\": [ { "
|
|
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
|
|
@@ -1572,10 +1569,7 @@ TEST_F(Dhcp6ParserTest, optionDefIpv6Address) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"ipv6-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1612,10 +1606,8 @@ TEST_F(Dhcp6ParserTest, optionDefRecord) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"record\","
|
|
|
- " \"array\": False,"
|
|
|
" \"record-types\": \"uint16, ipv4-address, ipv6-address, string\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1661,19 +1653,13 @@ TEST_F(Dhcp6ParserTest, optionDefMultiple) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo-2\","
|
|
|
" \"code\": 101,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1725,19 +1711,13 @@ TEST_F(Dhcp6ParserTest, optionDefDuplicate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo-2\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1766,9 +1746,7 @@ TEST_F(Dhcp6ParserTest, optionDefArray) {
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
" \"array\": True,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1806,8 +1784,6 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
" \"space\": \"isc\","
|
|
|
" \"encapsulate\": \"sub-opts-space\""
|
|
|
" } ]"
|
|
@@ -1847,10 +1823,7 @@ TEST_F(Dhcp6ParserTest, optionDefInvalidName) {
|
|
|
" \"name\": \"invalid%name\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"string\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1874,10 +1847,7 @@ TEST_F(Dhcp6ParserTest, optionDefInvalidType) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"sting\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1901,10 +1871,8 @@ TEST_F(Dhcp6ParserTest, optionDefInvalidRecordType) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"record\","
|
|
|
- " \"array\": False,"
|
|
|
" \"record-types\": \"uint32,uint8,sting\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -1928,8 +1896,6 @@ TEST_F(Dhcp6ParserTest, optionDefInvalidEncapsulatedSpace) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
" \"space\": \"isc\","
|
|
|
" \"encapsulate\": \"invalid%space%name\""
|
|
|
" } ]"
|
|
@@ -1958,7 +1924,6 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulatedSpaceAndArray) {
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
" \"array\": True,"
|
|
|
- " \"record-types\": \"\","
|
|
|
" \"space\": \"isc\","
|
|
|
" \"encapsulate\": \"valid-space-name\""
|
|
|
" } ]"
|
|
@@ -1984,8 +1949,6 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulateOwnSpace) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
" \"space\": \"isc\","
|
|
|
" \"encapsulate\": \"isc\""
|
|
|
" } ]"
|
|
@@ -2016,10 +1979,7 @@ TEST_F(Dhcp6ParserTest, optionStandardDefOverride) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"string\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"dhcp6\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"dhcp6\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ElementPtr json = Element::fromJSON(config);
|
|
@@ -2053,10 +2013,7 @@ TEST_F(Dhcp6ParserTest, optionStandardDefOverride) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 3,"
|
|
|
" \"type\": \"string\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"dhcp6\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"dhcp6\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
json = Element::fromJSON(config);
|
|
@@ -2078,10 +2035,7 @@ TEST_F(Dhcp6ParserTest, optionStandardDefOverride) {
|
|
|
" \"name\": \"geolocation\","
|
|
|
" \"code\": 63,"
|
|
|
" \"type\": \"string\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"dhcp6\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"dhcp6\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
json = Element::fromJSON(config);
|
|
@@ -2212,10 +2166,7 @@ TEST_F(Dhcp6ParserTest, optionDataTwoSpaces) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 38,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ],"
|
|
|
"\"subnet6\": [ { "
|
|
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
|
|
@@ -2293,19 +2244,13 @@ TEST_F(Dhcp6ParserTest, optionDataEncapsulate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 110,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo2\","
|
|
|
" \"code\": 111,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
|
|
@@ -2353,8 +2298,6 @@ TEST_F(Dhcp6ParserTest, optionDataEncapsulate) {
|
|
|
" \"name\": \"base-option\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"uint8\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
" \"space\": \"dhcp6\","
|
|
|
" \"encapsulate\": \"isc\""
|
|
|
"},"
|
|
@@ -2362,19 +2305,13 @@ TEST_F(Dhcp6ParserTest, optionDataEncapsulate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 110,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo2\","
|
|
|
" \"code\": 111,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"isc\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"isc\""
|
|
|
" } ],"
|
|
|
"\"subnet6\": [ { "
|
|
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
|
|
@@ -2811,10 +2748,7 @@ TEST_F(Dhcp6ParserTest, vendorOptionsCsv) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 100,"
|
|
|
" \"type\": \"string\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-4491\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-4491\""
|
|
|
" } ],"
|
|
|
"\"subnet6\": [ { "
|
|
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
|
|
@@ -2884,19 +2818,13 @@ TEST_F(Dhcp6ParserTest, DISABLED_stdOptionDataEncapsulate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 110,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo2\","
|
|
|
" \"code\": 111,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" } ]"
|
|
|
"}";
|
|
|
|
|
@@ -2946,19 +2874,13 @@ TEST_F(Dhcp6ParserTest, DISABLED_stdOptionDataEncapsulate) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 110,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo2\","
|
|
|
" \"code\": 111,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" } ],"
|
|
|
"\"subnet6\": [ { "
|
|
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
|
|
@@ -3064,19 +2986,13 @@ buildHooksLibrariesConfig(const std::vector<std::string>& libraries) {
|
|
|
" \"name\": \"foo\","
|
|
|
" \"code\": 110,"
|
|
|
" \"type\": \"uint32\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" },"
|
|
|
" {"
|
|
|
" \"name\": \"foo2\","
|
|
|
" \"code\": 111,"
|
|
|
" \"type\": \"ipv4-address\","
|
|
|
- " \"array\": False,"
|
|
|
- " \"record-types\": \"\","
|
|
|
- " \"space\": \"vendor-opts-space\","
|
|
|
- " \"encapsulate\": \"\""
|
|
|
+ " \"space\": \"vendor-opts-space\""
|
|
|
" } ]"
|
|
|
"}");
|
|
|
|