Skip to content

Commit b8ec3a2

Browse files
committed
Add handling of api invisible parameters
As we need to handle parameters that doesn't pass through to api we need a parameter for that in parameter specs. We decided to use `api_invisible` for that purpose. The method `_auto_resolve_entities` will sort out these parameters/keys from `desired_entity`.
1 parent ec7aaaa commit b8ec3a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/module_utils/phpipam_helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def _auto_resolve_entities(self):
246246
need to be resolved and the id of a resolved entity.
247247
On that way we also convert boolean into int as the api needed this type.
248248
"""
249-
if key in self.phpipam_params:
249+
250+
if key in self.phpipam_params and not spec.get('api_invisible', False):
250251

251252
updated_key = spec.get('phpipam_name', key)
252253

@@ -275,6 +276,7 @@ def _phpipam_spec_helper(self, spec):
275276
argument_spec = {}
276277

277278
_PHPIPAM_SPEC_KEYS = {
279+
'api_invisible',
278280
'controller',
279281
'flatten',
280282
'phpipam_name',
@@ -283,6 +285,7 @@ def _phpipam_spec_helper(self, spec):
283285
'separator',
284286
}
285287
_VALUE_SPEC_KEYS = {
288+
'api_invisible',
286289
'controller',
287290
'flatten',
288291
'phpipam_name',

0 commit comments

Comments
 (0)