File: test_get_supported_devices.py

package info (click to toggle)
python-ncclient 0.6.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,448 kB
  • sloc: python: 9,548; xml: 476; makefile: 77; sh: 5
file content (37 lines) | stat: -rw-r--r-- 2,194 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import unittest
from ncclient import devices

class  TestGetSupportedDevices(unittest.TestCase):

    def test_get_supported_devices(self):
        supported_devices = devices.get_supported_devices()
        self.assertEqual(sorted(supported_devices), sorted(('junos',
                                                            'csr',
                                                            'ciena',
                                                            'nexus',
                                                            'iosxr',
                                                            'iosxe',
                                                            'huawei',
                                                            'huaweiyang',
                                                            'alu',
                                                            'h3c',
                                                            'hpcomware',
                                                            'sros',
                                                            'default')))

    def test_get_supported_device_labels(self):
        supported_device_labels = devices.get_supported_device_labels()
        self.assertEqual(supported_device_labels, {'junos':'Juniper',
                                                   'csr':'Cisco CSR1000v',
                                                   'ciena': 'Ciena',
                                                   'nexus':'Cisco Nexus',
                                                   'iosxr':'Cisco IOS XR',
                                                   'iosxe':'Cisco IOS XE',
                                                   'huawei':'Huawei',
                                                   'huaweiyang':'Huawei',
                                                   'alu':'Alcatel Lucent',
                                                   'h3c':'H3C',
                                                   'hpcomware':'HP Comware',
                                                   'sros':'Nokia SR OS',
                                                   'default':'Server or anything not in above'})