Documentation ¶
Index ¶
- type Aws
- type Config
- type Connection
- type ConnectionConfig
- type Device
- type DeviceConfig
- type Endpoint
- type NMgr
- func (nm *NMgr) AssociateCustomerGateway(cgwArn, dID, lID *string) (*networkmanager.AssociateCustomerGatewayOutput, error)
- func (nm *NMgr) AssociateLink(dID, lID *string) (*networkmanager.AssociateLinkOutput, error)
- func (nm *NMgr) CreateAWSNetworkMgrNetwork() error
- func (nm *NMgr) CreateAWSNetworkMgrSites() error
- func (nm *NMgr) CreateCustomerGateway(region, name, ip *string, asn *int32) (*ec2.CreateCustomerGatewayOutput, error)
- func (nm *NMgr) CreateDevice(name *string, d *Device) (*networkmanager.CreateDeviceOutput, error)
- func (nm *NMgr) CreateGlobalNetwork(name *string) (*networkmanager.CreateGlobalNetworkOutput, error)
- func (nm *NMgr) CreateLink(name *string, ep *Endpoint) (*networkmanager.CreateLinkOutput, error)
- func (nm *NMgr) CreateSite(name *string, s *Site) (*networkmanager.CreateSiteOutput, error)
- func (nm *NMgr) CreateTransitGateway(region, name *string) (*ec2.CreateTransitGatewayOutput, error)
- func (nm *NMgr) CreateVpc(region, name, cidr *string) (*ec2.CreateVpcOutput, error)
- func (nm *NMgr) CreateVpnConnection(region, name, cgwID, tgwID, cidr *string) (*ec2.CreateVpnConnectionOutput, error)
- func (nm *NMgr) DeleteAWSNetworkMgrNetwork() error
- func (nm *NMgr) DeleteAWSNetworkMgrSites() error
- func (nm *NMgr) DeleteCustomerGateway(region, id *string) (*ec2.DeleteCustomerGatewayOutput, error)
- func (nm *NMgr) DeleteDevice(d *string) (*networkmanager.DeleteDeviceOutput, error)
- func (nm *NMgr) DeleteDevices() error
- func (nm *NMgr) DeleteGlobalNetwork() (*networkmanager.DeleteGlobalNetworkOutput, error)
- func (nm *NMgr) DeleteLink(l *string) (*networkmanager.DeleteLinkOutput, error)
- func (nm *NMgr) DeleteLinks() error
- func (nm *NMgr) DeleteSite(s *string) (*networkmanager.DeleteSiteOutput, error)
- func (nm *NMgr) DeleteSites() error
- func (nm *NMgr) DeleteTransitGateway(region, id *string) (*ec2.DeleteTransitGatewayOutput, error)
- func (nm *NMgr) DeleteVpnConnection(region, id *string) (*ec2.DeleteVpnConnectionOutput, error)
- func (nm *NMgr) DeregisterTransitGateway(arn *string) (*networkmanager.DeregisterTransitGatewayOutput, error)
- func (nm *NMgr) DescribeCustomerGateways(region, name *string) (*ec2.DescribeCustomerGatewaysOutput, error)
- func (nm *NMgr) DescribeGlobalNetworks() (*networkmanager.DescribeGlobalNetworksOutput, error)
- func (nm *NMgr) DescribeTransitGateways(region, name *string) (*ec2.DescribeTransitGatewaysOutput, error)
- func (nm *NMgr) DescribeVpcs(region, name *string) (*ec2.DescribeVpcsOutput, error)
- func (nm *NMgr) DescribeVpnConnections(region, name *string) (*ec2.DescribeVpnConnectionsOutput, error)
- func (nm *NMgr) DisassociateCustomerGateway(cgwArn, dID, lID *string) (*networkmanager.DisassociateCustomerGatewayOutput, error)
- func (nm *NMgr) DisassociateLink(dID, lID *string) (*networkmanager.DisassociateLinkOutput, error)
- func (nm *NMgr) GetCustomerGatewayAssociations() (*networkmanager.GetCustomerGatewayAssociationsOutput, error)
- func (nm *NMgr) GetDevice(siteID *string) (*networkmanager.GetDevicesOutput, error)
- func (nm *NMgr) GetDevices() (*networkmanager.GetDevicesOutput, error)
- func (nm *NMgr) GetLink(siteID *string) (*networkmanager.GetLinksOutput, error)
- func (nm *NMgr) GetLinks() (*networkmanager.GetLinksOutput, error)
- func (nm *NMgr) GetSites() (*networkmanager.GetSitesOutput, error)
- func (nm *NMgr) GetTopology(topo string) error
- func (nm *NMgr) GetTransitGatewayRegistrations() (*networkmanager.GetTransitGatewayRegistrationsOutput, error)
- func (nm *NMgr) NewConnection(cCfg ConnectionConfig) *Connection
- func (nm *NMgr) NewDevice(name string, cfg DeviceConfig, idx int) error
- func (nm *NMgr) NewEndpoint(i int, e string, l map[string]string) *Endpoint
- func (nm *NMgr) NewSite(name string, cfg SiteConfig, idx int) error
- func (nm *NMgr) ParseTopology() error
- func (nm *NMgr) RegisterTransitGateway(arn *string) (*networkmanager.RegisterTransitGatewayOutput, error)
- type Nuage
- type Option
- type Site
- type SiteConfig
- type Topology
- type VpnConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `json:"name,omitempty"` Nuage Nuage `json:"nuage,omitempty"` Aws Aws `json:"aws,omitempty"` Topology Topology `json:"topology,omitempty"` }
Config defines lab configuration as it is provided in the YAML file
type Connection ¶
Connection is a struct that contains the information of a link between 2 containers
type ConnectionConfig ¶
type ConnectionConfig struct { Endpoints []string Labels map[string]string `yaml:"labels,omitempty"` }
ConnectionConfig struct
type Device ¶
type Device struct { Name string DeviceID *string DeviceARN *string NuageNSGateway *vspk.NSGateway Index int Kind string Model string Serial string Vendor string Region string Site *Site Endpoints map[string]*Endpoint }
Device is a struct that contains the information of a device element
type DeviceConfig ¶
type DeviceConfig struct { Kind string `yaml:"kind,omitempty"` Vendor string `yaml:"vendor,omitempty"` Model string `yaml:"model,omitempty"` Serial string `yaml:"serial,omitempty"` Region string `yaml:"region,omitempty"` }
DeviceConfig represents a configuration a given device can have
type Endpoint ¶
type Endpoint struct { Device *Device Site *Site Name string LinkID *string LinkARN *string NuagePort *vspk.NSPort NuageVlan *vspk.VLAN Provider string BwUp int32 BwDown int32 Kind string PublicIP string Asn int32 Cidr string Region string CustomerGatewayID *string CustomerGatewayARN *string CustomerGatewayIP []string VPNConnState string }
Endpoint is a struct that contains information of a link endpoint
type NMgr ¶
type NMgr struct { Config *Config ConfigFile *string Sites map[string]*Site Devices map[string]*Device Connections map[int]*Connection Region *string GlobalNetworkID *string ClientNMgr *networkmanager.Client ClientEC2 map[string]*ec2.Client VsdUsr *vspk.Me // contains filtered or unexported fields }
NMgr structure that holds the structure of the network manager
func NewAWsNMgrNuage ¶
NewAWsNMgrNuage function defines a new dns-proxy
func (*NMgr) AssociateCustomerGateway ¶
func (nm *NMgr) AssociateCustomerGateway(cgwArn, dID, lID *string) (*networkmanager.AssociateCustomerGatewayOutput, error)
AssociateCustomerGateway function
func (*NMgr) AssociateLink ¶
func (nm *NMgr) AssociateLink(dID, lID *string) (*networkmanager.AssociateLinkOutput, error)
AssociateLink function
func (*NMgr) CreateAWSNetworkMgrNetwork ¶
CreateAWSNetworkMgrNetwork function
func (*NMgr) CreateAWSNetworkMgrSites ¶
CreateAWSNetworkMgrSites function
func (*NMgr) CreateCustomerGateway ¶
func (nm *NMgr) CreateCustomerGateway(region, name, ip *string, asn *int32) (*ec2.CreateCustomerGatewayOutput, error)
CreateCustomerGateway fucntion
func (*NMgr) CreateDevice ¶
func (nm *NMgr) CreateDevice(name *string, d *Device) (*networkmanager.CreateDeviceOutput, error)
CreateDevice function
func (*NMgr) CreateGlobalNetwork ¶
func (nm *NMgr) CreateGlobalNetwork(name *string) (*networkmanager.CreateGlobalNetworkOutput, error)
CreateGlobalNetwork function
func (*NMgr) CreateLink ¶
func (nm *NMgr) CreateLink(name *string, ep *Endpoint) (*networkmanager.CreateLinkOutput, error)
CreateLink function
func (*NMgr) CreateSite ¶
func (nm *NMgr) CreateSite(name *string, s *Site) (*networkmanager.CreateSiteOutput, error)
CreateSite function
func (*NMgr) CreateTransitGateway ¶
func (nm *NMgr) CreateTransitGateway(region, name *string) (*ec2.CreateTransitGatewayOutput, error)
CreateTransitGateway fucntion
func (*NMgr) CreateVpc ¶
func (nm *NMgr) CreateVpc(region, name, cidr *string) (*ec2.CreateVpcOutput, error)
CreateVpc function
func (*NMgr) CreateVpnConnection ¶
func (nm *NMgr) CreateVpnConnection(region, name, cgwID, tgwID, cidr *string) (*ec2.CreateVpnConnectionOutput, error)
CreateVpnConnection function
func (*NMgr) DeleteAWSNetworkMgrNetwork ¶
DeleteAWSNetworkMgrNetwork function
func (*NMgr) DeleteAWSNetworkMgrSites ¶
DeleteAWSNetworkMgrSites function
func (*NMgr) DeleteCustomerGateway ¶
func (nm *NMgr) DeleteCustomerGateway(region, id *string) (*ec2.DeleteCustomerGatewayOutput, error)
DeleteCustomerGateway function
func (*NMgr) DeleteDevice ¶
func (nm *NMgr) DeleteDevice(d *string) (*networkmanager.DeleteDeviceOutput, error)
DeleteDevice function
func (*NMgr) DeleteGlobalNetwork ¶
func (nm *NMgr) DeleteGlobalNetwork() (*networkmanager.DeleteGlobalNetworkOutput, error)
DeleteGlobalNetwork function
func (*NMgr) DeleteLink ¶
func (nm *NMgr) DeleteLink(l *string) (*networkmanager.DeleteLinkOutput, error)
DeleteLink function
func (*NMgr) DeleteSite ¶
func (nm *NMgr) DeleteSite(s *string) (*networkmanager.DeleteSiteOutput, error)
DeleteSite function
func (*NMgr) DeleteTransitGateway ¶
func (nm *NMgr) DeleteTransitGateway(region, id *string) (*ec2.DeleteTransitGatewayOutput, error)
DeleteTransitGateway function
func (*NMgr) DeleteVpnConnection ¶
func (nm *NMgr) DeleteVpnConnection(region, id *string) (*ec2.DeleteVpnConnectionOutput, error)
DeleteVpnConnection function
func (*NMgr) DeregisterTransitGateway ¶
func (nm *NMgr) DeregisterTransitGateway(arn *string) (*networkmanager.DeregisterTransitGatewayOutput, error)
DeregisterTransitGateway function
func (*NMgr) DescribeCustomerGateways ¶
func (nm *NMgr) DescribeCustomerGateways(region, name *string) (*ec2.DescribeCustomerGatewaysOutput, error)
DescribeCustomerGateways function
func (*NMgr) DescribeGlobalNetworks ¶
func (nm *NMgr) DescribeGlobalNetworks() (*networkmanager.DescribeGlobalNetworksOutput, error)
DescribeGlobalNetworks function
func (*NMgr) DescribeTransitGateways ¶
func (nm *NMgr) DescribeTransitGateways(region, name *string) (*ec2.DescribeTransitGatewaysOutput, error)
DescribeTransitGateways function
func (*NMgr) DescribeVpcs ¶
func (nm *NMgr) DescribeVpcs(region, name *string) (*ec2.DescribeVpcsOutput, error)
DescribeVpcs function
func (*NMgr) DescribeVpnConnections ¶
func (nm *NMgr) DescribeVpnConnections(region, name *string) (*ec2.DescribeVpnConnectionsOutput, error)
DescribeVpnConnections function
func (*NMgr) DisassociateCustomerGateway ¶
func (nm *NMgr) DisassociateCustomerGateway(cgwArn, dID, lID *string) (*networkmanager.DisassociateCustomerGatewayOutput, error)
DisassociateCustomerGateway function
func (*NMgr) DisassociateLink ¶
func (nm *NMgr) DisassociateLink(dID, lID *string) (*networkmanager.DisassociateLinkOutput, error)
DisassociateLink function
func (*NMgr) GetCustomerGatewayAssociations ¶
func (nm *NMgr) GetCustomerGatewayAssociations() (*networkmanager.GetCustomerGatewayAssociationsOutput, error)
GetCustomerGatewayAssociations function
func (*NMgr) GetDevice ¶
func (nm *NMgr) GetDevice(siteID *string) (*networkmanager.GetDevicesOutput, error)
GetDevice function
func (*NMgr) GetDevices ¶
func (nm *NMgr) GetDevices() (*networkmanager.GetDevicesOutput, error)
GetDevices function
func (*NMgr) GetLink ¶
func (nm *NMgr) GetLink(siteID *string) (*networkmanager.GetLinksOutput, error)
GetLink function
func (*NMgr) GetLinks ¶
func (nm *NMgr) GetLinks() (*networkmanager.GetLinksOutput, error)
GetLinks function
func (*NMgr) GetSites ¶
func (nm *NMgr) GetSites() (*networkmanager.GetSitesOutput, error)
GetSites function
func (*NMgr) GetTopology ¶
GetTopology parses the topology file into c.Conf structure as well as populates the TopoFile structure with the topology file related information
func (*NMgr) GetTransitGatewayRegistrations ¶
func (nm *NMgr) GetTransitGatewayRegistrations() (*networkmanager.GetTransitGatewayRegistrationsOutput, error)
GetTransitGatewayRegistrations fucntion
func (*NMgr) NewConnection ¶
func (nm *NMgr) NewConnection(cCfg ConnectionConfig) *Connection
NewConnection initializes a new link object
func (*NMgr) NewDevice ¶
func (nm *NMgr) NewDevice(name string, cfg DeviceConfig, idx int) error
NewDevice initializes a new device object
func (*NMgr) NewEndpoint ¶
NewEndpoint initializes a new endpoint object
func (*NMgr) NewSite ¶
func (nm *NMgr) NewSite(name string, cfg SiteConfig, idx int) error
NewSite initializes a new site object
func (*NMgr) ParseTopology ¶
ParseTopology parses the configuration topology
func (*NMgr) RegisterTransitGateway ¶
func (nm *NMgr) RegisterTransitGateway(arn *string) (*networkmanager.RegisterTransitGatewayOutput, error)
RegisterTransitGateway function
type Nuage ¶
type Nuage struct { Enterprise string `json:"enterprise,omitempty"` URL string `json:"url,omitempty"` }
Nuage related information
type Site ¶
type Site struct { Name string SiteID *string Index int Street string Number int City string State string Country string Devices map[string]*Device Endpoints map[string]*Endpoint }
Site is a struct that contains the information of a site element
type SiteConfig ¶
type SiteConfig struct { Street string `yaml:"street,omitempty"` Number int `yaml:"number,omitempty"` City string `yaml:"city,omitempty"` State string `yaml:"state,omitempty"` Country string `yaml:"country,omitempty"` }
SiteConfig represents a configuration a given site can have
type Topology ¶
type Topology struct { Sites map[string]SiteConfig `yaml:"sites,omitempty"` DeviceKinds map[string]DeviceConfig `yaml:"device-kinds,omitempty"` Devices map[string]DeviceConfig `yaml:"devices,omitempty"` Connections []ConnectionConfig `yaml:"connections,omitempty"` }
Topology represents a lab topology
type VpnConnection ¶
type VpnConnection struct { XMLName xml.Name `xml:"vpn_connection"` Text string `xml:",chardata"` ID string `xml:"id,attr"` CustomerGatewayID string `xml:"customer_gateway_id"` VpnGatewayID string `xml:"vpn_gateway_id"` VpnConnectionType string `xml:"vpn_connection_type"` VpnConnectionAttributes string `xml:"vpn_connection_attributes"` IpsecTunnel []struct { Text string `xml:",chardata"` CustomerGateway struct { Text string `xml:",chardata"` TunnelOutsideAddress struct { Text string `xml:",chardata"` IPAddress string `xml:"ip_address"` } `xml:"tunnel_outside_address"` TunnelInsideAddress struct { Text string `xml:",chardata"` IPAddress string `xml:"ip_address"` NetworkMask string `xml:"network_mask"` NetworkCidr string `xml:"network_cidr"` } `xml:"tunnel_inside_address"` } `xml:"customer_gateway"` VpnGateway struct { Text string `xml:",chardata"` TunnelOutsideAddress struct { Text string `xml:",chardata"` IPAddress string `xml:"ip_address"` } `xml:"tunnel_outside_address"` TunnelInsideAddress struct { Text string `xml:",chardata"` IPAddress string `xml:"ip_address"` NetworkMask string `xml:"network_mask"` NetworkCidr string `xml:"network_cidr"` } `xml:"tunnel_inside_address"` } `xml:"vpn_gateway"` Ike struct { Text string `xml:",chardata"` AuthenticationProtocol string `xml:"authentication_protocol"` EncryptionProtocol string `xml:"encryption_protocol"` Lifetime string `xml:"lifetime"` PerfectForwardSecrecy string `xml:"perfect_forward_secrecy"` Mode string `xml:"mode"` PreSharedKey string `xml:"pre_shared_key"` } `xml:"ike"` Ipsec struct { Text string `xml:",chardata"` Protocol string `xml:"protocol"` AuthenticationProtocol string `xml:"authentication_protocol"` EncryptionProtocol string `xml:"encryption_protocol"` Lifetime string `xml:"lifetime"` PerfectForwardSecrecy string `xml:"perfect_forward_secrecy"` Mode string `xml:"mode"` ClearDfBit string `xml:"clear_df_bit"` FragmentationBeforeEncryption string `xml:"fragmentation_before_encryption"` TCPMssAdjustment string `xml:"tcp_mss_adjustment"` DeadPeerDetection struct { Text string `xml:",chardata"` Interval string `xml:"interval"` Retries string `xml:"retries"` } `xml:"dead_peer_detection"` } `xml:"ipsec"` } `xml:"ipsec_tunnel"` }
VpnConnection struct