Property group

Registered by Kanagaraj Manickam

In heat resource plugins, properties are getting defined with validation schema and there is no group concept exist which is required for following reasons:

* some time, resource mandates to provide either PropertyA or PropertyB should be provided, and one of them is mandatory one for resource. This can't be defined now in heat, as developer can't set required=true for both the properties and as part of validate() method, developer should implement the logic whether one of these property is provided. Such a case occurs in many Resources. This can be over come by:

PropertyGroupA = {
required=true,
PropertyA= {},
PropertyB={},
validation: PropertyA OR PropertyB
}
Here 'validation' define binary operator among them. Like (A AND B) OR (A AND C) AND (B OR E).

PropertyGroup can have child PropertyGroup as well and 'validation' can operate on top of PropertyGroup.

* some of the Plugin supports multiple versions of its thing, for example, docker plugin supports multiple versions. so Some properties are only supported in some versions only. so PropertyGroup can be used with 'plugin_supported_since' as follows:

PropertyGroupA = {
PropertyA = {}
PropertyB ={}
client_plugin_supported_since = 1.2
}

Heat engine can infer that this set of properties in the PropertyGroups are supported only from 1.2 version. so it can check the current client_plugin_version and validate accordingly.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Medium
Drafter:
Kanagaraj Manickam
Direction:
Needs approval
Assignee:
None
Definition:
Pending Approval
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/heat-property-group,n,z

Addressed by: https://review.openstack.org/172386
    Property Group

Addressed by: https://review.openstack.org/333304
    Fix milestone and new ideas to properties group

Addressed by: https://review.openstack.org/337663
    Implement Properties Group

Addressed by: https://review.openstack.org/338211
    Add operators for properties group

Addressed by: https://review.openstack.org/340459
    Add properties groups schema for Resource

Addressed by: https://review.openstack.org/344439
    Add properties_groups_schema to resources

Addressed by: https://review.openstack.org/344923
    Add versions resolving to properties groups

Addressed by: https://review.openstack.org/367935
    [WIP] Test more lightweight properties group

Addressed by: https://review.openstack.org/369280
    [WIP] Add properties group to doc generator

Addressed by: https://review.openstack.org/369281
    [WIP] Add properties group schema to resources

Addressed by: https://review.openstack.org/392627
    Initial PropertiesGroup implementation

Addressed by: https://review.openstack.org/392628
    Add props dependencies builder for PropertiesGroup

Addressed by: https://review.openstack.org/392629
    Add properties groups to doc generator

Addressed by: https://review.openstack.org/392630
    Add properties_groups_schema to resource plugins

Addressed by: https://review.openstack.org/392631
    Add generic method to validate props relations

Addressed by: https://review.openstack.org/392632
    String representation of PropertiesGroup

Addressed by: https://review.openstack.org/392633
    Support PropertiesGroup validation in resources

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.