Skip to content

Commit

Permalink
[nghttpx] Bring back nghttpx Dockerfile for now (magma#2092)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacky Tian <xjtian@fb.com>

fixed removeLastUITestCases.sed file (magma#2094)

Signed-off-by: Vitalii <vitalij.kostenko@gmail.com>

Wrong param (magma#2096)

Signed-off-by: Marie Bremner <marwhal@fb.com>

adding owners to openwrt & emakeev to feg & orc8r (lib & gateway) (magma#2089)

Signed-off-by: Evgeniy Makeev <evgeniym@fb.com>

[lte] Removing Ansible cruft for magma_oai VM (magma#2097)

Signed-off-by: Shaddi Hasan <shasan@fb.com>

[policydb] Add rating_group stream name to lte cloud service_registry (magma#2087)

Signed-off-by: Andrei Lee <andreilee@fb.com>

Add gateway JSON editor (magma#2095)

Signed-off-by: HannaFar <hannafarag159@gmail.com>

AGW: cloud: plugin: set MME NAT flag when configured at orc8r (magma#1998)

This sync NAT flag to MME config

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
  • Loading branch information
xjtian authored and rsarwad committed Jul 29, 2020
1 parent 4f77a64 commit a9a6f3c
Show file tree
Hide file tree
Showing 27 changed files with 692 additions and 571 deletions.
6 changes: 4 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -3,9 +3,11 @@ circleci/ @xjtian @tmdzk

*/cloud/ @xjtian @mpgermano @hcgatewood

orc8r/ @xjtian @mpgermano @hcgatewood
orc8r/ @xjtian @mpgermano @hcgatewood @emakeev

feg/ @themarwhal @mpgermano @uri200
feg/ @themarwhal @mpgermano @uri200 @emakeev

openwrt/ @emakeev @uri200

# More specific mappings for lte/gateway will override this top-level one
lte/gateway @xjtian @ardzoht
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/removeLastUlTestCases.sed
Expand Up @@ -15,6 +15,6 @@
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
s@s1aptests/test_attach_detach_multiple_secondary_pdn.py \\@s1aptests/test_attach_detach_multiple_secondary_pdn.py@
s@s1aptests/test_attach_detach_multiple_secondary_pdn.py@#s1aptests/test_attach_detach_multiple_secondary_pdn.py@
s@s1aptests/test_attach_ul_udp_data.py@#s1aptests/test_attach_ul_udp_data.py@
s@s1aptests/test_attach_ul_tcp_data.py@#s1aptests/test_attach_ul_tcp_data.py@
1 change: 0 additions & 1 deletion feg/gateway/services/session_proxy/servicers/policy.go
Expand Up @@ -104,7 +104,6 @@ func getGxAnswerOrError(

func getUsageMonitorsFromCCA_I(
imsi, sessionID, gyOriginHost string, gxCCAInit *gx.CreditControlAnswer) []*protos.UsageMonitoringUpdateResponse {

monitors := make([]*protos.UsageMonitoringUpdateResponse, 0, len(gxCCAInit.UsageMonitors))
// If there is a message wide revalidation time, apply it to every Usage Monitor
triggers, revalidationTime := gx.GetEventTriggersRelatedInfo(gxCCAInit.EventTriggers, gxCCAInit.RevalidationTime)
Expand Down
Expand Up @@ -126,7 +126,7 @@ func (srv *CentralSessionController) CreateSession(
metrics.OcsCcrInitRequests.Inc()
}

usageMonitors := getUsageMonitorsFromCCA_I(imsi, gyOriginHost, request.SessionId, gxCCAInit)
usageMonitors := getUsageMonitorsFromCCA_I(imsi, request.SessionId, gyOriginHost, gxCCAInit)

return &protos.CreateSessionResponse{
Credits: credits,
Expand Down
2 changes: 1 addition & 1 deletion lte/cloud/configs/service_registry.yml
Expand Up @@ -20,7 +20,7 @@ services:
orc8r.io/obsidian_handlers: "true"
annotations:
orc8r.io/obsidian_handlers_path_prefixes: "/magma/v1/lte,/magma/v1/lte/:network_id"
orc8r.io/stream_provider_streams: "base_names,network_wide_rules,policydb,rule_mappings,subscriberdb"
orc8r.io/stream_provider_streams: "base_names,network_wide_rules,policydb,rule_mappings,subscriberdb,rating_groups"

subscriberdb:
host: "localhost"
Expand Down
1 change: 1 addition & 0 deletions lte/cloud/go/plugin/mconfig.go
Expand Up @@ -131,6 +131,7 @@ func (s *LteMconfigBuilderServicer) Build(
AttachedEnodebTacs: getEnodebTacs(enbConfigsBySerial),
DnsPrimary: gwEpc.DNSPrimary,
DnsSecondary: gwEpc.DNSSecondary,
NatEnabled: swag.BoolValue(gwEpc.NatEnabled),
},
"pipelined": &mconfig.PipelineD{
LogLevel: protos.LogLevel_INFO,
Expand Down
121 changes: 121 additions & 0 deletions lte/cloud/go/plugin/mconfig_test.go
Expand Up @@ -123,6 +123,7 @@ func TestBuilder_Build(t *testing.T) {
CloudSubscriberdbEnabled: false,
EnableDnsCaching: true,
AttachedEnodebTacs: []int32{15000},
NatEnabled: true,
},
"pipelined": &mconfig.PipelineD{
LogLevel: protos.LogLevel_INFO,
Expand Down Expand Up @@ -178,6 +179,104 @@ func TestBuilder_Build(t *testing.T) {
assert.Equal(t, expected, actual)
}

func TestBuilder_Build_NonNat(t *testing.T) {
builder := &plugin.Builder{}

// no dnsd config, no enodebs
nw := configurator.Network{
ID: "n1",
Configs: map[string]interface{}{
lte.CellularNetworkType: models2.NewDefaultTDDNetworkConfig(),
},
}
gw := configurator.NetworkEntity{
Type: orc8r.MagmadGatewayType, Key: "gw1",
Associations: []storage.TypeAndKey{
{Type: lte.CellularGatewayType, Key: "gw1"},
},
}
lteGW := configurator.NetworkEntity{
Type: lte.CellularGatewayType, Key: "gw1",
Config: newGatewayConfigNonNat(),
ParentAssociations: []storage.TypeAndKey{gw.GetTypeAndKey()},
}
graph := configurator.EntityGraph{
Entities: []configurator.NetworkEntity{lteGW, gw},
Edges: []configurator.GraphEdge{
{From: gw.GetTypeAndKey(), To: lteGW.GetTypeAndKey()},
},
}

actual := map[string]proto.Message{}
expected := map[string]proto.Message{
"enodebd": &mconfig.EnodebD{
LogLevel: protos.LogLevel_INFO,
Pci: 260,
TddConfig: &mconfig.EnodebD_TDDConfig{
Earfcndl: 44590,
SubframeAssignment: 2,
SpecialSubframePattern: 7,
},
BandwidthMhz: 20,
AllowEnodebTransmit: true,
Tac: 1,
PlmnidList: "00101",
CsfbRat: mconfig.EnodebD_CSFBRAT_2G,
Arfcn_2G: nil,
EnbConfigsBySerial: nil,
},
"mobilityd": &mconfig.MobilityD{
LogLevel: protos.LogLevel_INFO,
IpBlock: "192.168.128.0/24",
},
"mme": &mconfig.MME{
LogLevel: protos.LogLevel_INFO,
Mcc: "001",
Mnc: "01",
Tac: 1,
MmeCode: 1,
MmeGid: 1,
NonEpsServiceControl: mconfig.MME_NON_EPS_SERVICE_CONTROL_OFF,
CsfbMcc: "001",
CsfbMnc: "01",
Lac: 1,
RelayEnabled: false,
CloudSubscriberdbEnabled: false,
AttachedEnodebTacs: nil,
NatEnabled: false,
},
"pipelined": &mconfig.PipelineD{
LogLevel: protos.LogLevel_INFO,
UeIpBlock: "192.168.128.0/24",
NatEnabled: false,
DefaultRuleId: "",
Services: []mconfig.PipelineD_NetworkServices{
mconfig.PipelineD_ENFORCEMENT,
},
},
"subscriberdb": &mconfig.SubscriberDB{
LogLevel: protos.LogLevel_INFO,
LteAuthOp: []byte("\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11"),
LteAuthAmf: []byte("\x80\x00"),
SubProfiles: nil,
RelayEnabled: false,
},
"policydb": &mconfig.PolicyDB{
LogLevel: protos.LogLevel_INFO,
},
"sessiond": &mconfig.SessionD{
LogLevel: protos.LogLevel_INFO,
RelayEnabled: false,
WalletExhaustDetection: &mconfig.WalletExhaustDetection{
TerminateOnExhaust: false,
},
},
}
err := builder.Build("n1", "gw1", graph, nw, actual)
assert.NoError(t, err)
assert.Equal(t, expected, actual)
}

func TestBuilder_Build_BaseCase(t *testing.T) {
builder := &plugin.Builder{}

Expand Down Expand Up @@ -242,6 +341,7 @@ func TestBuilder_Build_BaseCase(t *testing.T) {
RelayEnabled: false,
CloudSubscriberdbEnabled: false,
AttachedEnodebTacs: nil,
NatEnabled: true,
},
"pipelined": &mconfig.PipelineD{
LogLevel: protos.LogLevel_INFO,
Expand Down Expand Up @@ -368,6 +468,7 @@ func TestBuilder_BuildInheritedProperties(t *testing.T) {
CloudSubscriberdbEnabled: false,
EnableDnsCaching: true,
AttachedEnodebTacs: []int32{1},
NatEnabled: true,
},
"pipelined": &mconfig.PipelineD{
LogLevel: protos.LogLevel_INFO,
Expand Down Expand Up @@ -422,6 +523,26 @@ func newDefaultGatewayConfig() *models2.GatewayCellularConfigs {
}
}

func newGatewayConfigNonNat() *models2.GatewayCellularConfigs {
return &models2.GatewayCellularConfigs{
Ran: &models2.GatewayRanConfigs{
Pci: 260,
TransmitEnabled: swag.Bool(true),
},
Epc: &models2.GatewayEpcConfigs{
NatEnabled: swag.Bool(false),
IPBlock: "192.168.128.0/24",
},
NonEpsService: &models2.GatewayNonEpsConfigs{
CsfbMcc: "001",
CsfbMnc: "01",
Lac: swag.Uint32(1),
CsfbRat: swag.Uint32(0),
Arfcn2g: nil,
NonEpsServiceControl: swag.Uint32(0),
},
}
}
func newDefaultEnodebConfig() *models2.EnodebConfiguration {
return &models2.EnodebConfiguration{
Earfcndl: 39150,
Expand Down
3 changes: 0 additions & 3 deletions lte/gateway/deploy/hosts
Expand Up @@ -15,6 +15,3 @@ magma_prod ansible_ssh_host=192.168.60.151 ansible_ssh_port=22 ansible_user=vagr

[atom-box]
10.0.4.1 ansible_user=magma ansible_ssh_pass=magma ansible_become_pass=magma

[oai]
magma_oai ansible_ssh_host=192.168.60.145 ansible_ssh_port=22 ansible_user=vagrant
42 changes: 0 additions & 42 deletions lte/gateway/deploy/magma_oai.yml

This file was deleted.

3 changes: 0 additions & 3 deletions lte/gateway/deploy/roles/magma_oai/files/hosts

This file was deleted.

19 changes: 0 additions & 19 deletions lte/gateway/deploy/roles/magma_oai/files/magma_identity.sql

This file was deleted.

0 comments on commit a9a6f3c

Please sign in to comment.