Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @pyrule
- def clean_config(managed_object,config):
- cfg = []
- for c in config.split("\n"):
- if c.startswith("! Last configuration change"):
- continue
- elif c.startswith("! NVRAM config last updated"):
- continue
- elif c.startswith("! No configuration change since last restart"):
- continue
- elif c.startswith("ntp clock-period"):
- continue
- else:
- cfg += [c]
- return "\n".join(cfg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement