Create entry with a list of plain string as group
Change-Id: Ib1a7ebdf6977b78dfbf25606b1f455869c254f2d
This commit is contained in:
parent
bcb3210760
commit
0d263ec65e
|
@ -3417,12 +3417,22 @@ class NsxPolicySecurityPolicyBaseApi(NsxPolicyResourceBase):
|
||||||
direction=nsx_constants.IN_OUT,
|
direction=nsx_constants.IN_OUT,
|
||||||
logged=False, tag=None,
|
logged=False, tag=None,
|
||||||
service_entries=IGNORE,
|
service_entries=IGNORE,
|
||||||
tenant=constants.POLICY_INFRA_TENANT):
|
tenant=constants.POLICY_INFRA_TENANT,
|
||||||
|
plain_groups=False):
|
||||||
"""Create CommunicationMap Entry.
|
"""Create CommunicationMap Entry.
|
||||||
|
|
||||||
source_groups/dest_groups should be a list of group ids belonging
|
source_groups/dest_groups should be a list of group ids belonging
|
||||||
to the domain.
|
to the domain.
|
||||||
|
|
||||||
|
plain_groups should be True if source_groups/dest_groups is a list
|
||||||
|
of group paths and IP addresses. IP address support from NSX 3.0.0.
|
||||||
"""
|
"""
|
||||||
|
if (version.LooseVersion(self.version) <
|
||||||
|
version.LooseVersion(nsx_constants.NSX_VERSION_3_0_0) and
|
||||||
|
plain_groups):
|
||||||
|
err_msg = _("plain_groups support is from NSX 3.0.0")
|
||||||
|
raise exceptions.NsxLibInvalidInput(error_message=err_msg)
|
||||||
|
|
||||||
# get the next available sequence number
|
# get the next available sequence number
|
||||||
if not sequence_number:
|
if not sequence_number:
|
||||||
last_sequence = self._get_last_seq_num(domain_id, map_id,
|
last_sequence = self._get_last_seq_num(domain_id, map_id,
|
||||||
|
@ -3447,7 +3457,8 @@ class NsxPolicySecurityPolicyBaseApi(NsxPolicyResourceBase):
|
||||||
logged=logged,
|
logged=logged,
|
||||||
tag=tag,
|
tag=tag,
|
||||||
service_entries=service_entries,
|
service_entries=service_entries,
|
||||||
tenant=tenant)
|
tenant=tenant,
|
||||||
|
plain_groups=plain_groups)
|
||||||
|
|
||||||
self._create_or_store(entry_def)
|
self._create_or_store(entry_def)
|
||||||
return entry_id
|
return entry_id
|
||||||
|
|
Loading…
Reference in New Issue