Bulk move current info api to info/v1. Making room for info/v2.

This commit is contained in:
Rohit Jnagal 2015-03-04 00:47:28 +00:00
parent e2e54565fe
commit 872546ba3a
50 changed files with 57 additions and 56 deletions

View File

@ -29,7 +29,7 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/events"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
)

View File

@ -20,7 +20,7 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/events"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
)

View File

@ -28,12 +28,12 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/api"
"github.com/google/cadvisor/healthz"
"github.com/google/cadvisor/info"
"github.com/google/cadvisor/manager"
"github.com/google/cadvisor/pages"
"github.com/google/cadvisor/pages/static"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/validate"
"github.com/google/cadvisor/version"
)
var argIp = flag.String("listen_ip", "", "IP to listen on, defaults to all IPs")
@ -53,7 +53,7 @@ func main() {
flag.Parse()
if *versionFlag {
fmt.Printf("cAdvisor version %s\n", info.VERSION)
fmt.Printf("cAdvisor version %s\n", version.VERSION)
os.Exit(0)
}
@ -135,7 +135,7 @@ func main() {
// Install signal handler.
installSignalHandler(containerManager)
glog.Infof("Starting cAdvisor version: %q on port %d", info.VERSION, *argPort)
glog.Infof("Starting cAdvisor version: %q on port %d", version.VERSION, *argPort)
addr := fmt.Sprintf("%s:%d", *argIp, *argPort)
glog.Fatal(http.ListenAndServe(addr, nil))

View File

@ -24,7 +24,7 @@ import (
"path"
"strings"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
// Client represents the base URL for a cAdvisor client.

View File

@ -25,8 +25,8 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
itest "github.com/google/cadvisor/info/test"
info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"
"github.com/kr/pretty"
)

View File

@ -16,7 +16,7 @@
// defines an interface for container operation handlers.
package container
import "github.com/google/cadvisor/info"
import info "github.com/google/cadvisor/info/v1"
// ListType describes whether listing should be just for a
// specific container or performed recursively.

View File

@ -28,7 +28,7 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
)

View File

@ -32,7 +32,7 @@ import (
"github.com/google/cadvisor/container"
containerLibcontainer "github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
)

View File

@ -22,7 +22,7 @@ import (
"github.com/docker/libcontainer/cgroups"
cgroupfs "github.com/docker/libcontainer/cgroups/fs"
"github.com/docker/libcontainer/network"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
type CgroupSubsystems struct {

View File

@ -15,7 +15,7 @@
package container
import (
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/mock"
)

View File

@ -20,7 +20,7 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
type rawFactory struct {

View File

@ -33,7 +33,7 @@ import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
"github.com/google/cadvisor/fs"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
"github.com/google/cadvisor/utils/sysinfo"
)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package info
package v1
import (
"reflect"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package info
package v1
import (
"testing"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package info
package v1
type FsInfo struct {
// Block device associated with the filesystem.

View File

@ -19,7 +19,7 @@ import (
"math/rand"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
func GenerateRandomStats(numStats, numCores int, duration time.Duration) []*info.ContainerStats {

View File

@ -21,7 +21,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/integration/framework"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -25,7 +25,7 @@ import (
"github.com/docker/docker/pkg/units"
"github.com/golang/glog"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage/memory"
"github.com/google/cadvisor/summary"
"github.com/google/cadvisor/utils/cpuload"

View File

@ -23,8 +23,8 @@ import (
"time"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/info"
itest "github.com/google/cadvisor/info/test"
info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"
"github.com/google/cadvisor/storage/memory"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -26,10 +26,11 @@ import (
dclient "github.com/fsouza/go-dockerclient"
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/fs"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysinfo"
version "github.com/google/cadvisor/version"
)
var cpuRegExp = regexp.MustCompile("processor\\t*: +([0-9]+)")
@ -272,7 +273,7 @@ func getVersionInfo() (*info.VersionInfo, error) {
KernelVersion: kernel_version,
ContainerOsVersion: container_os,
DockerVersion: docker_version,
CadvisorVersion: info.VERSION,
CadvisorVersion: version.VERSION,
}, nil
}

View File

@ -30,7 +30,7 @@ import (
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/container/raw"
"github.com/google/cadvisor/events"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage/memory"
"github.com/google/cadvisor/utils/cpuload"
"github.com/google/cadvisor/utils/oomparser"

View File

@ -16,7 +16,7 @@ package manager
import (
"github.com/google/cadvisor/events"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/mock"
)

View File

@ -24,8 +24,8 @@ import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/info"
itest "github.com/google/cadvisor/info/test"
info "github.com/google/cadvisor/info/v1"
itest "github.com/google/cadvisor/info/v1/test"
"github.com/google/cadvisor/storage/memory"
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
)

View File

@ -19,7 +19,7 @@ import (
"reflect"
"testing"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
)

View File

@ -27,7 +27,7 @@ import (
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
)

View File

@ -23,7 +23,7 @@ import (
"github.com/golang/glog"
"github.com/google/cadvisor/container/docker"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
)

View File

@ -22,7 +22,7 @@ import (
auth "github.com/abbot/go-http-auth"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"
)

View File

@ -20,7 +20,7 @@ import (
"time"
bigquery "code.google.com/p/google-api-go-client/bigquery/v2"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/bigquery/client"
)

View File

@ -19,7 +19,7 @@ import (
"sync"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
influxdb "github.com/influxdb/influxdb/client"
)

View File

@ -23,7 +23,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/test"
influxdb "github.com/influxdb/influxdb/client"

View File

@ -20,7 +20,7 @@ import (
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
)

View File

@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@ -18,7 +18,7 @@ import (
"sort"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
// A circular buffer for ContainerStats.

View File

@ -20,7 +20,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/assert"
)

View File

@ -14,7 +14,7 @@
package storage
import "github.com/google/cadvisor/info"
import info "github.com/google/cadvisor/info/v1"
type StorageDriver interface {
AddStats(ref info.ContainerReference, stats *info.ContainerStats) error

View File

@ -15,7 +15,7 @@
package test
import (
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/stretchr/testify/mock"
)

View File

@ -20,7 +20,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
)

View File

@ -15,7 +15,7 @@
package summary
import (
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
// Manages a buffer of usage samples.

View File

@ -18,7 +18,7 @@ import (
"reflect"
"testing"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
func createSample(i uint64) info.Usage {

View File

@ -22,7 +22,7 @@ import (
"sort"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
const secondsToMilliSeconds = 1000

View File

@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
const Nanosecond = 1000000000

View File

@ -25,7 +25,7 @@ import (
"sync"
"time"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
// Usage fields we track for generating percentiles.

View File

@ -18,7 +18,7 @@ import (
"fmt"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils/cpuload/netlink"
"github.com/google/cadvisor/utils/cpuload/scheddebug"
)

View File

@ -20,7 +20,7 @@ import (
"fmt"
"syscall"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
const (

View File

@ -19,7 +19,7 @@ import (
"os"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
)
type NetlinkReader struct {

View File

@ -25,7 +25,7 @@ import (
"time"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"
)

View File

@ -20,7 +20,7 @@ import (
"strconv"
"strings"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils/sysfs"
)

View File

@ -17,7 +17,7 @@ package sysinfo
import (
"testing"
"github.com/google/cadvisor/info"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package info
package version
// Version of cAdvisor.
const VERSION = "0.10.1"