From 5ffd0c19d3fb062ff28b9acc15a4b9116b6ebc62 Mon Sep 17 00:00:00 2001 From: asarfaty Date: Wed, 15 Jul 2020 08:17:51 +0200 Subject: [PATCH] Add wait_until_realized for security policies Change-Id: I4ca75c8f419252ab14a4b510d0a47968c3ba16b9 --- vmware_nsxlib/v3/policy/core_resources.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vmware_nsxlib/v3/policy/core_resources.py b/vmware_nsxlib/v3/policy/core_resources.py index 1b65363a..5c2e6aad 100644 --- a/vmware_nsxlib/v3/policy/core_resources.py +++ b/vmware_nsxlib/v3/policy/core_resources.py @@ -3602,6 +3602,16 @@ class NsxPolicySecurityPolicyBaseApi(NsxPolicyResourceBase): return self._get_realization_info(map_def, entity_type=entity_type, silent=silent) + def wait_until_realized(self, domain_id, map_id, entity_type=None, + tenant=constants.POLICY_INFRA_TENANT, + sleep=None, max_attempts=None): + map_def = self.parent_entry_def(map_id=map_id, + domain_id=domain_id, + tenant=tenant) + return self._wait_until_realized(map_def, entity_type=entity_type, + sleep=sleep, + max_attempts=max_attempts) + class NsxPolicyCommunicationMapApi(NsxPolicySecurityPolicyBaseApi): """NSX Policy CommunicationMap (Under a Domain). AKA Security"""