Merge "Add firewall-policy insert_rule/remove_rule"

This commit is contained in:
Jenkins 2016-02-15 22:51:12 +00:00 committed by Gerrit Code Review
commit ed11113c62
2 changed files with 183 additions and 64 deletions

View File

@ -8877,6 +8877,28 @@
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallPolicyInsertBeforeParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="false" name="insert_before" style="plain" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID of the firewall_rule. A new firewall_rule
will be inserted before this firewall_rule.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallPolicyInsertAfterParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="false" name="insert_after" style="plain" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID of the firewall_rule. A new firewall_rule
will be inserted after this firewall_rule.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallPolicyResponseParameters '
&firewall_policy-auditedResponseParameter;
&firewall_policy-descriptionResponseParameter;
@ -8886,92 +8908,93 @@
&firewall_policy-sharedResponseParameter;
&firewall_policy-tenant_idResponseParameter;'>
<!ENTITY firewall_policy-auditedResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="audited" style="plain" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
Indicates whether the policy has been audited.
</para>
<para>
Each time that the firewall policy or its associated rules are changed,
the API sets this attribute to <code>False</code>. To audit the policy,
the policy owner must explicitly update the policy to set this attribute
to <code>True</code>.
</para>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
Indicates whether the policy has been audited.
</para>
<para>
Each time that the firewall policy or its associated rules are
changed, the API sets this attribute to <code>False</code>. To
audit the policy, the policy owner must explicitly update the
policy to set this attribute to <code>True</code>.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-descriptionResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="description" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>
The human-readable description for the firewall policy.
</para>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The human-readable description for the firewall policy.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-firewall_listResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="firewall_list" style="plain" type="xsd:list">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
A list of the UUIDs for firewall associated with the
firewall policy.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-firewall_rulesResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
name="firewall_policy_id" style="plain" type="xsd:list">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>
A list of rules that are associated with the firewall policy.
</para>
</wadl:doc>
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="firewall_rules" style="plain" type="xsd:list">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
A list of the UUIDs for firewall rule associated with the
firewall policy.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-idResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="id" style="plain" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>
The UUID for the firewall policy.
</para>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID for the firewall policy.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-nameResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="name" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>
Human-readable name for the firewall policy. Does not have to be unique.
</para>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
Human-readable name for the firewall policy.
Does not have to be unique.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-sharedResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="shared" style="plain" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
Indicates whether the firewall policy is shared across all tenants.
<para>
Indicates whether the firewall policy is shared across all tenants.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewall_policy-tenant_idResponseParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true"
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="tenant_id" style="plain" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>
The owner of the firewall policy.
</para>
</wadl:doc>
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID of the tenant who owns the firewall policy.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallPolicyRequestParameters '
&firewall_policy-auditedRequestParameter;
@ -9070,6 +9093,16 @@
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallRuleIdParameter '
<param xmlns="http://wadl.dev.java.net/2009/02"
required="true" name="firewall_rule_id" style="plain" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID of the firewall rule.
</para>
</wadl:doc>
</param>'>
<!ENTITY firewallRulesRequestParameters '
&firewall_rule-tenant_idRequestParameter;
&firewall_rule-nameRequestParameter;

View File

@ -44,6 +44,12 @@
<method href="#showFirewallPolicy"/>
<method href="#updateFirewallPolicy"/>
<method href="#deleteFirewallPolicy"/>
<resource path="insert_rule" id="insert_rule">
<method href="#insert_ruleFirewallPolicy"/>
</resource>
<resource path="remove_rule" id="remove_rule">
<method href="#remove_ruleFirewallPolicy"/>
</resource>
</resource>
</resource>
<resource id="firewall_rules" path="firewall_rules">
@ -288,6 +294,86 @@
<!-- &fault401; -->
<!-- &fault404; -->
</method>
<method name="PUT" id="insert_ruleFirewallPolicy">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Insert rule into a firewall policy">
<para role="shortdesc">
Insert firewall rule into a policy.
</para>
<para>
A firewall_rule_id is inserted relative to the position of the
firewall_rule_id set in <code>insert_before</code> or
<code>insert_after</code>. If <code>insert_before</code> is set,
<code>insert_after</code> is ignored. If both
<code>insert_before</code> and <code>insert_after</code> are not
set, the new firewall_rule_id is inserted at the top of the
policy.
</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<xsdxt:code href="../samples/firewalls/firewall-policy-insert-rule-request.json"/>
</wadl:doc>
&firewallRuleIdParameter;
&firewallPolicyInsertBeforeParameter;
&firewallPolicyInsertAfterParameter;
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<xsdxt:code href="../samples/firewalls/firewall-policy-insert-rule-response.json"/>
</wadl:doc>
&firewall_policy-auditedResponseParameter;
&firewall_policy-descriptionResponseParameter;
&firewall_policy-firewall_listResponseParameter;
&firewall_policy-firewall_rulesResponseParameter;
&firewall_policy-idResponseParameter;
&firewall_policy-nameResponseParameter;
&firewall_policy-sharedResponseParameter;
&firewall_policy-tenant_idResponseParameter;
</representation>
</response>
&fault400;
&fault401;
&fault404;
&fault409;
</method>
<method name="PUT" id="remove_ruleFirewallPolicy">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Remove rule from firewall policy">
<para role="shortdesc">
Remove firewall rule from a policy.
</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<xsdxt:code href="../samples/firewalls/firewall-policy-remove-rule-request.json"/>
</wadl:doc>
&firewallRuleIdParameter;
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<xsdxt:code href="../samples/firewalls/firewall-policy-remove-rule-response.json"/>
</wadl:doc>
&firewall_policy-auditedResponseParameter;
&firewall_policy-descriptionResponseParameter;
&firewall_policy-firewall_listResponseParameter;
&firewall_policy-firewall_rulesResponseParameter;
&firewall_policy-idResponseParameter;
&firewall_policy-nameResponseParameter;
&firewall_policy-sharedResponseParameter;
&firewall_policy-tenant_idResponseParameter;
</representation>
</response>
&fault400;
&fault401;
&fault404;
</method>
<method name="DELETE" id="deleteFirewallPolicy">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="Delete firewall policy">
<para role="shortdesc">