equal
deleted
inserted
replaced
797 ('fixed-address', '192.0.2.1'), |
797 ('fixed-address', '192.0.2.1'), |
798 ('hardware', 'ethernet', '01:23:45:67:89:ab'), |
798 ('hardware', 'ethernet', '01:23:45:67:89:ab'), |
799 ], []), |
799 ], []), |
800 ]) |
800 ]) |
801 |
801 |
|
802 def testHostSubclass(self): |
|
803 hosts = [Host.build('foo', 'test', |
|
804 ethernet = '00:11:22:33:44:55', |
|
805 extensions = dict(dhcp=dict( |
|
806 subclass = 'debian', |
|
807 )), |
|
808 )] |
|
809 |
|
810 self.assertBlocksEqual(list(dhcp.dhcp_hosts(hosts)), [ |
|
811 (('host', 'foo'), [ |
|
812 ('option', 'host-name', "foo"), |
|
813 ('hardware', 'ethernet', '00:11:22:33:44:55'), |
|
814 ], []), |
|
815 (None, [ |
|
816 ('subclass', 'debian', '1:00:11:22:33:44:55'), |
|
817 ], []), |
|
818 ]) |
802 |
819 |
803 if __name__ == '__main__': |
820 if __name__ == '__main__': |
804 unittest.main() |
821 unittest.main() |