--- /dev/null
+# System tests for Netconf agent and Kea DHCPv4 server on Linux
+
+# 0 tunoff NetworkManager on the target interface
+
+# 1 change interface name from ens38 (put your here) to eth1
+sudo ip link set down dev ens38
+sudo ip link set name eth1 dev ens38
+sudo ip link set up dev eth1
+
+# 2 add IPv4 address
+sudo ip addr add 10.0.0.1/16 dev eth1
+
+# 3 launch DHCPv4 server
+sudo kea-dhcp4 -d -c boot-4.json
+
+# 4 verify its configuration
+echo '{ "command": "config-get" }' | socat UNIX:/tmp/kea4-sock '-,ignoreeof'
+
+# 5 load the startup config to the startup datastore
+sudo sysrepocfg -l 4 -d startup -f xml -i startup-4.xml kea-dhcp4-server
+
+# 6 launch Netconf agent
+sudo kea-netconf -d -c netconf-4.json
+
+# 7 play changing configuration
+sudo sysrepocfg -l 4 -d running -f xml -i bad-schema-4.xml kea-dhcp4-server
+
+sudo sysrepocfg -l 4 -d running -f xml -i twopools-4.xml kea-dhcp4-server
-# for Linux
+# System tests for Netconf agent and Kea DHCPv6 server on Linux
# 0 tunoff NetworkManager on the target interface
sudo ip -6 addr add 2001:db8::1/64 dev eth1
# 3 launch DHCPv6 server
-sudo kea-dhcp6 -d -c boot.json
+sudo kea-dhcp6 -d -c boot-6.json
# 4 verify its configuration
echo '{ "command": "config-get" }' | socat UNIX:/tmp/kea6-sock '-,ignoreeof'
# 5 load the startup config to the startup datastore
-sudo sysrepocfg -l 4 -d startup -f xml -i startup.xml kea-dhcp6-server
+sudo sysrepocfg -l 4 -d startup -f xml -i startup-6.xml kea-dhcp6-server
# 6 launch Netconf agent
-sudo kea-netconf -d -c netconf.json
+sudo kea-netconf -d -c netconf-6.json
# 7 play changing configuration
-sudo sysrepocfg -l 4 -d running -f xml -i bad-schema.xml kea-dhcp6-server
+sudo sysrepocfg -l 4 -d running -f xml -i bad-schema-6.xml kea-dhcp6-server
-sudo sysrepocfg -l 4 -d running -f xml -i twopools.xml kea-dhcp6-server
+sudo sysrepocfg -l 4 -d running -f xml -i twopools-6.xml kea-dhcp6-server
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet4>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.44.64</start-address>
+ <end-address>10.0.44.95</end-address>
+ <prefix>10.0.44.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ </subnet4>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet6>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.35.64</start-address>
+ <end-address>10.0.35.95</end-address>
+ <prefix>10.0.35.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ </subnet6>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet4>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.35.64</start-address>
+ <end-address>10.0.35.95</end-address>
+ <prefix>10.0.35.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ </subnet4>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+ <user-context>bad</user-context>
+</config>
--- /dev/null
+{
+ "Dhcp4": {
+ "control-socket": {
+ "socket-type": "unix",
+ "socket-name": "/tmp/kea4-sock"
+ }
+ }
+}
--- /dev/null
+{
+ "Netconf":
+ {
+ "managed-servers":
+ {
+ "dhcp4":
+ {
+ "control-socket":
+ {
+ "socket-type": "unix",
+ "socket-name": "/tmp/kea4-sock"
+ }
+ }
+ }
+/* Remove comments to get traces in logs.
+ },
+ "Logging":
+ {
+ "loggers":
+ [
+ {
+ "name": "kea-netconf",
+ "output_options":
+ [
+ {
+ "output": "stderr"
+ }
+ ],
+ "severity": "DEBUG",
+ "debuglevel": 99
+ }
+ ]
+*/
+ }
+}
--- /dev/null
+{
+ "Netconf":
+ {
+ "managed-servers":
+ {
+ "dhcp6":
+ {
+ "control-socket":
+ {
+ "socket-type": "unix",
+ "socket-name": "/tmp/kea6-sock"
+ }
+ }
+ }
+/* Remove comments to get traces in logs.
+ },
+ "Logging":
+ {
+ "loggers":
+ [
+ {
+ "name": "kea-netconf",
+ "output_options":
+ [
+ {
+ "output": "stderr"
+ }
+ ],
+ "severity": "DEBUG",
+ "debuglevel": 99
+ }
+ ]
+*/
+ }
+}
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet4>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.35.64</start-address>
+ <end-address>10.0.35.95</end-address>
+ <prefix>10.0.35.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ </subnet4>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet4>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.35.64</start-address>
+ <end-address>10.0.35.95</end-address>
+ <prefix>10.0.35.64/27</prefix>
+ </pool>
+ <pool>
+ <start-address>10.0.35.96</start-address>
+ <end-address>10.0.35.127</end-address>
+ <prefix>10.0.35.96/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ </subnet4>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
+ <subnet4>
+ <subnet4>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>10.0.35.64</start-address>
+ <end-address>10.0.35.95</end-address>
+ <prefix>10.0.35.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.35.0/24</subnet>
+ </subnet4>
+ <subnet4>
+ <id>2</id>
+ <pools>
+ <pool>
+ <start-address>10.0.44.64</start-address>
+ <end-address>10.0.44.95</end-address>
+ <prefix>10.0.44.64/27</prefix>
+ </pool>
+ </pools>
+ <subnet>10.0.44.0/24</subnet>
+ </subnet4>
+ </subnet4>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea4-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>
--- /dev/null
+<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server">
+ <subnet6>
+ <subnet6>
+ <id>1</id>
+ <pools>
+ <pool>
+ <start-address>2001:db8:1::</start-address>
+ <end-address>2001:db8:1::ffff</end-address>
+ <prefix>2001:db8:1::/112</prefix>
+ </pool>
+ </pools>
+ <subnet>2001:db8:1::/64</subnet>
+ </subnet6>
+ <subnet6>
+ <id>2</id>
+ <pools>
+ <pool>
+ <start-address>2001:db8:2::</start-address>
+ <end-address>2001:db8:2::ffff</end-address>
+ <prefix>2001:db8:2::/112</prefix>
+ </pool>
+ </pools>
+ <subnet>2001:db8:2::/64</subnet>
+ </subnet6>
+ </subnet6>
+ <interfaces-config>
+ <interfaces>eth1</interfaces>
+ </interfaces-config>
+ <control-socket>
+ <socket-name>/tmp/kea6-sock</socket-name>
+ <socket-type>unix</socket-type>
+ </control-socket>
+</config>