network

package
v0.0.0-...-4ec9558 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalGateway

type ExternalGateway struct {
	NetworkId string `json:"network_id,omitempty"`
}

type Firewall

type Firewall struct {
	Id           string `json:"id,omitempty"`
	TenantId     string `json:"tenant_id,omitempty"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
	Status       bool   `json:"status,omitempty"`
	Shared       string `json:"shared,omitempty"`
	PolicyId     string `json:"firewall_policy_id,omitempty"`
}

type FirewallPolicy

type FirewallPolicy struct {
	Id          string   `json:"id,omitempty"`
	TenantId    string   `json:"tenant_id,omitempty"`
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Shared      bool     `json:"shared,omitempty"`
	Audited     bool     `json:"audited,omitempty"`
	Rules       []string `json:"firewall_rules,omitempty"`
}

type FirewallRule

type FirewallRule struct {
	Id                   string `json:"id,omitempty"`
	TenantId             string `json:"tenant_id,omitempty"`
	Name                 string `json:"name,omitempty"`
	Description          string `json:"description,omitempty"`
	Protocol             string `json:"protocol,omitempty"`
	Action               string `json:"action,omitempty"`
	IpVersion            int    `json:"ip_version,omitempty"`
	SourceIpAddress      string `json:"source_ip_address,omitempty"`
	DestinationIpAddress string `json:"destination_ip_address,omitempty"`
	SourcePort           string `json:"source_port,omitempty"`
	DestinationPort      string `json:"destination_port,omitempty"`
	Shared               bool   `json:"shared,omitempty"`
	Enabled              bool   `json:"enabled,omitempty"`
}

type FixedIp

type FixedIp struct {
	SubnetId  string `json:"subnet_id"`
	IpAddress string `json:"ip_address"`
}

type FloatingIp

type FloatingIp struct {
	PortId            string `json:"port_id,omitempty"`
	RouterId          string `json:"router_id,omitempty"`
	FloatingNetworkId string `json:"floating_network_id,omitempty"`
	FixedIpAddress    string `json:"fixed_ip_address,omitempty"`
	FloatingIpAddress string `json:"floating_ip_address,omitempty"`
	Id                string `json:"id,omitempty"`
	Status            string `json:"status,omitempty"`
}

type Member

type Member struct {
	Id           string `json:"id,omitempty"`
	Status       string `json:"status,omitempty"`
	ProtocolPort int    `json:"protocol_port,omitempty"`
	Address      string `json:"address,omitempty"`
	PoolId       string `json:"pool_id,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
}

type Monitor

type Monitor struct {
	Id            string `json:"id,omitempty"`
	Type          string `json:"type,omitempty"`
	Delay         int    `json:"delay,omitempty"`
	Timeout       int    `json:"timeout,omitempty"`
	MaxRetry      int    `json:"max_retry,omitempty"`
	UrlPath       string `json:"url_path,omitempty"`
	ExpectedCodes string `json:"expected_codes ,omitempty"`
	HttpMethod    string `json:"http_method ,omitempty"`
	Status        string `json:"status ,omitempty"`
	AdminStateUp  bool   `json:"admin_state_up  ,omitempty"`
}

type Network

type Network struct {
	Status       string   `json:"status,omitempty"`
	Name         string   `json:"name,omitempty"`
	AdminStateUp bool     `json:"admin_state_up,omitempty"`
	TenantId     string   `json:"tenant_id,omitempty"`
	Subnets      []string `json:"subnets,omitempty"`
	Id           string   `json:"id,omitempty"`
	IsExternal   bool     `json:"router:external,omitempty"`
}

type NetworkProvider

