4.7.4.7. Wizards

Parser for query wizards.

class axonius_api_client.parsers.wizards.WizardParser(apiobj)[source]

Bases: object

Wizard value parsers for the various field types.

__init__(apiobj)[source]

Parse for the various field types.

:param apiobj axonius_api_client.api.assets.asset_mixin.AssetMixin: Asset object to

use when validating fields/adapters/connection labels/etc.

apiobj

Asset object to use when validating fields/adapters/connection labels/etc.

Type

axonius_api_client.api.assets.asset_mixin.AssetMixin

__call__(value, parser, enum=None, enum_items=None)[source]

Parse a value and return the AQL and raw expression values.

Parameters
Return type

typing.Tuple[str, typing.Any]

Returns

AQL value and raw expression value

value_to_csv_adapters(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of valid adapter names.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_cnx_label(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of valid connection labels.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_int(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of integers.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_ip(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of IP addresses.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_str(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of strings.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_subnet(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of subnets.

Parameters
Return type

typing.Tuple[str, str]

value_to_csv_tags(value, enum=None, enum_items=None)[source]

Parse a value as a comma separated list of valid asset tags (labels).

Parameters
Return type

typing.Tuple[str, str]

value_to_dt(value, enum=None, enum_items=None)[source]

Parse a value as a datetime string.

Parameters
Return type

typing.Tuple[str, str]

value_to_in_subnet(value, enum=None, enum_items=None)[source]

Parse a value into the start and end of a subnet.

Parameters
Return type

typing.Tuple[typing.List[str], str]

value_to_int(value, enum=None, enum_items=None)[source]

Parse a value as an integer.

Parameters
Return type

typing.Tuple[str, typing.Union[int, float]]

value_to_ip(value, enum=None, enum_items=None)[source]

Parse a value as an IP address.

Parameters
Return type

typing.Tuple[str, str]

value_to_none(value, enum=None, enum_items=None)[source]

Parse a value as none.

Parameters
Return type

typing.Tuple[str, None]

value_to_raw_version(value, enum=None, enum_items=None)[source]

Parse a value as a raw version string.

Parameters
Return type

typing.Tuple[str, str]

value_to_str(value, enum=None, enum_items=None)[source]

Parse a value as a string.

Parameters
Return type

typing.Tuple[str, str]

value_to_str_adapters(value, enum=None, enum_items=None)[source]

Parse a value as a valid adapter name.

Parameters
Return type

typing.Tuple[str, str]

value_to_str_cnx_label(value, enum=None, enum_items=None)[source]

Parse a value as a valid connection label.

Parameters
Return type

typing.Tuple[str, str]

value_to_str_escaped_regex(value, enum=None, enum_items=None)[source]

Parse a value as an escaped regular expression.

Parameters
Return type

typing.Tuple[str, str]

value_to_str_tags(value, enum=None, enum_items=None)[source]

Parse a value as a valid asset tag (label).

Parameters
Return type

typing.Tuple[str, str]

value_to_str_subnet(value, enum=None, enum_items=None)[source]

Parse a value as a subnet.

Parameters
Return type

typing.Tuple[str, str]

parse_csv(value, converter=None, join_tmpl='"{}"', enum=None, enum_items=None, enum_custom=None, custom_id=None)[source]

Parse a comma separated string.

Parameters
Return type

typing.Tuple[str, str]

check_enum(value, enum=None, enum_items=None, enum_custom=None, custom_id=None)[source]

Check that the value is a valid option of enums.

Parameters
Return type

typing.Union[int, str]

_tags()[source]

Get all known tags (labels) of this asset type.

Return type

typing.List[str]

_adapters()[source]

Get all known adapters.

Return type

typing.List[dict]

_adapter_names()[source]

Get all known adapter names.

Return type

typing.Dict[str, str]

_cnx_labels()[source]

Get all known adapter connection labels.

Return type

typing.List[str]