network

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound determines if the passed in error is a not found error from the API.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for interacting with Azure networking

func NewClient

func NewClient(azAuth *azure.Authentication) (*Client, error)

NewClient creates a new client for interacting with azure networking

func (*Client) CreateOrUpdateProfile

func (c *Client) CreateOrUpdateProfile(resourceGroup string, p *Profile) (*Profile, error)

CreateOrUpdateProfile creates or updates an Azure network profile

func (*Client) CreateOrUpdateSubnet

func (c *Client) CreateOrUpdateSubnet(resourceGroup, vnet string, s *Subnet) (*Subnet, error)

CreateOrUpdateSubnet creates a new or updates an existing subnet in the defined resourcegroup/vnet

func (*Client) GetProfile

func (c *Client) GetProfile(resourceGroup, name string) (*Profile, error)

GetProfile gets the network profile with the provided name

func (*Client) GetSubnet

func (c *Client) GetSubnet(resourceGroup, vnet, name string) (*Subnet, error)

GetSubnet gets the subnet from the specified resourcegroup/vnet

type Delegation

type Delegation struct {
	Name       string
	ID         string
	ETag       string
	Properties DelegationProperties
}

Delegation stores the subnet delegation details

type DelegationProperties

type DelegationProperties struct {
	ServiceName string
	Actions     []string
}

DelegationProperties stores the properties for a delegation

type ID

type ID struct {
	ID string
}

ID is a generic struct for objets with an ID

type IPConfiguration

type IPConfiguration struct {
	Name       string
	Properties IPConfigurationProperties
}

IPConfiguration stores the configuration for an IP on a network profile

type IPConfigurationProperties

type IPConfigurationProperties struct {
	Subnet ID
}

IPConfigurationProperties stores the subnet for an IP configuration

type InterfaceConfiguration

type InterfaceConfiguration struct {
	Name       string
	Properties InterfaceConfigurationProperties
}

InterfaceConfiguration is a configuration for a network interface

type InterfaceConfigurationProperties

type InterfaceConfigurationProperties struct {
	IPConfigurations []IPConfiguration
}

InterfaceConfigurationProperties is the properties for a network interface configuration

type Profile

type Profile struct {
	Name       string
	ID         string
	ETag       string `json:"etag"`
	Type       string
	Location   string
	Properties ProfileProperties
}

Profile represents an Azure network profile

type ProfileProperties

type ProfileProperties struct {
	ContainerNetworkInterfaceConfigurations []InterfaceConfiguration
}

ProfileProperties stores the properties for network profiles

type Subnet

type Subnet struct {
	Name       string
	ID         string
	Properties *SubnetProperties
}

Subnet represents an Azure subnet

type SubnetIPConfigurationProfile

type SubnetIPConfigurationProfile struct {
	ID string
}

SubnetIPConfigurationProfile stores the ID for an assigned network profile

type SubnetProperties

type SubnetProperties struct {
	AddressPrefix string `json:"addressPrefix,omitempty"`

	// IPConfigurationProfiles and Delegations are new fields not available in the SDK yet
	IPConfigurationProfiles []SubnetIPConfigurationProfile `json:"ipConfigurationProfiles"`
	Delegations             []Delegation

	// copied from official go SDK, none of these are used here except to make sure we don't nil out some data on fetched objects.
	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
	NetworkSecurityGroup *network.SecurityGroup `json:"networkSecurityGroup,omitempty"`
	// RouteTable - The reference of the RouteTable resource.
	RouteTable *network.RouteTable `json:"routeTable,omitempty"`
	// ServiceEndpoints - An array of service endpoints.
	ServiceEndpoints *[]network.ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
	// IPConfigurations - Gets an array of references to the network interface IP configurations using subnet.
	IPConfigurations *[]network.IPConfiguration `json:"ipConfigurations,omitempty"`
	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
	ResourceNavigationLinks *[]network.ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
	// ProvisioningState - The provisioning state of the resource.
	ProvisioningState *string `json:"provisioningState,omitempty"`
}

SubnetProperties are the properties for a subne

Jump to

Keyboard shortcuts

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