File: test_network_settings.py

package info (click to toggle)
python-hpilo 4.4.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,784 kB
  • sloc: python: 3,418; ruby: 467; makefile: 122; sh: 31
file content (21 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python

from utils import *

class NetworkTests(IloTestCase):
    def test_mod_network_settings(self, ilo):
        old = ilo.get_network_settings()
        try:
            ilo.mod_network_settings(ter_dns_server='10.1.1.1')
            self.reset_delay(ilo)
            new = ilo.get_network_settings()
            self.assertEquals(new['ter_dns_server'], '10.1.1.1')
        finally:
            ilo.mod_network_settings(ter_dns_server='' if old['ter_dns_server'] == '0.0.0.0' else old['ter_dns_server'])
            self.reset_delay(ilo)

    def test_ipv6_routes(self, ilo):
        self.require_ilo(ilo, 'ilo3:1.50', 'ilo4:1.20')

if __name__ == '__main__':
    unittest.main()