You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/01/23 22:03:01 UTC
[trafficserver] 10/12: Cleanup trailing whitespaces,
and YAML formatting (#6210)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit fc2d1ffae3e718546f56a9bf14ebcc125780a451
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Wed Nov 20 15:50:41 2019 +0800
Cleanup trailing whitespaces, and YAML formatting (#6210)
* Cleanup trailing whitespaces, and YAML formatting
* Restores trailing WS for these .gold files
(cherry picked from commit 9c1b88a6349a84fa8556fc508d24bf6a25917fad)
Conflicts:
tests/README.md
---
configs/strategies.yaml.default | 46 +++++------
doc/admin-guide/files/strategies.yaml.en.rst | 37 +++++----
.../uri_signing/python_signer/README.md | 18 ++---
proxy/http/remap/Makefile.am | 6 +-
proxy/http/remap/unit-tests/combined.yaml | 84 +++++++++----------
.../remap/unit-tests/consistent-hash-tests.yaml | 44 +++++-----
proxy/http/remap/unit-tests/hosts.yaml | 26 +++---
proxy/http/remap/unit-tests/round-robin-tests.yaml | 93 +++++++++++-----------
proxy/http/remap/unit-tests/simple-strategy.yaml | 27 +++----
.../remap/unit-tests/strategies-dir/01-hosts.yaml | 26 +++---
.../unit-tests/strategies-dir/03-strategies.yaml | 8 +-
proxy/http/remap/unit-tests/strategy.yaml | 4 +-
12 files changed, 208 insertions(+), 211 deletions(-)
diff --git a/configs/strategies.yaml.default b/configs/strategies.yaml.default
index c2f3482..6ef420d 100644
--- a/configs/strategies.yaml.default
+++ b/configs/strategies.yaml.default
@@ -7,30 +7,30 @@
# The purpose of this file is to specify the strategies available for
# use in locating upstream caches for use to satisfy requests
#
-# This is a YAML formatted file to define hosts, groups of hosts and next hop strategies that
+# This is a YAML formatted file to define hosts, groups of hosts and next hop strategies that
# may be used by remap
#
# There are three top-level YAML name spaces: 'hosts', 'groups', and 'strategies'.
-# 'hosts' is a YAML list of host's definitions and is used when defining 'groups' YAML
-# references are supported.
-# 'groups' is a YAML list that aggregates a group of hosts together and serves as the
-# equivalent to the rings used in parent.config. You may define upto five groups in a
+# 'hosts' is a YAML list of host's definitions and is used when defining 'groups' YAML
+# references are supported.
+# 'groups' is a YAML list that aggregates a group of hosts together and serves as the
+# equivalent to the rings used in parent.config. You may define upto five groups in a
# config, see MAX_GROUPS.
-# 'strategies' is a YAML list of strategy definitions.
+# 'strategies' is a YAML list of strategy definitions.
#
-# Files may be broken up into several different files. The main file loaded by the Next Hop
-# Strategy factory is this file, strategies.yaml. You may move the 'hosts' and 'groups'
-# definitions into separate files and then include them in this file using:
+# Files may be broken up into several different files. The main file loaded by the Next Hop
+# Strategy factory is this file, strategies.yaml. You may move the 'hosts' and 'groups'
+# definitions into separate files and then include them in this file using:
#
# '#include path_to_hosts_and_groups_file'
#
-# It is even possible to put individual strategies into separate file. The Next Hop
-# strategy factory concatenates all included files together in a single YAML document at
+# It is even possible to put individual strategies into separate file. The Next Hop
+# strategy factory concatenates all included files together in a single YAML document at
# each point where it sees an '#include file_name'. When using this feature you just need to
# ensure that the final concatenation is a valid YAML document with 'hosts', 'groups'
# and 'strategies' in this given order.
#
-#
+#
# This example YAML document shows a complete definiton in a single strategies.yaml
# file. There are other example unit test files in the source tree showing examples of
# using '#include' and different formats available for use, proxy/http/remap/unit-tests/
@@ -40,7 +40,7 @@
#
#
# hosts:
-# - &p1
+# - &p1
# host: p1.foo.com
# hash_string: slsklslsk # optional hash string that replaces the hostname in consistent hashing.
# protocol:
@@ -59,14 +59,14 @@
# - scheme: https
# port: 443
# health_check_url: https://192.168.1.2:443
-# - &s1
+# - &s1
# host: s1.foo.com
# hash_string: slsklslsk # optional hash string that replaces the hostname in consistent hashing.
# protocol:
# - scheme: http
# port: 80
# health_check_url: http://192.168.2.1:80
-# - scheme: https
+# - scheme: https
# port: 443
# health_check_url: https://192.168.2.1:443
# - &s2
@@ -98,8 +98,8 @@
# groups: # groups of hosts, these groups are used as rings in consistent hash and arrays of host groups for round_robin.
# - *g1
# - *g2
-# scheme: http
-# failover:
+# scheme: http
+# failover:
# max_simple_retries: 2 # default is 1, indicates the maximum number of simple retries for the listed response codes.
# ring_mode: exhaust_ring # enumerated as exhaust_ring or alternate_ring
# #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
@@ -113,20 +113,20 @@
# - active
# - strategy: 'mid-tier-south'
# policy: latched
-# hash_key: uri
-# go_direct: false
+# hash_key: uri
+# go_direct: false
# parent_is_proxy: false # next hop hosts are origin servers
# groups:
# - *g1
# - *g2
-# scheme: https
-# failover:
-# max_simple_retries: 2
+# scheme: https
+# failover:
+# max_simple_retries: 2
# ring_mode: alternate_ring
# response_codes:
# - 404
# - 502
# - 503
-# health_check:
+# health_check:
# - passive
# - active
diff --git a/doc/admin-guide/files/strategies.yaml.en.rst b/doc/admin-guide/files/strategies.yaml.en.rst
index 5eaae37..d501dd2 100644
--- a/doc/admin-guide/files/strategies.yaml.en.rst
+++ b/doc/admin-guide/files/strategies.yaml.en.rst
@@ -27,7 +27,7 @@ strategies.yaml
:maxdepth: 2
The :file:`strategies.yaml` file identifies the next hop proxies used in an
-cache hierarchy and the algorithms used to select the next hop proxy. Use
+cache hierarchy and the algorithms used to select the next hop proxy. Use
this file to perform the following configuration:
- Set up next hop cache hierarchies, with multiple parents and parent
@@ -50,7 +50,7 @@ and **strategies**. These name spaces may be in separate files. When in separa
**#include filename** in the `strategies.yaml` so that they are concatenated by the strategy
factory into a single YAML document in the order, **hosts**, **groups**, and the **strategies**.
-Alternatively if the config parameter `proxy.config.url_remap.strategies.filename` refers to
+Alternatively if the config parameter `proxy.config.url_remap.strategies.filename` refers to
a directory, the NextHopStrategyFactory will alphanumerically concatenate all files in that directory that end in `.yaml` by name into a single document stream for parsing. The final document must be a vaild `YAML` document with single `strategies` node and optionally a single `hosts` and `groups` node. Any **#include filename** strings are ignored when reading `.yaml` files in a directory.
Hosts definitions
@@ -59,14 +59,14 @@ Hosts definitions
The **hosts** definitions is a **YAML** list of hosts. This list is **optional** but if not used, the
**groups** list **must** include complete defintions for hosts. See the **group** examples below.
-In the example below, **hosts** is a **YAML** list of hosts. Each host entry uses a **YAML** anchor,
+In the example below, **hosts** is a **YAML** list of hosts. Each host entry uses a **YAML** anchor,
**&p1** and **&p2** that may be used elsewhere in the **YAML** document to refer to hosts **p1** and **p2**.
- **host**: the host value is a hostname string
- **protocol**: a list of schemes, ports, and health check urls for the host.
-- **healthcheck**: health check information with the **url** used to check
+- **healthcheck**: health check information with the **url** used to check
the hosts health by some external health check agent.
-
+
Example::
hosts:
@@ -85,7 +85,7 @@ Example::
- scheme: http
port: 80
health_check_url: http://192.168.1.2:80
-
+
Groups definitions
==================
@@ -111,7 +111,7 @@ Example using **YAML** anchors and references::
weight: 0.5
- <<: *p4
weight: 1.5
-
+
Explicitly defined Example, no **YAML** referenences::
groups:
@@ -119,20 +119,20 @@ Explicitly defined Example, no **YAML** referenences::
- p1
host: p1.foo.com
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.1:443
weight: 0.5
- p2
host: p2.foo.com
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.2:443
weight: 0.5
@@ -140,23 +140,23 @@ Explicitly defined Example, no **YAML** referenences::
- p3
host: p3.foo.com
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.3:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.3:443
weight: 0.5
- p4
host: p4.foo.com
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.4:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.4:443
- weight: 0.5
+ weight: 0.5
Strategies defintions
=====================
@@ -171,7 +171,7 @@ Each **strategy** in the list may using the following parameters::
#. **rr_ip**: round robin selection using the modulus of the client IP
#. **rr_strict**: strict round robin over the list of hosts in the primary group.
- #. **first_live**: always selects the first host in the primary group. Other hosts are selected when the first host fails.
+ #. **first_live**: always selects the first host in the primary group. Other hosts are selected when the first host fails.
#. **latched**: Same as **first_live** but primary selection sticks to whatever host was used by a previous transaction.
#. **consistent_hash**: hosts are selected using a **hash_key**.
@@ -184,7 +184,7 @@ Each **strategy** in the list may using the following parameters::
#. **path+fragment**: Same as **path** but adds the fragement portion of the URL.
#. **cache_key**: Uses the hash key from the **cachekey** plugin. defaults to **path** if the **cachekey** plugin is not configured on the **remap**.
#. **url**: Creates a hash from the entire request url.
-
+
- **go_direct** - A boolean value indicating whether a transaction may bypass proxies and go direct to the origin. Defaults to **true**
- **parent_is_proxy**: A boolean value which indicates if the groups of hosts are proxy caches or origins. **true** (default) means all the hosts used in the reamp are trafficserver caches. **false** means the hosts are origins that the next hop strategies may use for load balancing and/or failover.
- **scheme** Indicates which scheme the strategy supports, *http* or *https*
@@ -236,4 +236,3 @@ Example:
- 503
health_check:
- passive
-
diff --git a/plugins/experimental/uri_signing/python_signer/README.md b/plugins/experimental/uri_signing/python_signer/README.md
index baa9b22..daa41bb 100644
--- a/plugins/experimental/uri_signing/python_signer/README.md
+++ b/plugins/experimental/uri_signing/python_signer/README.md
@@ -1,31 +1,31 @@
Python URI Signer
==================
-Given a configuration file and a URI, this python script will generate a signed URI according to the URI signing protocol outlined [here](https://tools.ietf.org/html/draft-ietf-cdni-uri-signing-16):
+Given a configuration file and a URI, this python script will generate a signed URI according to the URI signing protocol outlined [here](https://tools.ietf.org/html/draft-ietf-cdni-uri-signing-16):
The script takes a config file and a uri as command line arguments. It picks one of the keys located in the json file at random
-and embeds a valid JWT as a query string parameter into the uri and prints this new signed URI to standard out.
+and embeds a valid JWT as a query string parameter into the uri and prints this new signed URI to standard out.
-** Disclaimer **
-Please note that this script is provided as a very simple example of how to implement a signer should not be considered production ready.
+** Disclaimer **
+Please note that this script is provided as a very simple example of how to implement a signer should not be considered production ready.
Requirements
-------
+------
[python-jose](https://pypi.org/project/python-jose/) library must be installed (pip install python-jose).
Config
-------
+------
The config file should be a JSON object that contains the following:
- `iss`: A string representing the issuer of the token
- `token_lifetime`: The lifetime of the token in seconds. Expiry of the token is calculated as now + token_lifetime
- `aud`: A string representing the intended audience of the token.
- - `cdnistt`: Boolean value which if set to true uses cookie signed token transport, allowing the validator of the token to
+ - `cdnistt`: Boolean value which if set to true uses cookie signed token transport, allowing the validator of the token to
to issue subsequent tokens via set cookie headers.
- - `cdniets`: Must be set if using cdnistt. Provides means of setting Expiry Times when generating subsequent tokens. It denotes
- the number of seconds to be added to the time at which the JWT is verified that gives the value of the Expiry Time claim of the
+ - `cdniets`: Must be set if using cdnistt. Provides means of setting Expiry Times when generating subsequent tokens. It denotes
+ the number of seconds to be added to the time at which the JWT is verified that gives the value of the Expiry Time claim of the
next signed JWT.
- `keys`: A list of json objects, each one representing a key. Each key should have the following attributes:
- `alg`: The Cryptographic algorithm to be used with the key.
diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am
index bf8d131..c569801 100644
--- a/proxy/http/remap/Makefile.am
+++ b/proxy/http/remap/Makefile.am
@@ -140,7 +140,7 @@ test_NextHopStrategyFactory_LDADD = \
$(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/iocore/utils/libinkutils.a \
@YAMLCPP_LIBS@ \
- @HWLOC_LIBS@
+ @HWLOC_LIBS@
test_NextHopStrategyFactory_LDFLAGS = $(AM_LDFLAGS) -L$(top_builddir)/src/tscore/.libs -ltscore
@@ -170,7 +170,7 @@ test_NextHopRoundRobin_LDADD = \
$(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/iocore/utils/libinkutils.a \
@YAMLCPP_LIBS@ \
- @HWLOC_LIBS@
+ @HWLOC_LIBS@
test_NextHopRoundRobin_LDFLAGS = $(AM_LDFLAGS) -L$(top_builddir)/src/tscore/.libs -ltscore
@@ -200,7 +200,7 @@ test_NextHopConsistentHash_LDADD = \
$(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/iocore/utils/libinkutils.a \
@YAMLCPP_LIBS@ \
- @HWLOC_LIBS@
+ @HWLOC_LIBS@
test_NextHopConsistentHash_LDFLAGS = $(AM_LDFLAGS) -L$(top_builddir)/src/tscore/.libs -ltscore
diff --git a/proxy/http/remap/unit-tests/combined.yaml b/proxy/http/remap/unit-tests/combined.yaml
index 9033dda..de4d347 100644
--- a/proxy/http/remap/unit-tests/combined.yaml
+++ b/proxy/http/remap/unit-tests/combined.yaml
@@ -22,18 +22,18 @@
#
# @section details Details
#
-#
+#
# unit test combined hosts and strategies, combined.yaml example
#
hosts:
- &p1 # shorthand name of host object, with an "anchor name"
- host: p1.foo.com # name or IP of host
+ host: p1.foo.com # name or IP of host
hash_string: slsklslsk # optional hash string that replaces the hostname in consistent hashing.
protocol:
- scheme: http
port: 80
health_check_url: http://192.168.1.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.1:443
- &p2
@@ -42,7 +42,7 @@ hosts:
- scheme: http
port: 80
health_check_url: http://192.168.1.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.2:443
- &s1
@@ -75,19 +75,20 @@ groups:
- <<: *s2
weight: 1.0
strategies:
- - strategy: 'mid-tier-north'
+ - strategy: "mid-tier-north"
policy: rr_ip # Selection strategy policy: Enum of 'consistent_hash' or 'first_live' or 'rr_strict' or 'rr_ip' or 'latched'
go_direct: true # transactions may routed directly to the origin true/false default is true.
- parent_is_proxy: false # next hop hosts are origin servers when set to 'false', defaults to true and indicates next hop hosts are ats cache's.
+ parent_is_proxy: false # next hop hosts are origin servers when set to 'false', defaults to true and indicates next hop hosts are ats cache's.
groups: # groups of hosts, these groups are used as rings in consistent hash and arrays of host groups for round_robin.
- *g1
- *g2
scheme: http # enumerated, 'http' or 'https'. by default uses the remapped scheme
- failover:
+ failover:
max_simple_retries: 2 # default is 1, indicates the maximum number of simple retries for the listed response codes.
- ring_mode: exhaust_ring # enumerated as exhaust_ring or alternate_ring
- #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
- #2) in 'alternate_ring' mode causes the failover to another server in secondary ring.
+ ring_mode:
+ exhaust_ring # enumerated as exhaust_ring or alternate_ring
+ #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
+ #2) in 'alternate_ring' mode causes the failover to another server in secondary ring.
response_codes: # defines the responses codes for failover in exhaust_ring mode
- 404
- 502
@@ -95,76 +96,75 @@ strategies:
health_check: # specifies the list of healthchecks that should be considered for failover. A list of enums: 'passive' or 'active'
- passive
- active
- - strategy: 'mid-tier-south'
+ - strategy: "mid-tier-south"
policy: latched
- go_direct: false
- parent_is_proxy: false # next hop hosts are origin servers
+ go_direct: false
+ parent_is_proxy: false # next hop hosts are origin servers
ignore_self_detect: false
groups:
- *g1
- *g2
- scheme: http
- failover:
- max_simple_retries: 2
+ scheme: http
+ failover:
+ max_simple_retries: 2
ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'mid-tier-east'
+ - strategy: "mid-tier-east"
policy: first_live
- go_direct: false
- parent_is_proxy: false # next hop hosts are origin servers
+ go_direct: false
+ parent_is_proxy: false # next hop hosts are origin servers
ignore_self_detect: true
groups:
- *g1
- *g2
- scheme: https
- failover:
- max_simple_retries: 2
- ring_mode: alternate_ring
+ scheme: https
+ failover:
+ max_simple_retries: 2
+ ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
health_check:
- passive
- - strategy: 'mid-tier-west'
+ - strategy: "mid-tier-west"
policy: rr_strict
- go_direct: true
- parent_is_proxy: false # next hop hosts are origin servers
+ go_direct: true
+ parent_is_proxy: false # next hop hosts are origin servers
groups:
- *g1
- *g2
- scheme: https
- failover:
- max_simple_retries: 2
- ring_mode: exhaust_ring
+ scheme: https
+ failover:
+ max_simple_retries: 2
+ ring_mode: exhaust_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- active
- - strategy: 'mid-tier-midwest'
+ - strategy: "mid-tier-midwest"
policy: consistent_hash
- hash_key: cache_key
- go_direct: true
- parent_is_proxy: false # next hop hosts are origin servers
+ hash_key: cache_key
+ go_direct: true
+ parent_is_proxy: false # next hop hosts are origin servers
groups:
- *g1
- *g2
- scheme: https
- failover:
- max_simple_retries: 2
- ring_mode: exhaust_ring
+ scheme: https
+ failover:
+ max_simple_retries: 2
+ ring_mode: exhaust_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- active
-
diff --git a/proxy/http/remap/unit-tests/consistent-hash-tests.yaml b/proxy/http/remap/unit-tests/consistent-hash-tests.yaml
index 6c8b5f2..5bb1d9b 100644
--- a/proxy/http/remap/unit-tests/consistent-hash-tests.yaml
+++ b/proxy/http/remap/unit-tests/consistent-hash-tests.yaml
@@ -22,14 +22,14 @@
#
# @section details Details
#
-#
+#
# unit testing strategies for NextHopConsistentHash.
#
strategies:
- - strategy: 'consistent-hash-1'
- policy: consistent_hash
- hash_key: path
- groups:
+ - strategy: "consistent-hash-1"
+ policy: consistent_hash
+ hash_key: path
+ groups:
- &g1
- host: p1.foo.com
protocol:
@@ -87,21 +87,21 @@ strategies:
port: 443
health_check_url: https://192.168.3.2:443
weight: 1.0
- scheme: http
- failover:
- ring_mode: exhaust_ring
- response_codes:
+ scheme: http
+ failover:
+ ring_mode: exhaust_ring
+ response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'consistent-hash-2'
- policy: consistent_hash
- hash_key: path
+ - strategy: "consistent-hash-2"
+ policy: consistent_hash
+ hash_key: path
go_direct: false
- groups:
+ groups:
- &g1
- host: c1.foo.com
protocol:
@@ -146,26 +146,26 @@ strategies:
- scheme: http
port: 80
health_check_url: http://192.168.3.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.3.1:443
weight: 1.0
- host: c6.bar.com
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.3.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.3.2:443
weight: 1.0
- scheme: http
- failover:
- ring_mode: alternate_ring
- response_codes:
+ scheme: http
+ failover:
+ ring_mode: alternate_ring
+ response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
diff --git a/proxy/http/remap/unit-tests/hosts.yaml b/proxy/http/remap/unit-tests/hosts.yaml
index 616e316..f8ab329 100644
--- a/proxy/http/remap/unit-tests/hosts.yaml
+++ b/proxy/http/remap/unit-tests/hosts.yaml
@@ -26,38 +26,38 @@
#
hosts:
- &p1
- host: 'p1.foo.com'
+ host: "p1.foo.com"
protocol:
- scheme: http
port: 80
- health_check_url: 'http://192.168.1.1:80'
+ health_check_url: "http://192.168.1.1:80"
- scheme: https
port: 443
- health_check_url: 'https://192.168.1.1:443'
+ health_check_url: "https://192.168.1.1:443"
- &p2
- host: 'p2.foo.com'
+ host: "p2.foo.com"
protocol:
- scheme: http
port: 80
- health_check_url: 'http://192.168.1.2:80'
+ health_check_url: "http://192.168.1.2:80"
- &p3
- host: 'p3.foo.com'
+ host: "p3.foo.com"
protocol:
- scheme: http
port: 8080
- health_check_url: 'http://192.168.1.3:8080'
+ health_check_url: "http://192.168.1.3:8080"
- scheme: https
- port: 8443
- health_check_url: 'https://192.168.1.3:8443'
+ port: 8443
+ health_check_url: "https://192.168.1.3:8443"
- &p4
- host: 'p4.foo.com'
+ host: "p4.foo.com"
protocol:
- - scheme: http
+ - scheme: http
port: 8080
- health_check_url: 'http://192.168.1.4:8080'
+ health_check_url: "http://192.168.1.4:8080"
- scheme: https
port: 8443
- health_check_url: 'https://192.168.1.4:8443'
+ health_check_url: "https://192.168.1.4:8443"
groups:
- &g1
- <<: *p1
diff --git a/proxy/http/remap/unit-tests/round-robin-tests.yaml b/proxy/http/remap/unit-tests/round-robin-tests.yaml
index f0f1573..0ff9267 100644
--- a/proxy/http/remap/unit-tests/round-robin-tests.yaml
+++ b/proxy/http/remap/unit-tests/round-robin-tests.yaml
@@ -22,31 +22,31 @@
#
# @section details Details
#
-#
+#
# unit testing strategies for NextHopRoundRobin.
#
strategies:
- - strategy: 'first-live'
- policy: first_live
- groups:
+ - strategy: "first-live"
+ policy: first_live
+ groups:
- &g1
- host: p1.foo.com
hash_string: slsklslsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.1:443
weight: 1.0
- host: p2.foo.com
hash_string: srskrsrsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.2:443
weight: 1.0
@@ -54,54 +54,54 @@ strategies:
- host: s1.bar.com
hash_string: lslalalal
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.2.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.2.1:443
weight: 1.0
- host: s2.bar.com
hash_string: alalalalal
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.2.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.2.2:443
weight: 1.0
- scheme: http
- failover:
- ring_mode: exhaust_ring
- response_codes:
+ scheme: http
+ failover:
+ ring_mode: exhaust_ring
+ response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'rr-strict-exhaust-ring'
- policy: rr_strict
- groups:
+ - strategy: "rr-strict-exhaust-ring"
+ policy: rr_strict
+ groups:
- &g1
- host: p1.foo.com
hash_string: slsklslsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.1:443
weight: 1.0
- host: p2.foo.com
hash_string: srskrsrsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.2:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.2:443
weight: 1.0
@@ -109,10 +109,10 @@ strategies:
- host: s1.bar.com
hash_string: lslalalal
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.2.1:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.2.1:443
weight: 1.0
@@ -126,82 +126,81 @@ strategies:
port: 443
health_check_url: https://192.168.2.2:443
weight: 1.0
- scheme: http
- failover:
- ring_mode: exhaust_ring
- response_codes:
+ scheme: http
+ failover:
+ ring_mode: exhaust_ring
+ response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'rr-ip'
+ - strategy: "rr-ip"
policy: rr_ip
groups:
- &g1
- host: p3.foo.com
hash_string: slsklslsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.3:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.3:443
weight: 1.0
- host: p4.foo.com
hash_string: srskrsrsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.4:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.4:443
weight: 1.0
- scheme: http
- failover:
+ scheme: http
+ failover:
ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'latched'
+ - strategy: "latched"
policy: latched
groups:
- &g1
- host: p3.foo.com
hash_string: slsklslsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.3:80
- - scheme: https
+ - scheme: https
port: 443
health_check_url: https://192.168.1.3:443
weight: 1.0
- host: p4.foo.com
hash_string: srskrsrsk
protocol:
- - scheme: http
+ - scheme: http
port: 80
health_check_url: http://192.168.1.4:80
- scheme: https
port: 443
health_check_url: https://192.168.1.4:443
weight: 1.0
- scheme: http
- failover:
+ scheme: http
+ failover:
ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
-
diff --git a/proxy/http/remap/unit-tests/simple-strategy.yaml b/proxy/http/remap/unit-tests/simple-strategy.yaml
index 8697b1a..23ef1d6 100644
--- a/proxy/http/remap/unit-tests/simple-strategy.yaml
+++ b/proxy/http/remap/unit-tests/simple-strategy.yaml
@@ -22,13 +22,13 @@
#
# @section details Details
#
-#
+#
# unit test simple-strategy.yaml example
#
strategies:
- - strategy: 'strategy-3'
- policy: rr_ip
- groups:
+ - strategy: "strategy-3"
+ policy: rr_ip
+ groups:
- &g1
- host: p1.foo.com
hash_string: slsklslsk
@@ -71,17 +71,17 @@ strategies:
port: 443
health_check_url: https://192.168.2.2:443
weight: 1.0
- scheme: https
- failover:
- ring_mode: exhaust_ring
- response_codes:
+ scheme: https
+ failover:
+ ring_mode: exhaust_ring
+ response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
- - strategy: 'strategy-4'
+ - strategy: "strategy-4"
policy: latched
groups:
- &g1
@@ -105,14 +105,13 @@ strategies:
port: 443
health_check_url: https://192.168.1.4:443
weight: 1.0
- scheme: http
- failover:
+ scheme: http
+ failover:
ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
-
diff --git a/proxy/http/remap/unit-tests/strategies-dir/01-hosts.yaml b/proxy/http/remap/unit-tests/strategies-dir/01-hosts.yaml
index f075058..99af17c 100644
--- a/proxy/http/remap/unit-tests/strategies-dir/01-hosts.yaml
+++ b/proxy/http/remap/unit-tests/strategies-dir/01-hosts.yaml
@@ -26,35 +26,35 @@
#
hosts:
- &p1
- host: 'p1.foo.com'
+ host: "p1.foo.com"
protocol:
- scheme: http
port: 80
- health_check_url: 'http://192.168.1.1:80'
+ health_check_url: "http://192.168.1.1:80"
- scheme: https
port: 443
- health_check_url: 'https://192.168.1.1:443'
+ health_check_url: "https://192.168.1.1:443"
- &p2
- host: 'p2.foo.com'
+ host: "p2.foo.com"
protocol:
- scheme: http
port: 80
- health_check_url: 'http://192.168.1.2:80'
+ health_check_url: "http://192.168.1.2:80"
- &p3
- host: 'p3.foo.com'
+ host: "p3.foo.com"
protocol:
- scheme: http
port: 8080
- health_check_url: 'http://192.168.1.3:8080'
+ health_check_url: "http://192.168.1.3:8080"
- scheme: https
- port: 8443
- health_check_url: 'https://192.168.1.3:8443'
+ port: 8443
+ health_check_url: "https://192.168.1.3:8443"
- &p4
- host: 'p4.foo.com'
+ host: "p4.foo.com"
protocol:
- - scheme: http
+ - scheme: http
port: 8080
- health_check_url: 'http://192.168.1.4:8080'
+ health_check_url: "http://192.168.1.4:8080"
- scheme: https
port: 8443
- health_check_url: 'https://192.168.1.4:8443'
+ health_check_url: "https://192.168.1.4:8443"
diff --git a/proxy/http/remap/unit-tests/strategies-dir/03-strategies.yaml b/proxy/http/remap/unit-tests/strategies-dir/03-strategies.yaml
index 3bbd670..b60101d 100644
--- a/proxy/http/remap/unit-tests/strategies-dir/03-strategies.yaml
+++ b/proxy/http/remap/unit-tests/strategies-dir/03-strategies.yaml
@@ -22,7 +22,7 @@
#
# @section details Details
#
-#
+#
# unit test data.
#
strategies:
@@ -52,14 +52,14 @@ strategies:
groups:
- *g1
- *g2
- scheme: http
- failover:
+ scheme: http
+ failover:
max_simple_retries: 2
ring_mode: alternate_ring
response_codes:
- 404
- 502
- 503
- health_check:
+ health_check:
- passive
- active
diff --git a/proxy/http/remap/unit-tests/strategy.yaml b/proxy/http/remap/unit-tests/strategy.yaml
index fb7cc65..b3f438a 100644
--- a/proxy/http/remap/unit-tests/strategy.yaml
+++ b/proxy/http/remap/unit-tests/strategy.yaml
@@ -22,7 +22,7 @@
#
# @section details Details
#
-#
+#
# unit test strategy.yaml example
#
#include unit-tests/hosts.yaml
@@ -36,7 +36,7 @@ strategies:
- *g1
- *g2
scheme: http
- failover:
+ failover:
ring_mode: exhaust_ring
response_codes:
- 404