migration: add default configuration for ietf-interfaces
The current state of startup datastore for ietf-interfaces model did not
correspond to the real state of the box (its systemd-networkd
configuration). The datastore was empty, but its configuration was, by
default, set to "bridge all links" and set DHCP for both IPv4 and IPv6
for br0 (the bridge).
This migration should fix that. It overwrites the current networking
content in startup datastore with the values of the default
configuration described in the previous paragraph.
Change-Id: I0b809a39044bf6bcba4135a3456c684d94ef8b86
diff --git a/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/cmdline b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/cmdline
new file mode 100644
index 0000000..17d977e
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/cmdline
@@ -0,0 +1 @@
+czechlight=sdn-inline
diff --git a/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/expected.json b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/expected.json
new file mode 100644
index 0000000..58babdd
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/expected.json
@@ -0,0 +1,39 @@
+{
+ "ietf-interfaces:interfaces": {
+ "interface": [
+ {
+ "name": "br0",
+ "type": "iana-if-type:bridge",
+ "ietf-ip:ipv4": {
+ "czechlight-network:dhcp-client": true
+ },
+ "ietf-ip:ipv6": {
+ "enabled": true,
+ "autoconf": {
+ "create-global-addresses": true
+ }
+ }
+ },
+ {
+ "name": "eth1",
+ "type": "iana-if-type:ethernetCsmacd",
+ "czechlight-network:bridge": "br0"
+ },
+ {
+ "name": "eth0",
+ "type": "iana-if-type:ethernetCsmacd",
+ "czechlight-network:bridge": "br0"
+ },
+ {
+ "name": "oscE",
+ "type": "iana-if-type:ethernetCsmacd",
+ "czechlight-network:bridge": "br0"
+ },
+ {
+ "name": "oscW",
+ "type": "iana-if-type:ethernetCsmacd",
+ "czechlight-network:bridge": "br0"
+ }
+ ]
+ }
+}
diff --git a/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/startup.json b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/startup.json
new file mode 100644
index 0000000..baca11f
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/startup.json
@@ -0,0 +1,37 @@
+{
+ "ietf-interfaces:interfaces": {
+ "interface": [
+ {
+ "name": "br0",
+ "type": "iana-if-type:bridge",
+ "ietf-ip:ipv4": {
+ "czechlight-network:dhcp-client": true
+ },
+ "ietf-ip:ipv6": {
+ "enabled": true,
+ "autoconf": {
+ "create-global-addresses": true
+ }
+ }
+ },
+ {
+ "name": "eth1",
+ "type": "iana-if-type:ethernetCsmacd",
+ "czechlight-network:bridge": "br0"
+ },
+ {
+ "name": "eth0",
+ "type": "iana-if-type:ethernetCsmacd",
+ "ietf-ip:ipv4": {
+ "czechlight-network:dhcp-client": true
+ },
+ "ietf-ip:ipv6": {
+ "enabled": true,
+ "autoconf": {
+ "create-global-addresses": true
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/version b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/version
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/version
@@ -0,0 +1 @@
+1
diff --git a/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/xpath b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/xpath
new file mode 100644
index 0000000..a745562
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v1_inline_eth0_explicit_ip/xpath
@@ -0,0 +1 @@
+/ietf-interfaces:interfaces