-
Notifications
You must be signed in to change notification settings - Fork 1
Rename and refactor bootstrap, implement basic provisioning functions #140
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
base: main
Are you sure you want to change the base?
Conversation
4f5a453 to
9e59f4a
Compare
9e59f4a to
24203e1
Compare
d34c54d to
e5aa346
Compare
This renames `DeviceSpec.Bootstrap` to `Provisioning` in order to have a unified naming. We also implement a ProvisioningProvider interface and state transitionings in the device controller.
1b1d271 to
bb719f3
Compare
Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
| // +required | ||
| Endpoint Endpoint `json:"endpoint"` | ||
|
|
||
| // Bootstrap is an optional configuration for the device bootstrap process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Bootstrap is an optional configuration for the device bootstrap process. | |
| // Provisioning is an optional configuration for the device provisioning process. |
nit: this comment should be updated.
| if activeProv == nil { | ||
| err := errors.New("device went into provisioning completed phase, but no active provisioning found") | ||
| log.Error(err, "Failed to finalize provisioning") | ||
| return ctrl.Result{}, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return ctrl.Result{}, err | |
| return ctrl.Result{}, reconcile.TerminalError(err) |
We should use a reconcile.TerminalError as there is no point in retrying on this error.
This renames
DeviceSpec.BootstraptoProvisioningin order to have aunified naming. We also implement a ProvisioningProvider interface and
state transitionings in the device controller.