type NetworkProvider interface {
	CreateNetwork(nn NewNetwork) (*Network, error)
	GetNetwork(networkId string) (*Network, error)
	GetNetworks() ([]Network, error)
	UpdateNetwork(networkId string, updatedNetwork UpdatedNetwork) (*Network, error)
	DeleteNetwork(networkId string) error

	CreateSubnet(subnet NewSubnet) (*Subnet, error)
	GetSubnet(subnetId string) (*Subnet, error)
	UpdateSubnet(subnetId string, updatedSubnet UpdatedSubnet) (*Subnet, error)
	DeleteSubnet(subnetId string) error

	CreateSecurityGroup(group NewSecurityGroup) (*SecurityGroup, error)
	GetSecurityGroup(securityGroupId string) (*SecurityGroup, error)
	DeleteSecurityGroup(securityGroupId string) error

	CreateSecurityGroupRule(rule SecurityGroupRule) (*SecurityGroupRule, error)

	CreateRouter(router NewRouter) (*Router, error)
	GetRouter(routerId string) (*Router, error)
	UpdateRouter(router Router) (*Router, error)
	AddRouterInterface(routerId string, subnetId string) (*Port, error)
	RemoveRouterInterface(routerId string, portId string) error
	DeleteRouter(routerId string) error
	GetPorts() ([]*Port, error)

	CreatePool(newPool NewPool) (*Pool, error)
	GetPool(poolId string) (*Pool, error)
	UpdatePool(pool Pool) (*Pool, error)
	DeletePool(poolId string) error

	CreateMember(newMember NewMember) (*Member, error)
	GetMember(memberId string) (*Member, error)
	DeleteMember(memberId string) error

	CreateMonitor(newMonitor NewMonitor) (*Monitor, error)
	GetMonitor(monitorId string) (*Monitor, error)
	DeleteMonitor(monitorId string) error

	AssociateMonitor(monitorId string, poolId string) error
	UnassociateMonitor(monitorId string, poolId string) error

	CreateVip(newVio NewVip) (*Vip, error)
	GetVip(vipId string) (*Vip, error)
	DeleteVip(vipId string) error

	ListFloatingIps() ([]FloatingIp, error)
	AssociateFloatingIp(portId string, floatingId string) error
	UnassociateFloatingIp(floatingIpId string) error

	CreateFirewall(newFirewall NewFirewall) (*Firewall, error)
	GetFirewall(firewallId string) (*Firewall, error)
	DeleteFirewall(firewallId string) error

	CreateFirewallPolicy(newPolicy NewFirewallPolicy) (*FirewallPolicy, error)
	GetFirewallPolicy(policyId string) (*FirewallPolicy, error)
	DeleteFirewallPolicy(policyId string) error

	CreateFirewallRule(newRule NewFirewallRule) (*FirewallRule, error)
	GetFirewallRule(ruleId string) (*FirewallRule, error)
	DeleteFirewallRule(ruleId string) error
}

func NetworksApi

Instantiates a Network API for the provider given.

type Networks

type Networks struct {
	Networks []Network `json:"networks,omitempty"`
}

type NewFirewall

type NewFirewall struct {
	TenantId     string `json:"tenant_id,omitempty"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
	Shared       bool   `json:"shared,omitempty"`
	PolicyId     string `json:"firewall_policy_id,omitempty"`
}

type NewFirewallPolicy

type NewFirewallPolicy struct {
	TenantId    string   `json:"tenant_id,omitempty"`
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Shared      bool     `json:"shared,omitempty"`
	Audited     bool     `json:"audited,omitempty"`
	Rules       []string `json:"firewall_rules,omitempty"`
}

type NewFirewallRule

type NewFirewallRule struct {
	TenantId             string `json:"tenant_id,omitempty"`
	Name                 string `json:"name,omitempty"`
	Description          string `json:"description,omitempty"`
	Protocol             string `json:"protocol,omitempty"`
	Action               string `json:"action,omitempty"`
	IpVersion            int    `json:"ip_version,omitempty"`
	SourceIpAddress      string `json:"source_ip_address,omitempty"`
	DestinationIpAddress string `json:"destination_ip_address,omitempty"`
	SourcePort           string `json:"source_port,omitempty"`
	DestinationPort      string `json:"destination_port,omitempty"`
	Shared               bool   `json:"shared,omitempty"`
	Enabled              bool   `json:"enabled,omitempty"`
}

type NewMember

type NewMember struct {
	ProtocolPort int    `json:"protocol_port,omitempty"`
	Address      string `json:"address,omitempty"`
	PoolId       string `json:"pool_id,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
}

type NewMonitor

type NewMonitor struct {
	Type          string `json:"type,omitempty"`
	Delay         int    `json:"delay,omitempty"`
	Timeout       int    `json:"timeout,omitempty"`
	MaxRetries    int    `json:"max_retries,omitempty"`
	UrlPath       string `json:"url_path,omitempty"`
	ExpectedCodes string `json:"expected_codes ,omitempty"`
	HttpMethod    string `json:"http_method ,omitempty"`
}

type NewNetwork

type NewNetwork struct {
	Name         string `json:"name,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
	Shared       bool   `json:"shared,omitempty"`
	TenantId     string `json:"tenant_id,omitempty"`
}

type NewPool

type NewPool struct {
	SubnetId     string `json:"subnet_id,omitempty"`
	LoadMethod   string `json:"lb_method,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	Provider     string `json:"provider,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
}

type NewRouter

type NewRouter struct {
	Name            string          `json:"name,omitempty"`
	ExternalGateway ExternalGateway `json:"external_gateway_info,omitempty"`
	AdminStateUp    bool            `json:"admin_state_up,omitempty"`
}

type NewSecurityGroup

type NewSecurityGroup struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	TenantId    string `json:"tenant_id,omitempty"`
	Description string `json:"description,omitempty"`
}

