pvl.hosts.dhcp: subclass class name is a String
authorTero Marttila <tero.marttila@aalto.fi>
Mon, 02 Mar 2015 19:58:35 +0200
changeset 700 88b0d3df1ad7
parent 699 d34567c1b21a
child 701 8ddc141af313
pvl.hosts.dhcp: subclass class name is a String
pvl/hosts/dhcp.py
pvl/hosts/tests.py
--- a/pvl/hosts/dhcp.py	Mon Mar 02 19:58:12 2015 +0200
+++ b/pvl/hosts/dhcp.py	Mon Mar 02 19:58:35 2015 +0200
@@ -7,10 +7,10 @@
     """
     
     # hardware-type prefixed hardware-address
-    hardware = pvl.dhcp.config.Field('1:' + ethernet)
+    hardware = '1:' + ethernet
 
     return pvl.dhcp.config.Block(None, [
-        ('subclass', subclass, hardware),
+        ('subclass', pvl.dhcp.config.String(subclass), pvl.dhcp.config.Field(hardware)),
     ])
 
 class HostDHCPError(pvl.hosts.host.HostError):
--- a/pvl/hosts/tests.py	Mon Mar 02 19:58:12 2015 +0200
+++ b/pvl/hosts/tests.py	Mon Mar 02 19:58:35 2015 +0200
@@ -813,7 +813,7 @@
                 ('hardware', 'ethernet', '00:11:22:33:44:55'),
             ], []),
             (None, [
-                ('subclass', 'debian', '1:00:11:22:33:44:55'),
+                ('subclass', '"debian"', '1:00:11:22:33:44:55'),
             ], []),
         ])