예제 #1
0
    def __init__(self, templatelookup, test):
        self.templatelookup = templatelookup
        self.test = test

        self.netconfdb, self.meshconfdb = _utils.set_confdbs(self.test)

        # Configuration information for the network device chosen by the user to
        # act as the uplink.
        self.interface = ''
        self.channel = 0
        self.essid = ''

        # Used for sanity checking user input.
        self.frequency = 0
        
        # Class attributes which make up a network interface.  By default they are
        # blank, but will be populated from the network.sqlite database if the
        # user picks an already-configured interface.
        self.mesh_interface = ''
        self.mesh_ip = ''
        self.client_interface = ''
        self.client_ip = ''

        # Set the netmasks aside so everything doesn't run together.
        self.mesh_netmask = '255.255.0.0'
        self.client_netmask = '255.255.255.0'

        # Attributes for flat files that this object maintains for the client side
        # of the network subsystem.
        self.hosts_file = '/etc/hosts.mesh'
        self.dnsmasq_include_file = '/etc/dnsmasq.conf.include'
예제 #2
0
파일: gateways.py 프로젝트: wflk/Byzantium
    def __init__(self, templatelookup, test):
        self.templatelookup = templatelookup
        self.test = test

        self.netconfdb, self.meshconfdb = _utils.set_confdbs(self.test)

        # Configuration information for the network device chosen by the user to
        # act as the uplink.
        self.interface = ''
        self.channel = 0
        self.essid = ''

        # Used for sanity checking user input.
        self.frequency = 0

        # Class attributes which make up a network interface.  By default they are
        # blank, but will be populated from the network.sqlite database if the
        # user picks an already-configured interface.
        self.mesh_interface = ''
        self.mesh_ip = ''
        self.client_interface = ''
        self.client_ip = ''

        # Set the netmasks aside so everything doesn't run together.
        self.mesh_netmask = '255.255.0.0'
        self.client_netmask = '255.255.255.0'

        # Attributes for flat files that this object maintains for the client side
        # of the network subsystem.
        self.hosts_file = '/etc/hosts.mesh'
        self.dnsmasq_include_file = '/etc/dnsmasq.conf.include'
예제 #3
0
    def __init__(self, templatelookup, test):
        self.templatelookup = templatelookup
        self.test = test

        # Class constants.
        self.babeld = "/usr/local/bin/babeld"
        self.babeld_pid = "/var/run/babeld.pid"
        self.babeld_timeout = 3

        self.netconfdb, self.meshconfdb = _utils.set_confdbs(self.test)

        # Class attributes which apply to a network interface.  By default they
        # are blank but will be populated from the mesh.sqlite database if the
        # user picks an interface that's already been set up.
        self.interface = ""
        self.protocol = ""
        self.enabled = ""
        self.pid = ""
예제 #4
0
    def __init__(self, templatelookup, test):
        self.templatelookup = templatelookup
        self.test = test

        # Class constants.
        self.babeld = '/usr/local/bin/babeld'
        self.babeld_pid = '/var/run/babeld.pid'
        self.babeld_timeout = 3

        self.netconfdb, self.meshconfdb = _utils.set_confdbs(self.test)

        # Class attributes which apply to a network interface.  By default they
        # are blank but will be populated from the mesh.sqlite database if the
        # user picks an interface that's already been set up.
        self.interface = ''
        self.protocol = ''
        self.enabled = ''
        self.pid = ''