Skip to content

Commit d7d1e9f

Browse files
committed
Resolved merge conflicts
Signed-off-by: Rashmi <[email protected]>
2 parents d61dc1a + 7064547 commit d7d1e9f

File tree

23 files changed

+314
-33
lines changed

23 files changed

+314
-33
lines changed

.github/workflows/build_all.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
runs-on: macos-12
116116
outputs:
117117
artifacts: ${{ steps.publish_packages.outputs.artifacts }}
118+
magma_package: ${{ steps.publish_packages.outputs.magma_package }}
118119
steps:
119120
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
120121
with:
@@ -179,6 +180,14 @@ jobs:
179180
if [[ "$HTTP_STATUS" != "2"* ]]; then
180181
PUBLISH_ERROR="true"
181182
fi
183+
# extract magma debian package version
184+
match="magma_[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-[a-z0-9]+_[a-z0-9]+.deb"
185+
if [[ $i =~ $match ]]; then
186+
magma_package=${i#magma_}
187+
magma_package=${magma_package%_[a-z0-9]*.deb}
188+
magma_package='magma='${magma_package}
189+
echo "::set-output name=magma_package::${magma_package}"
190+
fi
182191
done
183192
# set output
184193
if [[ "$PUBLISH_ERROR" != "true" ]]; then
@@ -991,3 +1000,15 @@ jobs:
9911000
SLACK_ICON_EMOJI: ":heavy_check_mark:"
9921001
SLACK_COLOR: "#00FF00"
9931002
SLACK_FOOTER: ' '
1003+
trigger-debian-integ-test:
1004+
if: always() && github.event_name == 'push' && github.repository_owner == 'magma' && github.ref == 'refs/heads/master'
1005+
runs-on: ubuntu-latest
1006+
needs: agw-build
1007+
steps:
1008+
- name: Trigger debian integ test workflow
1009+
uses: peter-evans/repository-dispatch@v2
1010+
with:
1011+
token: ${{ secrets.GITHUB_TOKEN }}
1012+
repository: magma/magma
1013+
event-type: build-all-artifact
1014+
client-payload: '{ "artifact": "${{ needs.agw-build.outputs.magma_package }}" }'
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2022 The Magma Authors.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
#
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
name: docker promote
13+
14+
on:
15+
workflow_dispatch:
16+
inputs:
17+
branch_tag:
18+
description: 'Branch version number'
19+
required: true
20+
release_tag:
21+
description: 'Release version number'
22+
required: true
23+
24+
jobs:
25+
docker-promote:
26+
runs-on: ubuntu-latest
27+
env:
28+
BRANCH_TAG: ${{ inputs.branch_tag }}
29+
RELEASE_TAG: ${{ inputs.release_tag }}
30+
MAGMA_ARTIFACTORY: artifactory.magmacore.org
31+
steps:
32+
- uses: tspascoal/get-user-teams-membership@533553aa88900a17c59177d65bcf8c5c97ff1a90 # [email protected]
33+
name: Check if user has rights to promote
34+
id: checkUserMember
35+
with:
36+
username: ${{ github.actor }}
37+
team: 'approvers-ci'
38+
GITHUB_TOKEN: ${{ secrets.github_token }}
39+
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
40+
run: |
41+
echo "User is not a member of the team"
42+
exit 1
43+
- uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # Pin v2.0.0
44+
name: Login to Artifactory
45+
with:
46+
registry: docker.${{ env.MAGMA_ARTIFACTORY }}
47+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
48+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
49+
- run: |
50+
wget https://github.com/magma/magma/raw/master/orc8r/tools/docker/promote.sh
51+
chmod 755 promote.sh
52+
# Promote Docker images
53+
./promote.sh

.github/workflows/helm-promote.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2022 The Magma Authors.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
#
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
name: helm promote
13+
14+
on:
15+
workflow_dispatch:
16+
inputs:
17+
magma_version:
18+
description: 'Magma version number'
19+
required: true
20+
21+
jobs:
22+
helm-promote:
23+
runs-on: ubuntu-latest
24+
env:
25+
MAGMA_VERSION: ${{ inputs.magma_version }}
26+
MAGMA_ARTIFACTORY: https://artifactory.magmacore.org:443/artifactory
27+
HELM_CHART_MUSEUM_TOKEN: ${{ secrets.HELM_CHART_MUSEUM_TOKEN }}
28+
HELM_CHART_MUSEUM_USERNAME: ${{ secrets.HELM_CHART_MUSEUM_USERNAME }}
29+
steps:
30+
- uses: tspascoal/get-user-teams-membership@533553aa88900a17c59177d65bcf8c5c97ff1a90 # [email protected]
31+
name: Check if user has rights to promote
32+
id: checkUserMember
33+
with:
34+
username: ${{ github.actor }}
35+
team: 'approvers-ci'
36+
GITHUB_TOKEN: ${{ secrets.github_token }}
37+
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
38+
run: |
39+
echo "User is not a member of the team"
40+
exit 1
41+
- run: |
42+
wget https://github.com/magma/magma/raw/master/orc8r/tools/helm/promote.sh
43+
chmod 755 promote.sh
44+
# Promote Helm charts
45+
./promote.sh orc8r-${MAGMA_VERSION}.tgz
46+
./promote.sh cwf-orc8r-${MAGMA_VERSION}.tgz
47+
./promote.sh feg-orc8r-${MAGMA_VERSION}.tgz
48+
./promote.sh lte-orc8r-${MAGMA_VERSION}.tgz
49+
./promote.sh domain-proxy-${MAGMA_VERSION}.tgz

.github/workflows/lte-integ-test-magma-deb.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ name: LTE integ test magma-deb
1313

1414
on:
1515
workflow_dispatch: null
16-
workflow_run:
17-
workflows:
18-
- build-all
19-
branches:
20-
- master
21-
types:
22-
- completed
16+
repository_dispatch:
17+
types: [build-all-artifact]
2318

2419
jobs:
2520
lte-integ-test-magma-deb:
@@ -59,6 +54,7 @@ jobs:
5954
env:
6055
MAGMA_DEV_CPUS: 3
6156
MAGMA_DEV_MEMORY_MB: 9216
57+
MAGMA_PACKAGE: ${{ github.event.client_payload.artifact }}
6258
run: |
6359
cd lte/gateway
6460
fab integ_test_deb_installation

lte/gateway/Vagrantfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
235235
ansible.raw_arguments = ENV.fetch("ANSIBLE_ARGS", "").split(";") +
236236
["--timeout=30"]
237237
ansible.verbose = 'v'
238+
ansible.extra_vars = { MAGMA_PACKAGE: ENV.fetch('MAGMA_PACKAGE', 'magma') }
238239
end
239240

240241
# Reload VM to apply correct network configuration

lte/gateway/c/core/oai/tasks/amf/amf_config.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@ int amf_config_parse_opt_line(int argc, char* argv[], amf_config_t* config_pP) {
161161
return 0;
162162
}
163163

164+
static bool parse_bool(const char* str) {
165+
if (strcasecmp(str, "yes") == 0) return true;
166+
if (strcasecmp(str, "true") == 0) return true;
167+
if (strcasecmp(str, "no") == 0) return false;
168+
if (strcasecmp(str, "false") == 0) return false;
169+
if (strcasecmp(str, "") == 0) return false;
170+
171+
Fatal("Error in config file: got \"%s\" but expected bool\n", str);
172+
}
173+
164174
/***************************************************************************
165175
** **
166176
** Name: amf_config_parse_opt_line() **
@@ -330,6 +340,13 @@ int amf_config_parse_file(amf_config_t* config_pP,
330340
} // For the number of entries in the list for PLMN SUPPORT
331341
} // PLMN_SUPPORT LIST is present
332342

343+
// enable VoNR support
344+
if ((config_setting_lookup_string(
345+
setting_amf, AMF_CONFIG_STRING_NAS_ENABLE_IMS_VoPS_3GPP,
346+
&astring))) {
347+
config_pP->nas_config.enable_IMS_VoPS_3GPP = parse_bool(astring);
348+
}
349+
333350
// guamfi SETTING
334351
setting =
335352
config_setting_get_member(setting_amf, AMF_CONFIG_STRING_GUAMFI_LIST);

lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ oai::UeDescription* s1ap_new_ue(oai::EnbDescription* enb_ref,
443443
//------------------------------------------------------------------------------
444444
void s1ap_remove_ue(oai::S1apState* state, oai::UeDescription* ue_ref) {
445445
oai::EnbDescription enb_ref;
446-
447446
// NULL reference...
448447
if (ue_ref == nullptr) return;
449448

@@ -457,7 +456,6 @@ void s1ap_remove_ue(oai::S1apState* state, oai::UeDescription* ue_ref) {
457456
DevAssert(enb_ref.nb_ue_associated() > 0);
458457
// Updating number of UE
459458
enb_ref.set_nb_ue_associated((enb_ref.nb_ue_associated() - 1));
460-
461459
OAILOG_TRACE(LOG_S1AP,
462460
"Removing UE enb_ue_s1ap_id: " ENB_UE_S1AP_ID_FMT
463461
" mme_ue_s1ap_id:" MME_UE_S1AP_ID_FMT " in eNB id : %d\n",

lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace lte {
5353
/** \Initialize an object of EnbDescription, which is passed as
5454
* argument
5555
**/
56-
void s1ap_new_enb(oai::EnbDescription*);
56+
void s1ap_new_enb(oai::EnbDescription* enb_ref);
5757

5858
/** \brief Allocate and add to the right eNB list a new UE descriptor
5959
* \param sctp_assoc_id association ID over SCTP

lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,7 +3469,6 @@ status_code_e s1ap_mme_handle_path_switch_request(
34693469
}
34703470
/* Remove ue description from source eNB */
34713471
s1ap_remove_ue(state, ue_ref_p);
3472-
34733472
/* Mapping between mme_ue_s1ap_id, assoc_id and enb_ue_s1ap_id */
34743473
proto_map_uint32_uint32_t mmeid2associd_map;
34753474
mmeid2associd_map.map = state->mutable_mmeid2associd();
@@ -3481,7 +3480,6 @@ status_code_e s1ap_mme_handle_path_switch_request(
34813480
ue_id_coll.insert(new_ue_ref_p->mme_ue_s1ap_id(),
34823481
new_ue_ref_p->comp_s1ap_id());
34833482
s1ap_state_update_enb_map(state, assoc_id, &enb_association);
3484-
34853483
OAILOG_DEBUG_UE(
34863484
LOG_S1AP, imsi64,
34873485
"Associated sctp_assoc_id %d, enb_ue_s1ap_id " ENB_UE_S1AP_ID_FMT

lte/gateway/c/core/oai/test/s1ap_task/test_s1ap_state_converter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ TEST_F(S1APStateConverterTest, S1apStateConversionSuccess) {
110110
enbd_final.supported_ta_list().list_count());
111111
EXPECT_EQ(enbd.supported_ta_list().supported_tai_items(0).tac(),
112112
enbd_final.supported_ta_list().supported_tai_items(0).tac());
113-
114113
free_s1ap_state(init_state);
115114
free_s1ap_state(final_state);
116115
}

0 commit comments

Comments
 (0)