aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorAlan Bishop <alan_bishop@dell.com>2016-08-05 16:16:14 -0400
committerAlan Bishop <alan_bishop@dell.com>2016-08-16 14:24:30 -0400
commitc6e21c8bf6c80cd0daeec6ed3c6b957dc9ad2e74 (patch)
treebc43101b3ff378dd689b1e93a85b83e8aba383ec /etc
parent9e1a613204ed17b4f96ac4f39a2afdde8d966455 (diff)
Enhance and fix NIC mapping feature
The original implementation supported a strictly numeric mapping scheme (e.g. nic1, nic2) that could misbehave if an active NIC was not listed in the user's mapping file. This change fixes the misbehavior, and enhances the feature by not requiring NIC aliases follow the numeric mapping scheme. This allows the user to choose meaningful names for the NIC aliases. NIC mapping now happens in two steps: 1) Process any user supplied mappings - NIC alias does not need to follow the numeric "nicN" scheme - Existing validation rules apply: mappings for inactive NICs are ignored (but logged), and duplicate mappings are rejected 2) Generate default mappings as needed - Only applies to active NICs that aren't already mapped - Follows the numeric scheme (nic1, nic2) using the NIC number based on the list of active NICs - No default mapping is assigned if another NIC is already using that numeric alias Change-Id: I6943623a51702349f6a7dcf2de8a8429078a3ab0 Closes-Bug: 1612723
Diffstat (limited to 'etc')
-rw-r--r--etc/os-net-config/samples/mapping_mnemonic.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/os-net-config/samples/mapping_mnemonic.yaml b/etc/os-net-config/samples/mapping_mnemonic.yaml
new file mode 100644
index 0000000..10f31de
--- /dev/null
+++ b/etc/os-net-config/samples/mapping_mnemonic.yaml
@@ -0,0 +1,8 @@
+# See the mapping.yaml sample for an overview of the mapping functionality.
+# This shows the use of mnemonic aliases instead of the default nicN aliases
+# in configs. It can be used with the -m option to override the default
+# mapping of the nicN aliases.
+interface_mapping:
+ provision: em1
+ bond0p1: em2
+ bond0p2: 12:34:56:de:f0:12