mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-05-06 20:55:23 +08:00
fix error in checking for mnt
This commit is contained in:
parent
5c538c72f8
commit
a89781d3aa
1 changed files with 4 additions and 1 deletions
|
@ -463,6 +463,7 @@ def test_policy(obj_type, name, mntner):
|
||||||
return "FAIL"
|
return "FAIL"
|
||||||
|
|
||||||
lis = find(["mnt-by"], {"@type": obj_type, "@name": name})
|
lis = find(["mnt-by"], {"@type": obj_type, "@name": name})
|
||||||
|
log.debug(lis)
|
||||||
|
|
||||||
if len(lis) == 0:
|
if len(lis) == 0:
|
||||||
log.notice("%s does not currently exist" %(name))
|
log.notice("%s does not currently exist" %(name))
|
||||||
|
@ -471,11 +472,13 @@ def test_policy(obj_type, name, mntner):
|
||||||
status = 'FAIL'
|
status = 'FAIL'
|
||||||
for o in lis:
|
for o in lis:
|
||||||
for n in o:
|
for n in o:
|
||||||
|
log.debug(n)
|
||||||
|
log.debug(mntner)
|
||||||
if n[0] == "mnt-by" and n[1] == mntner:
|
if n[0] == "mnt-by" and n[1] == mntner:
|
||||||
status = 'PASS'
|
status = 'PASS'
|
||||||
log.error("%s does not have mnt for object" %(mntner))
|
|
||||||
return status
|
return status
|
||||||
|
|
||||||
|
log.error("%s does not have mnt for object" %(mntner))
|
||||||
return status
|
return status
|
||||||
|
|
||||||
elif args["type"] in ["inetnum","inet6num"]:
|
elif args["type"] in ["inetnum","inet6num"]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue