コード例 #1
0
ファイル: results_test.go プロジェクト: hdansou/rack
func TestExtractRebuild(t *testing.T) {
	th.SetupHTTP()
	defer th.TeardownHTTP()
	servers.HandleRebuildSuccessfully(t, servers.SingleServerBody)

	r := servers.Rebuild(client.ServiceClient(), "1234asdf", servers.RebuildOpts{
		Name:       "new-name",
		AdminPass:  "******",
		ImageID:    "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/images/f90f6034-2570-4974-8351-6b49732ef2eb",
		AccessIPv4: "1.2.3.4",
	})
	config, err := ExtractRebuild(r)
	th.AssertNoErr(t, err)
	th.CheckEquals(t, Manual, *config)
}
コード例 #2
0
ファイル: delegate.go プロジェクト: hdansou/rack
// Rebuild will reprovision the server according to the configuration options provided in the
// RebuildOpts struct.
func Rebuild(client *gophercloud.ServiceClient, id string, opts os.RebuildOptsBuilder) os.RebuildResult {
	return os.Rebuild(client, id, opts)
}