Documentation ¶
Overview ¶
The package which makes the tool cloud agnostic for updating network components. 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 Catageory ¶
type Catageory struct { // The type of resource that has to be updated. Resource string `json:"resource"` // Select the action that has to be performed on the resource // passed in above option. Action string `json:"action"` // Pass the name here for the resource 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 SubCidrs []string `json:"subcidrs"` // 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"` // Pass the Id of the vpc here if you select to update a resource inside it. VpcId string `json:"vpcid"` // Pass the zone here if you need to create subnet in the required zone. Zone string `json:"zone"` }
type NetworkUpdateInput ¶
type NetworkUpdateInput struct { // The type of resources and the action to be performed in it // goes here the detailed inputs is in below struct Catageory Cloud cmn.Cloud }
The struct which implements method GetNetworks, GetSubnets.
func New ¶
func New() *NetworkUpdateInput
func (*NetworkUpdateInput) UpdateNetwork ¶
func (net *NetworkUpdateInput) UpdateNetwork() (UpdateNetworkResponse, error)
Being UpdateNetwork, job of him is to update the network and its components and give back the response who called him. Below method will take care of fetching details of appropriate user and his cloud profile details which was passed while calling it.
type UpdateNetworkResponse ¶
type UpdateNetworkResponse struct { // Contains filtered/unfiltered response of AWS. AwsResponse awsnetwork.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"` }
The struct that will return the filtered/unfiltered responses of variuos clouds.
Click to show internal directories.
Click to hide internal directories.