gnocchixyz / gnocchixyz/python-gnocchiclient

ResourceManager.search doesn't take the endpoint path into account

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
13
Forks
30
PR merge metrics
No merged PRs in 30d

Description

In here:
https://github.com/gnocchixyz/python-gnocchiclient/blob/master/gnocchiclient/v1/resource.py#L174

gnocchiclient does:
url = "v1/search/resource/%s?%%s" % resource_type

Unfortunately, when the endpoint is set to something like this:
http://api.example.com/metric

gnocchiclient then fails to add /metric to the above url = variable, and therefore fails.

The solution would be to check the endpoint, and find the path, to add it before the content of url=

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.