Exemple #1
0
// ResetNetwork is the admin operation to create a backup of a Compute Server.
func CreateBackup(client *gophercloud.ServiceClient, id string, opts CreateBackupOpts) gophercloud.ErrResult {
	var res gophercloud.ErrResult

	req, err := opts.ToCreateBackupMap()
	if err != nil {
		res.Err = err
		return res
	}
	_, res.Err = client.Post(actionURL(client, id), req, nil, nil)
	return res

}
Exemple #2
0
// ResetNetwork is the admin operation to reset the network on a Compute Server.
func LiveMigrate(client *gophercloud.ServiceClient, id string, opts LiveMigrateOpts) gophercloud.ErrResult {
	var res gophercloud.ErrResult

	req, err := opts.ToLiveMigrateMap()
	if err != nil {
		res.Err = err
		return res
	}

	_, res.Err = client.Post(actionURL(client, id), req, nil, nil)
	return res

}