VOL-3419:
- Make iScheduler and iScheduler public
- Bump version to 3.3.0
Change-Id: I60c96476b9262be759e4f766cbb4aa2f9c88a6b0
diff --git a/VERSION b/VERSION
index 6d7d659..15a2799 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.3.0-dev
+3.3.0
diff --git a/pkg/techprofile/tech_profile.go b/pkg/techprofile/tech_profile.go
index 13cd081..6badd09 100644
--- a/pkg/techprofile/tech_profile.go
+++ b/pkg/techprofile/tech_profile.go
@@ -191,7 +191,8 @@
McastGemID uint32 `json:"multicast_gem_id"`
}
-type iScheduler struct {
+// Instance of Scheduler
+type IScheduler struct {
AllocID uint32 `json:"alloc_id"`
Direction string `json:"direction"`
AdditionalBw string `json:"additional_bw"`
@@ -199,7 +200,9 @@
Weight uint32 `json:"weight"`
QSchedPolicy string `json:"q_sched_policy"`
}
-type iGemPortAttribute struct {
+
+// Instance of GemPortAttribute
+type IGemPortAttribute struct {
GemportID uint32 `json:"gemport_id"`
MaxQueueSize string `json:"max_q_size"`
PbitMap string `json:"pbit_map"`
@@ -239,10 +242,10 @@
Version int `json:"version"`
NumGemPorts uint32 `json:"num_gem_ports"`
InstanceCtrl InstanceControl `json:"instance_control"`
- UsScheduler iScheduler `json:"us_scheduler"`
- DsScheduler iScheduler `json:"ds_scheduler"`
- UpstreamGemPortAttributeList []iGemPortAttribute `json:"upstream_gem_port_attribute_list"`
- DownstreamGemPortAttributeList []iGemPortAttribute `json:"downstream_gem_port_attribute_list"`
+ UsScheduler IScheduler `json:"us_scheduler"`
+ DsScheduler IScheduler `json:"ds_scheduler"`
+ UpstreamGemPortAttributeList []IGemPortAttribute `json:"upstream_gem_port_attribute_list"`
+ DownstreamGemPortAttributeList []IGemPortAttribute `json:"downstream_gem_port_attribute_list"`
}
// QThresholds struct for EPON
@@ -646,10 +649,10 @@
func (t *TechProfileMgr) allocateTPInstance(ctx context.Context, uniPortName string, tp *DefaultTechProfile, intfId uint32, tpInstPath string) *TechProfile {
- var usGemPortAttributeList []iGemPortAttribute
- var dsGemPortAttributeList []iGemPortAttribute
- var dsMulticastGemAttributeList []iGemPortAttribute
- var dsUnicastGemAttributeList []iGemPortAttribute
+ var usGemPortAttributeList []IGemPortAttribute
+ var dsGemPortAttributeList []IGemPortAttribute
+ var dsMulticastGemAttributeList []IGemPortAttribute
+ var dsUnicastGemAttributeList []IGemPortAttribute
var tcontIDs []uint32
var gemPorts []uint32
var err error
@@ -694,7 +697,7 @@
logger.Infow(ctx, "Allocated tconts and GEM ports successfully", log.Fields{"tconts": tcontIDs, "gemports": gemPorts})
for index := 0; index < int(tp.NumGemPorts); index++ {
usGemPortAttributeList = append(usGemPortAttributeList,
- iGemPortAttribute{GemportID: gemPorts[index],
+ IGemPortAttribute{GemportID: gemPorts[index],
MaxQueueSize: tp.UpstreamGemPortAttributeList[index].MaxQueueSize,
PbitMap: tp.UpstreamGemPortAttributeList[index].PbitMap,
AesEncryption: tp.UpstreamGemPortAttributeList[index].AesEncryption,
@@ -710,7 +713,7 @@
for index := 0; index < int(len(tp.DownstreamGemPortAttributeList)); index++ {
if isMulticastGem(tp.DownstreamGemPortAttributeList[index].IsMulticast) {
dsMulticastGemAttributeList = append(dsMulticastGemAttributeList,
- iGemPortAttribute{
+ IGemPortAttribute{
McastGemID: tp.DownstreamGemPortAttributeList[index].McastGemID,
MaxQueueSize: tp.DownstreamGemPortAttributeList[index].MaxQueueSize,
PbitMap: tp.DownstreamGemPortAttributeList[index].PbitMap,
@@ -725,7 +728,7 @@
SControlList: tp.DownstreamGemPortAttributeList[index].SControlList})
} else {
dsUnicastGemAttributeList = append(dsUnicastGemAttributeList,
- iGemPortAttribute{
+ IGemPortAttribute{
MaxQueueSize: tp.DownstreamGemPortAttributeList[index].MaxQueueSize,
PbitMap: tp.DownstreamGemPortAttributeList[index].PbitMap,
AesEncryption: tp.DownstreamGemPortAttributeList[index].AesEncryption,
@@ -739,7 +742,7 @@
//add unicast downstream GEM ports to dsGemPortAttributeList
for index := 0; index < int(tp.NumGemPorts); index++ {
dsGemPortAttributeList = append(dsGemPortAttributeList,
- iGemPortAttribute{GemportID: gemPorts[index],
+ IGemPortAttribute{GemportID: gemPorts[index],
MaxQueueSize: dsUnicastGemAttributeList[index].MaxQueueSize,
PbitMap: dsUnicastGemAttributeList[index].PbitMap,
AesEncryption: dsUnicastGemAttributeList[index].AesEncryption,
@@ -761,14 +764,14 @@
Version: tp.Version,
NumGemPorts: tp.NumGemPorts,
InstanceCtrl: tp.InstanceCtrl,
- UsScheduler: iScheduler{
+ UsScheduler: IScheduler{
AllocID: tcontIDs[0],
Direction: tp.UsScheduler.Direction,
AdditionalBw: tp.UsScheduler.AdditionalBw,
Priority: tp.UsScheduler.Priority,
Weight: tp.UsScheduler.Weight,
QSchedPolicy: tp.UsScheduler.QSchedPolicy},
- DsScheduler: iScheduler{
+ DsScheduler: IScheduler{
AllocID: tcontIDs[0],
Direction: tp.DsScheduler.Direction,
AdditionalBw: tp.DsScheduler.AdditionalBw,