Use semantic markup (#185)

* Enable semantic markup.

* Use semantic markup.

* Break long lines.

* Add ignore entries.

* Ignore docs build error.
This commit is contained in:
Felix Fontein 2023-06-22 13:18:08 +02:00 committed by GitHub
parent 08c8c7ecc8
commit 2e78a207e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 146 additions and 129 deletions

View file

@ -17,7 +17,7 @@ description:
- Ansible module for RouterOS API with the Python C(librouteros) library.
- This module can add, remove, update, query and execute arbitrary command in RouterOS via API.
notes:
- I(add), I(remove), I(update), I(cmd) and I(query) are mutually exclusive.
- O(add), O(remove), O(update), O(cmd), and O(query) are mutually exclusive.
- Use the M(community.routeros.api_modify) and M(community.routeros.api_find_and_modify) modules
for more specific modifications, and the M(community.routeros.api_info) module for a more controlled
way of returning all entries for a path.
@ -40,26 +40,26 @@ options:
description:
- Main path for all other arguments.
- If other arguments are not set, api will return all items in selected path.
- Example C(ip address). Equivalent of RouterOS CLI C(/ip address print).
- Example V(ip address). Equivalent of RouterOS CLI C(/ip address print).
required: true
type: str
add:
description:
- Will add selected arguments in selected path to RouterOS config.
- Example C(address=1.1.1.1/32 interface=ether1).
- Example V(address=1.1.1.1/32 interface=ether1).
- Equivalent in RouterOS CLI C(/ip address add address=1.1.1.1/32 interface=ether1).
type: str
remove:
description:
- Remove config/value from RouterOS by '.id'.
- Example C(*03) will remove config/value with C(id=*03) in selected path.
- Example V(*03) will remove config/value with C(id=*03) in selected path.
- Equivalent in RouterOS CLI C(/ip address remove numbers=1).
- Note C(number) in RouterOS CLI is different from C(.id).
type: str
update:
description:
- Update config/value in RouterOS by '.id' in selected path.
- Example C(.id=*03 address=1.1.1.3/32) and path C(ip address) will replace existing ip address with C(.id=*03).
- Example V(.id=*03 address=1.1.1.3/32) and path V(ip address) will replace existing ip address with C(.id=*03).
- Equivalent in RouterOS CLI C(/ip address set address=1.1.1.3/32 numbers=1).
- Note C(number) in RouterOS CLI is different from C(.id).
type: str
@ -67,11 +67,11 @@ options:
description:
- 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(==) or C(eq), C(!=) or C(not), C(>) or C(more), C(<) or C(less).
- 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.
- Example path C(ip address) and query C(.id address WHERE address == 1.1.1.3/32).
will return only C(.id) and C(address) for items in C(ip address) path, where address is eq to 1.1.1.3/32.
- Example path C(interface) and query C(mtu name WHERE mut > 1400) will
- WHERE valid operators are V(==) or V(eq), V(!=) or V(not), V(>) or V(more), V(<) or V(less).
- Example path V(ip address) and query V(.id address) will return only C(.id) and C(address) for all items in V(ip address) path.
- Example path V(ip address) and query V(.id address WHERE address == 1.1.1.3/32).
will return only C(.id) and C(address) for items in V(ip address) path, where address is eq to 1.1.1.3/32.
- Example path V(interface) and query V(mtu name WHERE mut > 1400) will
return only interfaces C(mtu,name) where mtu is bigger than 1400.
- Equivalent in RouterOS CLI C(/interface print where mtu > 1400).
type: str
@ -84,65 +84,69 @@ options:
attributes:
description:
- The list of attributes to return.
- Every attribute used in a I(where) clause need to be listed here.
- Every attribute used in a O(extended_query.where[]) clause need to be listed here.
type: list
elements: str
required: true
where:
description:
- Allows to restrict the objects returned.
- The conditions here must all match. An I(or) condition needs at least one of its conditions to match.
- The conditions here must all match. An O(extended_query.where[].or) condition needs at least one of its conditions to match.
type: list
elements: dict
suboptions:
attribute:
description:
- The attribute to match. Must be part of I(attributes).
- Either I(or) or all of I(attribute), I(is), and I(value) have to be specified.
- The attribute to match. Must be part of O(extended_query.attributes).
- Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is),
and O(extended_query.where[].value) have to be specified.
type: str
is:
description:
- The operator to use for matching.
- For equality use C(==) or C(eq). For less use C(<) or C(less). For more use C(>) or C(more).
- Use C(in) to check whether the value is part of a list. In that case, I(value) must be a list.
- Either I(or) or all of I(attribute), I(is), and I(value) have to be specified.
- For equality use V(==) or V(eq). For less use V(<) or V(less). For more use V(>) or V(more).
- Use V(in) to check whether the value is part of a list. In that case, O(extended_query.where[].value) must be a list.
- Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is),
and O(extended_query.where[].value) have to be specified.
type: str
choices: ["==", "!=", ">", "<", "in", "eq", "not", "more", "less"]
value:
description:
- The value to compare to. Must be a list for I(is=in).
- Either I(or) or all of I(attribute), I(is), and I(value) have to be specified.
- The value to compare to. Must be a list for O(extended_query.where[].is=in).
- Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is),
and O(extended_query.where[].value) have to be specified.
type: raw
or:
description:
- A list of conditions so that at least one of them has to match.
- Either I(or) or all of I(attribute), I(is), and I(value) have to be specified.
- Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is),
and O(extended_query.where[].value) have to be specified.
type: list
elements: dict
suboptions:
attribute:
description:
- The attribute to match. Must be part of I(attributes).
- The attribute to match. Must be part of O(extended_query.attributes).
type: str
required: true
is:
description:
- The operator to use for matching.
- For equality use C(==) or C(eq). For less use C(<) or C(less). For more use C(>) or C(more).
- Use C(in) to check whether the value is part of a list. In that case, I(value) must be a list.
- For equality use V(==) or V(eq). For less use V(<) or V(less). For more use V(>) or V(more).
- Use V(in) to check whether the value is part of a list. In that case, O(extended_query.where[].or[].value) must be a list.
type: str
choices: ["==", "!=", ">", "<", "in", "eq", "not", "more", "less"]
required: true
value:
description:
- The value to compare to. Must be a list for I(is=in).
- The value to compare to. Must be a list for O(extended_query.where[].or[].is=in).
type: raw
required: true
cmd:
description:
- Execute any/arbitrary command in selected path, after the command we can add C(.id).
- Example path C(system script) and cmd C(run .id=*03) is equivalent in RouterOS CLI C(/system script run number=0).
- Example path C(ip address) and cmd C(print) is equivalent in RouterOS CLI C(/ip address print).
- Example path V(system script) and cmd V(run .id=*03) is equivalent in RouterOS CLI C(/system script run number=0).
- Example path V(ip address) and cmd V(print) is equivalent in RouterOS CLI C(/ip address print).
type: str
seealso:
- ref: ansible_collections.community.routeros.docsite.quoting