Skip to content

Commit

Permalink
[airos] somebody PEP8's me
Browse files Browse the repository at this point in the history
  • Loading branch information
edoput committed Jul 17, 2017
1 parent eb40826 commit 4ca28df
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion bin/netjsonconfig
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ backends = {
'openwrt': netjsonconfig.OpenWrt,
'openwisp': netjsonconfig.OpenWisp,
'openvpn': netjsonconfig.OpenVpn,
'airos': netjsonconfig.AirOS,
'airos': netjsonconfig.AirOs,
}

backend_class = backends[args.backend]
Expand Down
2 changes: 1 addition & 1 deletion netjsonconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .backends.openwrt.openwrt import OpenWrt # noqa
from .backends.openwisp.openwisp import OpenWisp # noqa
from .backends.openvpn.openvpn import OpenVpn # noqa
from .backends.airos.airos import AirOS # noqa
from .backends.airos.airos import AirOs # noqa
8 changes: 4 additions & 4 deletions netjsonconfig/backends/airos/airos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
Httpd, Igmpproxy, Iptables, Netconf, Netmode, Ntpclient, \
Pwdog, Radio, Resolv, Route, Snmp, Sshd, Syslog, System, \
Telnetd, Update, Users, Vlan, Wireless, Wpasupplicant
from .renderers import AirOS
from .renderers import AirOS as AirOsRenderer
from ..base.backend import BaseBackend
from .schema import schema


class AirOS(BaseBackend):
class AirOs(BaseBackend):
"""
AirOS backend
"""
Expand Down Expand Up @@ -52,10 +52,10 @@ class AirOS(BaseBackend):
# templates lives
env_path = 'netjsonconfig.backends.airos'

renderer = AirOS
renderer = AirOsRenderer

def to_intermediate(self):
super(AirOS, self).to_intermediate()
super(AirOs, self).to_intermediate()
for k, v in self.intermediate_data.items():
self.intermediate_data[k] = [x for x in flatten(intermediate_to_list(v)) if x != {}]

Expand Down
56 changes: 28 additions & 28 deletions tests/airos/dummy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from netjsonconfig import AirOS
from netjsonconfig import AirOs

from netjsoncongig.backends.airos.converters import Aaa, Bridge, Discovery, Dyndns, Ebtables, Gui, \
from netjsonconfig.backends.airos.converters import Aaa, Bridge, Discovery, Dyndns, Ebtables, Gui, \
Httpd, Igmpproxy, Iptables, Netconf, Netmode, Ntpclient, \
Pwdog, Radio, Resolv, Route, Snmp, Sshd, Syslog, System, \
Telnetd, Update, Users, Vlan, Wireless, Wpasupplicant
Expand Down Expand Up @@ -33,7 +33,7 @@ def assertEqualConfig(self, a, b):
self.assertEqual(a, b)


class AaaAirOS(AirOS):
class AaaAirOs(AirOs):
"""
Mock backend with converter for radius authentication
"""
Expand All @@ -42,7 +42,7 @@ class AaaAirOS(AirOS):
]


class BridgeAirOS(AirOS):
class BridgeAirOs(AirOs):
"""
Mock backend with converter for bridge interface
"""
Expand All @@ -51,7 +51,7 @@ class BridgeAirOS(AirOS):
]


class DiscoveryAirOS(AirOS):
class DiscoveryAirOs(AirOs):
"""
Mock backend with converter for network hardware discovery
"""
Expand All @@ -60,7 +60,7 @@ class DiscoveryAirOS(AirOS):
]


class DyndnsAirOS(AirOS):
class DyndnsAirOs(AirOs):
"""
Mock backend with converter for dynamic dns capabilities
"""
Expand All @@ -69,7 +69,7 @@ class DyndnsAirOS(AirOS):
]


class EbtablesAirOS(AirOS):
class EbtablesAirOs(AirOs):
"""
Mock backend with converter for ebtables
"""
Expand All @@ -78,7 +78,7 @@ class EbtablesAirOS(AirOS):
]


class GuiAirOS(AirOS):
class GuiAirOs(AirOs):
"""
Mock backend with converter for web interface settings
"""
Expand All @@ -87,7 +87,7 @@ class GuiAirOS(AirOS):
]


class HttpdAirOS(AirOS):
class HttpdAirOs(AirOs):
"""
Mock backend with converter for web server
"""
Expand All @@ -96,7 +96,7 @@ class HttpdAirOS(AirOS):
]


class Igmpproxy(AirOS):
class Igmpproxy(AirOs):
"""
Mock backend with converter for igmpproxy
"""
Expand All @@ -105,7 +105,7 @@ class Igmpproxy(AirOS):
]


class IptablesAirOS(AirOS):
class IptablesAirOs(AirOs):
"""
Mock backend with converter for iptables
"""
Expand All @@ -114,7 +114,7 @@ class IptablesAirOS(AirOS):
]


class NetconfAirOS(AirOS):
class NetconfAirOs(AirOs):
"""
Mock backend with converter for network configuration
"""
Expand All @@ -123,7 +123,7 @@ class NetconfAirOS(AirOS):
]


class NetmodeAirOS(AirOS):
class NetmodeAirOs(AirOs):
"""
Mock backend with converter for network mode
"""
Expand All @@ -132,7 +132,7 @@ class NetmodeAirOS(AirOS):
]


class NtpclientAirOS(AirOS):
class NtpclientAirOs(AirOs):
"""
Mock backend with converter for ntp settings
"""
Expand All @@ -141,7 +141,7 @@ class NtpclientAirOS(AirOS):
]


