Example #1
0
	def updCfgByID(self, record_id, pltf_name = None, ip = None):
		searchPara = {'_id' : record_id}
		setContent = {'Refresh_Time' : bf.timeStamp()}
		if pltf_name is not None:
			setContent.update({'Cfg.Register_Name' : pltf_name})
		if ip is not None:
			setContent.update({'Cfg.Debug_IP' : ip})
		self.update('pltf_basic_info', searchPara, content)
		return True
Example #2
0
 def updCfgByID(self, record_id, pltf_name=None, ip=None):
     searchPara = {'_id': record_id}
     setContent = {'Refresh_Time': bf.timeStamp()}
     if pltf_name is not None:
         setContent.update({'Cfg.Register_Name': pltf_name})
     if ip is not None:
         setContent.update({'Cfg.Debug_IP': ip})
     self.update('pltf_basic_info', searchPara, content)
     return True
Example #3
0
 def insNewItem(self, content):
     setContent = {
         'Refresh_Time': bf.timeStamp(),
         'Cfg': {
             'Register_Name': content['pltf_name'],
             'Debug_IP': content['ip'],
             'Site': content['site']
         }
     }
     _id = self.insert('pltf_basic_info', setContent)
     return {'record_id': _id}
Example #4
0
 def updItemByCfg(self, content, pltf_name, ip):
     searchPara = {
         "$and": [{
             'Cfg.Debug_IP': {
                 "$in": [ip],
                 "$exists": 'true'
             }
         }, {
             'Cfg.Register_Name': {
                 "$in": [pltf_name],
                 "$exists": 'true'
             }
         }]
     }
     content.update({'Refresh_Time': bf.timeStamp()})
     self.update('pltf_basic_info', searchPara, content)
     return True
Example #5
0
	def insNewItem(self, content):
		setContent = {'Refresh_Time' : bf.timeStamp(), 'Cfg' : {'Register_Name' : content['pltf_name'], 'Debug_IP' : content['ip'], 'Site' : content['site']}}
		_id = self.insert('pltf_basic_info', setContent)
		return {'record_id' : _id}
Example #6
0
	def updItemByCfg(self, content, pltf_name, ip):
		searchPara = {"$and" : [{'Cfg.Debug_IP' : {"$in" : [ip] , "$exists" : 'true'}}, {'Cfg.Register_Name' : {"$in" : [pltf_name] , "$exists" : 'true'}}]}
		content.update({'Refresh_Time' : bf.timeStamp()})
		self.update('pltf_basic_info', searchPara, content)
		return True
Example #7
0
	def updItemByID(self, content, record_id):
		searchPara = {'_id' : record_id}
		content.update({'Refresh_Time' : bf.timeStamp()})
		self.update('pltf_basic_info', searchPara, content)
		return True
Example #8
0
 def updItemByID(self, content, record_id):
     searchPara = {'_id': record_id}
     content.update({'Refresh_Time': bf.timeStamp()})
     self.update('pltf_basic_info', searchPara, content)
     return True