mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user