Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 1 | package gophercloud |
| 2 | |
| 3 | // AccessProvider instances encapsulate a Keystone authentication interface. |
| 4 | type AccessProvider interface { |
| 5 | // FirstEndpointUrlByCriteria searches through the service catalog for the first |
| 6 | // matching entry endpoint fulfilling the provided criteria. If nothing found, |
| 7 | // return "". Otherwise, return either the public or internal URL for the |
| 8 | // endpoint, depending on both its existence and the setting of the ApiCriteria.UrlChoice |
| 9 | // field. |
| 10 | FirstEndpointUrlByCriteria(ApiCriteria) string |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 11 | |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 12 | // AuthToken provides a copy of the current authentication token for the user's credentials. |
Samuel A. Falvo II | 659e14b | 2013-07-16 12:04:54 -0700 | [diff] [blame] | 13 | // Note that AuthToken() will not automatically refresh an expired token. |
Samuel A. Falvo II | bc0d54a | 2013-07-08 14:45:21 -0700 | [diff] [blame] | 14 | AuthToken() string |
Samuel A. Falvo II | 659e14b | 2013-07-16 12:04:54 -0700 | [diff] [blame] | 15 | |
| 16 | // Revoke allows you to terminate any program's access to the OpenStack API by token ID. |
| 17 | Revoke(string) error |
Samuel A. Falvo II | 9e64f6b | 2013-07-16 14:26:50 -0700 | [diff] [blame] | 18 | |
| 19 | // Reauthenticate attempts to acquire a new authentication token, if the feature is enabled by |
| 20 | // AuthOptions.AllowReauth. |
| 21 | Reauthenticate() error |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 22 | } |
| 23 | |
Samuel A. Falvo II | 1dd740a | 2013-07-08 15:48:40 -0700 | [diff] [blame] | 24 | // CloudServersProvider instances encapsulate a Cloud Servers API, should one exist in the service catalog |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 25 | // for your provider. |
Samuel A. Falvo II | 1dd740a | 2013-07-08 15:48:40 -0700 | [diff] [blame] | 26 | type CloudServersProvider interface { |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 27 | // Servers |
| 28 | |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 29 | ListServers() ([]Server, error) |
Samuel A. Falvo II | 5c305e1 | 2013-07-25 19:19:43 -0700 | [diff] [blame] | 30 | ListServersLinksOnly() ([]Server, error) |
Samuel A. Falvo II | 02f5e83 | 2013-07-10 13:52:27 -0700 | [diff] [blame] | 31 | ServerById(id string) (*Server, error) |
Samuel A. Falvo II | e91ff6d | 2013-07-11 15:46:10 -0700 | [diff] [blame] | 32 | CreateServer(ns NewServer) (*NewServer, error) |
Samuel A. Falvo II | 286e4de | 2013-07-12 11:33:31 -0700 | [diff] [blame] | 33 | DeleteServerById(id string) error |
Samuel A. Falvo II | 5c305e1 | 2013-07-25 19:19:43 -0700 | [diff] [blame] | 34 | SetAdminPassword(id string, pw string) error |
Samuel A. Falvo II | 8512e9a | 2013-07-26 22:53:29 -0700 | [diff] [blame] | 35 | ResizeServer(id, newName, newFlavor, newDiskConfig string) error |
| 36 | RevertResize(id string) error |
| 37 | ConfirmResize(id string) error |
Samuel A. Falvo II | adbecf9 | 2013-07-30 13:13:59 -0700 | [diff] [blame] | 38 | RebootServer(id string, hard bool) error |
Samuel A. Falvo II | 15da6ab | 2013-07-30 14:02:11 -0700 | [diff] [blame^] | 39 | RescueServer(id string) (string, error) |
| 40 | UnrescueServer(id string) error |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 41 | |
| 42 | // Images |
| 43 | |
| 44 | ListImages() ([]Image, error) |
Samuel A. Falvo II | bc3f10f | 2013-07-11 17:13:24 -0700 | [diff] [blame] | 45 | |
| 46 | // Flavors |
| 47 | |
| 48 | ListFlavors() ([]Flavor, error) |
Samuel A. Falvo II | 2e2b877 | 2013-07-04 15:40:15 -0700 | [diff] [blame] | 49 | } |
Samuel A. Falvo II | 0a6e45a | 2013-07-11 17:00:41 -0700 | [diff] [blame] | 50 | |