added flake8/black, pre-commit integration for flake8/black, and black formatting changes
This commit is contained in:
parent
d5055f85d3
commit
1fc8d647c3
77 changed files with 4452 additions and 1964 deletions
|
@ -11,6 +11,7 @@ class SdnService(CoreService):
|
|||
"""
|
||||
Parent class for SDN services.
|
||||
"""
|
||||
|
||||
group = "SDN"
|
||||
|
||||
@classmethod
|
||||
|
@ -78,8 +79,14 @@ class OvsService(SdnService):
|
|||
for ifc in node.netifs():
|
||||
if hasattr(ifc, "control") and ifc.control is True:
|
||||
continue
|
||||
cfg += "ovs-ofctl add-flow ovsbr0 priority=1000,in_port=%d,action=output:%d\n" % (portnum, portnum + 1)
|
||||
cfg += "ovs-ofctl add-flow ovsbr0 priority=1000,in_port=%d,action=output:%d\n" % (portnum + 1, portnum)
|
||||
cfg += (
|
||||
"ovs-ofctl add-flow ovsbr0 priority=1000,in_port=%d,action=output:%d\n"
|
||||
% (portnum, portnum + 1)
|
||||
)
|
||||
cfg += (
|
||||
"ovs-ofctl add-flow ovsbr0 priority=1000,in_port=%d,action=output:%d\n"
|
||||
% (portnum + 1, portnum)
|
||||
)
|
||||
portnum += 2
|
||||
|
||||
return cfg
|
||||
|
@ -102,5 +109,7 @@ class RyuService(SdnService):
|
|||
"""
|
||||
cfg = "#!/bin/sh\n"
|
||||
cfg += "# auto-generated by ryuService (ryuService.py)\n"
|
||||
cfg += "ryu-manager --observe-links ryu.app.ofctl_rest ryu.app.rest_topology &\n"
|
||||
cfg += (
|
||||
"ryu-manager --observe-links ryu.app.ofctl_rest ryu.app.rest_topology &\n"
|
||||
)
|
||||
return cfg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue