Skip to content

Commit

Permalink
fixed some ddl issues and added the transfer-quota to the seed data
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Aug 17, 2015
1 parent 2ca000d commit 49a514a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
@@ -0,0 +1,22 @@
POST /policyDefs ${apiman.suite.api-username}/${apiman.suite.api-password}
Content-Type: application/json

{
"name" : "Transfer Quota Policy",
"description" : "Provides a way to limit the total number of bytes that can be transferred from (or to) an API.",
"policyImpl" : "class:io.apiman.gateway.engine.policies.TransferQuotaPolicy",
"icon" : "download",
"templates" : [
{
"language" : null,
"template" : "Consumers are limited to transferring @{limit} bytes per per @{granularity} per @{period}."
}
]
}
----
200
Content-Type: application/json

{
"id" : "TransferQuotaPolicy"
}
Expand Up @@ -19,6 +19,7 @@
<test name="Create Authorization Policy Def">data/policyDefs/005_authorization-policydef.resttest</test>
<test name="Create Quota Policy Def">data/policyDefs/006_quota-policydef.resttest</test>
<test name="Create Caching Policy Def">data/policyDefs/007_caching-policydef.resttest</test>
<test name="Create Transfer Quota Policy Def">data/policyDefs/008_transfer-quota-policydef.resttest</test>
</testGroup>

<!-- Gateways -->
Expand Down
Expand Up @@ -96,7 +96,7 @@ INSERT INTO pd_templates (policydef_id, language, template) VALUES ('TransferQuo

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('IgnoredResourcesPolicy', NULL, 'Requests matching any of the @{pathsToIgnore.size()} regular expressions provided will receive a 404 error code.');

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('URLRewritingPolicy', NULL, "Responses will be modified by finding all text matching regular expression '@{fromRegex}' with '@{toReplacement}'.");
INSERT INTO pd_templates (policydef_id, language, template) VALUES ('URLRewritingPolicy', NULL, 'Responses will be modified by finding all text matching regular expression ''@{fromRegex}'' with ''@{toReplacement}''.');

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('CachingPolicy', NULL, 'API responses will be cached for @{ttl} seconds.');

Expand Down
Expand Up @@ -94,7 +94,7 @@ INSERT INTO pd_templates (policydef_id, language, template) VALUES ('TransferQuo

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('IgnoredResourcesPolicy', NULL, 'Requests matching any of the @{pathsToIgnore.size()} regular expressions provided will receive a 404 error code.');

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('URLRewritingPolicy', NULL, "Responses will be modified by finding all text matching regular expression '@{fromRegex}' with '@{toReplacement}'.");
INSERT INTO pd_templates (policydef_id, language, template) VALUES ('URLRewritingPolicy', NULL, 'Responses will be modified by finding all text matching regular expression ''@{fromRegex}'' with ''@{toReplacement}''.');

INSERT INTO pd_templates (policydef_id, language, template) VALUES ('CachingPolicy', NULL, 'API responses will be cached for @{ttl} seconds.');

Expand Down Expand Up @@ -158,6 +158,8 @@ INSERT INTO policydefs (id, description, form, form_type, icon, name, plugin_id,

INSERT INTO policydefs (id, description, form, form_type, icon, name, plugin_id, policy_impl) VALUES ('IgnoredResourcesPolicy', 'Requests satisfying the provided regular expression will be ignored.', NULL, 'Default', 'eye-slash', 'Ignored Resources Policy', NULL, 'class:io.apiman.gateway.engine.policies.IgnoredResourcesPolicy');

INSERT INTO policydefs (id, description, form, form_type, icon, name, plugin_id, policy_impl) VALUES ('URLRewritingPolicy', 'Responses from the back-end API will be modified by fixing up any incorrect URLs found with modified ones. This is useful because apiman works through an API Gateway.', NULL, 'Default', 'pencil-square', 'URL Rewriting Policy', NULL, 'class:io.apiman.gateway.engine.policies.URLRewritingPolicy');

INSERT INTO policydefs (id, description, form, form_type, icon, name, plugin_id, policy_impl) VALUES ('CachingPolicy', 'Allows caching of API responses in the Gateway to reduce overall traffic to the back-end API.', NULL, 'Default', 'hdd-o', 'Cachine Policy', NULL, 'class:io.apiman.gateway.engine.policies.CachingPolicy');

INSERT INTO policydefs (id, description, form, form_type, icon, name, plugin_id, policy_impl) VALUES ('AuthorizationPolicy', 'Enables fine grained authorization to API resources based on authenticated user roles.', NULL, 'Default', 'users', 'Authorization Policy', NULL, 'class:io.apiman.gateway.engine.policies.AuthorizationPolicy');
Expand Down

0 comments on commit 49a514a

Please sign in to comment.