# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## f5.BIGIP.get_vlans test
## Auto-generated by manage.py debug-script at 2011-01-31 14:18:53
##----------------------------------------------------------------------
## Copyright (C) 2007-2011 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
from noc.lib.test import ScriptTestCase
class f5_BIGIP_get_vlans_Test(ScriptTestCase):
    script="f5.BIGIP.get_vlans"
    vendor="f5"
    platform='BIG-IP'
    version='10.2.0 1707.0'
    input={}
    result=[{'name': 'VLAN012', 'vlan_id': 501},
            {'name': 'VLAN013_at_DC003', 'vlan_id': 503},
            {'name': 'internal', 'vlan_id': 23}]
    motd=' \nLast login: Mon Jan 31 14:18:30 2011 from 10.33.12.61\n'
    cli={
## 'vlan show'
'b vlan show': """vlan show

VLAN VLAN012   tag 501   00:01:D7:83:7F:05   MTU 1500
+-> VLAN MEMBER VLAN012/e0001trunk   tagged
    +-> TRUNK e0001trunk(Id: 4)   00:01:D7:83:7B:E0   LACP ACTIVE   members: 2 (2 working)
        |     (pkts,bits,errs) in = (267.9G, 1.473P, 0), out = (266.9G, 1.513P, 0)
        |     (drop,mcast) in = (4.388M, 18.23M), out = (466, 27.01M)    coll = 0
        +-> INTERFACE 1/1.1   00:01:D7:83:7A:15   ENABLED   up   MTU 1500
        |   |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
        |   |     flow control tx rx (tx rx)
        |   |     (pkts,bits,errs) in = (134.1G, 737.3T, 0), out = (133.5G, 756.7T, 0)
        |   |     (drop,mcast) in = (4.041M, 17.54M), out = (261, 10.81M)    coll = 0
        +-> INTERFACE 1/1.2   00:01:D7:83:7A:16   ENABLED   up   MTU 1500
            |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
            |     flow control tx rx (tx rx)
            |     (pkts,bits,errs) in = (133.8G, 736.6T, 0), out = (133.3G, 756.8T, 0)
            |     (drop,mcast) in = (346376, 698439), out = (205, 16.20M)    col
VLAN VLAN013_at_DC003 (VLAN013_at_DC~1)   tag 503   00:01:D7:83:7A:01   MTU 1500
+-> VLAN MEMBER VLAN013_at_DC003/e0001trunk   tagged
    +-> TRUNK e0001trunk(Id: 4)   00:01:D7:83:7B:E0   LACP ACTIVE   members: 2 (2 working)
        |     (pkts,bits,errs) in = (267.9G, 1.473P, 0), out = (266.9G, 1.513P, 0)
        |     (drop,mcast) in = (4.388M, 18.23M), out = (466, 27.01M)    coll = 0
        +-> INTERFACE 1/1.1   00:01:D7:83:7A:15   ENABLED   up   MTU 1500
        |   |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
        |   |     flow control tx rx (tx rx)
        |   |     (pkts,bits,errs) in = (134.1G, 737.3T, 0), out = (133.5G, 756.7T, 0)
        |   |     (drop,mcast) in = (4.041M, 17.54M), out = (261, 10.81M)    coll = 0
        +-> INTERFACE 1/1.2   00:01:D7:83:7A:16   ENABLED   up   MTU 1500
            |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
            |     flow control tx rx (tx rx)
            |     (pkts,bits,errs) in = (133.8G, 736.6T, 0), out = (133.3G, 756.8T, 0)
            |     (drop,mcast) in = (346376, 698439), out = (205, 16.20M)    coll = 0
VLAN internal   tag 23   00:01:D7:83:7A:04   MTU 1500
+-> VLAN MEMBER internal/e0001trunk   tagged
    +-> TRUNK e0001trunk(Id: 4)   00:01:D7:83:7B:E0   LACP ACTIVE   members: 2 (2 working)
        |     (pkts,bits,errs) in = (267.9G, 1.473P, 0), out = (266.9G, 1.513P, 0)
        |     (drop,mcast) in = (4.388M, 18.23M), out = (466, 27.01M)    coll = 0
        +-> INTERFACE 1/1.1   00:01:D7:83:7A:15   ENABLED   up   MTU 1500
        |   |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
        |   |     flow control tx rx (tx rx)
        |   |     (pkts,bits,errs) in = (134.1G, 737.3T, 0), out = (133.5G, 756.7T, 0)
        |   |     (drop,mcast) in = (4.041M, 17.54M), out = (261, 10.81M)    coll = 0
        +-> INTERFACE 1/1.2   00:01:D7:83:7A:16   ENABLED   up   MTU 1500
            |     media auto (10GbaseSR full)   trunk: e0001trunk   aggregation: attached
            |     flow control tx rx (tx rx)
            |     (pkts,bits,errs) in = (133.8G, 736.6T, 0), out = (133.3G, 756.8T, 0)
            |     (drop,mcast) in = (346376, 698439), out = (205, 16.20M)    coll = 0

""",
}
    snmp_get={}
    snmp_getnext={}
