Skip to content

Commit 61d8853

Browse files
Merge pull request #308 from jacobweinstock/fix-rufio-preferred-order
Use PreferDriver instead of PreferProtocol: ## Description <!--- Please describe what this PR is going to change --> The API spec defines PreferredOrder to be the driver name not the protocol name. This causes the "gofish" provider to not change the order as that is the driver name not the protocol. The protocol is "redfish". Changing the implementation to use PreferDriver is chosen so as not to have to change the API spec validation. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 75fb842 + 9d0406e commit 61d8853

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

controller/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewClientFunc(timeout time.Duration) ClientFunc {
3636
defer cancel()
3737

3838
if opts != nil && opts.ProviderOptions != nil && len(opts.PreferredOrder) > 0 {
39-
client.Registry.Drivers = client.Registry.PreferProtocol(toStringSlice(opts.PreferredOrder)...)
39+
client.Registry.Drivers = client.Registry.PreferDriver(toStringSlice(opts.PreferredOrder)...)
4040
}
4141
if err := client.Open(ctx); err != nil {
4242
md := client.GetMetadata()

controller/helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (t *testProvider) Protocol() string {
5858
if t.Proto != "" {
5959
return t.Proto
6060
}
61-
return "redfish"
61+
return "gofish"
6262
}
6363

6464
func (t *testProvider) Features() registrar.Features {

0 commit comments

Comments
 (0)