aboutsummaryrefslogtreecommitdiffstats
path: root/etc/os-net-config
diff options
context:
space:
mode:
Diffstat (limited to 'etc/os-net-config')
-rw-r--r--etc/os-net-config/samples/bond_mapped.yaml23
-rw-r--r--etc/os-net-config/samples/interface.json13
-rw-r--r--etc/os-net-config/samples/interface.yaml8
-rw-r--r--etc/os-net-config/samples/mapping.yaml12
4 files changed, 56 insertions, 0 deletions
diff --git a/etc/os-net-config/samples/bond_mapped.yaml b/etc/os-net-config/samples/bond_mapped.yaml
new file mode 100644
index 0000000..9a118c9
--- /dev/null
+++ b/etc/os-net-config/samples/bond_mapped.yaml
@@ -0,0 +1,23 @@
+# Example showing use of the optional nicN abstraction
+# for device naming, which defaults to an ordered
+# translation to biodev names based on which interfaces
+# are active on the system.
+# Optionally the default mapping may be overriden by
+# a mapping file via the -m option.
+network_config:
+ -
+ type: ovs_bridge
+ name: br-ctlplane
+ use_dhcp: true
+ members:
+ -
+ type: ovs_bond
+ name: bond1
+ use_dhcp: true
+ members:
+ -
+ type: interface
+ name: nic1
+ -
+ type: interface
+ name: nic2
diff --git a/etc/os-net-config/samples/interface.json b/etc/os-net-config/samples/interface.json
new file mode 100644
index 0000000..9fd5cf3
--- /dev/null
+++ b/etc/os-net-config/samples/interface.json
@@ -0,0 +1,13 @@
+{"network_config": [
+ {
+ "type": "interface",
+ "name": "em1",
+ "use_dhcp": false,
+ "addresses": [
+ {
+ "ip_netmask": "192.0.2.1/24"
+ }
+ ]
+ }
+ ]
+}
diff --git a/etc/os-net-config/samples/interface.yaml b/etc/os-net-config/samples/interface.yaml
new file mode 100644
index 0000000..2e24ccc
--- /dev/null
+++ b/etc/os-net-config/samples/interface.yaml
@@ -0,0 +1,8 @@
+network_config:
+ -
+ type: interface
+ name: em1
+ use_dhcp: false
+ addresses:
+ -
+ ip_netmask: 192.0.2.1/24
diff --git a/etc/os-net-config/samples/mapping.yaml b/etc/os-net-config/samples/mapping.yaml
new file mode 100644
index 0000000..a832dc9
--- /dev/null
+++ b/etc/os-net-config/samples/mapping.yaml
@@ -0,0 +1,12 @@
+# This can be used with the -m option to override the
+# default mapping of the nicN aliases in configs
+# The mapping can specify either a device name or a mac address
+# If --persist-mapping is specified, we write the device aliases
+# config instead of the system names, e.g we actually configure
+# nic1 intead of em3. This is probably best used with --cleanup
+# to remove the stale configs e.g for em3
+interface_mapping:
+ nic1: em3
+ nic2: em1
+ nic3: 12:34:56:de:f0:12
+ nic4: 12:34:56:78:9a:bc