clients

package
v0.0.0-...-ee2a6a4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBmpClient

func NewBmpClient(username, password, url string, hClient softlayer.HttpClient, configPath string) *bmpClient

Types

type BaremetalInfo

type BaremetalInfo struct {
	Id                 int      `json:"id"`
	Hostname           string   `json:"hostname"`
	Private_ip_address string   `json:"private_ip_address"`
	Public_ip_address  string   `json:"public_ip_address"`
	Tags               []string `json:"tags"`
	Memory             int      `json:"memory"`
	Cpu                int      `json:"cpu"`
	Provision_date     string   `json:"provision_date"`
}

/bms

type BmpClient

type BmpClient interface {
	ConfigPath() string

	Info() (InfoResponse, error)
	Bms(deploymentName string) (BmsResponse, error)
	SlPackages() (SlPackagesResponse, error)
	Stemcells() (StemcellsResponse, error)
	SlPackageOptions(packageId string) (SlPackageOptionsResponse, error)
	UpdateState(serverId string, status string) (UpdateStateResponse, error)
	TaskOutput(taskId int, level string) (TaskOutputResponse, error)
	TaskJsonOutput(taskId int, level string) (TaskJsonResponse, error)
	Tasks(latest int) (TasksResponse, error)
	Login(username string, password string) (LoginResponse, error)
	CreateBaremetals(createBaremetalsInfo CreateBaremetalsInfo, dryRun bool) (CreateBaremetalsResponse, error)
	ProvisioningBaremetal(provisioningBaremetalInfo ProvisioningBaremetalInfo) (CreateBaremetalsResponse, error)
}

type BmsResponse

type BmsResponse struct {
	Status int             `json:"Status"`
	Data   []BaremetalInfo `json:"data"`
}

type Category

type Category struct {
	Code     string   `json:"code"`
	Name     string   `json:"name"`
	Options  []Option `json:"options"`
	Required bool     `json:"required"`
}

type CloudProperty

type CloudProperty struct {
	BoshIP         string     `yaml:"bosh_ip" json:"bosh_ip"`
	Datacenter     string     `yaml:"datacenter" json:"datacenter"`
	Domain         string     `yaml:"domain" json:"domain"`
	NamePrefix     string     `yaml:"name_prefix" json:"name_prefix"`
	ServerSpec     ServerSpec `yaml:"server_spec" json:"server_spec"`
	Baremetal      bool       `yaml:"baremetal" json:"baremetal"`
	BmStemcell     string     `yaml:"bm_stemcell" json:"bm_stemcell,omitempty"`
	BmNetbootImage string     `yaml:"bm_netboot_image" json:"bm_netboot_image,omitempty"`
	Size           int        `yaml:"size" json:"size"`
}

type CreateBaremetalsInfo

type CreateBaremetalsInfo struct {
	BaremetalSpecs []CloudProperty `json:"baremetal_specs"`
	Deployment     string          `json:"deployment"`
}

type CreateBaremetalsParameters

type CreateBaremetalsParameters struct {
	Parameters CreateBaremetalsInfo `json:"parameters"`
}

type CreateBaremetalsResponse

type CreateBaremetalsResponse struct {
	Status int      `json:"status"`
	Data   TaskInfo `json:"data"`
}

type DataInfo

type DataInfo struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type DataPackage

type DataPackage struct {
	Packages []Package `json:"packages"`
}

type DataPackageOptions

type DataPackageOptions struct {
	Category   []Category `json:"categories"`
	Datacenter []string   `json:"datacenters"`
}

type Deployment

type Deployment struct {
	Name          string     `yaml:"name"`
	ResourcePools []Resource `yaml:"resource_pools"`
}

deployment

type InfoResponse

type InfoResponse struct {
	Status int      `json:"status"`
	Data   DataInfo `json:"data"`
}

type LoginResponse

type LoginResponse struct {
	Status int `json:"status"`
}

type Option

type Option struct {
	Id          int    `json:"id"`
	Description string `json:"description"`
}

/sl/${package_id}/options

type Package

type Package struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type ProvisioningBaremetalInfo

type ProvisioningBaremetalInfo struct {
	VmNamePrefix     string `json:"vmNamePrefix,omitempty"`
	Bm_stemcell      string `json:"bm_stemcell,omitempty"`
	Bm_netboot_image string `json:"bm_netboot_image,omitempty"`
}

/baremetal/spec/${server_name}/${stemcell}/${netboot_image}

type Resource

type Resource struct {
	Name          string        `yaml:"name"`
	Network       string        `yaml:"network"`
	Size          int           `yaml:"size"`
	Stemcell      Stemcell      `yaml:"stemcell"`
	CloudProperty CloudProperty `yaml:"cloud_properties"`
}

type ServerSpec

type ServerSpec struct {
	Cores         int  `yaml:"cores" json:"cores,omitempty"`
	Memory        int  `yaml:"memory" json:"memory,omitempty"`
	MaxPortSpeed  int  `yaml:"max_port_speed" json:"max_port_speed,omitempty"`
	PublicVlanId  int  `yaml:"public_vlan_id" json:"public_vlan_id,omitempty"`
	PrivateVlanId int  `yaml:"private_vlan_id" json:"private_vlan_id,omitempty"`
	Hourly        bool `yaml:"hourly" json:"hourly"`
}

type SlPackageOptionsResponse

type SlPackageOptionsResponse struct {
	Status int                `json:"status"`
	Data   DataPackageOptions `json:"data"`
}

type SlPackagesResponse

type SlPackagesResponse struct {
	Status int         `json:"status"`
	Data   DataPackage `json:"data"`
}

type Stemcell

type Stemcell struct {
	Name    string `yaml:"name"`
	Version string `yaml:"version"`
}

type StemcellsResponse

type StemcellsResponse struct {
	Status   int      `json:"status"`
	Stemcell []string `json:"data"`
}

type Task

type Task struct {
	Id          int    `json:"id"`
	Description string `json:"description"`
	StartTime   string `json:"start_time"`
	Status      string `json:"status"`
	EndTime     string `json:"end_time"`
}

type TaskInfo

type TaskInfo struct {
	TaskId int `json:"task_id"`
}

type TaskJsonResponse

type TaskJsonResponse struct {
	Status int                    `json:"status"`
	Data   map[string]interface{} `json:"data"`
}

type TaskOutputResponse

type TaskOutputResponse struct {
	Status int      `json:"status"`
	Data   []string `json:"data"`
}

type TasksResponse

type TasksResponse struct {
	Status int    `json:"status"`
	Data   []Task `json:"data"`
}

type UpdateStateResponse

type UpdateStateResponse struct {
	Status int `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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