config

package
v0.0.0-...-d54cad6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const IpAddressPattern = `([0-9]{1,3}\.){3}[0-9]{1,3}`
View Source
const UuidPattern = `([0-9a-z]{32})|([0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12})`

Variables

This section is empty.

Functions

func AddSubnet

func AddSubnet(
	client contrail.ApiClient, network *types.VirtualNetwork, prefix string) (
	bool, error)

AddSubnet returns true if the network was modified, false if the subnet already exists in the network.

func CreateNetwork

func CreateNetwork(client contrail.ApiClient, project_id, name string) (
	string, error)

func CreateNetworkWithIpam

func CreateNetworkWithIpam(
	client contrail.ApiClient, project *types.Project, name string, prefix []string, ipams []*types.NetworkIpam) (
	string, error)

func CreateNetworkWithSubnet

func CreateNetworkWithSubnet(
	client contrail.ApiClient, project_id, name, prefix string) (
	string, error)

func CreateProject

func CreateProject(client contrail.ApiClient, name string, createIpam bool) (
	string, error)

TODO: Create default security-group.

func DeleteProject

func DeleteProject(client contrail.ApiClient, project_id string) error

func GetProjectFQN

func GetProjectFQN(
	client contrail.ApiClient, projectName string, projectId string) (
	[]string, error)

func GetProjectId

func GetProjectId(
	client contrail.ApiClient, project_name string, project_id string) (
	string, error)

func IsUuid

func IsUuid(value string) bool

func RemoveSubnet

func RemoveSubnet(client contrail.ApiClient, network *types.VirtualNetwork, prefix string) error

Types

type NetworkInfo

type NetworkInfo struct {
	Uuid         string
	Name         string
	AdminState   bool
	NetworkId    int
	Transit      bool
	Mode         string
	Subnets      []string
	Policies     []string
	RouteTargets []string
}

func NetworkList

func NetworkList(client contrail.ApiClient, project_id string, detail bool) (
	[]*NetworkInfo, error)

func NetworkShow

func NetworkShow(client contrail.ApiClient, uuid string, detail bool) (
	*NetworkInfo, error)

Jump to

Keyboard shortcuts

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