Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. @pyrule
  2. def clean_config(managed_object,config):
  3. cfg = []
  4. for c in config.split("\n"):
  5. if c.startswith("! Last configuration change"):
  6. continue
  7. elif c.startswith("! NVRAM config last updated"):
  8. continue
  9. elif c.startswith("! No configuration change since last restart"):
  10. continue
  11. elif c.startswith("ntp clock-period"):
  12. continue
  13. else:
  14. cfg += [c]
  15. return "\n".join(cfg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement