json_select ..
}
-ucidef_set_network_device_mac() {
+_ucidef_set_network_device_common() {
json_select_object "network_device"
json_select_object "${1}"
- json_add_string macaddr "${2}"
+ json_add_string "${2}" "${3}"
json_select ..
json_select ..
}
+ucidef_set_network_device_mac() {
+ _ucidef_set_network_device_common $1 macaddr $2
+}
+
ucidef_set_network_device_path() {
- json_select_object "network_device"
- json_select_object "$1"
- json_add_string path "$2"
- json_select ..
- json_select ..
+ _ucidef_set_network_device_common $1 path $2
}
_ucidef_add_switch_port() {