Skip to content

Commit a0f492b

Browse files
authored
Merge pull request #64 from stewartfrancis/filter-spec
Custom validation and test for complex_filter dsl
2 parents 11dd59f + 7ada77c commit a0f492b

File tree

5 files changed

+985
-214
lines changed

5 files changed

+985
-214
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pip install -r requirements.txt
5959
echo "/* -------------------------------------------------------------------------- */"
6060
echo "/* Integration tests Python 2.7 */"
6161
echo "/* -------------------------------------------------------------------------- */"
62-
(set -x; ansible-test integration --python 2.7)
62+
(set -x; ansible-test integration cics_cmci --python 2.7)
6363
deactivate
6464

6565
source "$CMCI_PYTHON_38/bin/activate"

plugins/doc_fragments/cmci.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class ModuleDocFragment(object):
163163
- Filters can be nested. At most four nesting layers are allowed.
164164
- When supplying the C(attribute) option, you must also supply a
165165
C(value) for the filter. You can also override the default operator
166-
with the C(=) option.
166+
of C(=) with the C(operator) option.
167167
- For examples, see M(cmci_get)
168168
type: dict
169169
required: false
@@ -176,6 +176,7 @@ class ModuleDocFragment(object):
176176
nested filter expression can be either an C(attribute), C(and)
177177
or C(or) complex filter expression.
178178
type: list
179+
elements: dict
179180
required: false
180181
or:
181182
description:
@@ -185,6 +186,7 @@ class ModuleDocFragment(object):
185186
nested filter expression can be either an C(attribute), C(and)
186187
or C(or) complex filter expression.
187188
type: list
189+
elements: dict
188190
required: false
189191
attribute:
190192
description:
@@ -200,7 +202,8 @@ class ModuleDocFragment(object):
200202
These operators are accepted: C(<) or C(LT) (less than), C(<=) or
201203
C(LE) (less than or equal to), C(=) or C(EQ) (equal to), C(>) or
202204
C(GT) (greater than), C(>=) or C(GE) (greater than or equal to),
203-
C(==) or C(IS) (is), C(¬=), C(!=), or C(NE) (not equal to).
205+
C(==) or C(IS) (is), C(¬=), C(!=), or C(NE) (not equal to). If
206+
not supplied when 'attribute' is used, C(EQ) will be assumed.
204207
type: str
205208
required: false
206209
choices:
@@ -219,14 +222,14 @@ class ModuleDocFragment(object):
219222
- LE
220223
- NE
221224
- IS
222-
default: EQ
223225
value:
224226
description:
225227
- The value by which you are to filter the resource attributes.
226228
- The value must be a valid one for the resource table attribute
227229
as documented in the resource table reference, for example,
228230
L(PROGDEF resource table reference,
229231
https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html).
232+
type: str
230233
required: false
231234
get_parameters:
232235
description: >
@@ -239,6 +242,7 @@ class ModuleDocFragment(object):
239242
as found in the L(PROGDEF resource table reference,
240243
https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html).
241244
type: list
245+
elements: dict
242246
suboptions:
243247
name:
244248
description: Parameter name available for the GET operation.

0 commit comments

Comments
 (0)