diff options
author | Dan Prince <dprince@redhat.com> | 2014-08-20 21:46:46 -0400 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2014-08-20 21:46:46 -0400 |
commit | 416943cc4e1ec7e4fc0e86640f24f0133a8b2f4e (patch) | |
tree | 67698cc6a037c5bc3339dab31bf7e4226d875074 /etc/os-net-config | |
parent | b3e74611befb157dc4bf992f23aaba346e655a86 (diff) |
Add support for parsing YAML
Adds new YAML examples. Also adds some new CLI test
cases which compare --noop stdout (from the CLI) for
the json and yaml examples to verify they generate
the same things.
Diffstat (limited to 'etc/os-net-config')
-rw-r--r-- | etc/os-net-config/samples/bond.yaml | 17 | ||||
-rw-r--r-- | etc/os-net-config/samples/bridge_dhcp.yaml | 9 | ||||
-rw-r--r-- | etc/os-net-config/samples/bridge_vlan.json | 2 | ||||
-rw-r--r-- | etc/os-net-config/samples/bridge_vlan.yaml | 16 |
4 files changed, 43 insertions, 1 deletions
diff --git a/etc/os-net-config/samples/bond.yaml b/etc/os-net-config/samples/bond.yaml new file mode 100644 index 0000000..7b925a7 --- /dev/null +++ b/etc/os-net-config/samples/bond.yaml @@ -0,0 +1,17 @@ +network_config: + - + type: ovs_bridge + name: br-ctlplane + use_dhcp: true + members: + - + type: ovs_bond + name: bond1 + use_dhcp: true + members: + - + type: interface + name: em1 + - + type: interface + name: em2 diff --git a/etc/os-net-config/samples/bridge_dhcp.yaml b/etc/os-net-config/samples/bridge_dhcp.yaml new file mode 100644 index 0000000..aacd1e6 --- /dev/null +++ b/etc/os-net-config/samples/bridge_dhcp.yaml @@ -0,0 +1,9 @@ +network_config: + - + type: ovs_bridge + name: br-ctlplane + use_dhcp: true + members: + - + type: interface + name: em1 diff --git a/etc/os-net-config/samples/bridge_vlan.json b/etc/os-net-config/samples/bridge_vlan.json index 6a6480c..1e351e0 100644 --- a/etc/os-net-config/samples/bridge_vlan.json +++ b/etc/os-net-config/samples/bridge_vlan.json @@ -6,7 +6,7 @@ { "type": "vlan", "device": "em1", - "vlan_id": "16", + "vlan_id": 16, "addresses": [{ "ip_netmask": "192.0.2.1/24" }], diff --git a/etc/os-net-config/samples/bridge_vlan.yaml b/etc/os-net-config/samples/bridge_vlan.yaml new file mode 100644 index 0000000..9f25e09 --- /dev/null +++ b/etc/os-net-config/samples/bridge_vlan.yaml @@ -0,0 +1,16 @@ +network_config: + - + type: ovs_bridge + name: br-ctlplane + members: + - + type: vlan + device: em1 + vlan_id: 16 + addresses: + - + ip_netmask: 192.0.2.1/24 + routes: + - + next_hop: 192.0.2.1 + ip_netmask: 192.0.2.1/24 |