NSX Policy cosmetic changes

Change-Id: I494325ff31ef2a77fa340ac8bada89c539568737
This commit is contained in:
Adit Sarfaty 2017-04-20 08:32:45 +03:00
parent ec1eb444a3
commit c78f095f7f
3 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ POLICY_INFRA_TENANT = 'infra'
ACTION_ALLOW = 'ALLOW'
ACTION_DENY = 'DENY'
ANY_GROUP = "ANY"
ANY_GROUP = 'ANY'
CONDITION_KEY_TAG = 'Tag'
CONDITION_MEMBER_VM = 'VirtualMachine'

View File

@ -89,11 +89,11 @@ class ResourceDef(object):
entries_path = cls.sub_entries_path()
if not entries_path:
# This sub class doesn't support this
return None
return
if (entries_path not in obj_body or
len(obj_body[entries_path]) != 1):
return None
return
return obj_body[entries_path][0]

View File

@ -323,7 +323,7 @@ class NsxPolicyCommunicationProfileApi(NsxPolicyResourceBase):
def create(self, name, profile_id=None, description=None,
services=None, action=policy_constants.ACTION_ALLOW,
tenant=policy_constants.POLICY_INFRA_TENANT):
"""Create a Communication proflie with a single entry.
"""Create a Communication profile with a single entry.
Services should be a list of service ids
"""
@ -561,7 +561,7 @@ class NsxPolicyEnforcementPointApi(NsxPolicyResourceBase):
def update(self, ep_id, name=None, description=None,
ip_address=None, username=None, password=None,
tenant=policy_constants.POLICY_INFRA_TENANT):
"""Update the enforcment point.
"""Update the enforcement point.
username & password must be defined
"""