rebase: upgrade snapshot v1beta1 api and clientset to v1 version

At present e2e snapshot code make use of snapshot v1beta1 api and client
This patch address the same and snapshot api clientset/apis are updated
to v1 version.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal
2021-06-23 14:22:11 +05:30
committed by mergify[bot]
parent 0749315d7e
commit 5aca04d540
58 changed files with 1561 additions and 1285 deletions

View File

@ -21,8 +21,6 @@
package proto
import (
"fmt"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc/encoding"
)
@ -38,19 +36,11 @@ func init() {
type codec struct{}
func (codec) Marshal(v interface{}) ([]byte, error) {
vv, ok := v.(proto.Message)
if !ok {
return nil, fmt.Errorf("failed to marshal, message is %T, want proto.Message", v)
}
return proto.Marshal(vv)
return proto.Marshal(v.(proto.Message))
}
func (codec) Unmarshal(data []byte, v interface{}) error {
vv, ok := v.(proto.Message)
if !ok {
return fmt.Errorf("failed to unmarshal, message is %T, want proto.Message", v)
}
return proto.Unmarshal(data, vv)
return proto.Unmarshal(data, v.(proto.Message))
}
func (codec) Name() string {