Blame SOURCES/logging-0006-property_op.diff

69e14a
From ca2baffbfc14fba077c7c70d849c02b9c69c9e1f Mon Sep 17 00:00:00 2001
69e14a
From: Noriko Hosoi <nhosoi@redhat.com>
69e14a
Date: Fri, 16 Oct 2020 11:08:00 -0700
69e14a
Subject: [PATCH 6/7] Replacing prop_op with property_op and prop_value with
69e14a
 property_value.
69e14a
69e14a
(cherry picked from commit 1c951e6acef886548029151dbca9d002f20ef425)
69e14a
---
69e14a
 README.md                                     | 20 +++++++++----------
69e14a
 roles/rsyslog/templates/output_files.j2       |  2 +-
69e14a
 roles/rsyslog/templates/output_forwards.j2    |  2 +-
69e14a
 .../rsyslog/templates/output_remote_files.j2  |  2 +-
69e14a
 tests/tests_basics_files2.yml                 |  8 ++++----
69e14a
 5 files changed, 17 insertions(+), 17 deletions(-)
69e14a
69e14a
diff --git a/README.md b/README.md
69e14a
index 4352ee7..d94ec04 100644
69e14a
--- a/README.md
69e14a
+++ b/README.md
69e14a
@@ -184,8 +184,8 @@ This is a schematic logging configuration to show log messages from input_nameA
69e14a
   - `severity`: Severity in selector; default to `*`.
69e14a
   - `exclude`: Exclude list used in selector; default to none.
69e14a
   - `property`: Property in property-based filter; no default
69e14a
-  - `prop_op`: Operation in property-based filter; In case of not `!`, put the `prop_op` value in quotes; default to `contains`
69e14a
-  - `prop_value`: Value in property-based filter; default to `error`
69e14a
+  - `property_op`: Operation in property-based filter; In case of not `!`, put the `property_op` value in quotes; default to `contains`
69e14a
+  - `property_value`: Value in property-based filter; default to `error`
69e14a
   - `path`: Path to the output file.
69e14a
 
69e14a
   Selector options and property-based filter options are exclusive. If Property-based filter options are defined, selector options will be ignored.
69e14a
@@ -208,8 +208,8 @@ This is a schematic logging configuration to show log messages from input_nameA
69e14a
   - `severity`: Severity in selector; default to `*`.
69e14a
   - `exclude`: Exclude list used in selector; default to none.
69e14a
   - `property`: Property in property-based filter; no default
69e14a
-  - `prop_op`: Operation in property-based filter; In case of not `!`, put the `prop_op` value in quotes; default to `contains`
69e14a
-  - `prop_value`: Value in property-based filter; default to `error`
69e14a
+  - `property_op`: Operation in property-based filter; In case of not `!`, put the `property_op` value in quotes; default to `contains`
69e14a
+  - `property_value`: Value in property-based filter; default to `error`
69e14a
   - `target`: Target host (fqdn). **Required**.
69e14a
   - `udp_port`: UDP port number. Default to `514`.
69e14a
   - `tcp_port`: TCP port number. Default to `514`.
69e14a
@@ -225,8 +225,8 @@ This is a schematic logging configuration to show log messages from input_nameA
69e14a
   - `severity`: Severity in selector; default to `*`.
69e14a
   - `exclude`: Exclude list used in selector; default to none.
69e14a
   - `property`: Property in property-based filter; no default
69e14a
-  - `prop_op`: Operation in property-based filter; In case of not `!`, put the `prop_op` value in quotes; default to `contains`
69e14a
-  - `prop_value`: Value in property-based filter; default to `error`
69e14a
+  - `property_op`: Operation in property-based filter; In case of not `!`, put the `property_op` value in quotes; default to `contains`
69e14a
+  - `property_value`: Value in property-based filter; default to `error`
69e14a
   - `async_writing`: If set to `true`, the files are written asynchronously. Allowed value is `true` or `false`. Default to `false`.
69e14a
   - `client_count`: Count of client logging system supported this rsyslog server. Default to `10`.
69e14a
   - `io_buffer_size`: Buffer size used to write output data. Default to `65536` bytes.
69e14a
@@ -481,14 +481,14 @@ The following playbook generates the same logging configuration files.
69e14a
       - name: files_output0
69e14a
         type: files
69e14a
         property: msg
69e14a
-        prop_op: contains
69e14a
-        prop_value: error
69e14a
+        property_op: contains
69e14a
+        property_value: error
69e14a
         path: /var/log/errors.log
69e14a
       - name: files_output1
69e14a
         type: files
69e14a
         property: msg
69e14a
-        prop_op: "!contains"
69e14a
-        prop_value: error
69e14a
+        property_op: "!contains"
69e14a
+        property_value: error
69e14a
         path: /var/log/others.log
69e14a
     logging_flows:
69e14a
       - name: flow0
69e14a
diff --git a/roles/rsyslog/templates/output_files.j2 b/roles/rsyslog/templates/output_files.j2
69e14a
index e15e4cd..40f5b90 100644
69e14a
--- a/roles/rsyslog/templates/output_files.j2
69e14a
+++ b/roles/rsyslog/templates/output_files.j2
69e14a
@@ -1,7 +1,7 @@
69e14a
 {% if item.path is defined %}
69e14a
 ruleset(name="{{ item.name }}") {
69e14a
 {%   if item.property | d() %}
69e14a
-    :{{ item.property }}, {{ item.prop_op | d('contains') }}, "{{ item.prop_value | d('error') }}" {{ item.path }}
69e14a
+    :{{ item.property }}, {{ item.property_op | d('contains') }}, "{{ item.property_value | d('error') }}" {{ item.path }}
69e14a
 {%   elif item.exclude | d([]) %}
69e14a
     {{ item.facility | d('*') }}.{{ item.severity | d('*') }};{{ item.exclude | join(';') }} {{ item.path }}
69e14a
 {%   else %}
69e14a
diff --git a/roles/rsyslog/templates/output_forwards.j2 b/roles/rsyslog/templates/output_forwards.j2
69e14a
index 35030b4..87d7a09 100644
69e14a
--- a/roles/rsyslog/templates/output_forwards.j2
69e14a
+++ b/roles/rsyslog/templates/output_forwards.j2
69e14a
@@ -10,7 +10,7 @@
69e14a
 {% endif %}
69e14a
 ruleset(name="{{ item.name }}") {
69e14a
 {% if item.property | d() %}
69e14a
-    :{{ item.property }}, {{ item.prop_op | d('contains') }}, "{{ item.prop_value | d('error') }}" action(name="{{ item.name }}"
69e14a
+    :{{ item.property }}, {{ item.property_op | d('contains') }}, "{{ item.property_value | d('error') }}" action(name="{{ item.name }}"
69e14a
 {% elif item.exclude | d([]) %}
69e14a
     {{ item.facility | d('*') }}.{{ item.severity | d('*') }};{{ item.exclude | join(';') }} action(name="{{ item.name }}"
69e14a
 {% else %}
69e14a
diff --git a/roles/rsyslog/templates/output_remote_files.j2 b/roles/rsyslog/templates/output_remote_files.j2
69e14a
index aaf547e..84317f2 100644
69e14a
--- a/roles/rsyslog/templates/output_remote_files.j2
69e14a
+++ b/roles/rsyslog/templates/output_remote_files.j2
69e14a
@@ -18,7 +18,7 @@ ruleset(name="{{ item.name }}"
69e14a
         queue.workerThreads="{{ logging_server_threads }}") {
69e14a
     # Store remote logs in separate logfiles
69e14a
 {%   if item.property | d() %}
69e14a
-    :{{ item.property }}, {{ item.prop_op | d('contains') }}, "{{ item.prop_value | d('error') }}" action(name="{{ item.name }}" type="omfile" DynaFile="{{ item.name }}_template" DynaFileCacheSize="{{ item.client_count | d(10) }}" ioBufferSize="{{ item.io_buffer_size | d('65536') }}" asyncWriting="{{ 'on' if item.async_writing | d(false) | bool else 'off' }}")
69e14a
+    :{{ item.property }}, {{ item.property_op | d('contains') }}, "{{ item.property_value | d('error') }}" action(name="{{ item.name }}" type="omfile" DynaFile="{{ item.name }}_template" DynaFileCacheSize="{{ item.client_count | d(10) }}" ioBufferSize="{{ item.io_buffer_size | d('65536') }}" asyncWriting="{{ 'on' if item.async_writing | d(false) | bool else 'off' }}")
69e14a
 {%   elif item.exclude | d([]) %}
69e14a
     {{ item.facility | d('*') }}.{{ item.severity | d('*') }};{{ item.exclude | join(';') }} action(name="{{ item.name }}" type="omfile" DynaFile="{{ item.name }}_template" DynaFileCacheSize="{{ item.client_count | d(10) }}" ioBufferSize="{{ item.io_buffer_size | d('65536') }}" asyncWriting="{{ 'on' if item.async_writing | d(false) | bool else 'off' }}")
69e14a
 {%   else %}
69e14a
diff --git a/tests/tests_basics_files2.yml b/tests/tests_basics_files2.yml
69e14a
index b1a0f62..9f69ed5 100644
69e14a
--- a/tests/tests_basics_files2.yml
69e14a
+++ b/tests/tests_basics_files2.yml
69e14a
@@ -52,14 +52,14 @@
69e14a
           - name: files_output3
69e14a
             type: files
69e14a
             property: msg
69e14a
-            prop_op: contains
69e14a
-            prop_value: property_based_filter_test
69e14a
+            property_op: contains
69e14a
+            property_value: property_based_filter_test
69e14a
             path: "{{ __prop_based_log0 }}"
69e14a
           - name: files_output4
69e14a
             type: files
69e14a
             property: msg
69e14a
-            prop_op: "!contains"
69e14a
-            prop_value: property_based_filter_test
69e14a
+            property_op: "!contains"
69e14a
+            property_value: property_based_filter_test
69e14a
             path: "{{ __prop_based_log1 }}"
69e14a
         logging_inputs:
69e14a
           - name: basic_input
69e14a
-- 
69e14a
2.26.2
69e14a