-
Notifications
You must be signed in to change notification settings - Fork 36
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
Adds support for listing tags, filtering machines by tag, and getting machine hardware info #96
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
d4c1c87
to
7819ada
Compare
7819ada
to
6bcc018
Compare
Tags / MachineArgs and HardwareInfo seem relatively straightforward, but it is a bit of a surprise that you're also changing how dispatchSingleRequest (and adding an HTTPClient override), without document the what and why you're changing it in the PR overview. |
@markylaing is out for a few days but I agree that it'd make sense to clarify the need for the http.Client in the PR or maybe even split this into two PRs. The reason why we want to have a custom http.Client is so we can do proper TLS validation of otherwise self-signed servers as well as more tightly control timeouts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you did want to expose httpClient, we would definitely want to add some tests that it is supported/being used when appropriate.
|
6bcc018
to
88024ad
Compare
Adds required methods for reading a list of tags. Signed-off-by: Mark Laing <mark.laing@canonical.com>
88024ad
to
ef64133
Compare
Adds method to controller interface for listing all MAAS tags. Signed-off-by: Mark Laing <mark.laing@canonical.com>
Adds Tags field to MachinesArgs and adds these values to query parameters to filter results. Signed-off-by: Mark Laing <mark.laing@canonical.com>
Adds methods for retrieval of hardware info from the MAAS API response for a machine. Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
bb9eecd
to
16207a0
Compare
/build |
Failure on this build was because of a misconfiguration of Jenkins. I'm looking to fix that and will resubmit. |
@jameinel Did you have any success fixing the Jenkins configuration? |
Sorry about the delay, I was off on holiday. I will try again today.
John
=:->
…On Tue, Jun 21, 2022 at 7:35 AM Mark Laing ***@***.***> wrote:
@jameinel <https://github.com/jameinel> Did you have any success fixing
the Jenkins configuration?
—
Reply to this email directly, view it on GitHub
<#96 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRQ7PFIYHQWOGJI5KWWA3VQGSHVANCNFSM5XBCVI5A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jameinel no worries 👍 |
/build |
1 similar comment
/build |
It has been fixed, and the build check passed. So I'll merge. |
/merge |
/merge |
@jameinel thank you! |
Unfortunately, HardwareInfo isn't always available for every MAAS version. The prior PR[1] expected that hardware_info was available. The fix is simple, just make it optional when attempting to validate it with the schema coercing. Additionally, I've added a few more tests to ensure that we're testing various scenarios of hardware_info being omitted. Lastly, it felt like there was a missing check for TestReadMachines for validating the hardware info for a given machine response. This should fix[2] in Juju. 1. juju#96 2. https://bugs.launchpad.net/juju/+bug/2009064
#99 Unfortunately, HardwareInfo isn't always available for every MAAS version. The prior PR[1] expected that hardware_info was available. The fix is simple, just make it optional when attempting to validate it with the schema coercing. Additionally, I've added a few more tests to ensure that we're testing various scenarios of hardware_info being omitted. Lastly, it felt like there was a missing check for TestReadMachines for validating the hardware info for a given machine response. This should fix[2] in Juju. 1. #96 2. https://bugs.launchpad.net/juju/+bug/2009064
Tag
(implemented bytag
intags.go
) for interacting with MAAS tags.Tags() ([]Tag, error)
to theController
for retrieving a slice of MAAS tags.Tags
toMachineArgs
to allow filtering machines by tag.HardwareInfo() map[string]string
to theMachine
interface and implements it. Hardware info is added tomachine
when deserializing the API response.I have tried to follow conventions that I have found elsewhere in the codebase but let me know if I have missed something, thanks 😄