1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// Copyright (C) 2018-2023 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef ISC_JSON_CONFIGS_H
#define ISC_JSON_CONFIGS_H

#include <string><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.

namespace isc {
namespace yang {
namespace test {

/// @brief Empty DHCPv4 config.
const std::string emptyJson4 =
    "{\n"
    "  \"Dhcp4\": {\n"
    "  }\n"
    "}";

/// @brief A DHCPv4 config with one subnet with two pools.
const std::string subnetTwoPoolsJson4 =
    "{\n"
    "  \"Dhcp4\": {\n"
    "    \"subnet4\": [\n"
    "      {\n"
    "        \"id\": 111,\n"
    "        \"pools\": [\n"
    "          {\n"
    "            \"pool\": \"10.0.1.0/24\"\n"
    "          },\n"
    "          {\n"
    "            \"pool\": \"10.0.2.0/24\"\n"
    "          }\n"
    "        ],\n"
    "        \"subnet\": \"10.0.0.0/8\"\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

/// @brief A DHCPv6 config with one subnet with two pools and timers.
const std::string subnetTimersJson6 =
    "{\n"
    "  \"Dhcp6\": {\n"
    "    \"subnet6\": [\n"
    "      {\n"
    "        \"id\": 111,\n"
    "        \"renew-timer\": 1000,\n"
    "        \"rebind-timer\": 2000,\n"
    "        \"pools\": [\n"
    "          {\n"
    "            \"pool\": \"2001:db8::1:0/112\"\n"
    "          },\n"
    "          {\n"
    "            \"pool\": \"2001:db8::2:0/112\"\n"
    "          }\n"
    "        ],\n"
    "        \"subnet\": \"2001:db8::/48\"\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

/// @brief A DHCPv4 subnet with one pool and option data lists.
const std::string subnetOptionsJson4 =
    "{\n"
    "  \"Dhcp4\": {\n"
    "    \"subnet4\": [\n"
    "      {\n"
    "        \"id\": 111,\n"
    "        \"option-data\": [\n"
    "          {\n"
    "            \"code\": 100,\n"
    "            \"space\": \"dns\",\n"
    "            \"csv-format\": false,\n"
    "            \"data\": \"12121212\",\n"
    "            \"always-send\": false,\n"
    "            \"never-send\": false\n"
    "          }\n"
    "        ],\n"
    "        \"pools\": [\n"
    "          {\n"
    "            \"pool\": \"10.0.1.0/24\"\n"
    "          }\n"
    "        ],\n"
    "        \"subnet\": \"10.0.0.0/8\"\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

/// @brief Empty DHCPv6 config.
const std::string emptyJson6 =
    "{\n"
    "  \"Dhcp6\": {\n"
    "  }\n"
    "}";

/// @brief A DHCPv6 config with one subnet with one pool and option data lists.
const std::string subnetOptionsJson6 =
    "{\n"
    "  \"Dhcp6\": {\n"
    "    \"subnet6\": [\n"
    "      {\n"
    "        \"id\": 111,\n"
    "        \"pools\": [\n"
    "          {\n"
    "            \"option-data\": [\n"
    "              {\n"
    "                \"code\": 100,\n"
    "                \"space\": \"dns\",\n"
    "                \"csv-format\": false,\n"
    "                \"data\": \"12121212\",\n"
    "                \"always-send\": false,\n"
    "                \"never-send\": false\n"
    "              }\n"
    "            ],\n"
    "            \"pool\": \"2001:db8::1:0/112\"\n"
    "          }\n"
    "        ],\n"
    "        \"subnet\": \"2001:db8::/48\"\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

/// @brief A DHCPv6 config with one subnet with two pools.
const std::string subnetTwoPoolsJson6 =
    "{\n"
    "  \"Dhcp6\": {\n"
    "    \"subnet6\": [\n"
    "      {\n"
    "        \"id\": 111,\n"
    "        \"pools\": [\n"
    "          {\n"
    "            \"pool\": \"2001:db8::1:0/112\"\n"
    "          },\n"
    "          {\n"
    "            \"pool\": \"2001:db8::2:0/112\"\n"
    "          }\n"
    "        ],\n"
    "        \"subnet\": \"2001:db8::/48\"\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

/// @brief Example from the design document.
const std::string designExampleJson =
    "{\n"
    "  \"Dhcp6\": {\n"
    "    \"subnet6\": [\n"
    "      {\n"
    "        \"id\": 1,\n"
    "        \"subnet\": \"2001:db8:20:b00::/56\",\n"
    "        \"user-context\": { \"description\": \"example\" },\n"
    "        \"pd-pools\": [\n"
    "          {\n"
    "            \"prefix\": \"2001:db8:20:b00::\",\n"
    "            \"prefix-len\": 57\n"
//  "            \"delegated-len\": 57\n"
    "          }\n"
    "        ]\n"
    "      }\n"
    "    ]\n"
    "  }\n"
    "}";

}  // namespace test
}  // namespace yang
}  // namespace isc

#endif  // ISC_JSON_CONFIGS_H