Update cadvisor version to latest version

This commit is contained in:
Manjunath A Kumatagi
2017-04-04 13:20:20 -04:00
parent e36cca4b5d
commit 2b42d71a94
18 changed files with 594 additions and 106 deletions

View File

@@ -23,11 +23,12 @@ import (
)
const (
DockerInfoDriver = "Driver"
DockerInfoDriverStatus = "DriverStatus"
DriverStatusPoolName = "Pool Name"
DriverStatusDataLoopFile = "Data loop file"
DriverStatusMetadataFile = "Metadata file"
DockerInfoDriver = "Driver"
DockerInfoDriverStatus = "DriverStatus"
DriverStatusPoolName = "Pool Name"
DriverStatusDataLoopFile = "Data loop file"
DriverStatusMetadataFile = "Metadata file"
DriverStatusParentDataset = "Parent Dataset"
)
func DriverStatusValue(status [][2]string, target string) string {
@@ -68,3 +69,12 @@ func DockerMetadataDevice(info dockertypes.Info) (string, error) {
return metadataDevice, nil
}
func DockerZfsFilesystem(info dockertypes.Info) (string, error) {
filesystem := DriverStatusValue(info.DriverStatus, DriverStatusParentDataset)
if len(filesystem) == 0 {
return "", fmt.Errorf("Could not get zfs filesystem")
}
return filesystem, nil
}