Documentation ¶
Overview ¶
Package fabricsim implements the northbound API of the fabric simulator
Index ¶
- type Server
- func (s *Server) AddDevice(ctx context.Context, request *simapi.AddDeviceRequest) (*simapi.AddDeviceResponse, error)
- func (s *Server) AddHost(ctx context.Context, request *simapi.AddHostRequest) (*simapi.AddHostResponse, error)
- func (s *Server) AddLink(ctx context.Context, request *simapi.AddLinkRequest) (*simapi.AddLinkResponse, error)
- func (s *Server) DisablePort(ctx context.Context, request *simapi.DisablePortRequest) (*simapi.DisablePortResponse, error)
- func (s *Server) EmitARPs(ctx context.Context, request *simapi.EmitARPsRequest) (*simapi.EmitARPsResponse, error)
- func (s *Server) EnablePort(ctx context.Context, request *simapi.EnablePortRequest) (*simapi.EnablePortResponse, error)
- func (s *Server) GetDevice(ctx context.Context, request *simapi.GetDeviceRequest) (*simapi.GetDeviceResponse, error)
- func (s *Server) GetDevices(ctx context.Context, request *simapi.GetDevicesRequest) (*simapi.GetDevicesResponse, error)
- func (s *Server) GetHost(ctx context.Context, request *simapi.GetHostRequest) (*simapi.GetHostResponse, error)
- func (s *Server) GetHosts(ctx context.Context, request *simapi.GetHostsRequest) (*simapi.GetHostsResponse, error)
- func (s *Server) GetLink(ctx context.Context, request *simapi.GetLinkRequest) (*simapi.GetLinkResponse, error)
- func (s *Server) GetLinks(ctx context.Context, request *simapi.GetLinksRequest) (*simapi.GetLinksResponse, error)
- func (s *Server) RemoveDevice(ctx context.Context, request *simapi.RemoveDeviceRequest) (*simapi.RemoveDeviceResponse, error)
- func (s *Server) RemoveHost(ctx context.Context, request *simapi.RemoveHostRequest) (*simapi.RemoveHostResponse, error)
- func (s *Server) RemoveLink(ctx context.Context, request *simapi.RemoveLinkRequest) (*simapi.RemoveLinkResponse, error)
- func (s *Server) StartDevice(ctx context.Context, request *simapi.StartDeviceRequest) (*simapi.StartDeviceResponse, error)
- func (s *Server) StopDevice(ctx context.Context, request *simapi.StopDeviceRequest) (*simapi.StopDeviceResponse, error)
- type Service
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 (*Server) AddLink ¶
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 (*Server) GetLink ¶
func (s *Server) GetLink(ctx context.Context, request *simapi.GetLinkRequest) (*simapi.GetLinkResponse, error)
GetLink returns the specified simulated link
func (*Server) GetLinks ¶
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 (*Server) RemoveLink ¶
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