3 import "github.com/Sirupsen/logrus"
5 // CreateLayer creates a new, empty, read-only layer on the filesystem based on
6 // the parent layer provided.
7 func CreateLayer(info DriverInfo, id, parent string) error {
8 title := "hcsshim::CreateLayer "
9 logrus.Debugf(title+"Flavour %d ID %s parent %s", info.Flavour, id, parent)
11 // Convert info to API calling convention
12 infop, err := convertDriverInfo(info)
18 err = createLayer(&infop, id, parent)
20 err = makeErrorf(err, title, "id=%s parent=%s flavour=%d", id, parent, info.Flavour)
25 logrus.Debugf(title+" - succeeded id=%s parent=%s flavour=%d", id, parent, info.Flavour)