Esempio n. 1
0
	def applyConfig(self, ret = False):
		if (ret == True):
			data = { 'isMounted': False, 'mountusing': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, \
					'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False }
			data['mountusing'] = self.mountusingConfigEntry.value
			data['active'] = self.activeConfigEntry.value
			data['ip'] = self.ipConfigEntry.getText()
			data['sharename'] = re_sub("\W", "", self.sharenameConfigEntry.value)
			# "\W" matches everything that is "not numbers, letters, or underscores",where the alphabet defaults to ASCII.
			if self.sharedirConfigEntry.value.startswith("/"):
				data['sharedir'] = self.sharedirConfigEntry.value[1:]
			else:
				data['sharedir'] = self.sharedirConfigEntry.value
			data['options'] =  self.optionsConfigEntry.value
			data['mounttype'] = self.mounttypeConfigEntry.value
			data['username'] = self.usernameConfigEntry.value
			data['password'] = self.passwordConfigEntry.value
			data['hdd_replacement'] = self.hdd_replacementConfigEntry.value
			self.applyConfigRef = None
			self.applyConfigRef = self.session.openWithCallback(self.applyConfigfinishedCB, MessageBox, _("Please wait for activation of your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
			iAutoMount.automounts[self.sharenameConfigEntry.value] = data
			iAutoMount.writeMountsConfig()
			iAutoMount.getAutoMountPoints(self.applyConfigDataAvail, True)
		else:
			self.close()
Esempio n. 2
0
	def updateConfig(self, ret = False):
		if (ret == True):
			sharedir = None
			if self.old_sharename != self.sharenameConfigEntry.value:
				xml_sharename = self.old_sharename
			else:
				xml_sharename = self.sharenameConfigEntry.value

			if self.sharedirConfigEntry.value.startswith("/"):
				sharedir = self.sharedirConfigEntry.value[1:]
			else:
				sharedir = self.sharedirConfigEntry.value
			iAutoMount.setMountsAttribute(xml_sharename, "mountusing", self.mountusingConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "sharename", self.sharenameConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "active", self.activeConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "ip", self.ipConfigEntry.getText())
			iAutoMount.setMountsAttribute(xml_sharename, "sharedir", sharedir)
			iAutoMount.setMountsAttribute(xml_sharename, "mounttype", self.mounttypeConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "options", self.optionsConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "username", self.usernameConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "password", self.passwordConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "hdd_replacement", self.hdd_replacementConfigEntry.value)

			self.updateConfigRef = None
			self.updateConfigRef = self.session.openWithCallback(self.updateConfigfinishedCB, MessageBox, _("Please wait while updating your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
			iAutoMount.writeMountsConfig()
			iAutoMount.getAutoMountPoints(self.updateConfigDataAvail, True)
		else:
			self.close()
Esempio n. 3
0
	def updateConfig(self, ret = False):
		if (ret == True):
			sharedir = None
			if self.old_sharename != self.sharenameConfigEntry.value:
				xml_sharename = self.old_sharename
			else:
				xml_sharename = self.sharenameConfigEntry.value

			if self.sharedirConfigEntry.value.startswith("/"):
				sharedir = self.sharedirConfigEntry.value[1:]
			else:
				sharedir = self.sharedirConfigEntry.value
			iAutoMount.setMountsAttribute(xml_sharename, "mountusing", self.mountusingConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "sharename", self.sharenameConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "active", self.activeConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "ip", self.ipConfigEntry.getText())
			iAutoMount.setMountsAttribute(xml_sharename, "sharedir", sharedir)
			iAutoMount.setMountsAttribute(xml_sharename, "mounttype", self.mounttypeConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "options", self.optionsConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "username", self.usernameConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "password", self.passwordConfigEntry.value)
			iAutoMount.setMountsAttribute(xml_sharename, "hdd_replacement", self.hdd_replacementConfigEntry.value)

			self.updateConfigRef = None
			self.updateConfigRef = self.session.openWithCallback(self.updateConfigfinishedCB, MessageBox, _("Please wait while updating your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
			iAutoMount.writeMountsConfig()
			iAutoMount.getAutoMountPoints(self.updateConfigDataAvail, True)
		else:
			self.close()
Esempio n. 4
0
 def applyConfig(self, ret = False):
     if ret == True:
         data = {'isMounted': False,
          'mountusing': False,
          'active': False,
          'ip': False,
          'sharename': False,
          'sharedir': False,
          'username': False,
          'password': False,
          'mounttype': False,
          'options': False,
          'hdd_replacement': False}
         data['mountusing'] = self.mountusingConfigEntry.value
         data['active'] = self.activeConfigEntry.value
         data['ip'] = self.ipConfigEntry.getText()
         data['sharename'] = re_sub('\\W', '', self.sharenameConfigEntry.value)
         if self.sharedirConfigEntry.value.startswith('/'):
             data['sharedir'] = self.sharedirConfigEntry.value[1:]
         else:
             data['sharedir'] = self.sharedirConfigEntry.value
         data['options'] = self.optionsConfigEntry.value
         data['mounttype'] = self.mounttypeConfigEntry.value
         data['username'] = self.usernameConfigEntry.value
         data['password'] = self.passwordConfigEntry.value
         data['hdd_replacement'] = self.hdd_replacementConfigEntry.value
         self.applyConfigRef = None
         self.applyConfigRef = self.session.openWithCallback(self.applyConfigfinishedCB, MessageBox, _('Please wait for activation of your network mount...'), type=MessageBox.TYPE_INFO, enable_input=False)
         iAutoMount.automounts[self.sharenameConfigEntry.value] = data
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.applyConfigDataAvail)
     else:
         self.close()
Esempio n. 5
0
 def applyConfig(self, ret=False):
     if (ret == True):
         data = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, \
           'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False }
         data['active'] = self.activeConfigEntry.value
         data['ip'] = self.ipConfigEntry.getText()
         data['sharename'] = re_sub("\W", "",
                                    self.sharenameConfigEntry.value)
         # "\W" matches everything that is "not numbers, letters, or underscores",where the alphabet defaults to ASCII.
         if self.sharedirConfigEntry.value.startswith("/"):
             data['sharedir'] = self.sharedirConfigEntry.value[1:]
         else:
             data['sharedir'] = self.sharedirConfigEntry.value
         data['options'] = self.optionsConfigEntry.value
         data['mounttype'] = self.mounttypeConfigEntry.value
         data['username'] = self.usernameConfigEntry.value
         data['password'] = self.passwordConfigEntry.value
         data['hdd_replacement'] = self.hdd_replacementConfigEntry.value
         self.applyConfigRef = None
         self.applyConfigRef = self.session.openWithCallback(
             self.applyConfigfinishedCB,
             MessageBox,
             _("Please wait for activation of your network mount..."),
             type=MessageBox.TYPE_INFO,
             enable_input=False)
         iAutoMount.automounts[self.sharenameConfigEntry.value] = data
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.applyConfigDataAvail)
     else:
         self.close()
Esempio n. 6
0
 def applyConfig(self, ret=False):
     if ret == True:
         data = {
             "isMounted": False,
             "mountusing": False,
             "active": False,
             "ip": False,
             "sharename": False,
             "sharedir": False,
             "username": False,
             "password": False,
             "mounttype": False,
             "options": False,
             "hdd_replacement": False,
         }
         data["mountusing"] = self.mountusingConfigEntry.value
         data["active"] = self.activeConfigEntry.value
         data["ip"] = self.ipConfigEntry.getText()
         data["sharename"] = re_sub("\W", "", self.sharenameConfigEntry.value)
         # "\W" matches everything that is "not numbers, letters, or underscores",where the alphabet defaults to ASCII.
         if self.sharedirConfigEntry.value.startswith("/"):
             data["sharedir"] = self.sharedirConfigEntry.value[1:]
         else:
             data["sharedir"] = self.sharedirConfigEntry.value
         data["options"] = self.optionsConfigEntry.value
         data["mounttype"] = self.mounttypeConfigEntry.value
         data["username"] = self.usernameConfigEntry.value
         data["password"] = self.passwordConfigEntry.value
         data["hdd_replacement"] = self.hdd_replacementConfigEntry.value
         self.applyConfigRef = None
         self.applyConfigRef = self.session.openWithCallback(
             self.applyConfigfinishedCB,
             MessageBox,
             _("Please wait for activation of your network mount..."),
             type=MessageBox.TYPE_INFO,
             enable_input=False,
         )
         iAutoMount.automounts[self.sharenameConfigEntry.value] = data
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.applyConfigDataAvail)
     else:
         self.close()
Esempio n. 7
0
 def updateConfig(self, ret = False):
     if ret == True:
         sharedir = None
         if self.sharedirConfigEntry.value.startswith('/'):
             sharedir = self.sharedirConfigEntry.value[1:]
         else:
             sharedir = self.sharedirConfigEntry.value
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'mountusing', self.mountusingConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'sharename', self.sharenameConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'active', self.activeConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'ip', self.ipConfigEntry.getText())
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'sharedir', sharedir)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'mounttype', self.mounttypeConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'options', self.optionsConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'username', self.usernameConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'password', self.passwordConfigEntry.value)
         iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, 'hdd_replacement', self.hdd_replacementConfigEntry.value)
         self.updateConfigRef = None
         self.updateConfigRef = self.session.openWithCallback(self.updateConfigfinishedCB, MessageBox, _('Please wait while updating your network mount...'), type=MessageBox.TYPE_INFO, enable_input=False)
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.updateConfigDataAvail)
     else:
         self.close()
