Documentation ¶
Index ¶
- Constants
- type Data
- type GetStatusResponse
- type GetTenantsResponse
- type IkClient
- func (s *IkClient) Call(path string, query interface{}, jsonResp interface{}) (err error)
- func (s *IkClient) DeProvisionHost(requestID string) (resp *GetStatusResponse, err error)
- func (s *IkClient) GetStatus(requestID string) (resp *GetStatusResponse, err error)
- func (s *IkClient) GetTenants() (info GetTenantsResponse, err error)
- func (s *IkClient) ProvisionHost(sku string, tenantid string) (info *ProvisionHostResponse, err error)
- type InnkeeperClient
- type ProvisionHostResponse
- type RequestData
- type TenantData
Constants ¶
const ( //StatusReady - ready status StatusReady = "ready" //StatusRunning - status running StatusRunning = "running" //StatusSuccess - success status StatusSuccess = "success" //RouteProvisionHost - route to provision host endpoint RouteProvisionHost = "api/v1/Provision" //RouteGetStatus - route to getstatus endpoint RouteGetStatus = "api/v1/StatusDetails" //RouteDeProvisionHost - deprovision endpoint RouteDeProvisionHost = "api/v1/Deprovision" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v0.0.127
type Data struct { Credentials interface{} `json:"credentials"` Status string `json:"status"` }
Data --
type GetStatusResponse ¶ added in v0.0.125
type GetStatusResponse struct { Data Data `json:"data"` Message string `json:"message"` Status string `json:"status"` }
GetStatusResponse -- a status response object
type GetTenantsResponse ¶
type GetTenantsResponse struct { Data []TenantData `json:"data"` Message string `json:"message"` Status string `json:"status"` }
GetTenantsResponse -- auto json struct {[{"slotid": 1, "tenantid": "tech-support-openstack"},
{"slotid": 2, "tenantid": "photon"}, {"slotid": 3, "tenantid": "pez-stage"}, {"slotid": 4, "tenantid": "photon-2"}]}
type IkClient ¶
IkClient api struct
func (*IkClient) DeProvisionHost ¶ added in v0.0.138
func (s *IkClient) DeProvisionHost(requestID string) (resp *GetStatusResponse, err error)
DeProvisionHost - make a deprovision call to innkeeper for a given requestID
func (*IkClient) GetStatus ¶ added in v0.0.125
func (s *IkClient) GetStatus(requestID string) (resp *GetStatusResponse, err error)
GetStatus --
func (*IkClient) GetTenants ¶
func (s *IkClient) GetTenants() (info GetTenantsResponse, err error)
GetTenants -- /api/v1/GetTenants get current tenants
func (*IkClient) ProvisionHost ¶
func (s *IkClient) ProvisionHost(sku string, tenantid string) (info *ProvisionHostResponse, err error)
ProvisionHost -- given info provision a host in inkeeper "http://pez-app.core.pao.pez.pivotal.io:5555/api/v1/ProvisionHost?geo_loc=PAO&sku=4D.lowmem.R7&os=esxi60u2&count=1&feature=&tenantid=pez-stage"
type InnkeeperClient ¶
type InnkeeperClient interface { ProvisionHost(sku string, tenantid string) (result *ProvisionHostResponse, err error) GetStatus(requestID string) (resp *GetStatusResponse, err error) GetTenants() (result GetTenantsResponse, err error) DeProvisionHost(requestID string) (resp *GetStatusResponse, err error) }
InnkeeperClient api client
type ProvisionHostResponse ¶
type ProvisionHostResponse struct { Data []RequestData `json:"data"` Message string `json:"message"` Status string `json:"status"` }
ProvisionHostResponse -- autogen json struct from { "status": "success", "data": [{"requestid": "28ac758e-a02c-11e5-9531-0050569b9b57"}], "message": "ok" } generated by http://json2struct.mervine.net/
type RequestData ¶ added in v0.0.125
type RequestData struct {
RequestID string `json:"requestid"`
}
RequestData - a request data object
type TenantData ¶ added in v0.0.125
TenantData - a tenant data object