pvl/hosts/tests.py
changeset 503 a56456f901e8
parent 502 ac4e0f2df80c
child 504 ee0a3dcacb95
equal deleted inserted replaced
502:ac4e0f2df80c 503:a56456f901e8
    59                 ('bar@test', dict(
    59                 ('bar@test', dict(
    60                     ip          = ipaddr.IPAddress('127.0.0.2'),
    60                     ip          = ipaddr.IPAddress('127.0.0.2'),
    61                     ethernet    = {None: '01:23:45:67:89:ab'},
    61                     ethernet    = {None: '01:23:45:67:89:ab'},
    62                 )),
    62                 )),
    63         ])
    63         ])
    64 
    64     
    65     def testApplyHostsExpand(self):
    65     def testApplyHostFqdn(self):
       
    66         self.assertHostsEqual(config.apply_host_config(self.options, 'test', 'asdf@foo.test'), [
       
    67                 ('asdf@foo.test', dict()),
       
    68         ])
       
    69 
       
    70         self.assertHostsEqual(config.apply_host_config(self.options, 'test', 'asdf.test2'), [
       
    71                 ('asdf.test2@', dict()),
       
    72         ])
       
    73 
       
    74     def testApplyHostExpand(self):
    66         self.assertHostsEqual(config.apply_host_config(self.options, 'asdf', 'asdf{1-3}', ip='10.100.100.$'), [
    75         self.assertHostsEqual(config.apply_host_config(self.options, 'asdf', 'asdf{1-3}', ip='10.100.100.$'), [
    67                 ('asdf1@asdf', dict(ip=ipaddr.IPAddress('10.100.100.1'))),
    76                 ('asdf1@asdf', dict(ip=ipaddr.IPAddress('10.100.100.1'))),
    68                 ('asdf2@asdf', dict(ip=ipaddr.IPAddress('10.100.100.2'))),
    77                 ('asdf2@asdf', dict(ip=ipaddr.IPAddress('10.100.100.2'))),
    69                 ('asdf3@asdf', dict(ip=ipaddr.IPAddress('10.100.100.3'))),
    78                 ('asdf3@asdf', dict(ip=ipaddr.IPAddress('10.100.100.3'))),
    70         ])
    79         ])