Use hashutil to hold hash tools

This commit is contained in:
harry
2016-01-05 15:31:20 +08:00
committed by Harry Zhang
parent d6ab35a088
commit 2a52976983
7 changed files with 13 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ import (
"k8s.io/kubernetes/pkg/kubelet/network"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util"
hashutil "k8s.io/kubernetes/pkg/util/hash"
"k8s.io/kubernetes/pkg/util/parsers"
)
@@ -116,7 +116,7 @@ func TestGetContainerID(t *testing.T) {
func verifyPackUnpack(t *testing.T, podNamespace, podUID, podName, containerName string) {
container := &api.Container{Name: containerName}
hasher := adler32.New()
util.DeepHashObject(hasher, *container)
hashutil.DeepHashObject(hasher, *container)
computedHash := uint64(hasher.Sum32())
podFullName := fmt.Sprintf("%s_%s", podName, podNamespace)
_, name := BuildDockerName(KubeletContainerName{podFullName, types.UID(podUID), container.Name}, container)