Add node type VM to set_interface_state 83/583/2
authorMatus Fabian <matfabia@cisco.com>
Tue, 22 Mar 2016 07:49:58 +0000 (08:49 +0100)
committerGerrit Code Review <gerrit@fd.io>
Thu, 24 Mar 2016 11:23:55 +0000 (11:23 +0000)
Change-Id: Ib70de73eec7c015f328f877fa34ead15e27eb254
Signed-off-by: Matus Fabian <matfabia@cisco.com>
resources/libraries/python/InterfaceUtil.py

index be12650..58af5aa 100644 (file)
@@ -53,7 +53,7 @@ class InterfaceUtil(object):
             VatExecutor.cmd_from_template(node, 'set_if_state.vat',
                                           sw_if_index=sw_if_index, state=state)
 
-        elif node['type'] == NodeType.TG:
+        elif node['type'] == NodeType.TG or node['type'] == NodeType.VM:
             cmd = 'ip link set {} {}'.format(interface, state)
             exec_cmd_no_error(node, cmd, sudo=True)
         else: