github.com/gophercloud/gophercloud@v1.11.0/openstack/baremetal/v1/nodes/urls.go (about) 1 package nodes 2 3 import "github.com/gophercloud/gophercloud" 4 5 func createURL(client *gophercloud.ServiceClient) string { 6 return client.ServiceURL("nodes") 7 } 8 9 func listURL(client *gophercloud.ServiceClient) string { 10 return createURL(client) 11 } 12 13 func listDetailURL(client *gophercloud.ServiceClient) string { 14 return client.ServiceURL("nodes", "detail") 15 } 16 17 func deleteURL(client *gophercloud.ServiceClient, id string) string { 18 return client.ServiceURL("nodes", id) 19 } 20 21 func getURL(client *gophercloud.ServiceClient, id string) string { 22 return deleteURL(client, id) 23 } 24 25 func updateURL(client *gophercloud.ServiceClient, id string) string { 26 return deleteURL(client, id) 27 } 28 29 func validateURL(client *gophercloud.ServiceClient, id string) string { 30 return client.ServiceURL("nodes", id, "validate") 31 } 32 33 func injectNMIURL(client *gophercloud.ServiceClient, id string) string { 34 return client.ServiceURL("nodes", id, "management", "inject_nmi") 35 } 36 37 func bootDeviceURL(client *gophercloud.ServiceClient, id string) string { 38 return client.ServiceURL("nodes", id, "management", "boot_device") 39 } 40 41 func supportedBootDeviceURL(client *gophercloud.ServiceClient, id string) string { 42 return client.ServiceURL("nodes", id, "management", "boot_device", "supported") 43 } 44 45 func statesResourceURL(client *gophercloud.ServiceClient, id string, state string) string { 46 return client.ServiceURL("nodes", id, "states", state) 47 } 48 49 func powerStateURL(client *gophercloud.ServiceClient, id string) string { 50 return statesResourceURL(client, id, "power") 51 } 52 53 func provisionStateURL(client *gophercloud.ServiceClient, id string) string { 54 return statesResourceURL(client, id, "provision") 55 } 56 57 func raidConfigURL(client *gophercloud.ServiceClient, id string) string { 58 return statesResourceURL(client, id, "raid") 59 } 60 61 func biosListSettingsURL(client *gophercloud.ServiceClient, id string) string { 62 return client.ServiceURL("nodes", id, "bios") 63 } 64 65 func biosGetSettingURL(client *gophercloud.ServiceClient, id string, setting string) string { 66 return client.ServiceURL("nodes", id, "bios", setting) 67 } 68 69 func vendorPassthruMethodsURL(client *gophercloud.ServiceClient, id string) string { 70 return client.ServiceURL("nodes", id, "vendor_passthru", "methods") 71 } 72 73 func vendorPassthruCallURL(client *gophercloud.ServiceClient, id string) string { 74 return client.ServiceURL("nodes", id, "vendor_passthru") 75 } 76 77 func maintenanceURL(client *gophercloud.ServiceClient, id string) string { 78 return client.ServiceURL("nodes", id, "maintenance") 79 }