Example #1
0
func TestExtractUpdate(t *testing.T) {
	th.SetupHTTP()
	defer th.TeardownHTTP()
	servers.HandleServerUpdateSuccessfully(t)

	r := servers.Update(client.ServiceClient(), "1234asdf", servers.UpdateOpts{
		Name: "new-name",
	})
	config, err := ExtractUpdate(r)
	th.AssertNoErr(t, err)
	th.CheckEquals(t, Manual, *config)
}
Example #2
0
// Update requests an existing server to be updated with the supplied options.
func Update(client *gophercloud.ServiceClient, id string, opts os.UpdateOptsBuilder) os.UpdateResult {
	return os.Update(client, id, opts)
}