-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative filter #13
base: master
Are you sure you want to change the base?
Commits on Jul 27, 2020
-
Optimizations and comments added to aci_listify filter.
Comments/explanations added to the code. Optimizations: * Use closure for listify function to encapsulate internal vars. * Eliminated some intermediate vars. * Replaced last loop by direct key lookup.
Configuration menu - View commit details
-
Copy full SHA for 9f0d02a - Browse repository at this point
Copy the full SHA 9f0d02aView commit details -
In filter, omit obsolete check for dict before recursive call.
MOD: plugins/filter/aci.py
Configuration menu - View commit details
-
Copy full SHA for 0e8e300 - Browse repository at this point
Copy the full SHA 0e8e300View commit details
Commits on Aug 3, 2020
-
Added Apple Desktop Services Store to files ignored by git.
MOD: .gitignore
Configuration menu - View commit details
-
Copy full SHA for 5c56aa6 - Browse repository at this point
Copy the full SHA 5c56aa6View commit details -
Added Apple Desktop Services Store to files ignored by git.
MOD: .gitignore
Configuration menu - View commit details
-
Copy full SHA for f1dff0e - Browse repository at this point
Copy the full SHA f1dff0eView commit details -
Alternative filter aci_listify2 added.
The original filter needs alternating dicts/lists in the inventory. This alternative filter accepts lists and dicts in any order. The result for an inventory with alternating dicts/lists is unchanged. NEW: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for ad32ff5 - Browse repository at this point
Copy the full SHA ad32ff5View commit details
Commits on Sep 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b8aecc0 - Browse repository at this point
Copy the full SHA b8aecc0View commit details
Commits on Oct 5, 2020
-
Bugfix: Evaluate flat key/value-Pairs before dicts and lists
This fixes a bug in commit ad32ff5: Attributes in intermediate items (neither top-level nor bottom) do not appear in output. E.g. if you look for keywords «tenant», «vrf», «bd», «subnet» some attributes for «vrf» might be missing because they were evaluated after the cache had been transferred to the result list. To avoid this, all flat key/value pairs are evaluated before any dict or list at the same level. MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for b56e385 - Browse repository at this point
Copy the full SHA b56e385View commit details
Commits on Oct 6, 2020
-
Add feature: regex filter for name attribute
* You can append a regex to each key (separated by an =–sign). * Only keys whose name-attribute matches the regex will be included in the result. * If the regex is omitted, all keys will be included (same behavior as before – backwards compatible). * Example: "{{ aci_topology|aci_listify2('access_policy', 'interface_policy_profile=.+998', 'interface_selector') }}" All paths in the output match interface policy profiles that end in «998». E.g. interface selectors below a non-matching interface policy profile will be suppressed from the output. MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for fddcc0e - Browse repository at this point
Copy the full SHA fddcc0eView commit details
Commits on Oct 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e355fd4 - Browse repository at this point
Copy the full SHA e355fd4View commit details
Commits on Oct 12, 2020
-
Use a variable to specify the attribute in regex match
Do not hard-code the attribute used for regex matching of keys. The variable «NameAttr» specifies the name of this attribute. MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for 031995f - Browse repository at this point
Copy the full SHA 031995fView commit details
Commits on Oct 15, 2020
-
Convert name-attribute's value to str before regex match
Fixes this issue: Program ended with error if name-attribut's value was not a string (used pattern matching on a non-string object). MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for be9ffa6 - Browse repository at this point
Copy the full SHA be9ffa6View commit details
Commits on Apr 9, 2021
-
Update description and documentation
* Short description of alternative filter. * One more example how to use the alternative filter (dynamically specify match pattern for keys at runtime). MOD: README.md MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for f560ced - Browse repository at this point
Copy the full SHA f560cedView commit details
Commits on Sep 24, 2021
-
Reformat code of Ansible filter aci2.py
No functional changes or fixes. Add more patterns to .gitignore MOD: .gitignore MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for 57e330e - Browse repository at this point
Copy the full SHA 57e330eView commit details
Commits on Oct 17, 2021
-
Improvement for filter module «aci2.py»
* Get rid of extra loop that deletes flat key/value pairs after copying them to the cache. MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for 113a7c8 - Browse repository at this point
Copy the full SHA 113a7c8View commit details
Commits on Oct 24, 2021
-
Lists or dicts for object instances
Instances of objects can be organized in lists (as before) or dicts (new). * This is useful if you need direct lookups by key. * This is partly incompatible to previous versions! Nested dicts and lists in any order down the object tree are not supported any more. This feature was not not useful and therefore has been dropped. MOD: README.md MOD: plugins/filter/aci2.py
Configuration menu - View commit details
-
Copy full SHA for d941f3a - Browse repository at this point
Copy the full SHA d941f3aView commit details
Commits on Nov 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a7b9a4c - Browse repository at this point
Copy the full SHA a7b9a4cView commit details
Commits on Feb 22, 2022
-
Small optimization for filter module «aci2.py»
* Use a closure to set fixed values once for all (avoid setting them in every new call of the filter).
Configuration menu - View commit details
-
Copy full SHA for 1a361b5 - Browse repository at this point
Copy the full SHA 1a361b5View commit details
Commits on Mar 20, 2022
-
Do not modify object tree in filter module «aci2.py»
Previously scalar attributes have been deleted after evaluation. This simplified further processing of lists and dicts. However, if the object tree uses anchors and aliases, deleting attributes invalidates the aliases.
Configuration menu - View commit details
-
Copy full SHA for 09a5d1f - Browse repository at this point
Copy the full SHA 09a5d1fView commit details
Commits on Dec 3, 2022
-
Fix mutable default values in function args
+ minor code formatting.
Configuration menu - View commit details
-
Copy full SHA for 5a66f82 - Browse repository at this point
Copy the full SHA 5a66f82View commit details
Commits on Nov 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for eed6b9a - Browse repository at this point
Copy the full SHA eed6b9aView commit details
Commits on Nov 6, 2023
-
List of scalars as attr value in old listify filter
* This is a backport of commit eed6b9a to the old listify filter (aci.py). * Add an example for a subnet to the example inventory. Ref: CiscoDevNet/ansible-aci#517 (comment)
Configuration menu - View commit details
-
Copy full SHA for d07999d - Browse repository at this point
Copy the full SHA d07999dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2298797 - Browse repository at this point
Copy the full SHA 2298797View commit details
Commits on Nov 15, 2023
-
Explicit check for scalar types as attrs in listify filters
Accetable attribute values: Replace negated check for list or dict by explicit check for scalar types.
Configuration menu - View commit details
-
Copy full SHA for 28335fc - Browse repository at this point
Copy the full SHA 28335fcView commit details