Repository navigation
Add support for Ironic baremetal API #1429
Copy link
Copy link
Open
Description
There is currently no support for Ironic baremetal API in gophercloud. I'm working on it, and will have a PR open shortly for Nodes to get some early feedback, and will then continue on to the rest of the resources.
Categorized by the groupings under https://developer.openstack.org/api-ref/baremetal/
API
Clients
-
KeystoneBaremetal v1 API: Nodes #1431 -
NoauthBaremetal API: noauth support #1449 -
HTTPBasic Support http_basic auth_strategy for Ironic Inspector #1986 (inspector) and Support http_basic auth_strategy for Ironic #1983 ironic)
Nodes
Basic CRUD
-
Nodes: ListBaremetal v1 API: Nodes #1431 -
Nodes: GetBaremetal v1 API: Nodes #1431 -
Nodes: CreateBaremetal v1 API: Nodes #1431 -
Nodes: UpdateBaremetal v1 API: Nodes #1431 -
Nodes: DeleteBaremetal v1 API: Nodes #1431
Node Management
-
Nodes: ValidationBaremetal V1 API: Node management #1450 -
Nodes: Boot DevicesBaremetal V1 API: Node management #1450 -
Nodes: Non-masking interruptsBaremetal V1 API: Node management #1450 -
Nodes: Provision StateBaremetal API v1: Node provision state #1452 -
Nodes: Maintenancebaremetal: add API to set maintenance and maintenance reason #2384 -
Nodes: Power StateBaremetal API v1: Node Power State #1479 -
Nodes: RAID ConfigBaremetal API V1: Support set RAID config #1559 - Nodes: Console
Node Vendor Passthru
- Node Vendor Passthru: List
- Node Vendor Passthru: Call
Node Traits
Virtual Interfaces
-
VIF: List for a NodeAdded support for VIF's in Baremetal #3311 -
VIF: Attach to a NodeAdded support for VIF's in Baremetal #3311 -
VIF: Detach from a NodeAdded support for VIF's in Baremetal #3311
Portgroups
-
Portgroups: ListAdded support for baremetal portgroups #3290 -
Portgroups: GetAdded support for baremetal portgroups #3290 -
Portgroups: CreateAdded support for baremetal portgroups #3290 -
Portgroups: UpdateAdded support for baremetal portgroups #3290 -
Portgroups: DeleteAdded support for baremetal portgroups #3290
Ports
-
Ports: ListBaremetal V1 API Ports #1453 -
Ports: GetBaremetal V1 API Ports #1453 -
Ports: CreateBaremetal V1 API Ports #1453 -
Ports: UpdateBaremetal V1 API Ports #1453 -
Ports: DeleteBaremetal V1 API Ports #1453
Volumes
Volume Connector
- Volume Connectors: List
- Volume Connectors: Get
- Volumes Connectors: Create
- Volumes Connectors: Update
- Volumes Connectors: Delete
Volume Targets
- Volume Connectors: List
- Volume Connectors: Get
- Volumes Connectors: Create
- Volumes Connectors: Update
- Volumes Connectors: Delete
Drivers
-
Drivers: List Baremetal V1 API Drivers #1461 -
Drivers: Get Baremetal V1 API Drivers #1461 -
Drivers: Show PropertiesBaremetal V1 API Drivers #1461 -
Drivers: Show disk propertiesBaremetal V1 API Drivers #1461
Drivers vendor passthru
- Drivers vendor passthru: List
- Drivers vendor passthru: Call
Conductors
-
Conductors: ListAdd conductor API to Baremetal V1 #2722 -
Conductor: GetAdd conductor API to Baremetal V1 #2722
Allocation
-
Allocation: CreateBaremetal API V1: Allocations #1528 -
Allocation: ListBaremetal API V1: Allocations #1528 -
Allocation: GetBaremetal API V1: Allocations #1528 -
Allocation: DeleteBaremetal API V1: Allocations #1528
Allocation: Node
- Node Allocation: Get
- Node Allocation: Delete
Chassis
- Chassis: List
- Chassis: Get
- Chassis: Update
- Chassis: Delete
- Chassis: Create
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
juliakreger commentedon Feb 15, 2019
One minor note: The chassis functionality in the OpenStack Baremetal API is essentially unused and could likely be disregarded.
joy717 commentedon Feb 25, 2019
Good job!! I love u guys. haha.
Thanks!
dtantsur commentedon Feb 25, 2019
Would be nice to throw the newly introduced Conductors and Allocations on the list. On the other hand, as Julia mentioned, Chassis are pretty useless.
stbenjam commentedon Feb 26, 2019
Thanks @dtantsur, updated the list to include those. Is Chassis worth including at all for anyone or should I just remove it entirely from the list?
dtantsur commentedon Feb 28, 2019
I would make it absolutely lowest priority. Literally the last thing to get done (and only for completeness).
jtopjian commentedon Mar 12, 2019
@stbenjam One thing I just noticed is that Ports
created_atandupdated_atare set tostring. They should betime.Time:https://github.com/gophercloud/gophercloud/blob/master/openstack/baremetal/v1/ports/results.go#L61-L66
If you run into JSON decoding issues with the time, then you'll need to implement a custom
UnmarshalJSONmethod. This is quite common because the suite of OpenStack projects use so many different time formats. For example:gophercloud/openstack/blockstorage/v3/volumes/results.go
Line 13 in 19abc56
gophercloud/openstack/blockstorage/v3/volumes/results.go
Lines 23 to 38 in 19abc56
gophercloud/openstack/blockstorage/v3/volumes/results.go
Line 27 in 19abc56
gophercloud/results.go
Lines 296 to 312 in cbd1d4b
results.goalready has a wide array of time formats. It's doubtful you'll need to define a new one.Let me know if you need any help with this.
stbenjam commentedon Mar 13, 2019
@iurygregory ^ FYI, if you have time to look
iurygregory commentedon Mar 13, 2019
@stbenjam going to look
iurygregory commentedon Mar 13, 2019
@jtopjian according to the Ironic API docs they we handle as string see https://developer.openstack.org/api-ref/baremetal/?expanded=#ports-ports (Create Port Response, List Detailed Ports Response, Show Port Details Response, Update a Port Response)
created_at | body | string | The UTC date and time when the resource was created, ISO 8601 format.
updated_at | body | string | The UTC date and time when the resource was updated, ISO 8601 format. May be “null”.
So its still necessary to change?
stbenjam commentedon Mar 13, 2019
I think so. You’ll still interact with the API using strings but it should be marshalled/unmarshalled as a native time type in go.
jtopjian commentedon Mar 13, 2019
@stbenjam is correct. API references and JSON samples will always have dates as strings because JSON doesn't have a native "date" type. Converting them to a real date-type in Go will allow code to use date-specific methods/actions.
There are lots examples throughout Gophercloud on how to handle this (just search for
UnmarshalJSON), but please let me know if you need help - I don't mean for this to cause a large amount of time.EmilienM commentedon Dec 15, 2021
@iurygregory would you be able to check the TODO items in the bug description and see what's actually left to do (and maybe prioritize it?).
Thanks
juliakreger commentedon Dec 15, 2021
@EmilienM @iurygregory is on PTO this month, so I wouldn't expect a reply before sometime in January.
EmilienM commentedon Dec 15, 2021
Thanks. This is not urgent at all! Trying to make sure we keep this issue updated and at some point we close it.
dtantsur commentedon Apr 20, 2022
Maintenance API: #2384
Sharpz7 commentedon Dec 31, 2024
Hey Folks,
I recently(ish) contributed #3228, and am now looking to contribute more to baremetal. I will read everything up to now and make my own judgement on what to tackle next, but if anyone has features they are interested in being covered first, let me know.
There are also some updates to this list. If I can be given permissions to edit the above post I am happy to do all those updates.
#2722 (Conductors is completed)
Portgroups seems like a good start from there?
Cheers :)
dtantsur commentedon Dec 31, 2024
@Sharpz7 thanks! It's worth checking which features of the list above are actually implemented or not: I think it's outdated. Of all items marked as not done, I think the port groups and the VIF API are the most important, followed by vendor passthru (but I'm quite sure we already have at least some passthru support) and the rest of the allocation API.
Conductors API seems to have been implemented by #2722 (but please double-check it for completeness).
Sharpz7 commentedon Dec 31, 2024
@dtantsur you responded too quickly! I was just editing my comment since spotting the conductors change. Thank you though, I agree with you and I think that priority list is good :)
mandre commentedon Mar 20, 2025
FYI, I've updated the list with completed work. Let me know if I missed anything.
Sharpz7 commentedon Jun 1, 2026
I don't think there is much left now. Maybe volumes?
dtantsur commentedon Jun 1, 2026
@Sharpz7 do we have runbooks?
Sharpz7 commentedon Jun 1, 2026
@dtantsur no I do not think so, I will add that to do. @mandre would you be against me creating a new issue so I can take ownership of maintaining the EPIC?
Sharpz7 commentedon Aug 11, 2026
Okay... I think this issue is nearly entirely covered.