Add tags filter to linode inventory plugin (#1551)

* Add tags filter to linode inventory plugin

* add tags to return tuple on line 66 in test_linode.py

* Add period in changelog fragment.
use if any() rather than for ... if list completion

* Clarify the description of the ``tags`` option

* Updated description to remove syntax error of line break.
This commit is contained in:
cdbunch72 2021-01-17 05:29:20 -06:00 committed by GitHub
parent b31583b441
commit 3b9c6d496b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 7 deletions

View file

@ -58,18 +58,20 @@ def test_validation_option_bad_option(inventory):
def test_empty_config_query_options(inventory):
regions, types = inventory._get_query_options({})
assert regions == types == []
regions, types, tags = inventory._get_query_options({})
assert regions == types == tags == []
def test_conig_query_options(inventory):
regions, types = inventory._get_query_options({
regions, types, tags = inventory._get_query_options({
'regions': ['eu-west', 'us-east'],
'types': ['g5-standard-2', 'g6-standard-2'],
'tags': ['web-server'],
})
assert regions == ['eu-west', 'us-east']
assert types == ['g5-standard-2', 'g6-standard-2']
assert tags == ['web-server']
def test_verify_file_bad_config(inventory):