Documentation ¶
Overview ¶
Package networkcreate makes the tool cloud agnostic with respect to creation of network. The decision will be made here to route the request to respective package based on input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNetworkResponse ¶
type CreateNetworkResponse struct { // Contains filtered/unfiltered response of AWS. AwsResponse network.NetworkResponse `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 string `json:"DefaultResponse,omitempty"` }
CreateNetworkResponse is a struct that will return the filtered/unfiltered responses of variuos clouds.
type NetworkCreateInput ¶
type NetworkCreateInput struct { // The name for the Network that has to be created. Name string `json:"name"` // The CIDR block which will be used to create VPC and this // contains info that how many IP should be present in the network // so decide that in prior before calling this. VpcCidr string `json:"vpccidr"` // The CIDR for the subnet that has to be created in the VPC. // Pass an array of CIDR's and neuron will take care of creating // appropriate number of subnets and attaching to created VPC. SubCidr []string `json:"subcidr"` // The type of the network that has to be created, public or private. // Accordingly IGW will be created and attached. Type string `json:"type"` // The ports that has to be opened for the network, // if not passed, by default 22 will be made open so that // one can access machines that will be created inside the created network. Ports []string `json:"ports"` Cloud cmn.Cloud }
NetworkCreateInput implements method CreateNetwork and holds parameter for creating network.
func New ¶
func New() *NetworkCreateInput
New returns the new NetworkCreateInput instance with empty values
func (*NetworkCreateInput) CreateNetwork ¶
func (net *NetworkCreateInput) CreateNetwork() (CreateNetworkResponse, error)
CreateNetwork is responsible for creating network and send back the response to the called source. appropriate user and his cloud profile details which was passed while calling it.
Click to show internal directories.
Click to hide internal directories.