Example #1
0
func (this *OpenStack) VmReimage(vm *lobster.VirtualMachine, imageIdentification string) error {
	opts := servers.RebuildOpts{
		ImageID: imageIdentification,
	}
	_, err := servers.Rebuild(this.ComputeClient, vm.Identification, opts).Extract()
	return err
}
Example #2
0
func (os *OpenStack) ReimageInstance(instanceID string, image *compute.Image) error {
	imageID, err := common.GetMatchingImageID(os, image)
	if err != nil {
		return err
	}
	opts := servers.RebuildOpts{
		ImageID: imageID,
	}
	_, err = servers.Rebuild(os.ComputeClient, instanceID, opts).Extract()
	return err
}