Documentation ¶
Overview ¶
Package inventory contains the implementation of the simulated inventory. Each physical element is simulated using a state machine based local actor structure.
Index ¶
- func NewTracker() *tracker
- func Register(svc *grpc.Server, cfg *config.GlobalConfig) error
- type MockedBlade
- type MockedBladeActual
- func (m *MockedBladeActual) Create(ctx context.Context) (int64, error)
- func (m *MockedBladeActual) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedBladeActual) Equal(x *pb.Actual_Blade) bool
- func (m *MockedBladeActual) GetAllUsage() map[string]*pb.Usage
- func (m *MockedBladeActual) GetAvail() *pb.BladeCapacity
- func (m *MockedBladeActual) GetState() pb.BladeState_SM
- func (m *MockedBladeActual) GetStoreData() *pb.Actual_Blade
- func (m *MockedBladeActual) GetTimer() *pb.ActiveTimer
- func (m *MockedBladeActual) GetUsage(id string) *pb.Usage
- func (m *MockedBladeActual) NotEqual(x *pb.Actual_Blade) bool
- func (m *MockedBladeActual) Read(ctx context.Context) (int64, error)
- func (m *MockedBladeActual) RemoveUsage(id string) bool
- func (m *MockedBladeActual) SetAllUsage(usages map[string]*pb.Usage)
- func (m *MockedBladeActual) SetAvail(value *pb.BladeCapacity)
- func (m *MockedBladeActual) SetState(state pb.BladeState_SM)
- func (m *MockedBladeActual) SetTimer(t *pb.ActiveTimer)
- func (m *MockedBladeActual) SetUsage(id string, usage *pb.Usage)
- func (m *MockedBladeActual) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedBladeDefinition
- func (m *MockedBladeDefinition) ChildIndexName() string
- func (m *MockedBladeDefinition) Create(ctx context.Context) (int64, error)
- func (m *MockedBladeDefinition) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedBladeDefinition) Equal(d *pb.Definition_Blade) bool
- func (m *MockedBladeDefinition) GetBootInfo() *pb.BladeBootInfo
- func (m *MockedBladeDefinition) GetBootOnPowerOn() bool
- func (m *MockedBladeDefinition) GetCapacity() *pb.BladeCapacity
- func (m *MockedBladeDefinition) GetDetails() *pb.BladeDetails
- func (m *MockedBladeDefinition) GetStoreData() *pb.Definition_Blade
- func (m *MockedBladeDefinition) IndexName() string
- func (m *MockedBladeDefinition) KeyName() string
- func (m *MockedBladeDefinition) ListChildren(ctx context.Context) (int64, []string, error)
- func (m *MockedBladeDefinition) NotEqual(d *pb.Definition_Blade) bool
- func (m *MockedBladeDefinition) Read(ctx context.Context) (rev int64, err error)
- func (m *MockedBladeDefinition) SetBootInfo(bootInfo *pb.BladeBootInfo)
- func (m *MockedBladeDefinition) SetBootPowerOn(bootOnPowerOn bool)
- func (m *MockedBladeDefinition) SetCapacity(capacity *pb.BladeCapacity)
- func (m *MockedBladeDefinition) SetDetails(details *pb.BladeDetails)
- func (m *MockedBladeDefinition) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedPdu
- type MockedPduActual
- func (m *MockedPduActual) Create(ctx context.Context) (int64, error)
- func (m *MockedPduActual) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedPduActual) Describe() string
- func (m *MockedPduActual) Equal(x *pb.Actual_Pdu) bool
- func (m *MockedPduActual) GetCables() map[int64]*pb.Cable
- func (m *MockedPduActual) GetCondition() pb.Condition
- func (m *MockedPduActual) GetCore() *pb.MachineCore
- func (m *MockedPduActual) GetState() pb.PduState_SM
- func (m *MockedPduActual) GetStoreData() *pb.Actual_Pdu
- func (m *MockedPduActual) NotEqual(x *pb.Actual_Pdu) bool
- func (m *MockedPduActual) Read(ctx context.Context) (int64, error)
- func (m *MockedPduActual) SetCables(cables map[int64]*pb.Cable)
- func (m *MockedPduActual) SetCondition(cond pb.Condition)
- func (m *MockedPduActual) SetCore(item *pb.MachineCore)
- func (m *MockedPduActual) SetState(state pb.PduState_SM)
- func (m *MockedPduActual) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedPduDefinition
- func (m *MockedPduDefinition) ChildIndexName() string
- func (m *MockedPduDefinition) Create(ctx context.Context) (int64, error)
- func (m *MockedPduDefinition) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedPduDefinition) Equal(d *pb.Definition_Pdu) bool
- func (m *MockedPduDefinition) EqualPorts(ports map[int64]*pb.PowerPort) bool
- func (m *MockedPduDefinition) GetDetails() *pb.PduDetails
- func (m *MockedPduDefinition) GetPorts() map[int64]*pb.PowerPort
- func (m *MockedPduDefinition) GetStoreData() *pb.Definition_Pdu
- func (m *MockedPduDefinition) IndexName() string
- func (m *MockedPduDefinition) KeyName() string
- func (m *MockedPduDefinition) ListChildren(ctx context.Context) (int64, []string, error)
- func (m *MockedPduDefinition) NotEqual(d *pb.Definition_Pdu) bool
- func (m *MockedPduDefinition) Read(ctx context.Context) (int64, error)
- func (m *MockedPduDefinition) SetDetails(details *pb.PduDetails)
- func (m *MockedPduDefinition) SetPorts(ports map[int64]*pb.PowerPort)
- func (m *MockedPduDefinition) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedPduObserved
- func (m *MockedPduObserved) Create(ctx context.Context) (int64, error)
- func (m *MockedPduObserved) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedPduObserved) Describe() string
- func (m *MockedPduObserved) Equal(x *pb.Observed_Pdu) bool
- func (m *MockedPduObserved) GetCables() map[int64]*pb.Cable
- func (m *MockedPduObserved) GetCondition() pb.Condition
- func (m *MockedPduObserved) GetCore() *pb.MachineCore
- func (m *MockedPduObserved) GetLastGoodObservation() int64
- func (m *MockedPduObserved) GetObservationFailedReason() string
- func (m *MockedPduObserved) GetObservedAt() int64
- func (m *MockedPduObserved) GetState() pb.PduState_SM
- func (m *MockedPduObserved) GetStoreData() *pb.Observed_Pdu
- func (m *MockedPduObserved) NotEqual(x *pb.Observed_Pdu) bool
- func (m *MockedPduObserved) Observe(at int64, actual *pb.Actual_Pdu)
- func (m *MockedPduObserved) Read(ctx context.Context) (int64, error)
- func (m *MockedPduObserved) SetCables(cables map[int64]*pb.Cable)
- func (m *MockedPduObserved) SetCondition(cond pb.Condition)
- func (m *MockedPduObserved) SetCore(item *pb.MachineCore)
- func (m *MockedPduObserved) SetLastGoodObservation(at int64)
- func (m *MockedPduObserved) SetObservationFailedReason(x string)
- func (m *MockedPduObserved) SetObservedAt(at int64)
- func (m *MockedPduObserved) SetState(state pb.PduState_SM)
- func (m *MockedPduObserved) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedRack
- func (m *MockedRack) Actual() inventory.RackViewActualOperations
- func (m *MockedRack) Definition() inventory.RackViewDefinitionOperations
- func (m *MockedRack) Moniker() string
- func (m *MockedRack) NewBlade(ID int64) (inventory.BladeOperations, error)
- func (m *MockedRack) NewChild(name string) (interface{}, error)
- func (m *MockedRack) NewPdu(ID int64) (inventory.PduOperations, error)
- func (m *MockedRack) NewTor(ID int64) (inventory.TorOperations, error)
- type MockedRackActual
- func (m *MockedRackActual) ChildIndexName() string
- func (m *MockedRackActual) Create(ctx context.Context) (int64, error)
- func (m *MockedRackActual) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedRackActual) Equal(d *pb.Actual_Rack) bool
- func (m *MockedRackActual) FetchBlades(ctx context.Context) (int64, map[int64]inventory.BladeOperations, error)
- func (m *MockedRackActual) FetchChildren(ctx context.Context) (int64, *map[string]interface{}, error)
- func (m *MockedRackActual) FetchPdus(ctx context.Context) (int64, map[int64]inventory.PduOperations, error)
- func (m *MockedRackActual) FetchTors(ctx context.Context) (int64, map[int64]inventory.TorOperations, error)
- func (m *MockedRackActual) GetCore() *pb.MachineCore
- func (m *MockedRackActual) GetState() pb.RackState_SM
- func (m *MockedRackActual) GetStoreData() *pb.Actual_Rack
- func (m *MockedRackActual) GetStoreDataWithChildren(ctx context.Context) (*pb.Actual_Rack, error)
- func (m *MockedRackActual) IndexName() string
- func (m *MockedRackActual) KeyName() string
- func (m *MockedRackActual) ListBlades(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackActual) ListChildren(ctx context.Context) (int64, []string, error)
- func (m *MockedRackActual) ListPdus(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackActual) ListTors(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackActual) NotEqual(d *pb.Actual_Rack) bool
- func (m *MockedRackActual) Read(ctx context.Context) (int64, error)
- func (m *MockedRackActual) SetCore(item *pb.MachineCore)
- func (m *MockedRackActual) SetState(value pb.RackState_SM)
- func (m *MockedRackActual) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedRackDefinition
- func (m *MockedRackDefinition) ChildIndexName() string
- func (m *MockedRackDefinition) Create(ctx context.Context) (rev int64, err error)
- func (m *MockedRackDefinition) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedRackDefinition) Equal(d *pb.Definition_Rack) bool
- func (m *MockedRackDefinition) FetchBlades(ctx context.Context) (int64, map[int64]inventory.BladeOperations, error)
- func (m *MockedRackDefinition) FetchChildren(ctx context.Context) (int64, *map[string]interface{}, error)
- func (m *MockedRackDefinition) FetchPdus(ctx context.Context) (int64, map[int64]inventory.PduOperations, error)
- func (m *MockedRackDefinition) FetchTors(ctx context.Context) (int64, map[int64]inventory.TorOperations, error)
- func (m *MockedRackDefinition) GetDetails() *pb.RackDetails
- func (m *MockedRackDefinition) GetStoreData() *pb.Definition_Rack
- func (m *MockedRackDefinition) GetStoreDataWithChildren(ctx context.Context) (*pb.Definition_Rack, error)
- func (m *MockedRackDefinition) IndexName() string
- func (m *MockedRackDefinition) KeyName() string
- func (m *MockedRackDefinition) ListBlades(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackDefinition) ListChildren(ctx context.Context) (int64, []string, error)
- func (m *MockedRackDefinition) ListPdus(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackDefinition) ListTors(ctx context.Context) (int64, []int64, error)
- func (m *MockedRackDefinition) NotEqual(d *pb.Definition_Rack) bool
- func (m *MockedRackDefinition) Read(ctx context.Context) (rev int64, err error)
- func (m *MockedRackDefinition) SetDetails(details *pb.RackDetails)
- func (m *MockedRackDefinition) Update(ctx context.Context, unconditional bool) (rev int64, err error)
- type MockedTor
- type MockedTorActual
- func (m *MockedTorActual) Create(ctx context.Context) (int64, error)
- func (m *MockedTorActual) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedTorActual) Describe() string
- func (m *MockedTorActual) Equal(x *pb.Actual_Tor) bool
- func (m *MockedTorActual) GetCables() map[int64]*pb.Cable
- func (m *MockedTorActual) GetCondition() pb.Condition
- func (m *MockedTorActual) GetCore() *pb.MachineCore
- func (m *MockedTorActual) GetState() pb.TorState_SM
- func (m *MockedTorActual) GetStoreData() *pb.Actual_Tor
- func (m *MockedTorActual) NotEqual(x *pb.Actual_Tor) bool
- func (m *MockedTorActual) Read(ctx context.Context) (int64, error)
- func (m *MockedTorActual) SetCables(cables map[int64]*pb.Cable)
- func (m *MockedTorActual) SetCondition(cond pb.Condition)
- func (m *MockedTorActual) SetCore(item *pb.MachineCore)
- func (m *MockedTorActual) SetState(state pb.TorState_SM)
- func (m *MockedTorActual) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedTorDefinition
- func (m *MockedTorDefinition) ChildIndexName() string
- func (m *MockedTorDefinition) Create(ctx context.Context) (int64, error)
- func (m *MockedTorDefinition) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (m *MockedTorDefinition) Equal(d *pb.Definition_Tor) bool
- func (m *MockedTorDefinition) EqualPorts(ports map[int64]*pb.NetworkPort) bool
- func (m *MockedTorDefinition) GetDetails() *pb.TorDetails
- func (m *MockedTorDefinition) GetPorts() map[int64]*pb.NetworkPort
- func (m *MockedTorDefinition) GetStoreData() *pb.Definition_Tor
- func (m *MockedTorDefinition) IndexName() string
- func (m *MockedTorDefinition) KeyName() string
- func (m *MockedTorDefinition) ListChildren(ctx context.Context) (int64, []string, error)
- func (m *MockedTorDefinition) NotEqual(d *pb.Definition_Tor) bool
- func (m *MockedTorDefinition) Read(ctx context.Context) (int64, error)
- func (m *MockedTorDefinition) SetDetails(details *pb.TorDetails)
- func (m *MockedTorDefinition) SetPorts(ports map[int64]*pb.NetworkPort)
- func (m *MockedTorDefinition) Update(ctx context.Context, unconditional bool) (int64, error)
- type MockedTorObserved
- func (t *MockedTorObserved) Create(ctx context.Context) (int64, error)
- func (t *MockedTorObserved) Delete(ctx context.Context, unconditional bool) (int64, error)
- func (t *MockedTorObserved) Describe() string
- func (t *MockedTorObserved) Equal(x *pb.Observed_Tor) bool
- func (t *MockedTorObserved) GetCables() map[int64]*pb.Cable
- func (m *MockedTorObserved) GetCondition() pb.Condition
- func (m *MockedTorObserved) GetCore() *pb.MachineCore
- func (t *MockedTorObserved) GetLastGoodObservation() int64
- func (t *MockedTorObserved) GetObservationFailedReason() string
- func (t *MockedTorObserved) GetObservedAt() int64
- func (t *MockedTorObserved) GetState() pb.TorState_SM
- func (t *MockedTorObserved) GetStoreData() *pb.Observed_Tor
- func (t *MockedTorObserved) NotEqual(x *pb.Observed_Tor) bool
- func (t *MockedTorObserved) Observe(at int64, actual *pb.Actual_Tor)
- func (t *MockedTorObserved) Read(ctx context.Context) (int64, error)
- func (t *MockedTorObserved) SetCables(cables map[int64]*pb.Cable)
- func (m *MockedTorObserved) SetCondition(cond pb.Condition)
- func (m *MockedTorObserved) SetCore(item *pb.MachineCore)
- func (t *MockedTorObserved) SetLastGoodObservation(at int64)
- func (t *MockedTorObserved) SetObservationFailedReason(x string)
- func (t *MockedTorObserved) SetObservedAt(at int64)
- func (t *MockedTorObserved) SetState(state pb.TorState_SM)
- func (t *MockedTorObserved) Update(ctx context.Context, unconditional bool) (int64, error)
- type Rack
- func (r *Rack) AddToPduMap(key string, id int64)
- func (r *Rack) AddToTorMap(key string, id int64)
- func (r *Rack) Receive(msg sm.Envelope)
- func (r *Rack) ToBlade(ctx context.Context, id int64, msg sm.Envelope) error
- func (r *Rack) ToPdu(ctx context.Context, id int64, msg sm.Envelope) error
- func (r *Rack) ToTarget(ctx context.Context, t *messages.MessageTarget, msg sm.Envelope) error
- func (r *Rack) ToTor(ctx context.Context, id int64, msg sm.Envelope) error
- func (r *Rack) ViaPDU(ctx context.Context, t *messages.MessageTarget, msg sm.Envelope) error
- func (r *Rack) ViaTor(ctx context.Context, t *messages.MessageTarget, msg sm.Envelope) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockedBlade ¶
type MockedBlade struct {
// contains filtered or unexported fields
}
func (*MockedBlade) Actual ¶
func (m *MockedBlade) Actual() inventory.BladeViewActualOperations
func (*MockedBlade) Definition ¶
func (m *MockedBlade) Definition() inventory.BladeViewDefinitionOperations
func (*MockedBlade) Observed ¶
func (m *MockedBlade) Observed() inventory.BladeViewObservedOperations
type MockedBladeActual ¶
type MockedBladeActual struct {
// contains filtered or unexported fields
}
func (*MockedBladeActual) Create ¶
func (m *MockedBladeActual) Create(ctx context.Context) (int64, error)
func (*MockedBladeActual) Equal ¶
func (m *MockedBladeActual) Equal(x *pb.Actual_Blade) bool
func (*MockedBladeActual) GetAllUsage ¶
func (*MockedBladeActual) GetAvail ¶
func (m *MockedBladeActual) GetAvail() *pb.BladeCapacity
func (*MockedBladeActual) GetState ¶
func (m *MockedBladeActual) GetState() pb.BladeState_SM
func (*MockedBladeActual) GetStoreData ¶
func (m *MockedBladeActual) GetStoreData() *pb.Actual_Blade
func (*MockedBladeActual) GetTimer ¶
func (m *MockedBladeActual) GetTimer() *pb.ActiveTimer
func (*MockedBladeActual) NotEqual ¶
func (m *MockedBladeActual) NotEqual(x *pb.Actual_Blade) bool
func (*MockedBladeActual) Read ¶
func (m *MockedBladeActual) Read(ctx context.Context) (int64, error)
func (*MockedBladeActual) RemoveUsage ¶
func (*MockedBladeActual) SetAllUsage ¶
func (*MockedBladeActual) SetAvail ¶
func (m *MockedBladeActual) SetAvail(value *pb.BladeCapacity)
func (*MockedBladeActual) SetState ¶
func (m *MockedBladeActual) SetState(state pb.BladeState_SM)
func (*MockedBladeActual) SetTimer ¶
func (m *MockedBladeActual) SetTimer(t *pb.ActiveTimer)
type MockedBladeDefinition ¶
type MockedBladeDefinition struct {
// contains filtered or unexported fields
}
func (*MockedBladeDefinition) ChildIndexName ¶
func (m *MockedBladeDefinition) ChildIndexName() string
func (*MockedBladeDefinition) Create ¶
func (m *MockedBladeDefinition) Create(ctx context.Context) (int64, error)
func (*MockedBladeDefinition) Equal ¶
func (m *MockedBladeDefinition) Equal(d *pb.Definition_Blade) bool
func (*MockedBladeDefinition) GetBootInfo ¶
func (m *MockedBladeDefinition) GetBootInfo() *pb.BladeBootInfo
func (*MockedBladeDefinition) GetBootOnPowerOn ¶
func (m *MockedBladeDefinition) GetBootOnPowerOn() bool
func (*MockedBladeDefinition) GetCapacity ¶
func (m *MockedBladeDefinition) GetCapacity() *pb.BladeCapacity
func (*MockedBladeDefinition) GetDetails ¶
func (m *MockedBladeDefinition) GetDetails() *pb.BladeDetails
func (*MockedBladeDefinition) GetStoreData ¶
func (m *MockedBladeDefinition) GetStoreData() *pb.Definition_Blade
func (*MockedBladeDefinition) ListChildren ¶
func (*MockedBladeDefinition) NotEqual ¶
func (m *MockedBladeDefinition) NotEqual(d *pb.Definition_Blade) bool
func (*MockedBladeDefinition) Read ¶
func (m *MockedBladeDefinition) Read(ctx context.Context) (rev int64, err error)
func (*MockedBladeDefinition) SetBootInfo ¶
func (m *MockedBladeDefinition) SetBootInfo(bootInfo *pb.BladeBootInfo)
func (*MockedBladeDefinition) SetBootPowerOn ¶
func (m *MockedBladeDefinition) SetBootPowerOn(bootOnPowerOn bool)
func (*MockedBladeDefinition) SetCapacity ¶
func (m *MockedBladeDefinition) SetCapacity(capacity *pb.BladeCapacity)
func (*MockedBladeDefinition) SetDetails ¶
func (m *MockedBladeDefinition) SetDetails(details *pb.BladeDetails)
type MockedPdu ¶
type MockedPdu struct {
// contains filtered or unexported fields
}
func (*MockedPdu) Actual ¶
func (m *MockedPdu) Actual() inventory.PduViewActualOperations
func (*MockedPdu) Definition ¶
func (m *MockedPdu) Definition() inventory.PduViewDefinitionOperations
func (*MockedPdu) Observed ¶
func (m *MockedPdu) Observed() inventory.PduViewObservedOperations
type MockedPduActual ¶
type MockedPduActual struct {
// contains filtered or unexported fields
}
func (*MockedPduActual) Create ¶
func (m *MockedPduActual) Create(ctx context.Context) (int64, error)
func (*MockedPduActual) Describe ¶
func (m *MockedPduActual) Describe() string
func (*MockedPduActual) Equal ¶
func (m *MockedPduActual) Equal(x *pb.Actual_Pdu) bool
func (*MockedPduActual) GetCondition ¶
func (*MockedPduActual) GetCore ¶
func (m *MockedPduActual) GetCore() *pb.MachineCore
func (*MockedPduActual) GetState ¶
func (m *MockedPduActual) GetState() pb.PduState_SM
func (*MockedPduActual) GetStoreData ¶
func (m *MockedPduActual) GetStoreData() *pb.Actual_Pdu
func (*MockedPduActual) NotEqual ¶
func (m *MockedPduActual) NotEqual(x *pb.Actual_Pdu) bool
func (*MockedPduActual) SetCondition ¶
func (*MockedPduActual) SetCore ¶
func (m *MockedPduActual) SetCore(item *pb.MachineCore)
func (*MockedPduActual) SetState ¶
func (m *MockedPduActual) SetState(state pb.PduState_SM)
type MockedPduDefinition ¶
type MockedPduDefinition struct {
// contains filtered or unexported fields
}
func (*MockedPduDefinition) ChildIndexName ¶
func (m *MockedPduDefinition) ChildIndexName() string
func (*MockedPduDefinition) Create ¶
func (m *MockedPduDefinition) Create(ctx context.Context) (int64, error)
func (*MockedPduDefinition) Equal ¶
func (m *MockedPduDefinition) Equal(d *pb.Definition_Pdu) bool
func (*MockedPduDefinition) EqualPorts ¶
func (m *MockedPduDefinition) EqualPorts(ports map[int64]*pb.PowerPort) bool
func (*MockedPduDefinition) GetDetails ¶
func (m *MockedPduDefinition) GetDetails() *pb.PduDetails
func (*MockedPduDefinition) GetPorts ¶
func (m *MockedPduDefinition) GetPorts() map[int64]*pb.PowerPort
func (*MockedPduDefinition) GetStoreData ¶
func (m *MockedPduDefinition) GetStoreData() *pb.Definition_Pdu
func (*MockedPduDefinition) ListChildren ¶
func (*MockedPduDefinition) NotEqual ¶
func (m *MockedPduDefinition) NotEqual(d *pb.Definition_Pdu) bool
func (*MockedPduDefinition) Read ¶
func (m *MockedPduDefinition) Read(ctx context.Context) (int64, error)
func (*MockedPduDefinition) SetDetails ¶
func (m *MockedPduDefinition) SetDetails(details *pb.PduDetails)
type MockedPduObserved ¶
type MockedPduObserved struct {
// contains filtered or unexported fields
}
func (*MockedPduObserved) Create ¶
func (m *MockedPduObserved) Create(ctx context.Context) (int64, error)
func (*MockedPduObserved) Describe ¶
func (m *MockedPduObserved) Describe() string
func (*MockedPduObserved) Equal ¶
func (m *MockedPduObserved) Equal(x *pb.Observed_Pdu) bool
func (*MockedPduObserved) GetCondition ¶
func (*MockedPduObserved) GetCore ¶
func (m *MockedPduObserved) GetCore() *pb.MachineCore
func (*MockedPduObserved) GetLastGoodObservation ¶
func (m *MockedPduObserved) GetLastGoodObservation() int64
func (*MockedPduObserved) GetObservationFailedReason ¶
func (m *MockedPduObserved) GetObservationFailedReason() string
func (*MockedPduObserved) GetObservedAt ¶
func (m *MockedPduObserved) GetObservedAt() int64
func (*MockedPduObserved) GetState ¶
func (m *MockedPduObserved) GetState() pb.PduState_SM
func (*MockedPduObserved) GetStoreData ¶
func (m *MockedPduObserved) GetStoreData() *pb.Observed_Pdu
func (*MockedPduObserved) NotEqual ¶
func (m *MockedPduObserved) NotEqual(x *pb.Observed_Pdu) bool
func (*MockedPduObserved) Observe ¶
func (m *MockedPduObserved) Observe(at int64, actual *pb.Actual_Pdu)
func (*MockedPduObserved) Read ¶
func (m *MockedPduObserved) Read(ctx context.Context) (int64, error)
func (*MockedPduObserved) SetCables ¶
func (m *MockedPduObserved) SetCables(cables map[int64]*pb.Cable)
func (*MockedPduObserved) SetCondition ¶
func (*MockedPduObserved) SetCore ¶
func (m *MockedPduObserved) SetCore(item *pb.MachineCore)
func (*MockedPduObserved) SetLastGoodObservation ¶
func (m *MockedPduObserved) SetLastGoodObservation(at int64)
func (*MockedPduObserved) SetObservationFailedReason ¶
func (m *MockedPduObserved) SetObservationFailedReason(x string)
func (*MockedPduObserved) SetObservedAt ¶
func (m *MockedPduObserved) SetObservedAt(at int64)
func (*MockedPduObserved) SetState ¶
func (m *MockedPduObserved) SetState(state pb.PduState_SM)
type MockedRack ¶
type MockedRack struct {
// contains filtered or unexported fields
}
func (*MockedRack) Actual ¶
func (m *MockedRack) Actual() inventory.RackViewActualOperations
func (*MockedRack) Definition ¶
func (m *MockedRack) Definition() inventory.RackViewDefinitionOperations
func (*MockedRack) NewBlade ¶
func (m *MockedRack) NewBlade(ID int64) (inventory.BladeOperations, error)
func (*MockedRack) NewChild ¶
func (m *MockedRack) NewChild(name string) (interface{}, error)
func (*MockedRack) NewPdu ¶
func (m *MockedRack) NewPdu(ID int64) (inventory.PduOperations, error)
func (*MockedRack) NewTor ¶
func (m *MockedRack) NewTor(ID int64) (inventory.TorOperations, error)
type MockedRackActual ¶
type MockedRackActual struct {
// contains filtered or unexported fields
}
func (*MockedRackActual) ChildIndexName ¶
func (m *MockedRackActual) ChildIndexName() string
func (*MockedRackActual) Create ¶
func (m *MockedRackActual) Create(ctx context.Context) (int64, error)
func (*MockedRackActual) Equal ¶
func (m *MockedRackActual) Equal(d *pb.Actual_Rack) bool
func (*MockedRackActual) FetchBlades ¶
func (m *MockedRackActual) FetchBlades(ctx context.Context) (int64, map[int64]inventory.BladeOperations, error)
func (*MockedRackActual) FetchChildren ¶
func (*MockedRackActual) FetchPdus ¶
func (m *MockedRackActual) FetchPdus(ctx context.Context) (int64, map[int64]inventory.PduOperations, error)
func (*MockedRackActual) FetchTors ¶
func (m *MockedRackActual) FetchTors(ctx context.Context) (int64, map[int64]inventory.TorOperations, error)
func (*MockedRackActual) GetCore ¶
func (m *MockedRackActual) GetCore() *pb.MachineCore
func (*MockedRackActual) GetState ¶
func (m *MockedRackActual) GetState() pb.RackState_SM
func (*MockedRackActual) GetStoreData ¶
func (m *MockedRackActual) GetStoreData() *pb.Actual_Rack
func (*MockedRackActual) GetStoreDataWithChildren ¶
func (m *MockedRackActual) GetStoreDataWithChildren(ctx context.Context) (*pb.Actual_Rack, error)
func (*MockedRackActual) ListBlades ¶
func (*MockedRackActual) ListChildren ¶
func (*MockedRackActual) NotEqual ¶
func (m *MockedRackActual) NotEqual(d *pb.Actual_Rack) bool
func (*MockedRackActual) SetCore ¶
func (m *MockedRackActual) SetCore(item *pb.MachineCore)
func (*MockedRackActual) SetState ¶
func (m *MockedRackActual) SetState(value pb.RackState_SM)
type MockedRackDefinition ¶
type MockedRackDefinition struct {
// contains filtered or unexported fields
}
func (*MockedRackDefinition) ChildIndexName ¶
func (m *MockedRackDefinition) ChildIndexName() string
func (*MockedRackDefinition) Create ¶
func (m *MockedRackDefinition) Create(ctx context.Context) (rev int64, err error)
func (*MockedRackDefinition) Equal ¶
func (m *MockedRackDefinition) Equal(d *pb.Definition_Rack) bool
func (*MockedRackDefinition) FetchBlades ¶
func (m *MockedRackDefinition) FetchBlades(ctx context.Context) (int64, map[int64]inventory.BladeOperations, error)
func (*MockedRackDefinition) FetchChildren ¶
func (*MockedRackDefinition) FetchPdus ¶
func (m *MockedRackDefinition) FetchPdus(ctx context.Context) (int64, map[int64]inventory.PduOperations, error)
func (*MockedRackDefinition) FetchTors ¶
func (m *MockedRackDefinition) FetchTors(ctx context.Context) (int64, map[int64]inventory.TorOperations, error)
func (*MockedRackDefinition) GetDetails ¶
func (m *MockedRackDefinition) GetDetails() *pb.RackDetails
func (*MockedRackDefinition) GetStoreData ¶
func (m *MockedRackDefinition) GetStoreData() *pb.Definition_Rack
func (*MockedRackDefinition) GetStoreDataWithChildren ¶
func (m *MockedRackDefinition) GetStoreDataWithChildren(ctx context.Context) (*pb.Definition_Rack, error)
func (*MockedRackDefinition) ListBlades ¶
func (*MockedRackDefinition) ListChildren ¶
func (*MockedRackDefinition) NotEqual ¶
func (m *MockedRackDefinition) NotEqual(d *pb.Definition_Rack) bool
func (*MockedRackDefinition) Read ¶
func (m *MockedRackDefinition) Read(ctx context.Context) (rev int64, err error)
func (*MockedRackDefinition) SetDetails ¶
func (m *MockedRackDefinition) SetDetails(details *pb.RackDetails)
type MockedTor ¶
type MockedTor struct {
// contains filtered or unexported fields
}
func (*MockedTor) Actual ¶
func (m *MockedTor) Actual() inventory.TorViewActualOperations
func (*MockedTor) Definition ¶
func (m *MockedTor) Definition() inventory.TorViewDefinitionOperations
func (*MockedTor) Observed ¶
func (m *MockedTor) Observed() inventory.TorViewObservedOperations
type MockedTorActual ¶
type MockedTorActual struct {
// contains filtered or unexported fields
}
func (*MockedTorActual) Create ¶
func (m *MockedTorActual) Create(ctx context.Context) (int64, error)
func (*MockedTorActual) Describe ¶
func (m *MockedTorActual) Describe() string
func (*MockedTorActual) Equal ¶
func (m *MockedTorActual) Equal(x *pb.Actual_Tor) bool
func (*MockedTorActual) GetCondition ¶
func (*MockedTorActual) GetCore ¶
func (m *MockedTorActual) GetCore() *pb.MachineCore
func (*MockedTorActual) GetState ¶
func (m *MockedTorActual) GetState() pb.TorState_SM
func (*MockedTorActual) GetStoreData ¶
func (m *MockedTorActual) GetStoreData() *pb.Actual_Tor
func (*MockedTorActual) NotEqual ¶
func (m *MockedTorActual) NotEqual(x *pb.Actual_Tor) bool
func (*MockedTorActual) SetCondition ¶
func (*MockedTorActual) SetCore ¶
func (m *MockedTorActual) SetCore(item *pb.MachineCore)
func (*MockedTorActual) SetState ¶
func (m *MockedTorActual) SetState(state pb.TorState_SM)
type MockedTorDefinition ¶
type MockedTorDefinition struct {
// contains filtered or unexported fields
}
func (*MockedTorDefinition) ChildIndexName ¶
func (m *MockedTorDefinition) ChildIndexName() string
func (*MockedTorDefinition) Create ¶
func (m *MockedTorDefinition) Create(ctx context.Context) (int64, error)
func (*MockedTorDefinition) Equal ¶
func (m *MockedTorDefinition) Equal(d *pb.Definition_Tor) bool
func (*MockedTorDefinition) EqualPorts ¶
func (m *MockedTorDefinition) EqualPorts(ports map[int64]*pb.NetworkPort) bool
func (*MockedTorDefinition) GetDetails ¶
func (m *MockedTorDefinition) GetDetails() *pb.TorDetails
func (*MockedTorDefinition) GetPorts ¶
func (m *MockedTorDefinition) GetPorts() map[int64]*pb.NetworkPort
func (*MockedTorDefinition) GetStoreData ¶
func (m *MockedTorDefinition) GetStoreData() *pb.Definition_Tor
func (*MockedTorDefinition) ListChildren ¶
func (*MockedTorDefinition) NotEqual ¶
func (m *MockedTorDefinition) NotEqual(d *pb.Definition_Tor) bool
func (*MockedTorDefinition) Read ¶
func (m *MockedTorDefinition) Read(ctx context.Context) (int64, error)
func (*MockedTorDefinition) SetDetails ¶
func (m *MockedTorDefinition) SetDetails(details *pb.TorDetails)
func (*MockedTorDefinition) SetPorts ¶
func (m *MockedTorDefinition) SetPorts(ports map[int64]*pb.NetworkPort)
type MockedTorObserved ¶
type MockedTorObserved struct {
// contains filtered or unexported fields
}
func (*MockedTorObserved) Create ¶
func (t *MockedTorObserved) Create(ctx context.Context) (int64, error)
func (*MockedTorObserved) Describe ¶
func (t *MockedTorObserved) Describe() string
func (*MockedTorObserved) Equal ¶
func (t *MockedTorObserved) Equal(x *pb.Observed_Tor) bool
func (*MockedTorObserved) GetCondition ¶
func (*MockedTorObserved) GetCore ¶
func (m *MockedTorObserved) GetCore() *pb.MachineCore
func (*MockedTorObserved) GetLastGoodObservation ¶
func (t *MockedTorObserved) GetLastGoodObservation() int64
func (*MockedTorObserved) GetObservationFailedReason ¶
func (t *MockedTorObserved) GetObservationFailedReason() string
func (*MockedTorObserved) GetObservedAt ¶
func (t *MockedTorObserved) GetObservedAt() int64
func (*MockedTorObserved) GetState ¶
func (t *MockedTorObserved) GetState() pb.TorState_SM
func (*MockedTorObserved) GetStoreData ¶
func (t *MockedTorObserved) GetStoreData() *pb.Observed_Tor
func (*MockedTorObserved) NotEqual ¶
func (t *MockedTorObserved) NotEqual(x *pb.Observed_Tor) bool
func (*MockedTorObserved) Observe ¶
func (t *MockedTorObserved) Observe(at int64, actual *pb.Actual_Tor)
func (*MockedTorObserved) Read ¶
func (t *MockedTorObserved) Read(ctx context.Context) (int64, error)
func (*MockedTorObserved) SetCables ¶
func (t *MockedTorObserved) SetCables(cables map[int64]*pb.Cable)
func (*MockedTorObserved) SetCondition ¶
func (*MockedTorObserved) SetCore ¶
func (m *MockedTorObserved) SetCore(item *pb.MachineCore)
func (*MockedTorObserved) SetLastGoodObservation ¶
func (t *MockedTorObserved) SetLastGoodObservation(at int64)
func (*MockedTorObserved) SetObservationFailedReason ¶
func (t *MockedTorObserved) SetObservationFailedReason(x string)
func (*MockedTorObserved) SetObservedAt ¶
func (t *MockedTorObserved) SetObservedAt(at int64)
func (*MockedTorObserved) SetState ¶
func (t *MockedTorObserved) SetState(state pb.TorState_SM)
type Rack ¶
type Rack struct {
// contains filtered or unexported fields
}
Rack holds a simulated Rack, consisting of a TOR (top of Rack switch), a PDU (power distribution unit), and some number of blades. These are governed by a mesh of state machines rooted in the one for the Rack as a whole.
func (*Rack) AddToPduMap ¶
AddToPduMap sets the specified target to route through the PDU at the index supplied by the id parameter.
func (*Rack) AddToTorMap ¶
AddToTorMap sets the specified target to route through the TOR at the index supplied by the id parameter.
func (*Rack) Receive ¶
Receive handles incoming requests from outside, forwarding to the rack's state machine handler.
func (*Rack) ToBlade ¶
ToBlade forwards the supplied message directly to the target blade, without any intermediate hops. This should only be used by events that do not need to simulate a working network connection for reachability, or a working power cable for execution.
func (*Rack) ToPdu ¶
ToPdu forwards the supplied message directly to the target PDU, without any intermediate hops. This should only be used by events that do not need to simulate a working network connection for reachability, or a working power cable for execution.
func (*Rack) ToTarget ¶
ToTarget forwards the message directly to the element described in the supplied target, regardless of type.
func (*Rack) ToTor ¶
ToTor forwards the supplied message directly to the target TOR, without any intermediate hops. This should only be used by events that do not need to simulate a working network connection for reachability, or a working power cable for execution.
func (*Rack) ViaPDU ¶
ViaPDU forwards the supplied message to the Rack's simulated PDU for processing. This may or may not impact the full PDU and the all blades, or only one blade's power state.