Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Invalid API response when using snapctl #810

Closed
IRCody opened this issue Mar 28, 2016 · 2 comments
Closed

Invalid API response when using snapctl #810

IRCody opened this issue Mar 28, 2016 · 2 comments

Comments

@IRCody
Copy link
Contributor

IRCody commented Mar 28, 2016

When using snapctl to query metrics while running one of the example tasks we have the following metrics:

 % ./snapctl metric list
NAMESPACE                VERSIONS
/intel/mock/*/baz        1,2
/intel/mock/bar          1,2
/intel/mock/foo          1,2

When I do ./snapctl metric get -m="/intel/mock/*" I am expecting to get all of the metrics since no version is specified. I actually see:
Received an invalid API response (META/TYPE)

Digging a little deeper, the rest API is sending a response with all the metrics. The rest client gives the error because it's expecting MetricReturnedType but is receiving MetricsReturnedType which is what causes the error. The code that impacts this is here. The server side is doing some interpretation of the wildcard here but only if the namespace ends in a *.

@IRCody
Copy link
Contributor Author

IRCody commented Jul 6, 2016

Closing since #1048 is a newer issue with with a better description and linked PR that addresses this issue.

@obourdon
Copy link
Contributor

obourdon commented Jul 7, 2016

Oops sorry I did not see that the issue was already logged. Will be more careful in the future

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants