Bump Libcontainer to latest head

This commit is contained in:
Buddha Prakash
2016-08-04 10:04:14 -07:00
parent 20444ac84d
commit 216d707f28
43 changed files with 866 additions and 410 deletions

View File

@@ -100,3 +100,22 @@ func SearchLabels(labels []string, query string) string {
}
return ""
}
// Annotations returns the bundle path and user defined annotations from the
// libcontianer state. We need to remove the bundle because that is a label
// added by libcontainer.
func Annotations(labels []string) (bundle string, userAnnotations map[string]string) {
userAnnotations = make(map[string]string)
for _, l := range labels {
parts := strings.SplitN(l, "=", 2)
if len(parts) < 2 {
continue
}
if parts[0] == "bundle" {
bundle = parts[1]
} else {
userAnnotations[parts[0]] = parts[1]
}
}
return
}