Revendor github.com/Microsoft/hcsshim v0.8.4
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
24
vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
generated
vendored
24
vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
generated
vendored
@@ -14,9 +14,21 @@ import (
|
||||
// format includes any metadata required for later importing the layer (using
|
||||
// ImportLayer), and requires the full list of parent layer paths in order to
|
||||
// perform the export.
|
||||
func ExportLayer(path string, exportFolderPath string, parentLayerPaths []string) error {
|
||||
title := "hcsshim::ExportLayer "
|
||||
logrus.Debugf(title+"path %s folder %s", path, exportFolderPath)
|
||||
func ExportLayer(path string, exportFolderPath string, parentLayerPaths []string) (err error) {
|
||||
title := "hcsshim::ExportLayer"
|
||||
fields := logrus.Fields{
|
||||
"path": path,
|
||||
"exportFolderPath": exportFolderPath,
|
||||
}
|
||||
logrus.WithFields(fields).Debug(title)
|
||||
defer func() {
|
||||
if err != nil {
|
||||
fields[logrus.ErrorKey] = err
|
||||
logrus.WithFields(fields).Error(err)
|
||||
} else {
|
||||
logrus.WithFields(fields).Debug(title + " - succeeded")
|
||||
}
|
||||
}()
|
||||
|
||||
// Generate layer descriptors
|
||||
layers, err := layerPathsToDescriptors(parentLayerPaths)
|
||||
@@ -26,12 +38,8 @@ func ExportLayer(path string, exportFolderPath string, parentLayerPaths []string
|
||||
|
||||
err = exportLayer(&stdDriverInfo, path, exportFolderPath, layers)
|
||||
if err != nil {
|
||||
err = hcserror.Errorf(err, title, "path=%s folder=%s", path, exportFolderPath)
|
||||
logrus.Error(err)
|
||||
return err
|
||||
return hcserror.New(err, title+" - failed", "")
|
||||
}
|
||||
|
||||
logrus.Debugf(title+"succeeded path=%s folder=%s", path, exportFolderPath)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user