UT-Part 6 with overall coverage upto 45%
Change-Id: I4960bae8429ae34d88a2f98f288f72d582f9e788
diff --git a/internal/pkg/controller/controller.go b/internal/pkg/controller/controller.go
index 9ccb21d..7e1a726 100644
--- a/internal/pkg/controller/controller.go
+++ b/internal/pkg/controller/controller.go
@@ -48,6 +48,19 @@
var db database.DBIntf
+type VoltControllerInterface interface {
+ GetDevice(id string) (*Device, error)
+ GetAllPendingFlows() ([]*of.VoltSubFlow, error)
+ GetAllFlows() ([]*of.VoltSubFlow, error)
+ GetFlows(deviceID string) ([]*of.VoltSubFlow, error)
+ GetFlow(deviceID string, cookie uint64) (*of.VoltSubFlow, error)
+ GetGroups(cntx context.Context, id uint32) (*of.Group, error)
+ GetGroupList() ([]*of.Group, error)
+ GetMeterInfo(cntx context.Context, id uint32) (map[string]*of.Meter, error)
+ GetAllMeterInfo() (map[string][]*of.Meter, error)
+ GetTaskList(device string) []tasks.Task
+}
+
// VoltController structure
type VoltController struct {
ctx context.Context
@@ -517,7 +530,7 @@
return d.GetTaskList()
}
-// AddBlockedDevices to add devices to blocked devices list
+// AddBlockedDevices to add Devices to blocked Devices list
func (v *VoltController) AddBlockedDevices(deviceSerialNumber string) {
v.BlockedDeviceList.Set(deviceSerialNumber, deviceSerialNumber)
}