Skip to content

Commit

Permalink
Return early on device_owner=network:dhcp filter
Browse files Browse the repository at this point in the history
These ports are not present in contrail so we
can return an empty list very early in the
list method.

Change-Id: Icd9dd1c23ead3ead4a628ff504b48bcb8daa7f8c
Closes-Bug: #1559592
  • Loading branch information
eonpatapon committed Mar 19, 2016
1 parent 6f3dee5 commit 904d869
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -950,6 +950,10 @@ def get_vmi_list(self, **kwargs):
return self._resource_list(**kwargs)

def resource_list(self, context=None, filters=None, fields=None):
if (filters.get('device_owner') == 'network:dhcp' or
'network:dhcp' in filters.get('device_owner', [])):
return []

if not context:
context = {'is_admin': True}

Expand Down

0 comments on commit 904d869

Please sign in to comment.