Documentation
¶
Overview ¶
Package controller implements the topology discovery controller
Package controller implements the topology discovery controller
Index ¶
- type Controller
- func (c *Controller) AddPod(ctx context.Context, req *api.AddPodRequest) error
- func (c *Controller) AddRack(ctx context.Context, req *api.AddRackRequest) error
- func (c *Controller) AddServerIPU(ctx context.Context, req *api.AddServerIPURequest) error
- func (c *Controller) AddSwitch(ctx context.Context, req *api.AddSwitchRequest) error
- func (c *Controller) Start()
- func (c *Controller) Stop()
- type HostReconciler
- type LinkReconciler
- type PortReconciler
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller drives the topology discovery control logic
func NewController ¶
func NewController(realmOptions *realm.Options, neighborRealmOptions *realm.Options, topoAddress string, topoOpts ...grpc.DialOption) *Controller
NewController creates a new topology discovery controller
func (*Controller) AddPod ¶
func (c *Controller) AddPod(ctx context.Context, req *api.AddPodRequest) error
AddPod adds a new POD entity with the requisite aspects
func (*Controller) AddRack ¶
func (c *Controller) AddRack(ctx context.Context, req *api.AddRackRequest) error
AddRack adds a new rack entity with the requisite aspects as part of a POD
func (*Controller) AddServerIPU ¶
func (c *Controller) AddServerIPU(ctx context.Context, req *api.AddServerIPURequest) error
AddServerIPU adds a new server entity and an associated IPU entity, both with the requisite aspects into a rack
func (*Controller) AddSwitch ¶
func (c *Controller) AddSwitch(ctx context.Context, req *api.AddSwitchRequest) error
AddSwitch adds a new switch entity with the requisite aspects into a rack
type HostReconciler ¶ added in v1.1.10
type HostReconciler struct { southbound.HostListener // contains filtered or unexported fields }
HostReconciler provides state and context required for host discovery and reconciliation
func NewHostReconciler ¶ added in v1.1.10
func NewHostReconciler(ctx context.Context, topoClient topo.TopoClient) *HostReconciler
NewHostReconciler creates a new host reconciler context
func (*HostReconciler) DiscoverHosts ¶ added in v1.1.10
func (r *HostReconciler) DiscoverHosts(object *topo.Object)
DiscoverHosts discovers hosts and reconciles their topology entity counterparts
func (*HostReconciler) HostAdded ¶ added in v1.1.10
func (r *HostReconciler) HostAdded(host *southbound.Host, agentID string)
HostAdded handles host addition event
func (*HostReconciler) HostDeleted ¶ added in v1.1.10
func (r *HostReconciler) HostDeleted(host *southbound.Host, agentID string)
HostDeleted handles host deletion event
type LinkReconciler ¶ added in v0.2.4
type LinkReconciler struct { southbound.IngressLinkListener // contains filtered or unexported fields }
LinkReconciler provides state and context required for link discovery and reconciliation
func NewLinkReconciler ¶ added in v0.2.4
func NewLinkReconciler(ctx context.Context, topoClient topo.TopoClient) *LinkReconciler
NewLinkReconciler creates a new link reconciler context
func (*LinkReconciler) DiscoverLinks ¶ added in v0.2.4
func (r *LinkReconciler) DiscoverLinks(object *topo.Object)
DiscoverLinks discovers links and reconciles their topology entity counterparts
func (*LinkReconciler) LinkAdded ¶ added in v1.1.2
func (r *LinkReconciler) LinkAdded(link *southbound.Link)
LinkAdded handles link addition event
func (*LinkReconciler) LinkDeleted ¶ added in v1.1.2
func (r *LinkReconciler) LinkDeleted(link *southbound.Link)
LinkDeleted handles link deletion event
func (*LinkReconciler) RegisterAgent ¶ added in v1.1.9
func (r *LinkReconciler) RegisterAgent(object *topo.Object)
RegisterAgent discovers agentID and binds it to the specified object ID
type PortReconciler ¶ added in v0.2.4
type PortReconciler struct { southbound.PortStatusListener // contains filtered or unexported fields }
PortReconciler provides state and context required for port discovery and reconciliation
func NewPortReconciler ¶ added in v0.2.4
func NewPortReconciler(ctx context.Context, topoClient topo.TopoClient) *PortReconciler
NewPortReconciler creates a new port reconciler context
func (*PortReconciler) DiscoverPorts ¶ added in v0.2.4
func (r *PortReconciler) DiscoverPorts(object *topo.Object)
DiscoverPorts discovers ports and reconciles their topology entity counterparts
func (*PortReconciler) HandlePortStatus ¶ added in v1.1.2
func (r *PortReconciler) HandlePortStatus(object *topo.Object, port *topo.Port)
HandlePortStatus handles port status change
type State ¶
type State int
State represents the various states of controller lifecycle
const ( // Disconnected represents the default/initial state Disconnected State = iota // Connected represents state where connection to onos-topo has been established Connected // Initialized represents state after the initial reconciliation pass has completed Initialized // Monitoring represents state of monitoring topology changes Monitoring // Stopped represents state where the controller has been issued a stop command Stopped )