Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- ##----------------------------------------------------------------------
- ## MikroTik.RouterOS.add_vlan
- ##----------------------------------------------------------------------
- ## Copyright (C) 2007-2013 The NOC Project
- ## See LICENSE for details
- ##----------------------------------------------------------------------
- ## NOC modules
- from __future__ import with_statement
- from noc.sa.script import Script as NOCScript
- from noc.sa.interfaces import IAddVlan
- class Script(NOCScript):
- name = "MikroTik.RouterOS.add_vlan"
- implements = [IAddVlan]
- def execute(self, vlan_id, name, tagged_ports):
- with self.configure():
- self.cli("/interface/vlan/add %d %s" % (vlan_id, name))
- self.cli("exit")
- self.save_config()
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement