]> gitweb.fluxo.info Git - puppet-dhcp.git/commitdiff
capital letters are valid in mac addresses
authorRaphaël Pinson <raphael.pinson@camptocamp.com>
Fri, 12 Apr 2013 12:27:05 +0000 (14:27 +0200)
committerRaphaël Pinson <raphael.pinson@camptocamp.com>
Fri, 12 Apr 2013 12:27:05 +0000 (14:27 +0200)
spec/defines/dhcp_hosts_spec.rb
templates/host.conf.erb

index f5f44cae8524189a0dd065ee5826e0040b3c1350..8170ed5699f4677981b5fd16eee964ef64629934 100644 (file)
@@ -350,7 +350,7 @@ describe 'dhcp::hosts' do
           },
           'host2' => {
             'interfaces' => {
-              'eth1'  => '00:11:af:33:44:55',
+              'eth1'  => '00:11:AF:33:44:55',
             },
             'fixed_address' => 'foo.example.com',
             'options'        => ['opt1'],
@@ -363,7 +363,7 @@ describe 'dhcp::hosts' do
         :target  => '/etc/dhcp/hosts.d/1.2.3.4.conf').with_content(
         /host host1-eth0 \{\n  hardware ethernet 00:11:22:33:44:55;\n  fixed-address host1;\n\}/).with_content(
         /host host1-wlan0 \{\n  hardware ethernet 00:aa:bb:44:55:ff;\n  fixed-address host1;\n\}/).with_content(
-        /host host2-eth1 \{\n  hardware ethernet 00:11:af:33:44:55;\n  fixed-address foo\.example\.com;\n  opt1;\n\}/)
+        /host host2-eth1 \{\n  hardware ethernet 00:11:AF:33:44:55;\n  fixed-address foo\.example\.com;\n  opt1;\n\}/)
       }
     end
   end
index 1c690b465089dcfa8bbe30b98a2c57c88864b859..c483d6295f96a002f6a72e7687e73b3cef0ba4e8 100644 (file)
@@ -4,7 +4,7 @@
   data.fetch('interfaces').sort.each do |if_name, if_mac|
     scope.function_validate_re([if_name, '^\S+$'])
     scope.function_validate_string([if_mac])
-    scope.function_validate_re([if_mac, '^[a-f0-9:.]+$'])
+    scope.function_validate_re([if_mac, '^[A-Fa-f0-9:.]+$'])
  -%>
 host <%= host %>-<%= if_name %> {
   hardware ethernet <%= if_mac %>;