mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: link: use iproute2 to create custom devices (fixes #156)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -254,6 +254,14 @@ class IPRoute2(Cache, Requirements):
|
||||
|
||||
###
|
||||
|
||||
def link_add(self, ifname, link_type):
|
||||
utils.exec_command(
|
||||
"%s link add %s type %s"
|
||||
% (utils.ip_cmd, ifname, link_type)
|
||||
)
|
||||
|
||||
###
|
||||
|
||||
def link_add_macvlan(self, ifname, macvlan_ifname, macvlan_mode):
|
||||
utils.exec_command(
|
||||
"%s link add link %s name %s type macvlan mode %s"
|
||||
|
Reference in New Issue
Block a user