Guest User

Untitled

a guest
Aug 31st, 2015
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data