Esempio n. 8
0
def RemountMain(session, iface = None, **kwargs):
	from AutoMount import iAutoMount
	iAutoMount.getAutoMountPoints()
Esempio n. 9
0
def RemountMain(session, iface = None, **kwargs):
	from AutoMount import iAutoMount
	iAutoMount.getAutoMountPoints()
Esempio n. 10
0
 def removeDataAvail(self, data):
     if data is True:
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.deleteDataAvail)
Esempio n. 11
0
 def JobEpgCache(self):
     print('[Networkbrowser MountAgain] mounting network shares.')
     iAutoMount.getAutoMountPoints()
Esempio n. 12
0
	def JobEpgCache(self):
		print '[Networkbrowser MountAgain] mounting network shares.'
		iAutoMount.getAutoMountPoints() 
Esempio n. 13
0
 def removeDataAvail(self, data):
     print '!!!!!!remove mount test1', data
     if data:
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.deleteDataAvail)
Esempio n. 14
0
 def removeDataAvail(self, data):
     print "[MountView.py] removeDataAvail"
     if data is True:
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.deleteDataAvail)
Esempio n. 15
0
 def removeDataAvail(self, data):
     print "[MountView.py] removeDataAvail"
     if data is True:
         iAutoMount.writeMountsConfig()
         iAutoMount.getAutoMountPoints(self.deleteDataAvail)
Esempio n. 16
0
 def removeDataAvail(self, data):
         if data is True:
                 iAutoMount.writeMountsConfig()
                 iAutoMount.getAutoMountPoints(self.deleteDataAvail)
Esempio n. 17
0
	def removeDataAvail(self, data):
		print '!!!!!!remove mount test1',data
		if data:
			iAutoMount.writeMountsConfig()
			iAutoMount.getAutoMountPoints(self.deleteDataAvail)