blob: 75b47265361aca623b3095f5950e66d4cb53bda3 [file] [log] [blame]
Michal Kobusa1c3ca92019-08-21 14:29:23 +02001package nodes
2
3import "gerrit.mcp.mirantis.net/debian/gophercloud.git"
4
Michal Kobusf6113582019-09-09 15:58:21 +02005func createURL(client *gophercloud.ServiceClient) string {
6 return client.ServiceURL("nodes")
7}
8
9func listURL(client *gophercloud.ServiceClient) string {
10 return createURL(client)
11}
12
13func listDetailURL(client *gophercloud.ServiceClient) string {
14 return client.ServiceURL("nodes", "detail")
15}
16
17func deleteURL(client *gophercloud.ServiceClient, id string) string {
18 return client.ServiceURL("nodes", id)
19}
20
21func getURL(client *gophercloud.ServiceClient, id string) string {
22 return deleteURL(client, id)
23}
24
25func updateURL(client *gophercloud.ServiceClient, id string) string {
26 return deleteURL(client, id)
27}
28
29func validateURL(client *gophercloud.ServiceClient, id string) string {
30 return client.ServiceURL("nodes", id, "validate")
31}
32
33func injectNMIURL(client *gophercloud.ServiceClient, id string) string {
34 return client.ServiceURL("nodes", id, "management", "inject_nmi")
35}
36
37func bootDeviceURL(client *gophercloud.ServiceClient, id string) string {
38 return client.ServiceURL("nodes", id, "management", "boot_device")
39}
40
41func supportedBootDeviceURL(client *gophercloud.ServiceClient, id string) string {
42 return client.ServiceURL("nodes", id, "management", "boot_device", "supported")
43}
44
45func statesResourceURL(client *gophercloud.ServiceClient, id string, state string) string {
46 return client.ServiceURL("nodes", id, "states", state)
47}
48
49func powerStateURL(client *gophercloud.ServiceClient, id string) string {
50 return statesResourceURL(client, id, "power")
51}
52
53func provisionStateURL(client *gophercloud.ServiceClient, id string) string {
54 return statesResourceURL(client, id, "provision")
55}
56
57func raidConfigURL(client *gophercloud.ServiceClient, id string) string {
58 return statesResourceURL(client, id, "raid")
Michal Kobusa1c3ca92019-08-21 14:29:23 +020059}