Commit
fad36b2ed0152578dc5374731fda27b86b720840
by timothyjwardAllow default resource metadata to be set in the model
Provider instances have the ability to independently set metadata values, however in most cases metadata is common to all instances of a model and it is relatively static. It therefore makes sense to be able to define default metadata at the resource model level which is applied to the instance when it is first created.
Note that only the Extra metadata is used to populate the defaults. This prevents other data about the resource (e.g. the resource type and value type) from being added and bloating the metadata. To differentiate default metadata values from metadata values which are set later the default metadata values will have no associated timestamp. This is in line with the behaviour for default resource values.
Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: fad36b2)