Skip to content

Commit

Permalink
Update security draft mode model
Browse files Browse the repository at this point in the history
Replace the boolean property 'pending_update' of a security resource
by an enum property to specified if it's a draft resource creation,
modification or deletion. If not set that means it's not a draft
security resource.

Change-Id: I8050c97f23cc74600ee659614d9f02a0e9a17561
Partial-Bug: #1742774
  • Loading branch information
Édouard Thuleau committed Mar 20, 2018
1 parent c62d3a2 commit f7b0caa
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions schema/firewall_policy.xsd
Expand Up @@ -55,18 +55,28 @@
description_2="modifications applied on scoped security resources will not "
description_3="be enforced until they are intentionally committed."/>

<xsd:element name='pending-delete' type='xsd:boolean' default='false'
description_1="When this knob is enabled, the security resource was "
description_2="deleted, but will continue to be enforced until the policy "
description_3="change is committed."/>
<xsd:simpleType name="DraftModeState">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="created" required="optional"
description="Created draft security resource"/>
<xsd:enumeration value="updated" required="optional"
description="Updated draft security resource"/>
<xsd:enumeration value="deleted" required="optional"
description="Deleted draft security resource"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="draft-mode-state" type="DraftModeState"
description_1="When this knob is set on a security resource, it mean that "
description_2="resource is in draft mode and also permits to determine if "
description_3="pending to be created, updated or deleted."/>

<xsd:element name="service-group" type="ifmap:IdentityType"/>
<xsd:element name="service-group-firewall-service-list" type="FirewallServiceGroupType"/>
<!--#IFMAP-SEMANTICS-IDL
ListProperty('service-group-firewall-service-list', 'service-group', 'required', 'CRUD',
'list of service objects (protocol, source port and destination port') -->
<!--#IFMAP-SEMANTICS-IDL
Property('pending-delete', 'service-group', 'optional', 'R') -->
Property('draft-mode-state', 'service-group', 'optional', 'R') -->

<!-- Address group associated label to be derived from linked tag object -->
<xsd:element name="address-group" type="ifmap:IdentityType"/>
Expand All @@ -75,7 +85,7 @@
ListProperty('address-group-prefix', 'address-group', 'optional', 'CRUD',
description='List of IP prefix') -->
<!--#IFMAP-SEMANTICS-IDL
Property('pending-delete', 'address-group', 'optional', 'R') -->
Property('draft-mode-state', 'address-group', 'optional', 'R') -->

<xsd:element name="firewall-rule" type="ifmap:IdentityType"/>
<xsd:element name="action-list" type="ActionListType"/>
Expand Down Expand Up @@ -126,7 +136,7 @@
'firewall-rule', 'address-group', ['ref'], 'optional', 'R',
'Reference to address group attached to endpoints') -->
<!--#IFMAP-SEMANTICS-IDL
Property('pending-delete', 'firewall-rule', 'optional', 'R',) -->
Property('draft-mode-state', 'firewall-rule', 'optional', 'R',) -->

<xsd:complexType name="FirewallSequence">
<xsd:all>
Expand All @@ -141,7 +151,7 @@
'firewall-policy', 'firewall-rule', ['ref'], 'optional', 'CRUD',
'Reference to firewall-rule attached to this firewall-policy') -->
<!--#IFMAP-SEMANTICS-IDL
Property('pending-delete', 'firewall-policy', 'optional', 'R',) -->
Property('draft-mode-state', 'firewall-policy', 'optional', 'R',) -->

<xsd:element name="application-policy-set" type="ifmap:IdentityType"/>
<xsd:element name="application-policy-set-firewall-policy" type="FirewallSequence"/>
Expand All @@ -154,7 +164,7 @@
Property('all-applications', 'application-policy-set', 'optional', 'R',
'If set, indicates application policy set to be applied to all application tags') -->
<!--#IFMAP-SEMANTICS-IDL
Property('pending-delete', 'application-policy-set', 'optional', 'R',) -->
Property('draft-mode-state', 'application-policy-set', 'optional', 'R',) -->

<xsd:element name="policy-management" type="ifmap:IdentityType"/>
<xsd:element name="config-root-policy-management"/>
Expand Down

0 comments on commit f7b0caa

Please sign in to comment.