MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / unbind_extranet

Method unbind_extranet

class/projectModel/nodejsModel.py:1333–1349  ·  view source on GitHub ↗

@name 解绑外网 @author hwliang<2021-08-09> @param get { project_name: string<项目名称> } @return dict

(self,get)

Source from the content-addressed store, hash-verified

1331
1332
1333 def unbind_extranet(self,get):
1334 ''&#x27;
1335 @name 解绑外网
1336 @author hwliang<2021-08-09>
1337 @param get<dict_obj>{
1338 project_name: string<项目名称>
1339 }
1340 @return dict
1341 ''&#x27;
1342 project_name = get.project_name.strip()
1343 self.clear_config(project_name)
1344 public.serviceReload()
1345 project_find = self.get_project_find(project_name)
1346 project_find['project_config']['bind_extranet'] = 0
1347 public.M('sites').where("id=?",(project_find['id'],)).setField('project_config',json.dumps(project_find['project_config']))
1348 public.WriteLog(self._log_name,'Node项目{}, 关闭外网映射'.format(project_name))
1349 return public.return_data(True,'关闭成功')
1350
1351
1352 def get_project_pids(self,get = None,pid = None):

Callers

nothing calls this directly

Calls 8

clear_configMethod · 0.95
get_project_findMethod · 0.95
setFieldMethod · 0.45
whereMethod · 0.45
MMethod · 0.45
dumpsMethod · 0.45
formatMethod · 0.45
return_dataMethod · 0.45

Tested by

no test coverage detected