Skip to content

Commit

Permalink
fix(dp): Add carrier aggregation fields to cbsd write fields (#13296)
Browse files Browse the repository at this point in the history
Signed-off-by: Wojciech Sadowy <wojciech.sadowy@freedomfi.com>

Co-authored-by: Wojciech Sadowy <wojciech.sadowy@freedomfi.com>
  • Loading branch information
WojSad and Wojciech Sadowy committed Jul 14, 2022
1 parent d43c577 commit c2b0c40
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
9 changes: 0 additions & 9 deletions dp/cloud/go/services/dp/builders/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,6 @@ func (b *DBCbsdBuilder) WithCbsdCategory(cat string) *DBCbsdBuilder {
return b
}

// func (b *DBCbsdBuilder) WithDefaulValues() *DBCbsdBuilder {
// return b.WithCbsdCategory(catB).
// WithSingleStepEnabled(false).
// WithIndoorDeployment(false).
// WithGrantRedundancy(true).
// WithCarrierAggregationEnabled(false).
// WithMaxIbwMhx(150)
// }

type DBGrantBuilder struct {
Grant *storage.DBGrant
}
Expand Down
2 changes: 1 addition & 1 deletion dp/cloud/go/services/dp/storage/cbsd_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func getCbsdWriteFields() []string {
"preferred_bandwidth_mhz", "preferred_frequencies_mhz", "single_step_enabled",
"cbsd_category", "latitude_deg", "longitude_deg", "height_m", "height_type", "horizontal_accuracy_m",
"antenna_azimuth_deg", "antenna_downtilt_deg", "antenna_beamwidth_deg", "antenna_model", "eirp_capability_dbm_mhz",
"indoor_deployment", "cpi_digital_signature",
"indoor_deployment", "cpi_digital_signature", "carrier_aggregation_enabled", "max_ibw_mhz", "grant_redundancy",
}
}

Expand Down
17 changes: 17 additions & 0 deletions dp/cloud/go/services/dp/storage/cbsd_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ func (s *CbsdManagerTestSuite) TestCreateCbsdWithDefaultValues() {
s.verifyCbsdCreation(b.NewDBCbsdBuilder().WithIndoorDeployment(false).Cbsd)
}

func (s *CbsdManagerTestSuite) TestCreateCbsdWithCarrierAggregationFields() {
err := s.cbsdManager.CreateCbsd(someNetwork, b.GetMutableDBCbsd(
b.NewDBCbsdBuilder().
WithCarrierAggregationEnabled(true).
WithGrantRedundancy(true).
WithMaxIbwMhx(140).Cbsd, registered))
s.Require().NoError(err)
s.verifyCbsdCreation(b.NewDBCbsdBuilder().
WithIndoorDeployment(false).
WithCarrierAggregationEnabled(true).
WithGrantRedundancy(true).
WithMaxIbwMhx(140).Cbsd)
}

func (s *CbsdManagerTestSuite) TestCreateSingleStepCbsd() {
err := s.cbsdManager.CreateCbsd(someNetwork, b.GetMutableDBCbsd(
b.NewDBCbsdBuilder().
Expand Down Expand Up @@ -205,6 +219,9 @@ func (s *CbsdManagerTestSuite) TestUpdateCbsd() {
WithNumberOfPorts(cbsdBuilder.Cbsd.NumberOfPorts.Int64+4).
WithSingleStepEnabled(true).
WithIndoorDeployment(true).
WithCarrierAggregationEnabled(true).
WithMaxIbwMhx(140).
WithGrantRedundancy(true).
WithCbsdCategory("a").
WithNetworkId(someNetwork).
Cbsd,
Expand Down

0 comments on commit c2b0c40

Please sign in to comment.