lxd/images.go
func imageCreateInPool(d *Daemon, info *api.Image, storagePool string) error {
	if storagePool == "" {
		return fmt.Errorf("No storage pool specified")
	}

	// Initialize a new storage interface.
	s, err := storagePoolInit(d.State(), storagePool)
	if err != nil {
		return err
	}

	// Create the storage volume for the image on the requested storage
	// pool.
	err = s.ImageCreate(info.Fingerprint, nil)
	if err != nil {
		return err
	}

	return nil
}
func imageCreateInPool(d *Daemon, info *api.Image, storagePool string) error {
	if storagePool == "" {
		return fmt.Errorf("No storage pool specified")
	}

	// Initialize a new storage interface.
	s, err := storagePoolInit(d.State(), storagePool)
	if err != nil {
		return err
	}

	// Create the storage volume for the image on the requested storage
	// pool.
	err = s.ImageCreate(info.Fingerprint, nil)
	if err != nil {
		return err
	}

	return nil
}
func imageCreateInPool ( d * Daemon , info * api . Image , storagePool string ) error { if storagePool == " " { return fmt . Errorf ( " " ) } // Initialize a new storage interface. s , err := storagePoolInit ( d . State ( ) , storagePool ) if err != nil { return err } // Create the storage volume for the image on the requested storage // pool. err = s . ImageCreate ( info . Fingerprint , nil ) if err != nil { return err } return nil }
// imageCreateInPool() creates a new storage volume in a given storage pool for
// the image. No entry in the images database will be created. This implies that
// imageCreateinPool() should only be called when an image already exists in the
// database and hence has already a storage volume in at least one storage pool.
imageCreateInPool () creates a new storage volume in a given storage pool for the image . No entry in the images database will be created . This implies that imageCreateinPool () should only be called when an image already exists in the database and hence has already a storage volume in at least one storage pool .