ApmeM

al6850_remove_vlan

Jun 11th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. ##----------------------------------------------------------------------
  3. ## Alcatel.AOS.remove_vlan
  4. ##----------------------------------------------------------------------
  5. ## Copyright (C) 2007-2009 The NOC Project
  6. ## See LICENSE for details
  7. ##----------------------------------------------------------------------
  8. """
  9. """
  10. from __future__ import with_statement
  11. import noc.sa.script
  12. from noc.sa.interfaces import IRemoveVlan
  13.  
  14.  
  15. class Script(noc.sa.script.Script):
  16. name = "Alcatel.AOS.remove_vlan"
  17. implements = [IRemoveVlan]
  18.  
  19. def execute(self, vlan_id):
  20. if not self.scripts.has_vlan(vlan_id=vlan_id):
  21. return False
  22. with self.configure():
  23. self.cli("no vlan %d" % vlan_id)
  24. # self.save_config()
  25. return True
Advertisement
Add Comment
Please, Sign In to add comment