components/ruby/puppet/files/solaris/lib/puppet/provider/address_object/solaris.rb
changeset 5093 b3ada587e28f
parent 2081 1f1144fb0e4e
equal deleted inserted replaced
5092:07224041d798 5093:b3ada587e28f
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
    26 Puppet::Type.type(:address_object).provide(:address_object) do
    26 Puppet::Type.type(:address_object).provide(:address_object) do
    27     desc "Provider for creating Oracle Solaris address objects"
    27     desc "Provider for creating Oracle Solaris address objects"
    28     confine :operatingsystem => [:solaris]
    28     confine :operatingsystem => [:solaris]
    38             type = type.gsub(/\-/, "_")
    38             type = type.gsub(/\-/, "_")
    39 
    39 
    40             # look to see if this is a point-to-point address object
    40             # look to see if this is a point-to-point address object
    41             if addr.include?("->")
    41             if addr.include?("->")
    42                 local, remote = addr.split("->")
    42                 local, remote = addr.split("->")
    43                 local = locale.delete("\\")
    43                 local = local.delete("\\")
    44                 remote = remote.delete("\\")
    44                 remote = remote.delete("\\")
    45             elsif type.downcase == "dhcp" and addr == "?"
    45             elsif type.downcase == "dhcp" and addr == "?"
    46                 local = nil
    46                 local = nil
    47                 remote = nil
    47                 remote = nil
    48             else
    48             else