Add multiple assert export for awx cli

This commit is contained in:
Artsiom Musin
2022-11-08 15:11:56 +01:00
parent 192f45bbd0
commit 9b047c2af6
2 changed files with 18 additions and 12 deletions

View File

@@ -218,6 +218,8 @@ class ApiV2(base.Base):
return endpoint.get(id=int(value))
options = self._cache.get_options(endpoint)
identifier = next(field for field in options['search_fields'] if field in ('name', 'username', 'hostname'))
if len(value.split(',')) > 0:
identifier += '__in'
return endpoint.get(**{identifier: value}, all_pages=True)
def export_assets(self, **kwargs):