Skip to content

Add support for additional bios settings fields in Ironic#2174

Merged
jtopjian merged 1 commit intogophercloud:masterfrom
bfournie:bios-detail
Jun 10, 2021
Merged

Add support for additional bios settings fields in Ironic#2174
jtopjian merged 1 commit intogophercloud:masterfrom
bfournie:bios-detail

Conversation

@bfournie
Copy link
Copy Markdown
Contributor

@bfournie bfournie commented Jun 4, 2021

For #2166

A recent change to Ironic
(https://review.opendev.org/c/openstack/ironic/+/786707) has added
support for bios registry fields in the Ironic API for microversion 1.74.
These can be retrieved using the ?detail=True option when listing
all settings. The fields are also included when getting individual
settings without any options.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 4, 2021

Coverage Status

Coverage decreased (-0.0007%) to 79.915% when pulling 2590506 on bfournie:bios-detail into 05c2cc8 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jun 4, 2021

Build failed.

@elfosardo
Copy link
Copy Markdown
Contributor

this probably depends on the focal update? #2169

@elfosardo
Copy link
Copy Markdown
Contributor

/retest

@elfosardo
Copy link
Copy Markdown
Contributor

recheck

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Jun 7, 2021

This PR will need to be rebased off of master in order to take advantage of the recently fixed tests. However, since there aren't any acceptance tests in this PR, nothing will really be tested, so it's kind of moot.

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

@bfournie Thanks for submitting this. This looks good to me. I've left one non-blocking comment. Let me know if you want to change things or leave them as-is.


func getBoolPointer(x bool) *bool {
return &x
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are a few existing ways of handling this:

  1. There's some existing helper code here: openstack/identity/v3/users/testing/requests_test.go
  2. Just declare the variables each time:
    iTrue := true
    networkCreateOpts := networks.CreateOpts{
    Name: "private",
    AdminStateUp: &iTrue,
    }

I can't recall why there aren't central helper functions in the testhelper package. I have a feeling that, for whatever reason, it was discouraged to do this in Golang in general and to instead manually declare every occurrence of pointers, but it's been too long for me to remember at this point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I changed to use the variables.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jun 7, 2021

Build failed.

For gophercloud#2166

A recent change to Ironic
(https://review.opendev.org/c/openstack/ironic/+/786707) has added
support for bios registry fields in the Ironic API. These can be
retrieved using the `?detail=True` option.
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Jun 8, 2021

Build failed.

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

LGTM - thank you!

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.

4 participants