Fix VLAN range of setChain
[osm/vim-emu.git] / src / emuvim / dcemulator / net.py
index 531bdab..3eee2e5 100755 (executable)
@@ -113,7 +113,7 @@ class DCNetwork(Containernet):
         self.DCNetwork_graph = nx.MultiDiGraph()
 
         # initialize pool of vlan tags to setup the SDN paths
         self.DCNetwork_graph = nx.MultiDiGraph()
 
         # initialize pool of vlan tags to setup the SDN paths
-        self.vlans = range(4096)[::-1]
+        self.vlans = range(1, 4096)[::-1]
 
         # link to Ryu REST_API
         ryu_ip = 'localhost'
 
         # link to Ryu REST_API
         ryu_ip = 'localhost'
@@ -568,7 +568,7 @@ class DCNetwork(Containernet):
                 pass
 
 
                 pass
 
 
-        cmd = kwargs.get('cmd')
+        cmd = kwargs.get('cmd', 'add-flow')
         if cmd == 'add-flow' or cmd == 'del-flows':
             ret = self._chainAddFlow(vnf_src_name, vnf_dst_name, vnf_src_interface, vnf_dst_interface, **kwargs)
             if kwargs.get('bidirectional'):
         if cmd == 'add-flow' or cmd == 'del-flows':
             ret = self._chainAddFlow(vnf_src_name, vnf_dst_name, vnf_src_interface, vnf_dst_interface, **kwargs)
             if kwargs.get('bidirectional'):