Use networking to hold network related pkgs

Change names of unclear methods

Use net as pkg name for short
This commit is contained in:
Harry Zhang
2016-01-06 23:56:41 +08:00
committed by harry
parent 33c72db59c
commit 936a11e775
43 changed files with 687 additions and 626 deletions

View File

@@ -20,11 +20,11 @@ import (
"reflect"
"testing"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/net"
)
func TestRangeAllocatorEmpty(t *testing.T) {
r := &util.PortRange{}
r := &net.PortRange{}
r.Set("0-0")
defer func() {
if rv := recover(); rv == nil {
@@ -35,7 +35,7 @@ func TestRangeAllocatorEmpty(t *testing.T) {
}
func TestRangeAllocatorFullyAllocated(t *testing.T) {
r := &util.PortRange{}
r := &net.PortRange{}
r.Set("1-1")
a := newPortRangeAllocator(*r)
p, err := a.AllocateNext()
@@ -67,7 +67,7 @@ func TestRangeAllocatorFullyAllocated(t *testing.T) {
}
func TestRangeAllocator_RandomishAllocation(t *testing.T) {
r := &util.PortRange{}
r := &net.PortRange{}
r.Set("1-100")
a := newPortRangeAllocator(*r)