aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/vpp/vpp_commands.py
diff options
context:
space:
mode:
authorMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:44:59 +0200
committerMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:55:46 +0200
commit5f8867a3454164ad20ae427dc9d2c7d65ea00a90 (patch)
treec8ff40fb147a76af2baa77790ba8a6ac968e51b4 /vicn/resource/vpp/vpp_commands.py
parentaf2dd545d04cfca7e7ec066035abf78c3d541915 (diff)
Several fixes related to async_set, ip addressing, and memif interfaces for VPP
Change-Id: I26b7928751f41ea66ba47bb1becac33cf5195915 Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/resource/vpp/vpp_commands.py')
-rw-r--r--vicn/resource/vpp/vpp_commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/vicn/resource/vpp/vpp_commands.py b/vicn/resource/vpp/vpp_commands.py
index acc89640..e0b71517 100644
--- a/vicn/resource/vpp/vpp_commands.py
+++ b/vicn/resource/vpp/vpp_commands.py
@@ -6,6 +6,7 @@ CMD_VPP_DISABLE = 'systemctl disable vpp.service'
# 'sleep 1' ensures that VPP has enough time to start
CMD_VPP_START = '''
flock /tmp/vppctl.lock -c "systemctl start vpp"
+sleep 2
'''
CMD_VPP_STOP = '''
flock /tmp/vppctl.lock -c "systemctl stop vpp"
@@ -25,7 +26,7 @@ vppctl_wrapper set interface state {vpp_interface.device_name} up
# generated by VPP, preventing any reboot of VPP and recreation of commands
CMD_VPP_CREATE_MEMIFACE = '''
# Create vpp interface from shared_memory
-vppctl_wrapper create memif key {key} socket {vpp_interface.parent.path_unix_socket}{vpp_interface.parent.socket_name} hw-addr {vpp_interface.parent.mac_address} {master_slave}
+vppctl_wrapper create memif {key_label} {key} socket {vpp_interface.parent.path_unix_socket}{vpp_interface.parent.socket_name} hw-addr {vpp_interface.parent.mac_address} {master_slave}
'''
CMD_VPP_SET_IP = 'vppctl_wrapper set int ip address {device_name} {ip_address}/{prefix_len}'
CMD_VPP_SET_UP = 'vppctl_wrapper set int state {netdevice.device_name} {state}'