[PUP-7852] Simplify definition and override of constants in Object Created: 2017/08/20 Updated: 2017/12/11 Resolved: 2017/09/05
|Fix Version/s:||PUP 5.2.0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Epic Link:||Plan language/executor|
|Release Notes:||Not Needed|
|Release Notes Summary:||Part of a larger feature (Pcore) that has not yet been officially released|
|QA Risk Assessment:||No Action|
Before this, a constant in an Object required a full specification of an attribute setting kind to constant, and then specifying both value and type. This is in almost all cases excessive and makes simple definition of objects long.
To make constants easier to define - it should be possible to specify constants with just name and value and let the data type of the value determine the constant's data type.
is equivalent to the long form:
The two forms are interchangeable.
The inferred data type for the constant is made generic to the base data type. If a more restricted data type is wanted, the long form must be used. When overriding a constant with the same name in a parent type, the constant must be of a compliant type. When using the short form to override, the resulting data type is inherited from the base type. If a narrowing of the type is wanted when overriding the long form must be used.
|Comment by Henrik Lindberg [ 2017/08/21 ]|
|Comment by Kenn Hussey [ 2017/08/24 ]|
Henrik Lindberg did this make it through CI yet?
|Comment by Kenn Hussey [ 2017/08/31 ]|
John Duarte might you be able to help determine whether these changes have cleared CI?
|Comment by John Duarte [ 2017/08/31 ]|
This has passed the puppet-agent CI pipeline using puppet-agent at SHA a8c304273fab6ff37629c177bdd5c3433ef496cc containing puppet at SHA 8a6d5192a9365b6f712bddcd1671f219217a19aa
|Comment by Henrik Lindberg [ 2017/12/11 ]|
In Puppet 5.4.0 there are commits mentioning this ticket, but they are really for