Merge pull request #389 from GallenShao/master
fix a bug in port mapping
This commit is contained in:
commit
8757ab6391
|
@ -380,14 +380,13 @@ class VclusterMgr(object):
|
||||||
[success,msg] = worker.release_port_mapping(node_name, node_ip, str(node_port))
|
[success,msg] = worker.release_port_mapping(node_name, node_ip, str(node_port))
|
||||||
else:
|
else:
|
||||||
[success,msg] = portcontrol.release_port_mapping(node_name, node_ip, str(node_port))
|
[success,msg] = portcontrol.release_port_mapping(node_name, node_ip, str(node_port))
|
||||||
if not success:
|
|
||||||
return [False,msg]
|
|
||||||
db.session.delete(item)
|
db.session.delete(item)
|
||||||
break
|
db.session.commit()
|
||||||
else:
|
if success:
|
||||||
return [False,"No port mapping."]
|
return [True, json.loads(str(vcluster))]
|
||||||
db.session.commit()
|
else:
|
||||||
return [True, json.loads(str(vcluster))]
|
return [False, msg]
|
||||||
|
return [False, "No port mapping."]
|
||||||
|
|
||||||
def flush_cluster(self,username,clustername,containername):
|
def flush_cluster(self,username,clustername,containername):
|
||||||
begintime = datetime.datetime.now()
|
begintime = datetime.datetime.now()
|
||||||
|
|
Loading…
Reference in New Issue