Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
Files
7
+ 7
0
@@ -110,6 +110,7 @@ func (d *CommonDevice) ProcessResponse(resp proto.Message) error {
return d.transport.ProcessResponse(resp, d.GoStruct, d.sbi.Schema())
}
// CsbiDevice is used for the cSBI functionality.
type CsbiDevice struct {
CommonDevice
}
@@ -119,22 +120,28 @@ func (d *CsbiDevice) ID() uuid.UUID {
return d.UUID
}
// Model returns the ygot representation of the Device
func (d *CsbiDevice) Model() ygot.GoStruct {
return d.GoStruct
}
// Transport returns the Transport of the device
func (d *CsbiDevice) Transport() transport.Transport {
return d.transport
}
// Name returns the name of the device
func (d *CsbiDevice) Name() string {
return d.name
}
// SBI returns the sbi of the Device
func (d *CsbiDevice) SBI() southbound.SouthboundInterface {
return d.sbi
}
// ProcessResponse processes a response for the Device
func (d *CsbiDevice) ProcessResponse(resp proto.Message) error {
// TODO: callback to send response to caller
return d.transport.ProcessResponse(resp, d.GoStruct, d.sbi.Schema())
}
Loading