mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 09:35:45 +02:00
Fix query (#68)
* fix issues #67 * fix query id check * add changelog fragment * fix changelog fragment new line * fix changelog fragment new line2 * Update changelogs/fragments/68-fix-query-id-check.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
e9fdf19253
commit
a46c7df15c
2 changed files with 4 additions and 2 deletions
|
@ -79,7 +79,7 @@ options:
|
|||
type: str
|
||||
query:
|
||||
description:
|
||||
- Query given path for selected query attributes from RouterOS aip and return '.id'.
|
||||
- Query given path for selected query attributes from RouterOS aip.
|
||||
- WHERE is key word which extend query. WHERE format is key operator value - with spaces.
|
||||
- WHERE valid operators are C(==), C(!=), C(>), C(<).
|
||||
- Example path C(ip address) and query C(.id address) will return only C(.id) and C(address) for all items in C(ip address) path.
|
||||
|
@ -439,7 +439,7 @@ class ROS_api_module:
|
|||
def api_query(self):
|
||||
keys = {}
|
||||
for k in self.query:
|
||||
if 'id' in k and k != ".id":
|
||||
if k == 'id':
|
||||
self.errors("'%s' must be '.id'" % k)
|
||||
keys[k] = Key(k)
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue