Skip to content

Commit 6e947e9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into rsarwad_migrate_state_ue_ht_s1ap
Signed-off-by: Rashmi <[email protected]>
2 parents 17d779e + 924f83b commit 6e947e9

File tree

204 files changed

+5717
-1532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+5717
-1532
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ build --test_env=PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin
5757
# Use MAGMA_ROOT from the host system in tests.
5858
# Needed by python tests (e.g. freedomfi_one_tests in enodebd)
5959
build --test_env=MAGMA_ROOT
60+
build --test_env=S1AP_TESTER_ROOT
6061

6162
# MME specific compile time defines
6263
# Compile mme libraries with unit test flag

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
################################################################
44
FROM ghcr.io/magma/magma/bazel-base:latest as devcontainer
55

6+
ARG HOME=/home/vscode
67
# [Option] Install zsh
78
ARG INSTALL_ZSH="true"
89
# [Option] Upgrade OS packages to their latest versions
@@ -37,7 +38,6 @@ ENV MAGMA_ROOT=/workspaces/magma
3738
ENV BUILD_TYPE=Debug
3839
ENV C_BUILD=/workspaces/magma/build/c
3940

40-
4141
RUN echo "Install general purpose packages" && \
4242
apt-get update && \
4343
apt-get upgrade -y && \
@@ -82,7 +82,7 @@ RUN GO_TARBALL="go${GOLANG_VERSION}.linux-amd64.tar.gz" \
8282
&& curl https://artifactory.magmacore.org/artifactory/generic/${GO_TARBALL} --remote-name --location \
8383
&& tar -xzf ${GO_TARBALL} \
8484
&& rm ${GO_TARBALL}
85-
ENV PATH=$PATH:/usr/local/go/bin
85+
ENV PATH=${PATH}:/usr/local/go/bin:${HOME}/go/bin
8686

8787
RUN echo "Install 3rd party dependencies" && \
8888
apt-get update && \
@@ -207,7 +207,7 @@ RUN ldconfig -v
207207
##### Install Python requirements
208208

209209
### create virtualenv
210-
ARG PYTHON_VENV=/home/vscode/build/python
210+
ARG PYTHON_VENV=${HOME}/build/python
211211
ENV PYTHON_VENV_EXECUTABLE=${PYTHON_VENV}/bin/python${PYTHON_VERSION}
212212
# PYTHON_VENV must by in sync with "python.defaultInterpreterPath", "python.analysis.extraPaths" and magtivate path in "postCreateCommand" in .devcontainer/devcontainer.json
213213

.github/workflows/cwf-integ-test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
args: 'CWF integration test: docker build step failed on [${{ env.SHA }}](${{github.event.repository.owner.html_url}}/magma/commits/${{ env.SHA }}): ${{ steps.commit.outputs.title}}'
6060
cwf-integ-test:
6161
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
62-
runs-on: macos-10.15
62+
runs-on: macos-12
6363
needs: docker-build
6464
steps:
6565
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
@@ -69,11 +69,7 @@ jobs:
6969
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
7070
with:
7171
path: ~/.vagrant.d/boxes
72-
key: vagrant-boxes-cwf
73-
- name: Setup Python env
74-
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
75-
with:
76-
default: 3.8.5
72+
key: vagrant-boxes-cwf-v20220722
7773
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
7874
with:
7975
python-version: '3.8.10'

.github/workflows/federated-integ-test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name: Federated integ test
44

55
on: # yamllint disable-line rule:truthy
6-
workflow_dispatch:
6+
workflow_dispatch: null
77
workflow_run:
88
workflows:
99
- build-all
@@ -16,6 +16,7 @@ on: # yamllint disable-line rule:truthy
1616
jobs:
1717
# Build images on ubuntu which is faster than MacOs.
1818
docker-build-orc8r:
19+
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
1920
runs-on: ubuntu-latest
2021
env:
2122
MAGMA_ROOT: "${{ github.workspace }}"
@@ -41,6 +42,7 @@ jobs:
4142
path: images
4243

4344
docker-build-feg:
45+
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
4446
runs-on: ubuntu-latest
4547
env:
4648
MAGMA_ROOT: "${{ github.workspace }}"
@@ -68,7 +70,7 @@ jobs:
6870

6971
federated-integ-test:
7072
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
71-
runs-on: macos-10.15
73+
runs-on: macos-12
7274
env:
7375
SHA: ${{ github.event.workflow_run.head_commit.id || github.sha }}
7476
MAGMA_ROOT: "${{ github.workspace }}"
@@ -77,10 +79,6 @@ jobs:
7779
- uses: actions/checkout@v2
7880
with:
7981
ref: ${{ env.SHA }}
80-
- name: setup pyenv
81-
uses: "gabrielfalcao/pyenv-action@v8"
82-
with:
83-
default: 3.8.5
8482
- uses: actions/setup-python@v2
8583
with:
8684
python-version: '3.8.5'
@@ -114,7 +112,7 @@ jobs:
114112
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
115113
with:
116114
path: ~/.vagrant.d/boxes/magmacore-VAGRANTSLASH-magma_trfserver
117-
key: vagrant-box-magma-trfserver
115+
key: vagrant-box-magma-trfserver-v20220722
118116
- name: Build test vms
119117
run: |
120118
cd ${{ env.AGW_ROOT }} && fab build_test_vms

.github/workflows/lte-integ-test-bazel.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
lte-integ-test-bazel:
1818
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
19-
runs-on: macos-10.15
19+
runs-on: macos-12
2020
env:
2121
SHA: ${{ github.event.workflow_run.head_commit.id || github.sha }}
2222
steps:
@@ -37,11 +37,7 @@ jobs:
3737
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
3838
with:
3939
path: ~/.vagrant.d/boxes/magmacore-VAGRANTSLASH-magma_trfserver
40-
key: vagrant-box-magma-trfserver
41-
- name: setup pyenv
42-
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
43-
with:
44-
default: 3.8.5
40+
key: vagrant-box-magma-trfserver-v20220722
4541
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
4642
with:
4743
python-version: '3.8.10'

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
lte-integ-test:
1818
if: github.repository_owner == 'magma' || github.event_name == 'workflow_dispatch'
19-
runs-on: macos-10.15
19+
runs-on: macos-12
2020
env:
2121
SHA: ${{ github.event.workflow_run.head_commit.id || github.sha }}
2222
steps:
@@ -37,11 +37,7 @@ jobs:
3737
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # pin@v3
3838
with:
3939
path: ~/.vagrant.d/boxes/magmacore-VAGRANTSLASH-magma_trfserver
40-
key: vagrant-box-magma-trfserver
41-
- name: setup pyenv
42-
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
43-
with:
44-
default: 3.8.5
40+
key: vagrant-box-magma-trfserver-v20220722
4541
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
4642
with:
4743
python-version: '3.8.10'

.github/workflows/reviewdog-workflow.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ jobs:
127127
ref: ${{ github.event.pull_request.head.ref }}
128128
repository: ${{ github.event.pull_request.head.repo.full_name }}
129129
fetch-depth: 0
130+
- name: setup node
131+
uses: actions/setup-node@v2
132+
with:
133+
node-version: '16'
134+
- name: install dependencies
135+
run: yarn install
136+
working-directory: 'nms/'
130137
- name: eslint
131138
uses: reviewdog/action-eslint@v1
132139
with:
@@ -187,7 +194,7 @@ jobs:
187194
repository: ${{ github.event.pull_request.head.repo.full_name }}
188195
fetch-depth: 0
189196
- name: Run mypy with reviewdog
190-
uses: tsuyoshicho/action-mypy@631cb44fa199efd4ed132c5005d4f5b08d7ac1e6 # pin@v3.6.0
197+
uses: tsuyoshicho/action-mypy@176f65a2ad781202baffaf870e5715d768d799a8 # pin@v3.9.2
191198
with:
192199
github_token: ${{ secrets.github_token }}
193200
filter_mode: added

WORKSPACE.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ new_local_repository(
128128
path = "/",
129129
)
130130

131+
new_local_repository(
132+
name = "s1ap_test_util",
133+
build_file = "//bazel/external:s1ap_test_util.BUILD",
134+
path = "/",
135+
)
136+
131137
load("//bazel:python_dependencies.bzl", "configure_python_dependencies")
132138

133139
configure_python_dependencies()

bazel/external/requirements.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ parameterized==0.8.1
5959
freezegun
6060
pytest
6161
pytest-cov
62-
coverage-lcov
62+
coverage-lcov
63+
64+
# s1ap test requirements
65+
iperf3

bazel/external/requirements.txt

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/external/s1ap_test_util.BUILD

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
load("@rules_python//python:defs.bzl", "py_library")
13+
14+
package(default_visibility = ["//visibility:public"])
15+
16+
# The s1ap framework is only present on the magma_test environment
17+
config_setting(
18+
name = "expect_s1ap_framework",
19+
values = {"define": "on_magma_test=1"},
20+
)
21+
22+
py_library(
23+
name = "s1ap_types",
24+
srcs = select({
25+
":expect_s1ap_framework": ["home/vagrant/s1ap-tester/bin/s1ap_types.py"],
26+
"//conditions:default": [],
27+
}),
28+
imports = select({
29+
":expect_s1ap_framework": ["home/vagrant/s1ap-tester/bin/"],
30+
"//conditions:default": [],
31+
}),
32+
visibility = ["//visibility:public"],
33+
)

bazel/python_repositories.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def python_repositories(name = ""):
3030
patches = [
3131
"//lte/gateway/deploy/roles/magma/files/patches:ryu_ipfix_args.patch",
3232
"//lte/gateway/deploy/roles/magma/files/patches:0001-Set-unknown-dpid-ofctl-log-to-debug.patch",
33+
"//lte/gateway/deploy/roles/magma/files/patches:0002-QFI-value-set-in-Openflow-controller-using-RYU.patch",
34+
"//lte/gateway/deploy/roles/magma/files/patches:0003-QFI-value-set-in-Openflow-controller-using-RYU.patch",
3335
],
3436
patch_args = ["-p1"],
3537
)

bazel/python_test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ from bazel.python_utils.coverage_decorator import coverage_decorator
3434
3535
if __name__ == "__main__":
3636
with coverage_decorator():
37-
args = ["-ra", "-vv"] + %s + sys.argv[1:] + %s
37+
args = ["-s", "-vv"] + %s + sys.argv[1:] + %s
3838
sys.exit(pytest.main(args))"""
3939

4040
PYTEST_DEPS = [

0 commit comments

Comments
 (0)