Documentation ¶
Index ¶
Constants ¶
View Source
const ( //VCloudTokenHeaderName - response header name for the auth token VCloudTokenHeaderName = "X-Vcloud-Authorization" //AuthSuccessStatusCode - status code expected for a successful auth call to the vcd api AuthSuccessStatusCode = 200 //VAppTemplateName - the name of the vapp template to seed our apps from by defualt VAppTemplateName = "vSphere6-base-pcfaas-0.9.2" )
Variables ¶
View Source
var ( //ErrAuthFailure - error message returned for authentication responses not having a success statuscode ErrAuthFailure = errors.New("status code failure on authentication call to api") ErrNoTokenToApply = errors.New("no token to decorate the given request with") )
Functions ¶
func DefaultClient ¶
DefaultClient - grabs a default http client for us to use for api calls
Types ¶
type QueryResultRecords ¶
type QueryResultRecords struct { XMLName xml.Name `xml:"QueryResultRecords"` VAppTemplateRecord []VAppTemplateRecord `xml:"VAppTemplateRecord"` }
QueryResultRecords - root level query result xml object
type VAppTemplateRecord ¶
type VAppTemplateRecord struct { //VdcName VdcName string `xml:"vdcName,attr"` //Vdc Vdc string `xml:"vdc,attr"` //StorageProfileName StorageProfileName string `xml:"storageProfileName,attr"` //Status Status string `xml:"status,attr"` //OwnerName OwnerName string `xml:"ownerName,attr"` //Org Org string `xml:"org,attr"` //Name Name string `xml:"name,attr"` //IsPublished IsPublished bool `xml:"isPublished,attr"` //IsGoldMaster IsGoldMaster bool `xml:"isGoldMaster,attr"` //IsExpired IsExpired bool `xml:"isExpired,attr"` //IsEnabled IsEnabled bool `xml:"isEnabled,attr"` //IsDeployed IsDeployed bool `xml:"isDeployed,attr"` //IsBusy IsBusy bool `xml:"isBusy,attr"` //CreationDate CreationDate time.Time `xml:"creationDate,attr"` //CatalogName CatalogName string `xml:"catalogName,attr"` //Href Href string `xml:"href,attr"` //IsInCatalog IsInCatalog bool `xml:"isInCatalog,attr"` //CpuAllocationMhz CpuAllocationMhz float64 `xml:"cpuAllocationMhz,attr"` //CpuAllocationInMhz CpuAllocationInMhz float64 `xml:"cpuAllocationInMhz,attr"` //Task Task string `xml:"task,attr"` //NumberOfShadowVMs NumberOfShadowVMs float64 `xml:"numberOfShadowVMs,attr"` //AutoDeleteDate AutoDeleteDate time.Time `xml:"autoDeleteDate,attr"` //IsAutoDeleteNotified IsAutoDeleteNotified bool `xml:"isAutoDeleteNotified,attr"` //NumberOfVMs NumberOfVMs float64 `xml:"numberOfVMs,attr"` //IsAutoUndeployNotified IsAutoUndeployNotified bool `xml:"isAutoUndeployNotified,attr"` //TaskStatusName TaskStatusName string `xml:"taskStatusName,attr"` //IsVdcEnabled IsVdcEnabled bool `xml:"isVdcEnabled,attr"` //HonorBootOrder HonorBootOrder bool `xml:"honorBootOrder,attr"` //TaskStatus TaskStatus string `xml:"taskStatus,attr"` //StorageKB StorageKB float64 `xml:"storageKB,attr"` //TaskDetails TaskDetails string `xml:"taskDetails,attr"` //NumberOfCpus NumberOfCpus float64 `xml:"numberOfCpus,attr"` //MemoryAllocationMB MemoryAllocationMB float64 `xml:"memoryAllocationMB,attr"` }
VAppTemplateRecord - vapp result from query
type VCDClient ¶
type VCDClient struct { Token string // contains filtered or unexported fields }
VCDAuth - vcd authentication object
func NewVCDClient ¶
func NewVCDClient(client httpClientDoer) *VCDClient
NewVCDClient - constructs a new VCDClient object with given client
Click to show internal directories.
Click to hide internal directories.