Documentation
¶
Index ¶
- func GetArgs() map[string]string
- func GetArgsAsEnv(args map[string]string) map[string]string
- func SetArg(name, value string)
- func SetArgs(args map[string]string)
- type App
- type Apps
- type Arg
- type Atomix
- type CLI
- type Cluster
- func (c *Cluster) Apps() *Apps
- func (c *Cluster) Atomix() *Atomix
- func (c *Cluster) CLI() *CLI
- func (c *Cluster) Config() *Config
- func (c *Cluster) Database() *Storage
- func (c *Cluster) History() *History
- func (c *Cluster) Networks() *Networks
- func (c *Cluster) RIC() *RIC
- func (c *Cluster) Simulators() *Simulators
- func (c *Cluster) Topo() *Topo
- type Config
- type Database
- func (s *Database) AwaitReady() error
- func (s *Database) Connect() (*atomix.Database, error)
- func (s *Database) NOPaxos() *NOPaxosDatabase
- func (s *Database) Name() string
- func (s *Database) Partition(name string) *Partition
- func (s *Database) Partitions() []*Partition
- func (s *Database) Raft() *RaftDatabase
- func (s *Database) Setup() error
- type Deployment
- func (d *Deployment) AwaitReady() error
- func (d *Deployment) Execute(command ...string) ([]string, int, error)
- func (d *Deployment) Image() string
- func (d *Deployment) Name() string
- func (d *Deployment) Node(name string) (*Node, error)
- func (d *Deployment) Nodes() ([]*Node, error)
- func (d *Deployment) PullPolicy() corev1.PullPolicy
- func (d *Deployment) SetCluster(cluster *Cluster)
- func (d *Deployment) SetImage(image string)
- func (d *Deployment) SetLabels(labels map[string]string)
- func (d *Deployment) SetName(name string)
- func (d *Deployment) SetPullPolicy(pullPolicy corev1.PullPolicy)
- type History
- type JobInfo
- type NOPaxosDatabase
- func (s *NOPaxosDatabase) AwaitReady() error
- func (s *NOPaxosDatabase) Connect() (*atomix.PartitionGroup, error)
- func (s *NOPaxosDatabase) NumPartitions() int
- func (s *NOPaxosDatabase) ReplicaImage() string
- func (s *NOPaxosDatabase) ReplicaPullPolicy() corev1.PullPolicy
- func (s *NOPaxosDatabase) Replicas() int
- func (s *NOPaxosDatabase) SequencerImage() string
- func (s *NOPaxosDatabase) SequencerPullPolicy() corev1.PullPolicy
- func (s *NOPaxosDatabase) SetPartitions(partitions int)
- func (s *NOPaxosDatabase) SetReplicaImage(image string)
- func (s *NOPaxosDatabase) SetReplicaPullPolicy(pullPolicy corev1.PullPolicy)
- func (s *NOPaxosDatabase) SetReplicas(replicas int)
- func (s *NOPaxosDatabase) SetSequencerImage(image string)
- func (s *NOPaxosDatabase) SetSequencerPullPolicy(pullPolicy corev1.PullPolicy)
- func (s *NOPaxosDatabase) Setup() error
- type Network
- func (s *Network) AddDevices() bool
- func (s *Network) DeviceTimeout() *time.Duration
- func (s *Network) DeviceType() string
- func (s *Network) DeviceVersion() string
- func (s *Network) Devices() ([]*Node, error)
- func (s *Network) SetAddDevices(add bool)
- func (s *Network) SetDeviceTimeout(timeout time.Duration)
- func (s *Network) SetDeviceType(deviceType string)
- func (s *Network) SetDeviceVersion(version string)
- func (s *Network) SetLinear(devices int) *Network
- func (s *Network) SetSingle() *Network
- func (s *Network) SetTopo(topo string, devices int) *Network
- func (s *Network) Setup() error
- func (s *Network) TearDown() error
- type Networks
- type Node
- func (n *Node) Address() string
- func (n *Node) AwaitReady() error
- func (n *Node) Connect() (*grpc.ClientConn, error)
- func (n *Node) Credentials() (*tls.Config, error)
- func (n *Node) Delete() error
- func (n *Node) Execute(command ...string) ([]string, int, error)
- func (n *Node) Image() string
- func (n *Node) Name() string
- func (n *Node) Port() int
- func (n *Node) PullPolicy() corev1.PullPolicy
- func (n *Node) SetImage(image string)
- func (n *Node) SetName(name string)
- func (n *Node) SetPort(port int)
- func (n *Node) SetPullPolicy(pullPolicy corev1.PullPolicy)
- type Partition
- type Port
- type RIC
- type RaftDatabase
- func (s *RaftDatabase) AwaitReady() error
- func (s *RaftDatabase) Clusters() int
- func (s *RaftDatabase) Connect() (*atomix.PartitionGroup, error)
- func (s *RaftDatabase) Image() string
- func (s *RaftDatabase) NumPartitions() int
- func (s *RaftDatabase) PullPolicy() corev1.PullPolicy
- func (s *RaftDatabase) Replicas() int
- func (s *RaftDatabase) SetClusters(clusters int)
- func (s *RaftDatabase) SetImage(image string)
- func (s *RaftDatabase) SetPartitions(partitions int)
- func (s *RaftDatabase) SetPullPolicy(pullPolicy corev1.PullPolicy)
- func (s *RaftDatabase) SetReplicas(replicas int)
- func (s *RaftDatabase) Setup() error
- type Service
- func (s *Service) AddEnv(name, value string)
- func (s *Service) AddPort(name string, port int)
- func (s *Service) AddSecret(name, secret string)
- func (s *Service) Address(port string) string
- func (s *Service) Args() []string
- func (s *Service) AwaitReady() error
- func (s *Service) CPULimit() string
- func (s *Service) CPURequest() string
- func (s *Service) Connect(port string) (*grpc.ClientConn, error)
- func (s *Service) Credentials() (*tls.Config, error)
- func (s *Service) Debug() bool
- func (s *Service) Env() map[string]string
- func (s *Service) MemoryLimit() string
- func (s *Service) MemoryRequest() string
- func (s *Service) Ports() []Port
- func (s *Service) Privileged() bool
- func (s *Service) Replicas() int
- func (s *Service) Secrets() map[string]string
- func (s *Service) SetArgs(args ...string)
- func (s *Service) SetCPULimit(cpuLimit string)
- func (s *Service) SetCPURequest(cpuRequest string)
- func (s *Service) SetDebug(debug bool)
- func (s *Service) SetEnv(env map[string]string)
- func (s *Service) SetMemoryLimit(memoryLimit string)
- func (s *Service) SetMemoryRequest(memoryRequest string)
- func (s *Service) SetPorts(ports []Port)
- func (s *Service) SetPrivileged(privileged bool)
- func (s *Service) SetReplicas(replicas int)
- func (s *Service) SetSecrets(secrets map[string]string)
- func (s *Service) SetSidecars(sidecars []*Sidecar)
- func (s *Service) SetUser(user int)
- func (s *Service) SetVolume(volume ...corev1.VolumeMount)
- func (s *Service) Setup() error
- func (s *Service) Sidecars() []*Sidecar
- func (s *Service) TearDown() error
- func (s *Service) User() *int
- func (s *Service) Volume() []corev1.VolumeMount
- type Sidecar
- func (s *Sidecar) AddEnv(name, value string)
- func (s *Sidecar) Args() []string
- func (s *Sidecar) Command() []string
- func (s *Sidecar) Env() map[string]string
- func (s *Sidecar) Image() string
- func (s *Sidecar) Name() string
- func (s *Sidecar) PullPolicy() corev1.PullPolicy
- func (s *Sidecar) SetArgs(args ...string)
- func (s *Sidecar) SetCommand(command ...string)
- func (s *Sidecar) SetEnv(env map[string]string)
- func (s *Sidecar) SetImage(image string)
- func (s *Sidecar) SetName(name string)
- func (s *Sidecar) SetPullPolicy(pullPolicy corev1.PullPolicy)
- func (s *Sidecar) SetVolume(volume ...corev1.VolumeMount)
- func (s *Sidecar) Volume() []corev1.VolumeMount
- type Simulator
- func (s *Simulator) AddDevice() bool
- func (s *Simulator) AwaitDevicePredicate(predicate func(*device.Device) bool, timeout time.Duration) error
- func (s *Simulator) DeviceTimeout() *time.Duration
- func (s *Simulator) DeviceType() string
- func (s *Simulator) DeviceVersion() string
- func (s *Simulator) SetAddDevice(add bool)
- func (s *Simulator) SetDeviceTimeout(timeout time.Duration)
- func (s *Simulator) SetDeviceType(deviceType string)
- func (s *Simulator) SetDeviceVersion(version string)
- func (s *Simulator) Setup() error
- func (s *Simulator) TearDown() error
- type Simulators
- type Status
- type Storage
- type Topo
- type TopoType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArgsAsEnv ¶
GetArgsAsEnv returns the given arguments as an environment variable map
Types ¶
type Apps ¶
type Apps struct {
// contains filtered or unexported fields
}
Apps provides methods for adding and modifying applications
type Atomix ¶
type Atomix struct {
*Deployment
}
Atomix provides methods for managing the Atomix controller
type CLI ¶
type CLI struct {
*Deployment
// contains filtered or unexported fields
}
CLI provides methods for managing the onos-cli service
func (*CLI) AwaitReady ¶
AwaitReady waits for the onos-cli pods to complete startup
func (*CLI) SetEnabled ¶
SetEnabled sets whether the CLI is enabled
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster facilitates modifying subsystems in Kubernetes
func (*Cluster) Simulators ¶
func (c *Cluster) Simulators() *Simulators
Simulators returns the cluster simulators
type Config ¶
type Config struct {
*Service
}
Config provides methods for managing the onos-config service
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database provides methods for adding and modifying a database
func (*Database) AwaitReady ¶
AwaitReady waits for database to complete startup
func (*Database) NOPaxos ¶
func (s *Database) NOPaxos() *NOPaxosDatabase
NOPaxos returns new NOPaxosDatabase
func (*Database) Partitions ¶
Partitions lists the partitions in the database
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment is a collection of nodes
func (*Deployment) AwaitReady ¶
func (d *Deployment) AwaitReady() error
AwaitReady waits for the nodes to become ready
func (*Deployment) Execute ¶
func (d *Deployment) Execute(command ...string) ([]string, int, error)
Execute executes the given command on one of the service nodes
func (*Deployment) Image ¶
func (d *Deployment) Image() string
Image returns the image for the service
func (*Deployment) Node ¶
func (d *Deployment) Node(name string) (*Node, error)
Node gets a node by name
func (*Deployment) Nodes ¶
func (d *Deployment) Nodes() ([]*Node, error)
Nodes returns a list of nodes in the service
func (*Deployment) PullPolicy ¶
func (d *Deployment) PullPolicy() corev1.PullPolicy
PullPolicy returns the image pull policy for the service
func (*Deployment) SetCluster ¶
func (d *Deployment) SetCluster(cluster *Cluster)
SetCluster sets the cluster for the service
func (*Deployment) SetImage ¶
func (d *Deployment) SetImage(image string)
SetImage sets the image for the service
func (*Deployment) SetLabels ¶
func (d *Deployment) SetLabels(labels map[string]string)
SetLabels sets the labels for the service
func (*Deployment) SetName ¶
func (d *Deployment) SetName(name string)
SetName sets the name for the service
func (*Deployment) SetPullPolicy ¶
func (d *Deployment) SetPullPolicy(pullPolicy corev1.PullPolicy)
SetPullPolicy sets the image pull policy for the service
type History ¶
type History struct {
// contains filtered or unexported fields
}
History provides methods for retrieving history of tests and benchmarks
func (*History) GetBenchmarksMap ¶
GetBenchmarksMap gets a maps of benchmarks
func (*History) GetTestsMap ¶
GetTestsMap gets a map of test jobs
func (*History) ListBenchmarks ¶
ListBenchmarks gets list of all benchmarks
type JobInfo ¶
type JobInfo struct {
// contains filtered or unexported fields
}
JobInfo k8s job info
type NOPaxosDatabase ¶
type NOPaxosDatabase struct {
*Database
// contains filtered or unexported fields
}
NOPaxosDatabase provides methods for adding and modifying NOPaxos partitions
func (*NOPaxosDatabase) AwaitReady ¶
func (s *NOPaxosDatabase) AwaitReady() error
AwaitReady waits for partitions to complete startup
func (*NOPaxosDatabase) Connect ¶
func (s *NOPaxosDatabase) Connect() (*atomix.PartitionGroup, error)
Connect connects to the partition group
func (*NOPaxosDatabase) NumPartitions ¶
func (s *NOPaxosDatabase) NumPartitions() int
NumPartitions returns the number of partitions
func (*NOPaxosDatabase) ReplicaImage ¶
func (s *NOPaxosDatabase) ReplicaImage() string
ReplicaImage returns the image for the partition group
func (*NOPaxosDatabase) ReplicaPullPolicy ¶
func (s *NOPaxosDatabase) ReplicaPullPolicy() corev1.PullPolicy
ReplicaPullPolicy returns the image pull policy for the partition group
func (*NOPaxosDatabase) Replicas ¶
func (s *NOPaxosDatabase) Replicas() int
Replicas returns the number of replicas in each partition
func (*NOPaxosDatabase) SequencerImage ¶
func (s *NOPaxosDatabase) SequencerImage() string
SequencerImage returns the image for the partition group
func (*NOPaxosDatabase) SequencerPullPolicy ¶
func (s *NOPaxosDatabase) SequencerPullPolicy() corev1.PullPolicy
SequencerPullPolicy returns the image pull policy for the partition group
func (*NOPaxosDatabase) SetPartitions ¶
func (s *NOPaxosDatabase) SetPartitions(partitions int)
SetPartitions sets the number of partitions in the group
func (*NOPaxosDatabase) SetReplicaImage ¶
func (s *NOPaxosDatabase) SetReplicaImage(image string)
SetReplicaImage sets the image for the partition group replicas
func (*NOPaxosDatabase) SetReplicaPullPolicy ¶
func (s *NOPaxosDatabase) SetReplicaPullPolicy(pullPolicy corev1.PullPolicy)
SetReplicaPullPolicy sets the image pull policy for the partition group
func (*NOPaxosDatabase) SetReplicas ¶
func (s *NOPaxosDatabase) SetReplicas(replicas int)
SetReplicas sets the number of nodes in each partition
func (*NOPaxosDatabase) SetSequencerImage ¶
func (s *NOPaxosDatabase) SetSequencerImage(image string)
SetSequencerImage sets the image for the partition group sequencer
func (*NOPaxosDatabase) SetSequencerPullPolicy ¶
func (s *NOPaxosDatabase) SetSequencerPullPolicy(pullPolicy corev1.PullPolicy)
SetSequencerPullPolicy sets the image pull policy for the partition group
func (*NOPaxosDatabase) Setup ¶
func (s *NOPaxosDatabase) Setup() error
Setup sets up a NOPaxos database
type Network ¶
type Network struct {
// TODO: Network should be a Service with a Node per device
*Node
// contains filtered or unexported fields
}
Network is an implementation of the Network interface
func (*Network) AddDevices ¶
AddDevices returns whether to add the devices to the topo service
func (*Network) DeviceTimeout ¶
DeviceTimeout returns the device timeout
func (*Network) DeviceType ¶
DeviceType returns the device type
func (*Network) DeviceVersion ¶
DeviceVersion returns the device version
func (*Network) SetAddDevices ¶
SetAddDevices sets whether to add the devices to the topo service
func (*Network) SetDeviceTimeout ¶
SetDeviceTimeout sets the device timeout
func (*Network) SetDeviceType ¶
SetDeviceType sets the device type
func (*Network) SetDeviceVersion ¶
SetDeviceVersion sets the device version
type Networks ¶
type Networks struct {
// contains filtered or unexported fields
}
Networks provides methods for adding and modifying networks
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node provides the environment for a single node
func (*Node) AwaitReady ¶
AwaitReady waits for the node to become ready
func (*Node) Connect ¶
func (n *Node) Connect() (*grpc.ClientConn, error)
Connect creates a gRPC client connection to the node
func (*Node) Credentials ¶
Credentials returns the TLS credentials
func (*Node) PullPolicy ¶
func (n *Node) PullPolicy() corev1.PullPolicy
PullPolicy returns the image pull policy configured for the node
func (*Node) SetPullPolicy ¶
func (n *Node) SetPullPolicy(pullPolicy corev1.PullPolicy)
SetPullPolicy sets the image pull policy for the node
type Partition ¶
type Partition struct {
*Deployment
}
Partition provides methods for querying a database partition
type RIC ¶
type RIC struct {
*Service
// contains filtered or unexported fields
}
RIC provides methods for managing the onos-ric service
func (*RIC) SetEnabled ¶
SetEnabled sets whether the Ric is enabled
type RaftDatabase ¶
type RaftDatabase struct {
*Database
// contains filtered or unexported fields
}
RaftDatabase provides methods for adding and modifying Raft partitions
func (*RaftDatabase) AwaitReady ¶
func (s *RaftDatabase) AwaitReady() error
AwaitReady waits for partitions to complete startup
func (*RaftDatabase) Clusters ¶
func (s *RaftDatabase) Clusters() int
Clusters returns the number of clusters in each partition
func (*RaftDatabase) Connect ¶
func (s *RaftDatabase) Connect() (*atomix.PartitionGroup, error)
Connect connects to the partition group
func (*RaftDatabase) Image ¶
func (s *RaftDatabase) Image() string
Image returns the image for the partition group
func (*RaftDatabase) NumPartitions ¶
func (s *RaftDatabase) NumPartitions() int
NumPartitions returns the number of partitions
func (*RaftDatabase) PullPolicy ¶
func (s *RaftDatabase) PullPolicy() corev1.PullPolicy
PullPolicy returns the image pull policy for the partition group
func (*RaftDatabase) Replicas ¶
func (s *RaftDatabase) Replicas() int
Replicas returns the number of replicas in each partition
func (*RaftDatabase) SetClusters ¶
func (s *RaftDatabase) SetClusters(clusters int)
SetClusters sets the number of clusters in each partition
func (*RaftDatabase) SetImage ¶
func (s *RaftDatabase) SetImage(image string)
SetImage sets the image for the partition group
func (*RaftDatabase) SetPartitions ¶
func (s *RaftDatabase) SetPartitions(partitions int)
SetPartitions sets the number of partitions in the group
func (*RaftDatabase) SetPullPolicy ¶
func (s *RaftDatabase) SetPullPolicy(pullPolicy corev1.PullPolicy)
SetPullPolicy sets the image pull policy for the partition group
func (*RaftDatabase) SetReplicas ¶
func (s *RaftDatabase) SetReplicas(replicas int)
SetReplicas sets the number of nodes in each partition
type Service ¶
type Service struct {
*Deployment
// contains filtered or unexported fields
}
Service is the base type for multi-node services
func (*Service) AwaitReady ¶
AwaitReady waits for the service to complete startup
func (*Service) CPURequest ¶
CPURequest returns the cpu request for a deployment container
func (*Service) Connect ¶
func (s *Service) Connect(port string) (*grpc.ClientConn, error)
Connect creates a gRPC client connection to the service
func (*Service) Credentials ¶
Credentials returns the TLS credentials
func (*Service) MemoryLimit ¶
MemoryLimit returns the memory limit for a deployment container
func (*Service) MemoryRequest ¶
MemoryRequest returns the memory request for a deployment container
func (*Service) Privileged ¶
Privileged returns whether to run the service in privileged mode
func (*Service) SetCPULimit ¶
SetCPULimit sets cpu limit for a deployment container
func (*Service) SetCPURequest ¶
SetCPURequest sets cpu request for a deployment container
func (*Service) SetMemoryLimit ¶
SetMemoryLimit sets memory limit for a deployment container
func (*Service) SetMemoryRequest ¶
SetMemoryRequest sets memory request for a deployment container
func (*Service) SetPrivileged ¶
SetPrivileged sets whether to run the service in privileged mode
func (*Service) SetReplicas ¶
SetReplicas sets the number of nodes in the service
func (*Service) SetSecrets ¶
SetSecrets sets the service secrets
func (*Service) SetSidecars ¶
SetSidecars sets the service sidecars
func (*Service) SetVolume ¶
func (s *Service) SetVolume(volume ...corev1.VolumeMount)
SetVolume sets service volumes
func (*Service) Volume ¶
func (s *Service) Volume() []corev1.VolumeMount
Volume returns the service volume
type Sidecar ¶
type Sidecar struct {
// contains filtered or unexported fields
}
Sidecar provides methods for adding sidecar containers to a deployment
func (*Sidecar) PullPolicy ¶
func (s *Sidecar) PullPolicy() corev1.PullPolicy
PullPolicy returns the image pull policy for the container
func (*Sidecar) SetCommand ¶
SetCommand sets the sidecar container command
func (*Sidecar) SetPullPolicy ¶
func (s *Sidecar) SetPullPolicy(pullPolicy corev1.PullPolicy)
SetPullPolicy sets the image pull policy for the container
func (*Sidecar) SetVolume ¶
func (s *Sidecar) SetVolume(volume ...corev1.VolumeMount)
SetVolume sets sidecar containers volumes
func (*Sidecar) Volume ¶
func (s *Sidecar) Volume() []corev1.VolumeMount
Volume returns the sidecar container volume
type Simulator ¶
type Simulator struct {
*Node
// contains filtered or unexported fields
}
Simulator provides methods for adding and modifying simulators
func (*Simulator) AwaitDevicePredicate ¶
func (s *Simulator) AwaitDevicePredicate(predicate func(*device.Device) bool, timeout time.Duration) error
AwaitDevicePredicate waits for the given device predicate
func (*Simulator) DeviceTimeout ¶
DeviceTimeout returns the device timeout
func (*Simulator) DeviceType ¶
DeviceType returns the device type
func (*Simulator) DeviceVersion ¶
DeviceVersion returns the device version
func (*Simulator) SetAddDevice ¶
SetAddDevice sets whether to add the device to the topo service
func (*Simulator) SetDeviceTimeout ¶
SetDeviceTimeout sets the device timeout
func (*Simulator) SetDeviceType ¶
SetDeviceType sets the device type
func (*Simulator) SetDeviceVersion ¶
SetDeviceVersion sets the device version
type Simulators ¶
type Simulators struct {
// contains filtered or unexported fields
}
Simulators provides methods for adding and modifying simulators
func (*Simulators) Get ¶
func (s *Simulators) Get(name string) *Simulator
Get gets a simulator by name
func (*Simulators) List ¶
func (s *Simulators) List() []*Simulator
List lists the simulators in the cluster