summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorHenry.Sun <henry.a.sun@est.tech>2019-07-22 08:32:32 +0000
committerHenry.Sun <henry.a.sun@est.tech>2019-07-22 08:32:32 +0000
commit2941bc01126ce898a01733ab6d66ff3cbe63a009 (patch)
treec75e241f9a63a3175f90b64ea173f80fd0b41253 /docs
parent8bc537da0e74db9f686f11405a03a4583fbc383c (diff)
add document for POLICY-1742
Issue-ID: POLICY-1886 Change-Id: I491e9d34868c2dda1c4ed8b354317151590e5a8b Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
Diffstat (limited to 'docs')
-rw-r--r--docs/apex/APEX-User-Manual.rst54
1 files changed, 38 insertions, 16 deletions
diff --git a/docs/apex/APEX-User-Manual.rst b/docs/apex/APEX-User-Manual.rst
index e4a0d68b..3e9379d0 100644
--- a/docs/apex/APEX-User-Manual.rst
+++ b/docs/apex/APEX-User-Manual.rst
@@ -2812,6 +2812,13 @@ REST Client Input
by the server configured via the URL. For instance,
the server could support a wait timeout via the URL as
``?timeout=100ms``.
+ The httpCodeFilter is used for filtering the status
+ code, and it can be configured as a regular expression
+ string. The default httpCodeFilter is "[2][0-9][0-9]"
+ - for successful response codes.
+ The response with HTTP status code that matches the
+ given regular expression is forwarded to the task,
+ otherwise it is logged as a failure.
.. container:: listingblock
@@ -2825,16 +2832,19 @@ REST Client Input
"org.onap.policy.apex.plugins.event.carrier.restclient.RESTClientCarrierTechnologyParameters",
"parameters" : {
"url" : "http://example.org:8080/triggers/events", (2)
+ "httpCodeFilter" : "[2][0-9][0-9]" (3)
}
}
.. container:: colist arabic
- +-------+---------------------------------------+
- | **1** | set REST client as carrier technology |
- +-------+---------------------------------------+
- | **2** | the URL of the HTTP server for events |
- +-------+---------------------------------------+
+ +-------+--------------------------------------------------+
+ | **1** | set REST client as carrier technology |
+ +-------+--------------------------------------------------+
+ | **2** | the URL of the HTTP server for events |
+ +-------+--------------------------------------------------+
+ | **3** | use HTTP CODE FILTER for filtering status code |
+ +-------+--------------------------------------------------+
REST Client Output
==================
@@ -2849,11 +2859,12 @@ REST Client Output
The URL can be configured statically or tagged
as ``?example.{site}.org:8080/{trig}/events``,
all tags such as ``site`` and ``trig`` in the URL
- need to be set in the properties object available to the tasks.
- In addition, the keys should exactly match with the tags defined in url.
- The scope of the properties object is per HTTP call.
- Hence, key/value pairs set in the properties object by task
- is only available for that specific HTTP call.
+ need to be set in the properties object available to
+ the tasks. In addition, the keys should exactly match
+ with the tags defined in url. The scope of the properties
+ object is per HTTP call. Hence, key/value pairs set
+ in the properties object by task are only available
+ for that specific HTTP call.
.. container:: listingblock
@@ -3107,11 +3118,19 @@ REST Requestor Input
The URL can be configured statically or tagged
as ``?example.{site}.org:8080/{trig}/events``,
all tags such as ``site`` and ``trig`` in the URL
- need to be set in the properties object available to the tasks.
- In addition, the keys should exactly match with the tags defined in url.
- The scope of the properties object is per HTTP call.
- Hence, key/value pairs set in the properties object by task
- is only available for that specific HTTP call.
+ need to be set in the properties object available to
+ the tasks. In addition, the keys should exactly match
+ with the tags defined in url. The scope of the properties
+ object is per HTTP call. Hence, key/value pairs set
+ in the properties object by task are only available
+ for that specific HTTP call.
+ The httpCodeFilter is used for filtering the status
+ code, and it can be configured as a regular expression
+ string. The default httpCodeFilter is "[2][0-9][0-9]"
+ - for successful response codes.
+ The response with HTTP status code that matches the
+ given regular expression is forwarded to the task,
+ otherwise it is logged as a failure.
.. container:: listingblock
@@ -3126,7 +3145,8 @@ REST Requestor Input
"url": "http://localhost:54321/some/path/to/rest/resource", (2)
"url": "http://localhost:54321/{site}/path/to/rest/{resValue}", (2')
"httpMethod": "POST", (3)
- "restRequestTimeout": 2000 (4)
+ "restRequestTimeout": 2000, (4)
+ "httpCodeFilter" : "[2][0-9][0-9]" (5)
}
},
@@ -3143,6 +3163,8 @@ REST Requestor Input
+-------+--------------------------------------------------+
| **4** | request timeout in milliseconds |
+-------+--------------------------------------------------+
+ | **5** | use HTTP CODE FILTER for filtering status code |
+ +-------+--------------------------------------------------+
.. container:: paragraph