innkeeperclient

package
v0.0.115 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2015 License: GPL-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetTenantsResponse

type GetTenantsResponse struct {
	Data []struct {
		Slotid   int    `json:"slotid"`
		Tenantid string `json:"tenantid"`
	} `json:"data"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

GetTenantsResponse -- auto json struct

type IkClient

type IkClient struct {
	Uri      string
	User     string
	Password string
	Log      logger
}

IkClient api struct

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(geoLoc string, sku string, count int, tenantid string, osarg 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(geoLoc string, sku string, count int, tenantid string, osarg string) (result ProvisionHostResponse, err error)
	GetTenants() (result GetTenantsResponse, err error)
}

InnkeeperClient api client

func New

func New(log logger) (clnt InnkeeperClient)

New - create a new api client

type ProvisionHostResponse

type ProvisionHostResponse struct {
	Data []struct {
		Name    string `json:"name"`
		OobIP   string `json:"oob_ip"`
		OobPw   string `json:"oob_pw"`
		OobUser string `json:"oob_user"`
	} `json:"data"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

ProvisionHostResponse -- autogen json struct from generated by http://json2struct.mervine.net/

Directories

Path Synopsis
cli
ik

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL