Documentation ¶
Overview ¶
** Copyright [2013-2017] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.
Index ¶
- Constants
- Variables
- func NewArgs(email, org string) api.ApiArgs
- type MarketplaceInterface
- type Marketplaces
- func (m *Marketplaces) Get() (*Marketplaces, error)
- func (m *Marketplaces) GetVMCpuCost() string
- func (m *Marketplaces) GetVMHDDCost() string
- func (m *Marketplaces) GetVMMemoryCost() string
- func (s *Marketplaces) ImageId() string
- func (s *Marketplaces) ImageName() string
- func (m *Marketplaces) NukeAndSetOutputs(out map[string][]string) error
- func (m *Marketplaces) NukeKeysOutputs(k string) error
- func (m *Marketplaces) Process(action string) error
- func (s *Marketplaces) RawImageId() string
- func (s *Marketplaces) Region() string
- func (s *Marketplaces) RemoveVM() string
- func (s *Marketplaces) String() string
- func (m *Marketplaces) Trigger_event(status utils.Status) error
- func (m *Marketplaces) Update() error
- func (m *Marketplaces) UpdateError(status utils.Status, cause error) error
- func (m *Marketplaces) UpdateStatus(status utils.Status) error
- type ParseError
- type RawImages
- type Repo
- type ReqOpts
Constants ¶
const ( APIMARKETPLACES = "/marketplaces" UPDATE = "/update" )
const ( //actions available for rawimage. RAW_ISO_CREATE = "rawimage.iso.create" // actions available for marketplaces MARKETPLACE_INITIALIZE = "marketplaces.initialize" MARKETPLACE_ISO_FINISHED = "marketplaces.iso.finished" // made backup of vm (save changes to Datablock) MARKETPLACE_IMAGE_ADD = "marketplaces.image.add" )
const ( APIRAWIMAGES = "/rawimages" APIRAWIMAGES_UPDATE = "/rawimages/update" )
Variables ¶
var ( // categories of marketplaces queue process RAWIMAGE = "marketplaces.rawimages" MARKETPLACES = "localsite.marketplaces" )
var ProvisionerMap map[string]provision.Provisioner = make(map[string]provision.Provisioner)
Global provisioners set by the subd daemons.
Functions ¶
Types ¶
type MarketplaceInterface ¶
type Marketplaces ¶
type Marketplaces struct { Id string `json:"id"` AccountId string `json:"account_id"` ProvidedBy string `json:"provided_by"` Inputs pairs.JsonPairs `json:"inputs"` Outputs pairs.JsonPairs `json:"outputs"` Envs pairs.JsonPairs `json:"envs"` Options pairs.JsonPairs `json:"options"` AclPolicies pairs.JsonPairs `json:"acl_policies"` CatType string `json:"cattype"` Flavor string `json:"flavor"` Image string `json:"image"` CatOrder string `json:"catorder"` Plans pairs.JsonPairs `json:"plans"` Status string `json:"status"` Url string `json:"url"` JsonClaz string `json:"json_claz"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
struct for marketplaces and rawimages
func GetMarketplace ¶
func GetMarketplace(email, id string) (*Marketplaces, error)
func (*Marketplaces) Get ¶
func (m *Marketplaces) Get() (*Marketplaces, error)
func (*Marketplaces) GetVMCpuCost ¶
func (m *Marketplaces) GetVMCpuCost() string
func (*Marketplaces) GetVMHDDCost ¶
func (m *Marketplaces) GetVMHDDCost() string
func (*Marketplaces) GetVMMemoryCost ¶
func (m *Marketplaces) GetVMMemoryCost() string
func (*Marketplaces) ImageId ¶
func (s *Marketplaces) ImageId() string
func (*Marketplaces) ImageName ¶
func (s *Marketplaces) ImageName() string
func (*Marketplaces) NukeAndSetOutputs ¶
func (m *Marketplaces) NukeAndSetOutputs(out map[string][]string) error
func (*Marketplaces) NukeKeysOutputs ¶
func (m *Marketplaces) NukeKeysOutputs(k string) error
func (*Marketplaces) Process ¶
func (m *Marketplaces) Process(action string) error
process trigger based on acction
func (*Marketplaces) RawImageId ¶
func (s *Marketplaces) RawImageId() string
func (*Marketplaces) Region ¶
func (s *Marketplaces) Region() string
func (*Marketplaces) RemoveVM ¶
func (s *Marketplaces) RemoveVM() string
func (*Marketplaces) Trigger_event ¶
func (m *Marketplaces) Trigger_event(status utils.Status) error
func (*Marketplaces) Update ¶
func (m *Marketplaces) Update() error
func (*Marketplaces) UpdateError ¶
func (m *Marketplaces) UpdateError(status utils.Status, cause error) error
func (*Marketplaces) UpdateStatus ¶
func (m *Marketplaces) UpdateStatus(status utils.Status) error
type ParseError ¶
ParseError represents an error that occurred during parsing.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Error returns the string representation of the error.
type RawImages ¶
type RawImages struct { Id string `json:"id"` Name string `json:"name"` AccountId string `json:"account_id"` OrgId string `json:"org_id"` Inputs pairs.JsonPairs `json:"inputs"` Outputs pairs.JsonPairs `json:"outputs"` Repository string `json:"repos"` Repo *Repo `json:"-"` Status string `json:"status"` JsonClaz string `json:"json_claz"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type ReqOpts ¶
type ReqOpts struct { AccountId string `json:"account_id" cql:"account_id"` CatId string `json:"cat_id" cql:"cat_id"` Action string `json:"action" cql:"action"` Category string `json:"category" cql:"category"` }
func NewRequestOpt ¶
func (*ReqOpts) ParseRequest ¶
func (r *ReqOpts) ParseRequest() (MarketplaceInterface, error)