class PwdogAirOS(AirOS):
class PwdogAirOs(AirOs):
"""
Mock backend with converter for ping watchdog settings
"""
Expand All @@ -150,7 +150,7 @@ class PwdogAirOS(AirOS):
]


class RadioAirOS(AirOS):
class RadioAirOs(AirOs):
"""
Mock backend with converter for radio settings
"""
Expand All @@ -159,7 +159,7 @@ class RadioAirOS(AirOS):
]


class ResolvAirOS(AirOS):
class ResolvAirOs(AirOs):
"""
Mock backend with converter for network resolver
"""
Expand All @@ -168,7 +168,7 @@ class ResolvAirOS(AirOS):
]


class RouteAirOS(AirOS):
class RouteAirOs(AirOs):
"""
Mock backend with converter for static routes
"""
Expand All @@ -177,7 +177,7 @@ class RouteAirOS(AirOS):
]


class SnmpAirOS(AirOS):
class SnmpAirOs(AirOs):
"""
Mock backend with converter for simple network management protocol
"""
Expand All @@ -187,7 +187,7 @@ class SnmpAirOS(AirOS):



class SshdAirOS(AirOS):
class SshdAirOs(AirOs):
"""
Mock backend with converter for ssh daemon settings
"""
Expand All @@ -196,7 +196,7 @@ class SshdAirOS(AirOS):
]


class SyslogAirOS(AirOS):
class SyslogAirOs(AirOs):
"""
Mock backend with converter for remote logging
"""
Expand All @@ -205,7 +205,7 @@ class SyslogAirOS(AirOS):
]


class SystemAirOS(AirOS):
class SystemAirOs(AirOs):
"""
Mock backend with converter for system settings
"""
Expand All @@ -214,7 +214,7 @@ class SystemAirOS(AirOS):
]


class TelnetdAirOS(AirOS):
class TelnetdAirOs(AirOs):
"""
Mock backend with converter for telnet daemon settings
"""
Expand All @@ -223,7 +223,7 @@ class TelnetdAirOS(AirOS):
]


class UpdateAirOS(AirOS):
class UpdateAirOs(AirOs):
"""
Mock backend with converter for update
"""
Expand All @@ -232,7 +232,7 @@ class UpdateAirOS(AirOS):
]


class UsersAirOS(AirOS):
class UsersAirOs(AirOs):
"""
Mock backend with converter for users settings
"""
Expand All @@ -241,7 +241,7 @@ class UsersAirOS(AirOS):
]


class VlanAirOS(AirOS):
class VlanAirOs(AirOs):
"""
Mock backend with converter for vlan settings
"""
Expand All @@ -250,7 +250,7 @@ class VlanAirOS(AirOS):
]


class WirelessAirOS(AirOS):
class WirelessAirOs(AirOs):
"""
Mock backend with converter for wireless settings
"""
Expand All @@ -259,7 +259,7 @@ class WirelessAirOS(AirOS):
]


class WpasupplicantAirOS(AirOS):
class WpasupplicantAirOs(AirOs):
"""
Mock backend with converter for wpasupplicant settings
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_aaa.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import AaaAirOS, ConverterTest
from .dummy import AaaAirOs, ConverterTest


class TestResolvConverter(ConverterTest):

backend = AaaAirOS
backend = AaaAirOs

def test_aaa_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_bridge.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from .dummy import BridgeAirOS, ConverterTest
from .dummy import BridgeAirOs, ConverterTest


class TestBridgeConverter(ConverterTest):
"""
tests for backends.airos.renderers.SystemRenderer
"""
backend = BridgeAirOS
backend = BridgeAirOs

def test_active_bridge(self):

Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_discovery.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import DiscoveryAirOS, ConverterTest
from .dummy import DiscoveryAirOs, ConverterTest


class TestDiscoveryConverter(ConverterTest):

backend = DiscoveryAirOS
backend = DiscoveryAirOs

def test_discovery_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_dyndns.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import DyndnsAirOS, ConverterTest
from .dummy import DyndnsAirOs, ConverterTest


class TestDyndnsConverter(ConverterTest):

backend = DyndnsAirOS
backend = DyndnsAirOs

def test_Dyndns_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_gui.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import GuiAirOS, ConverterTest
from .dummy import GuiAirOs, ConverterTest


class TestGuiConverter(ConverterTest):

backend = GuiAirOS
backend = GuiAirOs

def test_gui_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_httpd.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import HttpdAirOS, ConverterTest
from .dummy import HttpdAirOs, ConverterTest


class TestHttpdConverter(ConverterTest):

backend = HttpdAirOS
backend = HttpdAirOs

def test_httpd_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_netconf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from unittest import skip
from .dummy import NetconfAirOS, ConverterTest
from .dummy import NetconfAirOs, ConverterTest


class TestNetconfConverter(ConverterTest):

backend = NetconfAirOS
backend = NetconfAirOs

def test_netconf_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_netmode.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import NetmodeAirOS, ConverterTest
from .dummy import NetmodeAirOs, ConverterTest


class TestNetmodeConverter(ConverterTest):

backend = NetmodeAirOS
backend = NetmodeAirOs

def test_netconf_key(self):
o = self.backend({
Expand Down
4 changes: 2 additions & 2 deletions tests/airos/test_ntp.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .dummy import NtpclientAirOS, ConverterTest
from .dummy import NtpclientAirOs, ConverterTest


class TestResolvConverter(ConverterTest):

backend = NtpclientAirOS
backend = NtpclientAirOs

def test_ntp_key(self):
o = self.backend({
Expand Down
Loading

0 comments on commit 4ca28df

Please sign in to comment.