fix some bugs
This commit is contained in:
parent
c52b6d692c
commit
5589e8feaa
|
@ -9,5 +9,8 @@
|
|||
ovs-vsctl --if-exists del-port $Bridge $5
|
||||
cnt=$(ovs-vsctl list-ports ${Bridge} | wc -l)
|
||||
if [ "$cnt" = "1" ]; then
|
||||
ovs-vsctl del-br $Bridge
|
||||
greport=$(ovs-vsctl list-ports $(Bridge) | grep "^gre-[[:digit:]][[:digit:]]*-[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$" | wc -l)
|
||||
if [ "$greport" = "1" ]; then
|
||||
ovs-vsctl del-br $Bridge
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -57,9 +57,11 @@ class VclusterMgr(object):
|
|||
usersdir = self.fspath+"/global/users/"
|
||||
auth_key = env.getenv('AUTH_KEY')
|
||||
res = post_to_user("/master/user/groupinfo/", {'auth_key':auth_key})
|
||||
groups = res['groups']
|
||||
#logger.info(res)
|
||||
groups = json.loads(res['groups'])
|
||||
quotas = {}
|
||||
for group in groups:
|
||||
logger.info(group)
|
||||
quotas[group['name']] = group['quotas']
|
||||
for user in os.listdir(usersdir):
|
||||
for cluster in self.list_clusters(user)[1]:
|
||||
|
|
|
@ -338,6 +338,7 @@ def get_master_recoverinfo():
|
|||
@app.route("/master/user/groupinfo/", methods=['POST'])
|
||||
@auth_key_required
|
||||
def get_master_groupinfo():
|
||||
fspath = env.getenv('FS_PREFIX')
|
||||
groupfile = open(fspath+"/global/sys/quota",'r')
|
||||
groups = json.loads(groupfile.read())
|
||||
groupfile.close()
|
||||
|
|
Loading…
Reference in New Issue