def dehydrate(self): DeviceConfigDialog.dehydrate(self) sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.route_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.hardware_dehydrate(self.sharedtcpip_xml, self.device) wl = self.device.Wireless if wl: if self.xml.get_widget("essidAutoButton").get_active(): wl.EssId = "" else: wl.EssId = self.xml.get_widget("essidEntry").get_text() row = self.xml.get_widget("modeCombo").get_active() wl.Mode = self.modestore[row][1] if wl.Mode == "Managed": wl.Channel = "" wl.Rate = "auto" else: channel = self.xml.get_widget("channelEntry").get_text() if channel == "Auto": wl.Channel = "" else: wl.Channel = channel rate = self.xml.get_widget("rateEntry").get_text() if rate == _("Auto"): wl.Rate = "auto" else: wl.Rate = rate # FIXME: [168036] check the key! wl.Key = self.xml.get_widget("keyEntry").get_text()
def on_hostname_config_page_next(self, druid_page, druid): sharedtcpip.dhcp_dehydrate (self.sharedtcpip_xml, self.device) if self.hwPage: self.device.Device = self.hwDruid.hw.Name self.device.Alias = None #self.device.Hostname = self.xml.get_widget("hostnameEntry").get_text() pass
def dehydrate(self): DeviceConfigDialog.dehydrate(self) sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.route_dehydrate(self.sharedtcpip_xml, self.device) hw = self.xml.get_widget("tokenringDeviceEntry").get_text() fields = hw.split() hw = fields[0] self.device.Device = hw if self.xml.get_widget("aliasSupportCB").get_active(): self.device.Alias = self.xml.get_widget( "aliasSpinBox").get_value_as_int() else: self.device.Alias = None
def dehydrate(self): DeviceConfigDialog.dehydrate(self) sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.route_dehydrate(self.sharedtcpip_xml, self.device) dialup = self.device.createDialup() for attr, widget in { 'ProviderName': 'providerName', 'Login': '******', 'Password': '******', 'Areacode': 'areaCodeEntry', 'Prefix': 'prefixEntry', 'PhoneNumber': 'phoneEntry', }.items(): val = self.xml.get_widget(widget).get_text().strip() if val: setattr(dialup, attr, val) else: if attr != "Password": delattr(dialup, attr) if not dialup.Compression: dialup.createCompression() for attr, widget in { 'VJTcpIp': 'headerCompressionCB', 'VJID': 'connectionCompressionCB', 'AdressControl': 'acCompressionCB', 'ProtoField': 'pfCompressionCB', 'BSD': 'bsdCompressionCB', 'CCP': 'cppCompressionCB', }.items(): val = self.xml.get_widget(widget).get_active() setattr(dialup.Compression, attr, val) del dialup.PPPOptions clist = self.xml.get_widget("pppOptionList") if clist.rows: dialup.createPPPOptions() for i in xrange(clist.rows): dialup.PPPOptions.append(clist.get_text(i, 0).strip())
def dehydrate(self): DeviceConfigDialog.dehydrate(self) dialup = self.device.Dialup dialup.ProviderName = self.xml.get_widget( "providerNameEntry").get_text() dialup.Login = self.xml.get_widget("loginNameEntry").get_text() dialup.Password = self.xml.get_widget("passwordEntry").get_text() dialup.ServiceName = self.xml.get_widget("serviceNameEntry").get_text() dialup.AcName = self.xml.get_widget("acNameEntry").get_text() dialup.SyncPPP = self.xml.get_widget("useSyncpppCB").get_active() dialup.DefRoute = self.xml.get_widget("defrouteCB").get_active() dialup.Persist = self.xml.get_widget("persistCB").get_active() if self.xml.get_widget("dialonDemandCB").get_active(): dialup.DialMode = DM_AUTO dialup.HangupTimeout = int( self.xml.get_widget("idleTimeSB").get_text()) else: dialup.DialMode = DM_MANUAL if not self.device.Device: self.device.Device = "dsl" sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.route_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.dsl_hardware_dehydrate(self.sharedtcpip_xml, self.device)
def on_hostname_config_page_next(self, druid_page, druid): # pylint: disable-msg=W0613 sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) if self.hwPage: self.device.Device = self.hwDruid.hw.Name self.device.Alias = None
def dehydrate(self): DeviceConfigDialog.dehydrate(self) sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.route_dehydrate(self.sharedtcpip_xml, self.device) sharedtcpip.hardware_dehydrate(self.sharedtcpip_xml, self.device)
def on_hostname_config_page_next(self, druid_page, druid): sharedtcpip.dhcp_dehydrate(self.sharedtcpip_xml, self.device)