remove ListSnapshots and GetAllSnapshots

Signed-off-by: Steve Kriss <steve@heptio.com>
pull/226/head
Steve Kriss 2017-11-29 13:59:29 -08:00
parent 7e3fc0884e
commit 038fa39451
10 changed files with 42 additions and 258 deletions

View File

@ -144,32 +144,6 @@ func (b *blockStore) IsVolumeReady(volumeID, volumeAZ string) (ready bool, err e
return *res.Volumes[0].State == ec2.VolumeStateAvailable, nil
}
func (b *blockStore) ListSnapshots(tagFilters map[string]string) ([]string, error) {
req := &ec2.DescribeSnapshotsInput{}
for k, v := range tagFilters {
filter := &ec2.Filter{}
filter.SetName(k)
filter.SetValues([]*string{&v})
req.Filters = append(req.Filters, filter)
}
var ret []string
err := b.ec2.DescribeSnapshotsPages(req, func(res *ec2.DescribeSnapshotsOutput, lastPage bool) bool {
for _, snapshot := range res.Snapshots {
ret = append(ret, *snapshot.SnapshotId)
}
return !lastPage
})
if err != nil {
return nil, errors.WithStack(err)
}
return ret, nil
}
func (b *blockStore) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error) {
req := &ec2.CreateSnapshotInput{
VolumeId: &volumeID,

View File

@ -200,40 +200,6 @@ func (b *blockStore) IsVolumeReady(volumeID, volumeAZ string) (ready bool, err e
return *res.ProvisioningState == "Succeeded", nil
}
func (b *blockStore) ListSnapshots(tagFilters map[string]string) ([]string, error) {
res, err := b.snaps.ListByResourceGroup(b.resourceGroup)
if err != nil {
return nil, errors.WithStack(err)
}
if res.Value == nil {
return nil, errors.New("nil Value returned from ListByResourceGroup call")
}
ret := make([]string, 0, len(*res.Value))
Snapshot:
for _, snap := range *res.Value {
if snap.Tags == nil && len(tagFilters) > 0 {
continue
}
if snap.ID == nil {
continue
}
// Azure doesn't offer tag-filtering through the API so we have to manually
// filter results. Require all filter keys to be present, with matching vals.
for filterKey, filterVal := range tagFilters {
if val, ok := (*snap.Tags)[filterKey]; !ok || val == nil || *val != filterVal {
continue Snapshot
}
}
ret = append(ret, *snap.Name)
}
return ret, nil
}
func (b *blockStore) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error) {
fullDiskName := getFullDiskName(b.subscription, b.resourceGroup, volumeID)
// snapshot names must be <= 80 characters long

View File

@ -17,7 +17,6 @@ limitations under the License.
package gcp
import (
"strings"
"time"
"github.com/pkg/errors"
@ -115,33 +114,6 @@ func (b *blockStore) IsVolumeReady(volumeID, volumeAZ string) (ready bool, err e
return disk.Status == "READY", nil
}
func (b *blockStore) ListSnapshots(tagFilters map[string]string) ([]string, error) {
useParentheses := len(tagFilters) > 1
subFilters := make([]string, 0, len(tagFilters))
for k, v := range tagFilters {
fs := k + " eq " + v
if useParentheses {
fs = "(" + fs + ")"
}
subFilters = append(subFilters, fs)
}
filter := strings.Join(subFilters, " ")
res, err := b.gce.Snapshots.List(b.project).Filter(filter).Do()
if err != nil {
return nil, errors.WithStack(err)
}
ret := make([]string, 0, len(res.Items))
for _, snap := range res.Items {
ret = append(ret, snap.Name)
}
return ret, nil
}
func (b *blockStore) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error) {
// snapshot names must adhere to RFC1035 and be 1-63 characters
// long

View File

@ -26,11 +26,6 @@ import (
// SnapshotService exposes Ark-specific operations for snapshotting and restoring block
// volumes.
type SnapshotService interface {
// GetAllSnapshots returns a slice of all snapshots found in the cloud API that
// are tagged with Ark metadata. Returns an error if a problem is encountered accessing
// the cloud API.
GetAllSnapshots() ([]string, error)
// CreateSnapshot triggers a snapshot for the specified cloud volume and tags it with metadata.
// it returns the cloud snapshot ID, or an error if a problem is encountered triggering the snapshot via
// the cloud API.
@ -99,19 +94,6 @@ func (sr *snapshotService) CreateVolumeFromSnapshot(snapshotID string, volumeTyp
}
}
func (sr *snapshotService) GetAllSnapshots() ([]string, error) {
tags := map[string]string{
snapshotTagKey: snapshotTagVal,
}
res, err := sr.blockStore.ListSnapshots(tags)
if err != nil {
return nil, err
}
return res, nil
}
func (sr *snapshotService) CreateSnapshot(volumeID, volumeAZ string) (string, error) {
tags := map[string]string{
snapshotTagKey: snapshotTagVal,

View File

@ -80,9 +80,6 @@ type BlockStore interface {
// IsVolumeReady returns whether the specified volume is ready to be used.
IsVolumeReady(volumeID, volumeAZ string) (ready bool, err error)
// ListSnapshots returns a list of all snapshots matching the specified set of tag key/values.
ListSnapshots(tagFilters map[string]string) ([]string, error)
// CreateSnapshot creates a snapshot of the specified block volume, and applies the provided
// set of tags to the snapshot.
CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (snapshotID string, err error)

View File

@ -124,16 +124,6 @@ func (c *BlockStoreGRPCClient) IsVolumeReady(volumeID, volumeAZ string) (bool, e
return res.Ready, nil
}
// ListSnapshots returns a list of all snapshots matching the specified set of tag key/values.
func (c *BlockStoreGRPCClient) ListSnapshots(tagFilters map[string]string) ([]string, error) {
res, err := c.grpcClient.ListSnapshots(context.Background(), &proto.ListSnapshotsRequest{TagFilters: tagFilters})
if err != nil {
return nil, err
}
return res.SnapshotIDs, nil
}
// CreateSnapshot creates a snapshot of the specified block volume, and applies the provided
// set of tags to the snapshot.
func (c *BlockStoreGRPCClient) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error) {
@ -267,16 +257,6 @@ func (s *BlockStoreGRPCServer) IsVolumeReady(ctx context.Context, req *proto.IsV
return &proto.IsVolumeReadyResponse{Ready: ready}, nil
}
// ListSnapshots returns a list of all snapshots matching the specified set of tag key/values.
func (s *BlockStoreGRPCServer) ListSnapshots(ctx context.Context, req *proto.ListSnapshotsRequest) (*proto.ListSnapshotsResponse, error) {
snapshotIDs, err := s.impl.ListSnapshots(req.TagFilters)
if err != nil {
return nil, err
}
return &proto.ListSnapshotsResponse{SnapshotIDs: snapshotIDs}, nil
}
// CreateSnapshot creates a snapshot of the specified block volume, and applies the provided
// set of tags to the snapshot.
func (s *BlockStoreGRPCServer) CreateSnapshot(ctx context.Context, req *proto.CreateSnapshotRequest) (*proto.CreateSnapshotResponse, error) {

View File

@ -21,8 +21,6 @@ It has these top-level messages:
GetVolumeInfoResponse
IsVolumeReadyRequest
IsVolumeReadyResponse
ListSnapshotsRequest
ListSnapshotsResponse
CreateSnapshotRequest
CreateSnapshotResponse
DeleteSnapshotRequest

View File

@ -161,38 +161,6 @@ func (m *IsVolumeReadyResponse) GetReady() bool {
return false
}
type ListSnapshotsRequest struct {
TagFilters map[string]string `protobuf:"bytes,1,rep,name=tagFilters" json:"tagFilters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} }
func (m *ListSnapshotsRequest) String() string { return proto.CompactTextString(m) }
func (*ListSnapshotsRequest) ProtoMessage() {}
func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
func (m *ListSnapshotsRequest) GetTagFilters() map[string]string {
if m != nil {
return m.TagFilters
}
return nil
}
type ListSnapshotsResponse struct {
SnapshotIDs []string `protobuf:"bytes,2,rep,name=snapshotIDs" json:"snapshotIDs,omitempty"`
}
func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} }
func (m *ListSnapshotsResponse) String() string { return proto.CompactTextString(m) }
func (*ListSnapshotsResponse) ProtoMessage() {}
func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (m *ListSnapshotsResponse) GetSnapshotIDs() []string {
if m != nil {
return m.SnapshotIDs
}
return nil
}
type CreateSnapshotRequest struct {
VolumeID string `protobuf:"bytes,1,opt,name=volumeID" json:"volumeID,omitempty"`
VolumeAZ string `protobuf:"bytes,2,opt,name=volumeAZ" json:"volumeAZ,omitempty"`
@ -202,7 +170,7 @@ type CreateSnapshotRequest struct {
func (m *CreateSnapshotRequest) Reset() { *m = CreateSnapshotRequest{} }
func (m *CreateSnapshotRequest) String() string { return proto.CompactTextString(m) }
func (*CreateSnapshotRequest) ProtoMessage() {}
func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
func (m *CreateSnapshotRequest) GetVolumeID() string {
if m != nil {
@ -232,7 +200,7 @@ type CreateSnapshotResponse struct {
func (m *CreateSnapshotResponse) Reset() { *m = CreateSnapshotResponse{} }
func (m *CreateSnapshotResponse) String() string { return proto.CompactTextString(m) }
func (*CreateSnapshotResponse) ProtoMessage() {}
func (*CreateSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
func (*CreateSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (m *CreateSnapshotResponse) GetSnapshotID() string {
if m != nil {
@ -248,7 +216,7 @@ type DeleteSnapshotRequest struct {
func (m *DeleteSnapshotRequest) Reset() { *m = DeleteSnapshotRequest{} }
func (m *DeleteSnapshotRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSnapshotRequest) ProtoMessage() {}
func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} }
func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
func (m *DeleteSnapshotRequest) GetSnapshotID() string {
if m != nil {
@ -264,7 +232,7 @@ type GetVolumeIDRequest struct {
func (m *GetVolumeIDRequest) Reset() { *m = GetVolumeIDRequest{} }
func (m *GetVolumeIDRequest) String() string { return proto.CompactTextString(m) }
func (*GetVolumeIDRequest) ProtoMessage() {}
func (*GetVolumeIDRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} }
func (*GetVolumeIDRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
func (m *GetVolumeIDRequest) GetPersistentVolume() []byte {
if m != nil {
@ -280,7 +248,7 @@ type GetVolumeIDResponse struct {
func (m *GetVolumeIDResponse) Reset() { *m = GetVolumeIDResponse{} }
func (m *GetVolumeIDResponse) String() string { return proto.CompactTextString(m) }
func (*GetVolumeIDResponse) ProtoMessage() {}
func (*GetVolumeIDResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} }
func (*GetVolumeIDResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} }
func (m *GetVolumeIDResponse) GetVolumeID() string {
if m != nil {
@ -297,7 +265,7 @@ type SetVolumeIDRequest struct {
func (m *SetVolumeIDRequest) Reset() { *m = SetVolumeIDRequest{} }
func (m *SetVolumeIDRequest) String() string { return proto.CompactTextString(m) }
func (*SetVolumeIDRequest) ProtoMessage() {}
func (*SetVolumeIDRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{13} }
func (*SetVolumeIDRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} }
func (m *SetVolumeIDRequest) GetPersistentVolume() []byte {
if m != nil {
@ -320,7 +288,7 @@ type SetVolumeIDResponse struct {
func (m *SetVolumeIDResponse) Reset() { *m = SetVolumeIDResponse{} }
func (m *SetVolumeIDResponse) String() string { return proto.CompactTextString(m) }
func (*SetVolumeIDResponse) ProtoMessage() {}
func (*SetVolumeIDResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{14} }
func (*SetVolumeIDResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} }
func (m *SetVolumeIDResponse) GetPersistentVolume() []byte {
if m != nil {
@ -336,8 +304,6 @@ func init() {
proto.RegisterType((*GetVolumeInfoResponse)(nil), "generated.GetVolumeInfoResponse")
proto.RegisterType((*IsVolumeReadyRequest)(nil), "generated.IsVolumeReadyRequest")
proto.RegisterType((*IsVolumeReadyResponse)(nil), "generated.IsVolumeReadyResponse")
proto.RegisterType((*ListSnapshotsRequest)(nil), "generated.ListSnapshotsRequest")
proto.RegisterType((*ListSnapshotsResponse)(nil), "generated.ListSnapshotsResponse")
proto.RegisterType((*CreateSnapshotRequest)(nil), "generated.CreateSnapshotRequest")
proto.RegisterType((*CreateSnapshotResponse)(nil), "generated.CreateSnapshotResponse")
proto.RegisterType((*DeleteSnapshotRequest)(nil), "generated.DeleteSnapshotRequest")
@ -362,7 +328,6 @@ type BlockStoreClient interface {
CreateVolumeFromSnapshot(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error)
GetVolumeInfo(ctx context.Context, in *GetVolumeInfoRequest, opts ...grpc.CallOption) (*GetVolumeInfoResponse, error)
IsVolumeReady(ctx context.Context, in *IsVolumeReadyRequest, opts ...grpc.CallOption) (*IsVolumeReadyResponse, error)
ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error)
DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*Empty, error)
GetVolumeID(ctx context.Context, in *GetVolumeIDRequest, opts ...grpc.CallOption) (*GetVolumeIDResponse, error)
@ -413,15 +378,6 @@ func (c *blockStoreClient) IsVolumeReady(ctx context.Context, in *IsVolumeReadyR
return out, nil
}
func (c *blockStoreClient) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) {
out := new(ListSnapshotsResponse)
err := grpc.Invoke(ctx, "/generated.BlockStore/ListSnapshots", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blockStoreClient) CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error) {
out := new(CreateSnapshotResponse)
err := grpc.Invoke(ctx, "/generated.BlockStore/CreateSnapshot", in, out, c.cc, opts...)
@ -465,7 +421,6 @@ type BlockStoreServer interface {
CreateVolumeFromSnapshot(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error)
GetVolumeInfo(context.Context, *GetVolumeInfoRequest) (*GetVolumeInfoResponse, error)
IsVolumeReady(context.Context, *IsVolumeReadyRequest) (*IsVolumeReadyResponse, error)
ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error)
CreateSnapshot(context.Context, *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*Empty, error)
GetVolumeID(context.Context, *GetVolumeIDRequest) (*GetVolumeIDResponse, error)
@ -548,24 +503,6 @@ func _BlockStore_IsVolumeReady_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _BlockStore_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSnapshotsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlockStoreServer).ListSnapshots(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/generated.BlockStore/ListSnapshots",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlockStoreServer).ListSnapshots(ctx, req.(*ListSnapshotsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BlockStore_CreateSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSnapshotRequest)
if err := dec(in); err != nil {
@ -658,10 +595,6 @@ var _BlockStore_serviceDesc = grpc.ServiceDesc{
MethodName: "IsVolumeReady",
Handler: _BlockStore_IsVolumeReady_Handler,
},
{
MethodName: "ListSnapshots",
Handler: _BlockStore_ListSnapshots_Handler,
},
{
MethodName: "CreateSnapshot",
Handler: _BlockStore_CreateSnapshot_Handler,
@ -686,44 +619,39 @@ var _BlockStore_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("BlockStore.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 620 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xd1, 0x6e, 0xd3, 0x3c,
0x14, 0x56, 0x9a, 0xee, 0xd7, 0x7a, 0xba, 0xed, 0xaf, 0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xbb, 0xb3, 0x2e, 0x2d, 0x34, 0x8d, 0xa0, 0xee,
0xaf, 0x61, 0xf3, 0x37, 0xb3, 0x69, 0xc6, 0xff, 0xeb, 0x7f, 0xc9, 0x3f, 0xfd, 0xd3, 0xbf, 0x01,
0x00, 0x00, 0xff, 0xff, 0xe7, 0x50, 0x0a, 0x1d, 0x16, 0x08, 0x00, 0x00,
// 540 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x95, 0x3f, 0x40, 0xcd, 0xa4, 0x54, 0xd1, 0x26, 0xa9, 0x2c, 0x4b, 0x04, 0xe3, 0x53, 0x54,
0x89, 0x08, 0xc2, 0xa1, 0x15, 0x07, 0x44, 0x21, 0x05, 0x45, 0x54, 0x3d, 0xd8, 0x85, 0x03, 0x70,
0x31, 0x64, 0x48, 0xa3, 0x26, 0x5e, 0xe3, 0xdd, 0x54, 0xf2, 0x0f, 0xe0, 0xbf, 0xf1, 0xa3, 0x38,
0x20, 0xdb, 0xeb, 0x8f, 0x4d, 0x36, 0x09, 0x55, 0x6e, 0x9e, 0x99, 0x7d, 0x6f, 0xdf, 0xec, 0xbe,
0x59, 0x43, 0xeb, 0xed, 0x9c, 0xfe, 0xb8, 0xf5, 0x39, 0x8d, 0x71, 0x10, 0xc5, 0x94, 0x53, 0xd2,
0x98, 0x62, 0x88, 0x71, 0xc0, 0x71, 0x62, 0x1f, 0xfa, 0x37, 0x41, 0x8c, 0x93, 0xbc, 0xe0, 0xfe,
0xd6, 0xa0, 0xfd, 0x2e, 0xc6, 0x80, 0xe3, 0x67, 0x3a, 0x5f, 0x2e, 0xd0, 0xc3, 0x5f, 0x4b, 0x64,
0x9c, 0xf4, 0x00, 0x58, 0x18, 0x44, 0xec, 0x86, 0xf2, 0xf1, 0xc8, 0xd2, 0x1c, 0xad, 0xdf, 0xf0,
0x6a, 0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, 0xdf, 0xce, 0xa6, 0xb0, 0xea, 0xf7, 0x87, 0xd9, 0x1f, 0xeb, 0xe5, 0xbf, 0x00,
0x00, 0x00, 0xff, 0xff, 0x76, 0x14, 0x93, 0xa6, 0xde, 0x06, 0x00, 0x00,
}

View File

@ -33,14 +33,6 @@ message IsVolumeReadyResponse {
bool ready = 1;
}
message ListSnapshotsRequest {
map<string, string> tagFilters = 1;
}
message ListSnapshotsResponse {
repeated string snapshotIDs = 2;
}
message CreateSnapshotRequest {
string volumeID = 1;
string volumeAZ = 2;
@ -77,7 +69,6 @@ service BlockStore {
rpc CreateVolumeFromSnapshot(CreateVolumeRequest) returns (CreateVolumeResponse);
rpc GetVolumeInfo(GetVolumeInfoRequest) returns (GetVolumeInfoResponse);
rpc IsVolumeReady(IsVolumeReadyRequest) returns (IsVolumeReadyResponse);
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse);
rpc CreateSnapshot(CreateSnapshotRequest) returns (CreateSnapshotResponse);
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (Empty);
rpc GetVolumeID(GetVolumeIDRequest) returns (GetVolumeIDResponse);

View File

@ -39,10 +39,6 @@ type FakeSnapshotService struct {
VolumeIDSet string
}
func (s *FakeSnapshotService) GetAllSnapshots() ([]string, error) {
return s.SnapshotsTaken.List(), nil
}
func (s *FakeSnapshotService) CreateSnapshot(volumeID, volumeAZ string) (string, error) {
if _, exists := s.SnapshottableVolumes[volumeID]; !exists {
return "", errors.New("snapshottable volume not found")