Esempio n. 1
0
    def _load(self):
        if EDENWALL and (not NuConfMainWindow.minimalMode):
            # before creation of frontends, initialize Q

            try:
                serialized_openvpn_conf = self.init_call('openvpn', 'getOpenVpnConfig')
                QOpenVpnObject.getInstance().openvpn = serialized_openvpn_conf
            except (RpcdError, DatastructureIncompatible):
                # openvpn backend is not available
                pass
Esempio n. 2
0
    def __init__(self, client, parent):
        ScrollArea.__init__(self)
        if not EDENWALL:
            raise NuConfModuleDisabled("Roadwarrior")
        self.loaded_done = False
        self.mainwindow = parent
        self.client = client
        self.modified = False
        self.error_message = ''
        self._buildGui()

        self.qopenvpnobject = QOpenVpnObject.getInstance()
        self.qopenvpnobject.openvpn = self.client.call('openvpn',
                                                       'getOpenVpnConfig')

        # FIXME: Remove isValid() or call it more even?
        self.isValid()

        self.resetConf()
Esempio n. 3
0
    def __init__(self, client, parent):
        ScrollArea.__init__(self)

        self.client = client
        self.mainwindow = parent
        self._modified = False
        self.__disabled = False
        self.net_object = QNetObject.getInitializedInstance(self.client)
        if EDENWALL:
            self.vpn_object = QOpenVpnObject.getInstance()

        self.setupWidgets()
        self.getConfigs()
        self.getNetworks()
        # vpn_config is used to check if the VPN config changed or not
        self.vpn_config = self.getVPNConfig()
        self.fillTable()
        self.net_object.registerCallbacks(self.validateNetCfg, self.updateWithNetCfg)
        if EDENWALL:
            self.vpn_object.registerCallbacks(self.validateVpnCfg, self.updateWithVpnCfg)


        self.mainwindow.addToInfoArea(tr("Access interface enabled"))