Skip to content

Commit 0f4183c

Browse files
committed
Add ProvisionUpdatedAt field to Baremetal nodes
1 parent 4f89b30 commit 0f4183c

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

openstack/baremetal/v1/nodes/results.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ type Node struct {
242242

243243
// The UTC date and time when the resource was updated, ISO 8601 format. May be “null”.
244244
UpdatedAt time.Time `json:"updated_at"`
245+
246+
// The UTC date and time when the provision state was updated, ISO 8601 format. May be “null”.
247+
ProvisionUpdatedAt time.Time `json:"provision_updated_at"`
245248
}
246249

247250
// NodePage abstracts the raw results of making a List() request against

openstack/baremetal/v1/nodes/testing/fixtures.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const NodeListDetailBody = `
144144
"power_state": null,
145145
"properties": {},
146146
"provision_state": "enroll",
147-
"provision_updated_at": null,
147+
"provision_updated_at": "2019-02-15T17:21:29+00:00",
148148
"raid_config": {},
149149
"raid_interface": "no-raid",
150150
"rescue_interface": "no-rescue",
@@ -448,7 +448,7 @@ const SingleNodeBody = `
448448
"power_state": null,
449449
"properties": {},
450450
"provision_state": "enroll",
451-
"provision_updated_at": null,
451+
"provision_updated_at": "2019-02-15T17:21:29+00:00",
452452
"raid_config": {},
453453
"raid_interface": "no-raid",
454454
"rescue_interface": "no-rescue",
@@ -814,10 +814,11 @@ const NodeSetMaintenanceBody = `
814814
`
815815

816816
var (
817-
createdAtFoo, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:28+00:00")
818-
createdAtBar, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:29+00:00")
819-
createdAtBaz, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:30+00:00")
820-
updatedAt, _ = time.Parse(time.RFC3339, "2019-02-15T19:59:29+00:00")
817+
createdAtFoo, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:28+00:00")
818+
createdAtBar, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:29+00:00")
819+
createdAtBaz, _ = time.Parse(time.RFC3339, "2019-01-31T19:59:30+00:00")
820+
updatedAt, _ = time.Parse(time.RFC3339, "2019-02-15T19:59:29+00:00")
821+
provisonUpdatedAt, _ = time.Parse(time.RFC3339, "2019-02-15T17:21:29+00:00")
821822

822823
NodeFoo = nodes.Node{
823824
UUID: "d2630783-6ec8-4836-b556-ab427c4b581e",
@@ -870,6 +871,7 @@ var (
870871
ProtectedReason: "",
871872
CreatedAt: createdAtFoo,
872873
UpdatedAt: updatedAt,
874+
ProvisionUpdatedAt: provisonUpdatedAt,
873875
}
874876

875877
NodeFooValidation = nodes.NodeValidation{

0 commit comments

Comments
 (0)