type NewSubnet

type NewSubnet struct {
	NetworkId  string `json:"network_id,omitempty"`
	Name       string `json:"name,omitempty"`
	TenantId   string `json:"tenant_id,omitempty"`
	Cidr       string `json:"cidr,omitempty"`
	IPVersion  int    `json:"ip_version,omitempty"`
	EnableDhcp bool   `json:"enable_dhcp,omitempty"`
}

type NewVip

type NewVip struct {
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
	SubnetId     string `json:"subnet_id,omitempty"`
	ProtocolPort int    `json:"protocol_port,omitempty"`
	PoolId       string `json:"pool_id,omitempty"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
}

type Pool

type Pool struct {
	SubnetId       string   `json:"subnet_id,omitempty"`
	LoadMethod     string   `json:"lb_method,omitempty"`
	Protocol       string   `json:"protocol,omitempty"`
	Name           string   `json:"name,omitempty"`
	AdminStateUp   bool     `json:"admin_state_up,omitempty"`
	Status         string   `json:"status,omitempty"`
	Description    string   `json:"description,omitempty"`
	Id             string   `json:"id,omitempty"`
	VipId          string   `json:"vip_id,omitempty"`
	Members        []string `json:"members,omitempty"`
	HealthMonitors []string `json:"health_monitors,omitempty"`
}

type Port

type Port struct {
	NetworkId string `json:"network_id"`
	PortId    string `json:"id"`
	DeviceId  string `json:"device_id"`

	Id           string    `json:"id"`
	FixedIps     []FixedIp `json:"fixed_ips"`
	AdminStateUp bool      `json:"admin_state_up"`
	// contains filtered or unexported fields
}

type Router

type Router struct {
	Id              string          `json:"id,omitempty"`
	TenantId        string          `json:"tenant_id,omitempty"`
	Name            string          `json:"name,omitempty"`
	ExternalGateway ExternalGateway `json:"external_gateway_info,omitempty"`
	AdminStateUp    bool            `json:"admin_state_up,omitempty"`
	Status          string          `json:"status,omitempty"`
}

type SecurityGroup

type SecurityGroup struct {
	Id          string              `json:"id,omitempty"`
	Name        string              `json:"name,omitempty"`
	TenantId    string              `json:"tenant_id,omitempty"`
	Description string              `json:"description,omitempty"`
	Rules       []SecurityGroupRule `json:"security_group_rules,omitempty"`
}

type SecurityGroupRule

type SecurityGroupRule struct {
	Id              string `json:"id,omitempty"`
	TenantId        string `json:"tenant_id,omitempty"`
	Direction       string `json:"direction,omitempty"`
	PortRangeMin    int    `json:"port_range_min,omitempty"`
	PortRangeMax    int    `json:"port_range_max,omitempty"`
	Protocol        string `json:"protocol,omitempty"`
	RemoteIpPrefix  string `json:"remote_ip_prefix,omitempty"`
	SecurityGroupId string `json:"security_group_id,omitempty"`
}

type Subnet

type Subnet struct {
	NetworkId  string `json:"network_id,omitempty"`
	Name       string `json:"name,omitempty"`
	TenantId   string `json:"tenant_id,omitempty"`
	Cidr       string `json:"cidr,omitempty"`
	IPVersion  int    `json:"ip_version,omitempty"`
	EnableDhcp bool   `json:"enable_dhcp,omitempty"`
	Id         string `json:"id,omitempty"`
	GatewayIp  string `json:"gateway_ip,omitempty"`
}

type SubnetId

type SubnetId struct {
	SubnetId string `json:"subnet_id"`
}

type UpdatedNetwork

type UpdatedNetwork struct {
	Name         string `json:"name"`
	AdminStateUp bool   `json:"admin_state_up,omitempty"`
}

type UpdatedSubnet

type UpdatedSubnet struct {
	Name       string `json:"name"`
	EnableDhcp bool   `json:"enable_dhcp,omitempty"`
}

type Vip

type Vip struct {
	Id              string `json:"id,omitempty"`
	Protocol        string `json:"protocol,omitempty"`
	Name            string `json:"name,omitempty"`
	Description     string `json:"description,omitempty"`
	SubnetId        string `json:"subnet_id,omitempty"`
	Status          string `json:"status ,omitempty"`
	ProtocolPort    int    `json:"protocol_port,omitempty"`
	PoolId          string `json:"pool_id,omitempty"`
	PortId          string `json:"port_id,omitempty"`
	Address         string `json:"address,omitempty"`
	ConnectionLimit int    `json:"connection_limit,omitempty"`
	AdminStateUp    bool   `json:"admin_state_up  ,omitempty"`
}

Jump to

Keyboard shortcuts

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