Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add params argument to _get_uuid_by_name #2071

Open
wants to merge 2 commits into
base: eng
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions python/avi/sdk/avi_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ def put_by_name(self, path, name, data=None, tenant='',
session creation
returns session's response object
"""
uuid = self._get_uuid_by_name(
path, name, tenant, tenant_uuid, api_version=api_version)
uuid = self._get_uuid_by_name(path, name, tenant, tenant_uuid,
params=params, api_version=api_version)
path = '%s/%s' % (path, uuid)
return self.put(path, data, tenant, tenant_uuid, timeout=timeout,
params=params, api_version=api_version, **kwargs)
Expand Down Expand Up @@ -930,7 +930,7 @@ def delete_by_name(self, path, name, tenant='', tenant_uuid='',
returns session's response object
"""
uuid = self._get_uuid_by_name(path, name, tenant, tenant_uuid,
api_version=api_version)
params=params, api_version=api_version)
if not uuid:
raise ObjectNotFound("%s/?name=%s" % (path, name))
path = '%s/%s' % (path, uuid)
Expand Down Expand Up @@ -1063,10 +1063,11 @@ def _get_api_path(self, path, uuid=None):
return self.prefix + '/api/' + path

def _get_uuid_by_name(self, path, name, tenant='admin',
tenant_uuid='', api_version=None):
params=None, tenant_uuid='', api_version=None):
"""gets object by name and service path and returns uuid"""
resp = self.get_object_by_name(
path, name, tenant, tenant_uuid, api_version=api_version)
path, name, tenant, tenant_uuid, params=params,
api_version=api_version)
if not resp:
raise ObjectNotFound("%s/%s" % (path, name))
return self.get_obj_uuid(resp)
Expand Down