Auto-generated patch by python-black
[integration/test.git] / csit / libraries / MininetTopo / vlan_vtn_test.py
index be3caa877d9668452db568379f2c6ee0fb35f4e5..cd7fa6f9c40d678c5bc9288824af5cd885dda0d1 100644 (file)
@@ -15,13 +15,13 @@ class VLANHost(Host):
 
         intf = self.defaultIntf()
         # remove IP from default, "physical" interface
-        self.cmd('ifconfig %s inet 0' % intf)
+        self.cmd("ifconfig %s inet 0" % intf)
         # create VLAN interface
-        self.cmd('vconfig add %s %d' % (intf, vlan))
+        self.cmd("vconfig add %s %d" % (intf, vlan))
         # assign the host's IP to the VLAN interface
-        self.cmd('ifconfig %s.%d inet %s' % (intf, vlan, params['ip']))
+        self.cmd("ifconfig %s.%d inet %s" % (intf, vlan, params["ip"]))
         # update the intf name and host's intf map
-        new_name = '%s.%d' % (intf, vlan)
+        new_name = "%s.%d" % (intf, vlan)
         # update the (Mininet) interface to refer to VLAN interface name
         intf.name = new_name
         # add VLAN interface to host's name to intf map
@@ -40,16 +40,16 @@ class VlanTopo(Topo):
         Topo.__init__(self)
 
         # Add hosts and switches
-        host1 = self.addHost('h1', cls=VLANHost, vlan=200)
-        host2 = self.addHost('h2', cls=VLANHost, vlan=300)
-        host3 = self.addHost('h3', cls=VLANHost, vlan=200)
-        host4 = self.addHost('h4', cls=VLANHost, vlan=300)
-        host5 = self.addHost('h5', cls=VLANHost, vlan=200)
-        host6 = self.addHost('h6', cls=VLANHost, vlan=300)
+        host1 = self.addHost("h1", cls=VLANHost, vlan=200)
+        host2 = self.addHost("h2", cls=VLANHost, vlan=300)
+        host3 = self.addHost("h3", cls=VLANHost, vlan=200)
+        host4 = self.addHost("h4", cls=VLANHost, vlan=300)
+        host5 = self.addHost("h5", cls=VLANHost, vlan=200)
+        host6 = self.addHost("h6", cls=VLANHost, vlan=300)
 
-        s1 = self.addSwitch('s1')
-        s2 = self.addSwitch('s2')
-        s3 = self.addSwitch('s3')
+        s1 = self.addSwitch("s1")
+        s2 = self.addSwitch("s2")
+        s3 = self.addSwitch("s3")
 
         self.addLink(s1, s2)
         self.addLink(s2, host1)
@@ -61,4 +61,4 @@ class VlanTopo(Topo):
         self.addLink(s3, host6)
 
 
-topos = {'vlantopo': (lambda: VlanTopo())}
+topos = {"vlantopo": (lambda: VlanTopo())}