cli2 4.3.0__tar.gz → 4.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cli2-4.3.0/cli2.egg-info → cli2-4.3.2}/PKG-INFO +1 -1
- {cli2-4.3.0 → cli2-4.3.2}/cli2/ansible/action.py +10 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/client.py +4 -2
- {cli2-4.3.0 → cli2-4.3.2}/cli2/mask.py +3 -0
- {cli2-4.3.0 → cli2-4.3.2/cli2.egg-info}/PKG-INFO +1 -1
- {cli2-4.3.0 → cli2-4.3.2}/setup.py +1 -1
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_client.py +9 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_mask.py +3 -0
- {cli2-4.3.0 → cli2-4.3.2}/MANIFEST.in +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/README.rst +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/classifiers.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/__init__.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/ansible/__init__.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/ansible/playbook.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/ansible/variables.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/asyncio.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/cli.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/cli2.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/colors.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/configuration.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/decorators.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/display.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/__init__.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/client.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/conf.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/example.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/example_obj.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/nesting.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/obj.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/obj2.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/examples/test.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/lock.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/log.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/node.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/sphinx.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/table.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2/test.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2.egg-info/SOURCES.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2.egg-info/dependency_links.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2.egg-info/entry_points.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2.egg-info/requires.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/cli2.egg-info/top_level.txt +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/setup.cfg +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_ansible.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_ansible_variables.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_asyncio.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_cli.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_command.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_configuration.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_decorators.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_display.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_entry_point.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_group.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_inject.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_lock.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_node.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_restful.py +0 -0
- {cli2-4.3.0 → cli2-4.3.2}/tests/test_table.py +0 -0
|
@@ -186,6 +186,7 @@ class ActionBase(ActionBase):
|
|
|
186
186
|
for value in self.masked_values:
|
|
187
187
|
if value:
|
|
188
188
|
self.mask.values.add(value)
|
|
189
|
+
self.mask_initial_values = self.mask.values
|
|
189
190
|
|
|
190
191
|
async def run_wrapped_async(self):
|
|
191
192
|
self.verbosity = self.task_vars.get('ansible_verbosity', 0)
|
|
@@ -232,8 +233,17 @@ class ActionBase(ActionBase):
|
|
|
232
233
|
self.exc = exc
|
|
233
234
|
finally:
|
|
234
235
|
if self.mask and self.verbosity:
|
|
236
|
+
# this task has a mask, so it's probably a no_log, we're
|
|
237
|
+
# running verbose, print masked result
|
|
235
238
|
self.print_yaml(self.result)
|
|
236
239
|
|
|
240
|
+
if self.mask_initial_values != self.mask.values:
|
|
241
|
+
# this module has discovered new values to mask, update the
|
|
242
|
+
# fact with those values
|
|
243
|
+
self.result['ansible_facts'] = dict(
|
|
244
|
+
mask_values=self.mask.values,
|
|
245
|
+
)
|
|
246
|
+
|
|
237
247
|
if (
|
|
238
248
|
self._before_data != UNSET_DEFAULT
|
|
239
249
|
and self._after_data != UNSET_DEFAULT
|
|
@@ -698,7 +698,8 @@ class ModelCommand(Command):
|
|
|
698
698
|
return await model.get(id=self['id'].value)
|
|
699
699
|
|
|
700
700
|
async def post_call(self):
|
|
701
|
-
|
|
701
|
+
if self.client:
|
|
702
|
+
await self.client.post_call(self)
|
|
702
703
|
|
|
703
704
|
|
|
704
705
|
class ModelMetaclass(type):
|
|
@@ -1294,7 +1295,8 @@ class ClientCommand(Command):
|
|
|
1294
1295
|
|
|
1295
1296
|
async def post_call(self):
|
|
1296
1297
|
""" Call :py:meth:`Client.post_call`. """
|
|
1297
|
-
|
|
1298
|
+
if self.client:
|
|
1299
|
+
await self.client.post_call(self)
|
|
1298
1300
|
|
|
1299
1301
|
|
|
1300
1302
|
class Client(metaclass=ClientMetaclass):
|
|
@@ -1195,3 +1195,12 @@ def test_client_command(client_class, httpx_mock):
|
|
|
1195
1195
|
assert Client.cli['model']['get'].client is None
|
|
1196
1196
|
cmd = Client.cli['model']['find']
|
|
1197
1197
|
cmd('http://x')
|
|
1198
|
+
|
|
1199
|
+
Client.post_call_called = False
|
|
1200
|
+
cmd = Client.cli['model']['get']
|
|
1201
|
+
cmd()
|
|
1202
|
+
assert not Client.post_call_called
|
|
1203
|
+
|
|
1204
|
+
cmd = Client.cli['request']
|
|
1205
|
+
cmd()
|
|
1206
|
+
assert not Client.post_call_called
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|