Version: v0.0.0-...-c891ed9 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0



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.



This section is empty.


This section is empty.


This section is empty.


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"`

The 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

func (*NetworkCreateInput) CreateNetwork

func (net *NetworkCreateInput) CreateNetwork() (CreateNetworkResponse, error)

Being CreateNetwork, job of him is to create network 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL