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

[JUJU-3293] Hardware Info should be optional #99

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

SimonRichardson
Copy link
Member

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. Adds support for listing tags, filtering machines by tag, and getting machine hardware info #96
  2. https://bugs.launchpad.net/juju/+bug/2009064

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
Copy link
Member

@manadart manadart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks for this.

@SimonRichardson
Copy link
Member Author

/merge

@jujubot jujubot merged commit 5277155 into juju:v2 Mar 17, 2023
@SimonRichardson SimonRichardson deleted the optional-hardware-info branch March 17, 2023 11:11
SimonRichardson added a commit to SimonRichardson/juju that referenced this pull request Mar 17, 2023
The following brings in the gomaasapi dependency that allows the
hardware info attribute to be optional. See the gomaasapi dependency for
more information[1].

  1. juju/gomaasapi#99
jujubot added a commit to juju/juju that referenced this pull request Mar 18, 2023
#15312

The following brings in the gomaasapi dependency that allows the hardware info attribute to be optional. See the gomaasapi dependency for more information[1].

 1. juju/gomaasapi#99

## Checklist

- [x] Code style: imports ordered, good names, simple structure, etc

## QA steps

```sh
$ juju bootstrap maas test --build-agent
$ juju add-machine
$ juju deploy ubuntu
```

## Bug reference

https://bugs.launchpad.net/juju/+bug/2009064
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants