Skip to content

Commit

Permalink
PWX-36635: Adds the pod_name field to PureBlockSpec (#2445)
Browse files Browse the repository at this point in the history
* PWX-36635: Adds the pod_name field to PureBlockSpec

Signed-off-by: Adam Krpan <[email protected]>

* Disabling alert UTs

Signed-off-by: Priyanshu Pandey <[email protected]>

* Skipping bucket ops tests

Signed-off-by: Priyanshu Pandey <[email protected]>

* Undo skip UT

Signed-off-by: Priyanshu Pandey <[email protected]>

---------

Signed-off-by: Adam Krpan <[email protected]>
Signed-off-by: Priyanshu Pandey <[email protected]>
Co-authored-by: Priyanshu Pandey <[email protected]>
  • Loading branch information
Pure-AdamuKaapan and pp511 authored Jun 5, 2024
1 parent cbb5901 commit e35a656
Show file tree
Hide file tree
Showing 9 changed files with 5,655 additions and 5,622 deletions.
4 changes: 4 additions & 0 deletions SDK_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Releases

### v0.185.0 - (05/24/2024)

* Added a parameter for FlashArray Pod names

### v0.184.0 - (04/30/2024)

* Added new `pure_nfs_endpoint_opt` field to VolumeSpecUpdate message in proto.
Expand Down
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const (
SpecBackendPureFile = "pure_file"
SpecPureFileExportRules = "pure_export_rules"
SpecPureNFSEnpoint = "pure_nfs_endpoint"
SpecPurePodName = "pure_fa_pod_name"
SpecIoThrottleRdIOPS = "io_throttle_rd_iops"
SpecIoThrottleWrIOPS = "io_throttle_wr_iops"
SpecIoThrottleRdBW = "io_throttle_rd_bw"
Expand Down
11,240 changes: 5,625 additions & 5,615 deletions api/api.pb.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ message PXDProxySpec {
message PureBlockSpec {
string serial_num = 1;
string full_vol_name = 2;
string pod_name = 3;
}

// PureFileSpec is the spec for proxying a volume on pure_file backends
Expand Down Expand Up @@ -5853,7 +5854,7 @@ message SdkVersion {
// SDK version major value of this specification
Major = 0;
// SDK version minor value of this specification
Minor = 184;
Minor = 185;
// SDK version patch value of this specification
Patch = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion api/server/sdk/alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/pkg/proto/time"
prototime "github.com/libopenstorage/openstorage/pkg/proto/time"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
5 changes: 4 additions & 1 deletion api/server/sdk/api/api.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/server/sdk/bucket_ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
12 changes: 9 additions & 3 deletions api/server/sdk/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,16 @@ func (s *testServer) Stop() {
volumedrivers.Remove("mock")

// Shutdown servers
s.conn.Close()
if s.conn != nil {
s.conn.Close()
}
s.m.EXPECT().StopVolumeWatcher().Return().AnyTimes()
s.server.Stop()
s.gw.Close()
if s.server != nil {
s.server.Stop()
}
if s.gw != nil {
s.gw.Close()
}

// Check mocks
s.mc.Finish()
Expand Down
8 changes: 8 additions & 0 deletions api/spec/spec_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,14 @@ func (d *specHandler) RestoreSpecFromOpts(
spec.ProxySpec.PureFileSpec = &api.PureFileSpec{}
}
spec.ProxySpec.PureFileSpec.ExportRules = v
case api.SpecPurePodName:
if spec.ProxySpec == nil {
spec.ProxySpec = &api.ProxySpec{}
}
if spec.ProxySpec.PureBlockSpec == nil {
spec.ProxySpec.PureBlockSpec = &api.PureBlockSpec{}
}
spec.ProxySpec.PureBlockSpec.PodName = v
case api.SpecBackendVolName:
volName := v
pureBackendVolName = &volName
Expand Down

0 comments on commit e35a656

Please sign in to comment.