skus

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//StatusComplete - a status flag for complete tasks
	StatusComplete = "complete"
	//StatusFailed - a status for failed tasks
	StatusFailed = "failed"
	//StatusProcessing - a status for in process items
	StatusProcessing = "processing"
	//StatusOutsourced - this is to indicate the the task tracking has been outsourced
	StatusOutsourced = "outsourced"
	//VCDTaskElementHrefMetaName - the name of the meta data field containing the href for the vcd task
	VCDTaskElementHrefMetaName = "vcd_task_element_href"
	//TaskActionUnDeploy --
	TaskActionUnDeploy = "undeploy_vapp"
	//SkuName2CSmall --
	SkuName2CSmall = "2c.small"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sku

type Sku interface {
	Procurement() (status string, taskMeta map[string]interface{})
	ReStock() (status string, taskMeta map[string]interface{})
	PollForTasks()
	New(tm TaskManager, procurementMeta map[string]interface{}) Sku
}

Sku - interface for a sku object

type Sku2CSmall

type Sku2CSmall struct {
	Client          vcdClient
	TaskManager     TaskManager
	Name            string
	ProcurementMeta map[string]interface{}
}

Sku2CSmall - a object representing a 2csmall sku

func (*Sku2CSmall) New added in v0.0.60

func (s *Sku2CSmall) New(tm TaskManager, procurementMeta map[string]interface{}) Sku

New - create a new instance of the given object type, initialized with some vars

func (*Sku2CSmall) PollForTasks added in v0.0.60

func (s *Sku2CSmall) PollForTasks()

PollForTasks - this is a method for polling the current long poll task queue and acting on it

func (*Sku2CSmall) Procurement

func (s *Sku2CSmall) Procurement() (status string, taskMeta map[string]interface{})

Procurement - this method will walk the procurement flow for the 2csmall object

func (*Sku2CSmall) ReStock

func (s *Sku2CSmall) ReStock() (status string, taskMeta map[string]interface{})

ReStock - this method will walk the restock flow for the 2csmall object

type TaskManager added in v0.0.60

type TaskManager interface {
	SaveTask(t *taskmanager.Task) (*taskmanager.Task, error)
	FindAndStallTaskForCaller(callerName string) (t *taskmanager.Task, err error)
	FindTask(id string) (t *taskmanager.Task, err error)
	NewTask(n string, p taskmanager.ProfileType, s string) (t *taskmanager.Task)
}

TaskManager - an interface representing a taskmanager object

Jump to

Keyboard shortcuts

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