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

Feature/958 reservation all connectors reserved #878

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

maaikez
Copy link
Contributor

@maaikez maaikez commented Nov 27, 2024

Describe your changes

Update status document for reservations

See other related pull requests:
EVerest/everest-core#972
EVerest/everest-utils#171

Issue ticket number and link

Checklist before requesting a review

Comment on lines 80 to 95
if (valid) {
if (device_model->get_optional_value<bool>(ControllerComponentVariables::ReservationCtrlrAvailable)
.value_or(false)) {
if (!this->reserve_now_callback.has_value() or this->reserve_now_callback == nullptr) {
EVLOG_error << "Reservation is set to 'Available' and 'Enabled' in device model, but "
"reserve_now_callback is not implemented.";
}

if (!this->cancel_reservation_callback.has_value() or this->cancel_reservation_callback == nullptr) {
EVLOG_error
<< "Reservation is set to 'Available' and 'Enabled' in device model, but cancel_reservation "
"callback is not implemented";
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like it could be moved inside the upper if (valid) and it does not set the valid variable to false in case of the error logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch

I put it in this if (valid) so it will not continue if the previous were not valid. But maybe it is a good idea to have a message of all not valid callbacks instead of fixing one and getting an error about the next. So changed it accordingly as you asked indeed :).

@maaikez maaikez force-pushed the feature/958-reservation-all-connectors-reserved branch from f73e62e to d79bf58 Compare December 10, 2024 13:39
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
…set it back to 'available' again. and it is not necessary for octt.

Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
…ged runtime (readwrite).

Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
@maaikez maaikez force-pushed the feature/958-reservation-all-connectors-reserved branch from c10ee90 to daa1c87 Compare December 13, 2024 16:17
@maaikez maaikez merged commit e52ac96 into main Dec 16, 2024
8 checks passed
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.

2 participants