model

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

View Source
const Keyword = "nodeconfig"

Keyword defines the keyword identifying NodeConfig data.

Variables

This section is empty.

Functions

func Key

func Key(node string) string

Key returns the key for configuration of a given node.

func KeyPrefix

func KeyPrefix() string

KeyPrefix return prefix where all node configs are persisted.

Types

type NodeConfig

type NodeConfig struct {
	// name of the node to which the configuration applies
	NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	// main VPP interface used for the inter-node connectivity
	MainVppInterface *NodeConfig_InterfaceConfig `protobuf:"bytes,2,opt,name=main_vpp_interface,json=mainVppInterface,proto3" json:"main_vpp_interface,omitempty"`
	// other interfaces on VPP, not necessarily used for inter-node connectivity
	OtherVppInterfaces []*NodeConfig_InterfaceConfig `protobuf:"bytes,3,rep,name=other_vpp_interfaces,json=otherVppInterfaces,proto3" json:"other_vpp_interfaces,omitempty"`
	// interface to be stolen from the host stack and bound to VPP
	StealInterface string `protobuf:"bytes,4,opt,name=steal_interface,json=stealInterface,proto3" json:"steal_interface,omitempty"`
	// IP address of the default gateway
	Gateway string `protobuf:"bytes,5,opt,name=gateway,proto3" json:"gateway,omitempty"`
	// whether to NAT external traffic or not
	NatExternalTraffic   bool     `protobuf:"varint,6,opt,name=nat_external_traffic,json=natExternalTraffic,proto3" json:"nat_external_traffic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NodeConfig is used to store Contiv-specific node configuration entered via CRD.

func (*NodeConfig) Descriptor

func (*NodeConfig) Descriptor() ([]byte, []int)

func (*NodeConfig) GetGateway

func (m *NodeConfig) GetGateway() string

func (*NodeConfig) GetMainVppInterface

func (m *NodeConfig) GetMainVppInterface() *NodeConfig_InterfaceConfig

func (*NodeConfig) GetNatExternalTraffic

func (m *NodeConfig) GetNatExternalTraffic() bool

func (*NodeConfig) GetNodeName

func (m *NodeConfig) GetNodeName() string

func (*NodeConfig) GetOtherVppInterfaces

func (m *NodeConfig) GetOtherVppInterfaces() []*NodeConfig_InterfaceConfig

func (*NodeConfig) GetStealInterface

func (m *NodeConfig) GetStealInterface() string

func (*NodeConfig) ProtoMessage

func (*NodeConfig) ProtoMessage()

func (*NodeConfig) Reset

func (m *NodeConfig) Reset()

func (*NodeConfig) String

func (m *NodeConfig) String() string

func (*NodeConfig) XXX_DiscardUnknown

func (m *NodeConfig) XXX_DiscardUnknown()

func (*NodeConfig) XXX_Marshal

func (m *NodeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeConfig) XXX_Merge

func (m *NodeConfig) XXX_Merge(src proto.Message)

func (*NodeConfig) XXX_Size

func (m *NodeConfig) XXX_Size() int

func (*NodeConfig) XXX_Unmarshal

func (m *NodeConfig) XXX_Unmarshal(b []byte) error

type NodeConfig_InterfaceConfig

type NodeConfig_InterfaceConfig struct {
	// interface name to which the configuration applies
	InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
	// ip address to statically assign to the interface
	Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// if enabled, the interface will be assigned IP address dynamically via DHCP protocol
	UseDhcp              bool     `protobuf:"varint,3,opt,name=use_dhcp,json=useDhcp,proto3" json:"use_dhcp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

InterfaceConfig stores configuration for a single interface.

func (*NodeConfig_InterfaceConfig) Descriptor

func (*NodeConfig_InterfaceConfig) Descriptor() ([]byte, []int)

func (*NodeConfig_InterfaceConfig) GetInterfaceName

func (m *NodeConfig_InterfaceConfig) GetInterfaceName() string

func (*NodeConfig_InterfaceConfig) GetIp

func (*NodeConfig_InterfaceConfig) GetUseDhcp

func (m *NodeConfig_InterfaceConfig) GetUseDhcp() bool

func (*NodeConfig_InterfaceConfig) ProtoMessage

func (*NodeConfig_InterfaceConfig) ProtoMessage()

func (*NodeConfig_InterfaceConfig) Reset

func (m *NodeConfig_InterfaceConfig) Reset()

func (*NodeConfig_InterfaceConfig) String

func (m *NodeConfig_InterfaceConfig) String() string

func (*NodeConfig_InterfaceConfig) XXX_DiscardUnknown

func (m *NodeConfig_InterfaceConfig) XXX_DiscardUnknown()

func (*NodeConfig_InterfaceConfig) XXX_Marshal

func (m *NodeConfig_InterfaceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeConfig_InterfaceConfig) XXX_Merge

func (m *NodeConfig_InterfaceConfig) XXX_Merge(src proto.Message)

func (*NodeConfig_InterfaceConfig) XXX_Size

func (m *NodeConfig_InterfaceConfig) XXX_Size() int

func (*NodeConfig_InterfaceConfig) XXX_Unmarshal

func (m *NodeConfig_InterfaceConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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