fabricsim

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fabricsim implements the northbound API of the fabric simulator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements the grpc fabric simulator service

func (*Server) AddDevice

func (s *Server) AddDevice(ctx context.Context, request *simapi.AddDeviceRequest) (*simapi.AddDeviceResponse, error)

AddDevice creates and registers a new simulated device

func (*Server) AddHost

func (s *Server) AddHost(ctx context.Context, request *simapi.AddHostRequest) (*simapi.AddHostResponse, error)

AddHost creates and registers the specified simulated host

func (s *Server) AddLink(ctx context.Context, request *simapi.AddLinkRequest) (*simapi.AddLinkResponse, error)

AddLink creates and registers the specified simulated link

func (*Server) DisablePort

func (s *Server) DisablePort(ctx context.Context, request *simapi.DisablePortRequest) (*simapi.DisablePortResponse, error)

DisablePort disables the specified simulated device port

func (*Server) EmitARPs added in v0.1.1

func (s *Server) EmitARPs(ctx context.Context, request *simapi.EmitARPsRequest) (*simapi.EmitARPsResponse, error)

EmitARPs triggers the specified host NIC to send ARP requests for a set of IP addresses

func (*Server) EnablePort

func (s *Server) EnablePort(ctx context.Context, request *simapi.EnablePortRequest) (*simapi.EnablePortResponse, error)

EnablePort enables the specified simulated device port

func (*Server) GetDevice

func (s *Server) GetDevice(ctx context.Context, request *simapi.GetDeviceRequest) (*simapi.GetDeviceResponse, error)

GetDevice returns the specified simulated device

func (*Server) GetDevices

func (s *Server) GetDevices(ctx context.Context, request *simapi.GetDevicesRequest) (*simapi.GetDevicesResponse, error)

GetDevices returns a list of simulated devices; switches and IPUs

func (*Server) GetHost

func (s *Server) GetHost(ctx context.Context, request *simapi.GetHostRequest) (*simapi.GetHostResponse, error)

GetHost returns the specified simulated host

func (*Server) GetHosts

func (s *Server) GetHosts(ctx context.Context, request *simapi.GetHostsRequest) (*simapi.GetHostsResponse, error)

GetHosts returns list of all simulated hosts

func (s *Server) GetLink(ctx context.Context, request *simapi.GetLinkRequest) (*simapi.GetLinkResponse, error)

GetLink returns the specified simulated link

func (s *Server) GetLinks(ctx context.Context, request *simapi.GetLinksRequest) (*simapi.GetLinksResponse, error)

GetLinks returns list of all simulated links

func (*Server) RemoveDevice

func (s *Server) RemoveDevice(ctx context.Context, request *simapi.RemoveDeviceRequest) (*simapi.RemoveDeviceResponse, error)

RemoveDevice stops and removes the specified simulated device

func (*Server) RemoveHost

func (s *Server) RemoveHost(ctx context.Context, request *simapi.RemoveHostRequest) (*simapi.RemoveHostResponse, error)

RemoveHost removes the specified simulated host

func (s *Server) RemoveLink(ctx context.Context, request *simapi.RemoveLinkRequest) (*simapi.RemoveLinkResponse, error)

RemoveLink removes the specified simulated link

func (*Server) StartDevice

func (s *Server) StartDevice(ctx context.Context, request *simapi.StartDeviceRequest) (*simapi.StartDeviceResponse, error)

StartDevice starts the specified simulated device

func (*Server) StopDevice

func (s *Server) StopDevice(ctx context.Context, request *simapi.StopDeviceRequest) (*simapi.StopDeviceResponse, error)

StopDevice stops the specified simulated device

type Service

type Service struct {
	northbound.Service
	// contains filtered or unexported fields
}

Service implements the fabric simulator NB gRPC

func NewService

func NewService(simulation *simulator.Simulation) Service

NewService allocates a Service struct with the given parameters

func (Service) Register

func (s Service) Register(r *grpc.Server)

Register registers the server with grpc

Jump to

Keyboard shortcuts

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