Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerCreateInput ¶
type ServerCreateInput struct { InstanceName string `json:"instancename"` Count int64 `json:"count"` ImageId string `json:"imageid"` SubnetId string `json:"subnetid"` KeyName string `json:"keyname"` Flavor string `json:"flavor"` UserData string `json:"userdata"` AssignPubIp bool `json:"assignpubip"` Cloud cmn.Cloud }
func New ¶
func New() *ServerCreateInput
func (ServerCreateInput) CreateServer ¶
func (serv ServerCreateInput) CreateServer() (ServerCreateResponse, error)
Being CreateServer, job of him is to create the server with the requirement passed to him and give back the response who called this. Below method will take care of fetching details of appropriate user and his cloud profile details which was passed while calling it.
type ServerCreateResponse ¶
type ServerCreateResponse struct { // Contains filtered/unfiltered response of AWS. AwsResponse []server.ServerResponse `json:"AwsResponse,omitempty"` // Contains filtered/unfiltered response of Azure. AzureResponse string `json:"AzureResponse,omitempty"` // Default response if no inputs or matching the values required. DefaultResponse interface{} `json:"DefaultResponse,omitempty"` }
The struct that will return the filtered/unfiltered responses of variuos clouds.
func CreateServerMock ¶
func CreateServerMock() (ServerCreateResponse, error)
Click to show internal directories.
Click to hide internal directories.