Skip to content

Get rid of type *property* defaults and use of Puppet::Property::Boolean #240

@alexjfisher

Description

@alexjfisher

trevor.viljoen reported this issue on slack

Any idea why the puppet-network module would inadvertently set boot protocol to dhcp when it was
set to static and the only property we wanted to change with the network_config type was mtu? The
resource declaration looks like this:

network_config { "${network_interfaces}":
  mtu => 8900,
}

The problem is that we use defaults for properties. Defaults are ok for parameters, but not so much for properties. Sometimes a default is needed for resource creation, but this code can go in the provider create method instead.

Worse still are the properties that default to true and use Puppet::Property::Boolean. Puppet::Property::Boolean is completely broken. If you try and set any of those properties to false, nothing will happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions