mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
lf_cleanup.py : pep8 cleanup
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -177,19 +177,20 @@ class lf_clean(Realm):
|
||||
self.sta_done = True
|
||||
return still_looking_sta
|
||||
|
||||
|
||||
'''
|
||||
1: delete cx
|
||||
2: delete endp
|
||||
3: delete sta
|
||||
when deleting sta first, you will end up with phantom CX
|
||||
'''
|
||||
|
||||
def cleanup(self):
|
||||
if self.clean_cxs:
|
||||
# also clean the endp when cleaning cxs
|
||||
still_looking_cxs = self.cxs_clean()
|
||||
still_looking_endp = self.endp_clean()
|
||||
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(looking_cxs=still_looking_cxs,looking_endp=still_looking_endp))
|
||||
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(
|
||||
looking_cxs=still_looking_cxs, looking_endp=still_looking_endp))
|
||||
if self.clean_endp and not self.clean_cxs:
|
||||
still_looking_endp = self.endp_clean()
|
||||
print("clean_endp: still_looking_endp {looking_endp}".format(looking_endp=still_looking_endp))
|
||||
@@ -198,6 +199,7 @@ class lf_clean(Realm):
|
||||
still_looking_sta = self.sta_clean()
|
||||
print("clean_sta: still_looking_sta {looking_sta}".format(looking_sta=still_looking_sta))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
@@ -239,8 +241,8 @@ python3 ./lf_clean.py --mgr MGR
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.cxs or args.endp or args.sta:
|
||||
clean = lf_clean(host=args.mgr,clean_cxs=args.cxs,clean_endp=args.endp,clean_sta=args.sta )
|
||||
print("cleaning cxs: {cxs} endpoints: {endp} stations: {sta} start".format(cxs=args.cxs,endp=args.endp,sta=args.sta))
|
||||
clean = lf_clean(host=args.mgr, clean_cxs=args.cxs, clean_endp=args.endp, clean_sta=args.sta)
|
||||
print("cleaning cxs: {cxs} endpoints: {endp} stations: {sta} start".format(cxs=args.cxs, endp=args.endp, sta=args.sta))
|
||||
if args.cxs:
|
||||
print("cleaning cxs will also clean endp")
|
||||
clean.cxs_clean()
|
||||
@@ -255,5 +257,6 @@ python3 ./lf_clean.py --mgr MGR
|
||||
else:
|
||||
print("please add option of --cxs ,--endp, or --sta to clean")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user