]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[153-netconf-configs] Adding untested v4 configs 153-netconf-configs
authorFrancis Dupont <fdupont@isc.org>
Thu, 25 Oct 2018 08:23:28 +0000 (10:23 +0200)
committerTomek Mrugalski <tomek@isc.org>
Wed, 7 Nov 2018 06:15:13 +0000 (01:15 -0500)
18 files changed:
src/bin/netconf/configs/README-4.setup [new file with mode: 0644]
src/bin/netconf/configs/README-6.setup [moved from src/bin/netconf/configs/README.setup with 60% similarity]
src/bin/netconf/configs/bad-kea-config-4.xml [new file with mode: 0644]
src/bin/netconf/configs/bad-kea-config-6.xml [moved from src/bin/netconf/configs/bad-kea-config.xml with 100% similarity]
src/bin/netconf/configs/bad-schema-4.xml [new file with mode: 0644]
src/bin/netconf/configs/bad-schema-6.xml [moved from src/bin/netconf/configs/bad-schema.xml with 100% similarity]
src/bin/netconf/configs/bad-translator-4.xml [new file with mode: 0644]
src/bin/netconf/configs/bad-translator-6.xml [moved from src/bin/netconf/configs/bad-translator.xml with 100% similarity]
src/bin/netconf/configs/boot-4.json [new file with mode: 0644]
src/bin/netconf/configs/boot-6.json [moved from src/bin/netconf/configs/boot.json with 100% similarity]
src/bin/netconf/configs/netconf-4.json [new file with mode: 0644]
src/bin/netconf/configs/netconf-6.json [new file with mode: 0644]
src/bin/netconf/configs/startup-4.xml [new file with mode: 0644]
src/bin/netconf/configs/startup-6.xml [moved from src/bin/netconf/configs/startup.xml with 100% similarity]
src/bin/netconf/configs/twopools-4.xml [new file with mode: 0644]
src/bin/netconf/configs/twopools-6.xml [moved from src/bin/netconf/configs/twopools.xml with 100% similarity]
src/bin/netconf/configs/twosubnets-4.xml [new file with mode: 0644]
src/bin/netconf/configs/twosubnets-6.xml [new file with mode: 0644]

diff --git a/src/bin/netconf/configs/README-4.setup b/src/bin/netconf/configs/README-4.setup
new file mode 100644 (file)
index 0000000..3e4ce46
--- /dev/null
@@ -0,0 +1,28 @@
+# 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
similarity index 60%
rename from src/bin/netconf/configs/README.setup
rename to src/bin/netconf/configs/README-6.setup
index 952b3a273977beec2089e3aa1701602216aba223..7b428039794198ed373489c39f28cbce565b744c 100644 (file)
@@ -1,4 +1,4 @@
-# for Linux
+# System tests for Netconf agent and Kea DHCPv6 server on Linux
 
 # 0 tunoff NetworkManager on the target interface
 
@@ -11,18 +11,18 @@ sudo ip link set up dev eth1
 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
diff --git a/src/bin/netconf/configs/bad-kea-config-4.xml b/src/bin/netconf/configs/bad-kea-config-4.xml
new file mode 100644 (file)
index 0000000..f6529ed
--- /dev/null
@@ -0,0 +1,22 @@
+<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>
diff --git a/src/bin/netconf/configs/bad-schema-4.xml b/src/bin/netconf/configs/bad-schema-4.xml
new file mode 100644 (file)
index 0000000..5868a4f
--- /dev/null
@@ -0,0 +1,22 @@
+<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>
diff --git a/src/bin/netconf/configs/bad-translator-4.xml b/src/bin/netconf/configs/bad-translator-4.xml
new file mode 100644 (file)
index 0000000..d898d12
--- /dev/null
@@ -0,0 +1,23 @@
+<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>
diff --git a/src/bin/netconf/configs/boot-4.json b/src/bin/netconf/configs/boot-4.json
new file mode 100644 (file)
index 0000000..cbc472c
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    "Dhcp4": {
+        "control-socket": {
+            "socket-type": "unix",
+            "socket-name": "/tmp/kea4-sock"
+        }
+    }
+}
diff --git a/src/bin/netconf/configs/netconf-4.json b/src/bin/netconf/configs/netconf-4.json
new file mode 100644 (file)
index 0000000..b7027ea
--- /dev/null
@@ -0,0 +1,35 @@
+{
+    "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
+            }
+        ]
+*/
+    }
+}
diff --git a/src/bin/netconf/configs/netconf-6.json b/src/bin/netconf/configs/netconf-6.json
new file mode 100644 (file)
index 0000000..ad7f1d7
--- /dev/null
@@ -0,0 +1,35 @@
+{
+    "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
+            }
+        ]
+*/
+    }
+}
diff --git a/src/bin/netconf/configs/startup-4.xml b/src/bin/netconf/configs/startup-4.xml
new file mode 100644 (file)
index 0000000..38ed1d6
--- /dev/null
@@ -0,0 +1,22 @@
+<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>
diff --git a/src/bin/netconf/configs/twopools-4.xml b/src/bin/netconf/configs/twopools-4.xml
new file mode 100644 (file)
index 0000000..091f3e4
--- /dev/null
@@ -0,0 +1,27 @@
+<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>
diff --git a/src/bin/netconf/configs/twosubnets-4.xml b/src/bin/netconf/configs/twosubnets-4.xml
new file mode 100644 (file)
index 0000000..1579eb6
--- /dev/null
@@ -0,0 +1,33 @@
+<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>
diff --git a/src/bin/netconf/configs/twosubnets-6.xml b/src/bin/netconf/configs/twosubnets-6.xml
new file mode 100644 (file)
index 0000000..cfe0f7e
--- /dev/null
@@ -0,0 +1,33 @@
+<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>