mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 20:50:28 +00:00
Compare commits
1 Commits
bugfix-sda
...
usrp_time_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a3e5a340c |
@@ -9,10 +9,9 @@ AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
@@ -45,7 +44,7 @@ BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 132
|
||||
ColumnLimit: 200
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
@@ -60,8 +59,6 @@ ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
- RB_FOREACH
|
||||
- UE_iterator
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -9,11 +9,8 @@ cmake_targets/nas_sim_tools/build/
|
||||
log/
|
||||
lte_build_oai/
|
||||
|
||||
# IDE files
|
||||
# vscode
|
||||
.vscode
|
||||
.cproject
|
||||
.project
|
||||
.settings
|
||||
|
||||
# Tags for vim/global
|
||||
GPATH
|
||||
@@ -25,4 +22,3 @@ tags
|
||||
nfapi_nr_interface_scf
|
||||
*.log
|
||||
*.out
|
||||
CMakeUserPresets.json
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
||||
[submodule "openair2/E2AP/flexric"]
|
||||
path = openair2/E2AP/flexric
|
||||
url = https://gitlab.eurecom.fr/mosaic5g/flexric.git
|
||||
branch = remotes/origin/service-models-integration
|
||||
31
.vscode/launch.json
vendored
Normal file
31
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/cmake_targets/ran_build/build/lte-softmodem",
|
||||
"args": [
|
||||
"-O", "../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf",
|
||||
"--noS1"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/cmake_targets",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "${workspaceFolder}/cmake_targets/sudo-gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
112
CHANGELOG.md
112
CHANGELOG.md
@@ -1,117 +1,5 @@
|
||||
# RELEASE NOTES: #
|
||||
|
||||
## [v2.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.2.0) -> November 2024. ##
|
||||
|
||||
General 5G improvements (both gNB and UE):
|
||||
- Make standalone mode (SA) the default (see [`RUNMODEM.md`](doc/RUNMODEM.md))
|
||||
- Experimental support for FR2 operation
|
||||
- Support for GEO NTN and simulation of GEO satellite channel in RFsimulator
|
||||
(see [`RUNMODEM.md`](doc/RUNMODEM.md))
|
||||
- Support 2-step RA
|
||||
- Add optional LTTng logger in logging module (see
|
||||
[`lttng_logs.md`](common/utils/LOG/DOC/lttng_logs.md))
|
||||
- Support for YAML-based config files (alongside libconfig) (see
|
||||
[`gnb.sa.band78.106prb.rfsim.yaml`](ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.yaml) and
|
||||
[`nrue.uicc.yaml`](ci-scripts/conf_files/nrue.uicc.yaml))
|
||||
- Add new L1 scope based on Dear ImGui (see [`readme.md`](openair1/PHY/TOOLS/readme.md))
|
||||
- Allow cross-compilation on ARM (via SIMDE SIMD emulation library)
|
||||
- Allow to build and run with clang
|
||||
- Support/check for Linux capabilities, allow to run without sudo (see
|
||||
[`tuning_and_security.md`](doc/tuning_and_security.md))
|
||||
- OAI does not modify CPU frequency and networking stack
|
||||
([`tuning_and_security.md`](doc/tuning_and_security.md))
|
||||
- Bugfixes in the entire stack (e.g. #547, #663, #674, #687, #712, #736, #739,
|
||||
#741, #756, #762, #773, ...)
|
||||
|
||||
5G gNB:
|
||||
- Support for FR2 interoperability with COTS UE (no beam switching supported yet)
|
||||
- Add 4-layer DL MIMO (experimental)
|
||||
- Add gNB Neighbour configuration and Mobility over F1 interface (see
|
||||
[`handover-tutorial.md`](doc/handover-tutorial.md))
|
||||
- Enhance O-RAN FHI 7.2: (see [`ORAN_FHI7.2_Tutorial.md`](doc/ORAN_FHI7.2_Tutorial.md))
|
||||
* Support different bandwidths (40/60/80/100MHz) and antenna configs (1x1 up
|
||||
to 4x4) for Benetel/VVDN/LITEON RUs
|
||||
* Add support for multi-RU support (single-cell/distributed antenna)
|
||||
- Support AMD T2 Telco card look-aside L1 accelerator (see
|
||||
[`LDPC_T2_OFFLOAD_SETUP.md`](doc/LDPC_T2_OFFLOAD_SETUP.md))
|
||||
- Support Nvidia Aerial/ARC in-line L1 accelerator (see
|
||||
[`Aerial_FAPI_Split_Tutorial.md`](doc/Aerial_FAPI_Split_Tutorial.md))
|
||||
- Various fixes for multi-UE operation: by default support of up to 16 UEs concurrently
|
||||
- Documentation for
|
||||
- 5G MAC (see [`mac-usage.md`](doc/MAC/mac-usage.md))
|
||||
- 5G RRC (see [`rrc-usage.md`](doc/RRC/rrc-usage.md))
|
||||
- E1 (see [`E1-design.md`](doc/E1AP/E1-design.md))
|
||||
- F1 (see [`F1-design.md`](doc/F1AP/F1-design.md))
|
||||
|
||||
5G UE:
|
||||
- Basic interoperability with COTS gNB (Nokia gNB)
|
||||
- Implement PHR reporting
|
||||
- Implement RRC re-establishment
|
||||
- Implement PUCCH/PUSCH/SRS power control
|
||||
- Implement UCI on PUSCH and aperiodic CSI reporting
|
||||
- Support of cell search (within the selected UE bandwidth) (see [`RUNMODEM.md`](doc/RUNMODEM.md))
|
||||
- Enhance connection control: implement timers, resync
|
||||
- A lot of internal cleanup
|
||||
|
||||
This release also includes many fixes and documentation updates. See
|
||||
`doc/README.md` in the repository for an overview of documentation.
|
||||
|
||||
## [v2.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.1.0) -> February 2024. ##
|
||||
|
||||
This release improves existing 5G support and adds various new features.
|
||||
|
||||
* 5G gNB
|
||||
- Add support for O-RAN 7.2 fronthaul interface
|
||||
(tested with 3 O-RUs: Benetel, LITEON, VVDN)
|
||||
- Add support for 2-layer UL MIMO
|
||||
- FDD interoperability with COTS UE
|
||||
- Compiles on ARM (through SIMDE)
|
||||
- Introduce E2 agent and basic support for E2SM-KPM and E2SM-RC
|
||||
- Add support for E1AP
|
||||
- Add support for multiple DUs and CU-UPs at one CU-CP
|
||||
- FR2 SA with OAI UE
|
||||
- Improve computational efficiency
|
||||
* 5G UE
|
||||
- Cleanup in MAC and RRC towards support of 3rd-party gNB
|
||||
- FR2 SA with OAI gNB
|
||||
- Improve computational efficiency
|
||||
|
||||
Overall the stability is improved for the same resource usage.
|
||||
|
||||
There is basic FR2 support between OAI gNB and OAI nrUE. COTS UE
|
||||
interoperability is under testing.
|
||||
|
||||
This release also includes many fixes and documentation updates.
|
||||
|
||||
## [v2.0.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.0.0) -> August 2023. ##
|
||||
|
||||
This release adds support for 5G and maintains previous features:
|
||||
* 5G SA in gNB
|
||||
- PHY, MAC, RLC, PDCP, SDAP, RRC layers
|
||||
- 2x2 MIMO and 256-QAM for UL/DL
|
||||
- 15 and 30 kHz subcarrier spacings; 10-100 MHz bandwidths
|
||||
- Up to 800Mbps throughput or 5ms latency
|
||||
- F1, basic E1, 5G FAPI (SCF 222.10.02), split 8 split options
|
||||
- Handling of up to 16 UEs
|
||||
- RRC procedures for connection setup, multiple PDU sessions, reestablishment
|
||||
* 5G SA in UE
|
||||
- PHY, MAC, RLC, PDCP, SDAP, RRC layers
|
||||
- 2x2 MIMO and 256-QAM for UL/DL
|
||||
- 15 and 30 kHz subcarrier spacings; 10-100 MHz bandwidths
|
||||
- Custom FAPI-like MAC/PHY interface
|
||||
- RRC procedures for connection setup and cell measurement
|
||||
* Basic 5G NSA in gNB
|
||||
- X2 sgNB Addition Request between OAI eNB and gNB
|
||||
* 4G eNB and UE
|
||||
- Bugfixes in fairRR scheduler (eNB)
|
||||
- Non-standard F1 midhaul removed (eNB)
|
||||
- FlexRAN removed (eNB)
|
||||
- Sync fixes (UE)
|
||||
* LTE-M supported
|
||||
* Support for AW2S devices, RFsimulator channel emulation support
|
||||
|
||||
For more information on supported features, please refer to the [feature set](doc/FEATURE_SET.md).
|
||||
|
||||
## [v1.2.1](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.2.1) -> February 2020. ##
|
||||
|
||||
* Bug fix for mutex lock for wake-up signal
|
||||
|
||||
1713
CMakeLists.txt
1713
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"displayName": "Default Config",
|
||||
"description": "Default build using Ninja generator",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tests",
|
||||
"displayName": "Default unit test config",
|
||||
"inherits": "default",
|
||||
"binaryDir": "${sourceDir}/cmake_targets/ran_build/build_test",
|
||||
"cacheVariables": {
|
||||
"ENABLE_TESTS": "ON",
|
||||
"SANITIZE_ADDRESS": "ON",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "5gdefault",
|
||||
"configurePreset": "default",
|
||||
"targets": [
|
||||
"nr-uesoftmodem",
|
||||
"nr-softmodem",
|
||||
"rfsimulator",
|
||||
"dfts",
|
||||
"ldpc",
|
||||
"params_libconfig",
|
||||
"params_yaml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "default",
|
||||
"inherits": "5gdefault"
|
||||
},
|
||||
{
|
||||
"name": "4gdefault",
|
||||
"configurePreset": "default",
|
||||
"targets": [
|
||||
"lte-softmodem",
|
||||
"lte-uesoftmodem",
|
||||
"dfts",
|
||||
"coding",
|
||||
"rfsimulator",
|
||||
"params_libconfig"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tests",
|
||||
"configurePreset": "tests",
|
||||
"targets": [
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,26 +5,24 @@ We want to make contributing to this project as easy and transparent as possible
|
||||
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112).
|
||||
|
||||
1. Sign and return a Contributor License Agreement to OAI team.
|
||||
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up)
|
||||
if you do not have any.
|
||||
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up) if you do not have any.
|
||||
- We recommend that you register with a professional or student email address.
|
||||
- If your email domain (`@domain.com`) is not whitelisted, please contact us
|
||||
(mailto:contact@openairinterface.org).
|
||||
- If your email domain (`@domain.com`) is not whitelisted, please contact us (mailto:contact@openairinterface.org).
|
||||
- Eurecom GitLab does NOT accept public email domains.
|
||||
3. Provide the OAI team with the **username** of this account to
|
||||
(mailto:contact@openairinterface.org) ; we will give you the developer
|
||||
rights on this repository.
|
||||
4. The contributing policies are described in the [corresponding documentation
|
||||
page](doc/code-style-contrib.md).
|
||||
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account.
|
||||
It just eats up space on our servers.
|
||||
- You can fork onto another hosting system. But we will NOT accept a merge
|
||||
request from a forked repository.
|
||||
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
|
||||
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home).
|
||||
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
|
||||
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
|
||||
* This decision was made for the license reasons.
|
||||
* The Continuous Integration will reject your merge request.
|
||||
- All merge requests SHALL have `develop` branch as target branch.
|
||||
- All merge requests SHALL have source branch names that SHALL not contain the `/` character.
|
||||
* We are using a `docker` registry scheme and the image names are based on the source branch name.
|
||||
|
||||
# License #
|
||||
## Coding Styles ##
|
||||
|
||||
By contributing to OpenAirInterface, you agree that your contributions will be
|
||||
licensed under the license described in the file [`LICENSE`](./LICENSE) in the
|
||||
root directory of this source tree.
|
||||
There are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/guidelines/guidelines-home).
|
||||
|
||||
## License ##
|
||||
|
||||
By contributing to OpenAirInterface, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
|
||||
|
||||
@@ -4,6 +4,15 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
|
||||
|
||||
However, the source code also contains third party software that is acknowledged here for reference.
|
||||
|
||||
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
|
||||
|
||||
See on [liblfds website](https://liblfds.org/) the license section.
|
||||
|
||||
<pre>
|
||||
"There is no license. You are free to use this software in any way, for any purpose. Go forth and create wealth!
|
||||
If however for legal reasons a licence is required, the license of your choice will be granted."
|
||||
</pre>
|
||||
|
||||
## Credits for source code common/utils/collection/queue.h: ##
|
||||
|
||||
The Regents of the University of California: BSD 3-Clause Licence.
|
||||
|
||||
101
README.md
101
README.md
@@ -4,15 +4,8 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
|
||||
<a href="https://releases.ubuntu.com/20.04/"><img src="https://img.shields.io/badge/OS-Ubuntu20-Green" alt="Supported OS Ubuntu 20"></a>
|
||||
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
|
||||
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
|
||||
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
|
||||
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 41"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/releases"><img alt="GitLab Release (custom instance)" src="https://img.shields.io/gitlab/v/release/oai/openairinterface5g?gitlab_url=https%3A%2F%2Fgitlab.eurecom.fr&include_prereleases&sort=semver"></a>
|
||||
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS"></a>
|
||||
<a href="https://www.redhat.com/en/enterprise-linux-8"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -20,11 +13,10 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-gnb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-gnb?label=gNB%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-enb?label=eNB%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-cuup"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-cuup?label=NR-CUUP%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/rdefosseoai/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-enb?label=eNB%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/rdefosseoai/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/rdefosseoai/oai-gnb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-gnb?label=gNB%20docker%20pulls"></a>
|
||||
<a href="https://hub.docker.com/r/rdefosseoai/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
|
||||
</p>
|
||||
|
||||
# OpenAirInterface License #
|
||||
@@ -40,13 +32,12 @@ Please see [NOTICE](NOTICE.md) file for third party software that is included in
|
||||
|
||||
# Where to Start #
|
||||
|
||||
* [General overview of documentation](./doc/README.md)
|
||||
* [The implemented features](./doc/FEATURE_SET.md)
|
||||
* [System Requirements for Using OAI Stack](./doc/system_requirements.md)
|
||||
* [How to build](./doc/BUILD.md)
|
||||
* [How to run the modems](./doc/RUNMODEM.md)
|
||||
|
||||
Not all information is available in a central place, and information for
|
||||
More information and documentation can be found in the [doc folder](./doc).
|
||||
Unfortunately, not all information is available there, and information for
|
||||
specific sub-systems might be available in the corresponding sub-directories.
|
||||
To find all READMEs, this command might be handy:
|
||||
|
||||
@@ -60,38 +51,52 @@ The OpenAirInterface (OAI) software is composed of the following parts:
|
||||
|
||||
```
|
||||
openairinterface5g
|
||||
├── charts
|
||||
├── ci-scripts : Meta-scripts used by the OSA CI process. Contains also configuration files used day-to-day by CI.
|
||||
├── CMakeLists.txt : Top-level CMakeLists.txt for building
|
||||
├── cmake_targets : Build utilities to compile (simulation, emulation and real-time platforms), and generated build files.
|
||||
├── common : Some common OAI utilities, some other tools can be found at openair2/UTILS.
|
||||
├── doc : Documentation
|
||||
├── docker : Dockerfiles to build for Ubuntu and RHEL
|
||||
├── executables : Top-level executable source files (gNB, eNB, ...)
|
||||
├── common : Some common OAI utilities, other tools can be found at openair2/UTILS.
|
||||
├── doc : Contains an up-to-date feature set list and starting tutorials.
|
||||
├── executables : Top-level executable source files.
|
||||
├── LICENSE : License file.
|
||||
├── maketags : Script to generate emacs tags.
|
||||
├── nfapi : (n)FAPI code for MAC-PHY interface
|
||||
├── openair1 : Layer 1 (3GPP LTE Rel-10/12 PHY, NR Rel-15 PHY)
|
||||
├── openair2 : Layer 2 (3GPP LTE Rel-10 MAC/RLC/PDCP/RRC/X2AP, LTE Rel-14 M2AP, NR Rel-15+ MAC/RLC/PDCP/SDAP/RRC/X2AP/F1AP/E1AP), E2AP
|
||||
├── openair3 : Layer 3 (3GPP LTE Rel-10 S1AP/GTP, NR Rel-15 NGAP/GTP)
|
||||
├── openshift : OpenShift helm charts for some deployment options of OAI
|
||||
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ...
|
||||
├── targets : Some configuration files; only historical relevance, and might be deleted in the future
|
||||
└── tools : Tools for use by the developers/ci machines: code analysis and formatting
|
||||
├── nfapi : Contains the NFAPI code. A local Readme file provides more details.
|
||||
├── openair1 : 3GPP LTE Rel-10/12 PHY layer / 3GPP NR Rel-15 layer. A local Readme file provides more details.
|
||||
│ ├── PHY
|
||||
│ ├── SCHED
|
||||
│ ├── SCHED_NBIOT
|
||||
│ ├── SCHED_NR
|
||||
│ ├── SCHED_NR_UE
|
||||
│ ├── SCHED_UE
|
||||
│ └── SIMULATION : PHY RF simulation.
|
||||
├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP + LTE Rel-14 M2AP implementation. Also 3GPP NR Rel-15 RLC/MAC/PDCP/RRC/X2AP.
|
||||
│ ├── COMMON
|
||||
│ ├── DOCS
|
||||
│ ├── ENB_APP
|
||||
│ ├── F1AP
|
||||
│ ├── GNB_APP
|
||||
│ ├── LAYER2/RLC/ : with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
||||
│ ├── LAYER2/PDCP/PDCP_v10.1.0
|
||||
│ ├── M2AP
|
||||
│ ├── MCE_APP
|
||||
│ ├── NETWORK_DRIVER
|
||||
│ ├── NR_PHY_INTERFACE
|
||||
│ ├── NR_UE_PHY_INTERFACE
|
||||
│ ├── PHY_INTERFACE
|
||||
│ ├── RRC
|
||||
│ ├── UTIL
|
||||
│ └── X2AP
|
||||
├── openair3 : 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
||||
│ ├── COMMON
|
||||
│ ├── DOCS
|
||||
│ ├── GTPV1-U
|
||||
│ ├── M3AP
|
||||
│ ├── MME_APP
|
||||
│ ├── NAS
|
||||
│ ├── S1AP
|
||||
│ ├── SCTP
|
||||
│ ├── SECU
|
||||
│ ├── TEST
|
||||
│ ├── UDP
|
||||
│ └── UTILS
|
||||
├── radio : drivers for various radios such as USRP, AW2S, RFsim, ...
|
||||
└── targets : Top-level wrappers for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
||||
```
|
||||
|
||||
# How to get support from the OAI Community #
|
||||
|
||||
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).
|
||||
|
||||
Your email should contain below information:
|
||||
|
||||
- A clear subject in your email.
|
||||
- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\].
|
||||
- In case of a problem, add a small description.
|
||||
- Do not share any photos unless you want to share a diagram.
|
||||
- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only.
|
||||
- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only.
|
||||
- In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment.
|
||||
- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking.
|
||||
|
||||
Always remember a structured email will help us understand your issues quickly.
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.dlsim100rbtm2}}
|
||||
nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.dlsimbasic}}
|
||||
nodeName: {{ .Values.global.nodeName.dlsimbasic }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.ldpctest}}
|
||||
nodeName: {{ .Values.global.nodeName.ldpctest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlschsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlschsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimbasic}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimbasic }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimdmrsptrs}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimmcsmimo}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrdlsimoffset}}
|
||||
nodeName: {{ .Values.global.nodeName.nrdlsimoffset }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbschsim106rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbchsim217rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpbchsim273rb}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
apiVersion: v1
|
||||
name: oai-nr-pbchsim-scs
|
||||
description: A Helm subchart for nr-pbchsim network function ("Other SCS" tests)
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 0.1.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: v1
|
||||
|
||||
keywords:
|
||||
- Physical Simulator
|
||||
- nr-pbchsim
|
||||
- RAN
|
||||
- 5G
|
||||
|
||||
sources:
|
||||
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||
|
||||
maintainers:
|
||||
- name: OPENAIRINTERFACE
|
||||
email: contact@openairinterface.org
|
||||
@@ -1,63 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.labels" -}}
|
||||
helm.sh/chart: {{ include "oai-nr-pbchsim-scs.chart" . }}
|
||||
{{ include "oai-nr-pbchsim-scs.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "oai-nr-pbchsim-scs.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "oai-nr-pbchsim-scs.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "oai-nr-pbchsim-scs.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,47 +0,0 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: physim
|
||||
spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
- name: OPENAIR_DIR
|
||||
value: /opt/oai-physim
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- >
|
||||
cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.otherSCS" -d bin/ &&
|
||||
echo "FINISHED" && sleep infinity
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Never
|
||||
schedulerName: default-scheduler
|
||||
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||
terminationGracePeriodSeconds: 30
|
||||
{{- if .Values.global.nodeSelector}}
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }}
|
||||
{{- end }}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Default values for oai-nr-pbchsim-scs
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
# pullPolicy: IfNotPresent or Never or Always
|
||||
pullPolicy: Always
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: "oai-nr-pbchsim-scs"
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
securityContext:
|
||||
privileged: false
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrprachsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrprachsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
apiVersion: v1
|
||||
name: oai-nr-psbchsim
|
||||
description: A Helm subchart for nr-psbchsim network function
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 0.1.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: v1
|
||||
|
||||
keywords:
|
||||
- Physical Simulator
|
||||
- nr-psbchsim
|
||||
- RAN
|
||||
- 5G
|
||||
|
||||
sources:
|
||||
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||
|
||||
maintainers:
|
||||
- name: OPENAIRINTERFACE
|
||||
email: contact@openairinterface.org
|
||||
@@ -1,63 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.labels" -}}
|
||||
helm.sh/chart: {{ include "oai-nr-psbchsim.chart" . }}
|
||||
{{ include "oai-nr-psbchsim.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "oai-nr-psbchsim.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "oai-nr-psbchsim.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "oai-nr-psbchsim.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,47 +0,0 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: physim
|
||||
spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
- name: OPENAIR_DIR
|
||||
value: /opt/oai-physim
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- >
|
||||
cmake_targets/autotests/run_exec_autotests.bash -g "nr_psbchsim" -d bin/ &&
|
||||
echo "FINISHED" && sleep infinity
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Never
|
||||
schedulerName: default-scheduler
|
||||
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||
terminationGracePeriodSeconds: 30
|
||||
{{- if .Values.global.nodeSelector}}
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpsbchsim }}
|
||||
{{- end }}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Default values for oai-nr-psbchsim
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
# pullPolicy: IfNotPresent or Never or Always
|
||||
pullPolicy: Always
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: "oai-nr-psbchsim"
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
securityContext:
|
||||
privileged: false
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrpucchsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrpucchsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulschsim}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulschsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsim3gpp}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsim3gpp }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimmimo}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimmimo }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimmisc}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimmisc }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
ports:
|
||||
@@ -44,6 +39,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.nrulsimscfdma}}
|
||||
nodeName: {{ .Values.global.nodeName.nrulsimscfdma }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.polartest}}
|
||||
nodeName: {{ .Values.global.nodeName.polartest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.smallblocktest}}
|
||||
nodeName: {{ .Values.global.nodeName.smallblocktest }}
|
||||
{{- end }}
|
||||
|
||||
@@ -18,11 +18,6 @@ spec:
|
||||
- name: physim
|
||||
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.global.resources.define}}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.global.resources.requests.cpu | quote }}
|
||||
{{- end}}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
env:
|
||||
@@ -42,6 +37,6 @@ spec:
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.global.nodeSelector | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.nodeName}}
|
||||
{{- if .Values.global.nodeName.ulsim}}
|
||||
nodeName: {{ .Values.global.nodeName.ulsim }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,21 +1,39 @@
|
||||
# Default values for oai-physim.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
global:
|
||||
serviceAccountName: oai-physim-sa
|
||||
namespace: "OAICICD_PROJECT"
|
||||
image:
|
||||
image:
|
||||
registry: local
|
||||
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran/oai-physim
|
||||
version: TAG
|
||||
# pullPolicy: IfNotPresent or Never or Always
|
||||
pullPolicy: Always
|
||||
# removing the node selector
|
||||
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
|
||||
nodeSelector:
|
||||
type: ran
|
||||
nodeName: ''
|
||||
resources:
|
||||
define: false
|
||||
requests:
|
||||
cpu: 1.5
|
||||
nodeSelector: {}
|
||||
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
|
||||
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
|
||||
nodeName:
|
||||
dlsim100rbtm2: acamas
|
||||
dlsimbasic: acamas
|
||||
ldpctest: acamas
|
||||
nrdlschsim: acamas
|
||||
nrdlsimbasic: acamas
|
||||
nrdlsimdmrsptrs: acamas
|
||||
nrdlsimmcsmimo: acamas
|
||||
nrdlsimoffset: dedale
|
||||
nrpbschsim106rb: dedale
|
||||
nrpbchsim217rb: dedale
|
||||
nrpbchsim273rb: dedale
|
||||
nrprachsim: dedale
|
||||
nrpucchsim: dedale
|
||||
nrulschsim: theseus
|
||||
nrulsim3gpp: theseus
|
||||
nrulsimmimo: theseus
|
||||
nrulsimmisc: theseus
|
||||
nrulsimscfdma: theseus
|
||||
polartest: theseus
|
||||
smallblocktest: theseus
|
||||
ulsim: theseus
|
||||
|
||||
@@ -27,19 +27,16 @@ def nodeExecutor = params.nodeExecutor
|
||||
def doBuild = true
|
||||
def do4Gtest = false
|
||||
def do5Gtest = false
|
||||
def do5GUeTest = false
|
||||
|
||||
//
|
||||
def gitCommitAuthorEmailAddr
|
||||
|
||||
// list of failing stages
|
||||
def failingStages = ""
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label nodeExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
gitLabConnection('OAI GitLab')
|
||||
ansiColor('xterm')
|
||||
@@ -65,24 +62,17 @@ pipeline {
|
||||
message += " - ~BUILD-ONLY (execute only build stages)\n"
|
||||
message += " - ~4G-LTE (perform 4G tests)\n"
|
||||
message += " - ~5G-NR (perform 5G tests)\n"
|
||||
message += " - ~CI (perform both 4G and 5G tests)\n"
|
||||
message += " - ~nrUE (perform only 5G-UE related tests including physims excluding LDPC tests)\n\n"
|
||||
message += " - ~CI (perform both 4G and 5G tests)\n\n"
|
||||
message += "Not performing CI due to lack of labels"
|
||||
addGitLabMRComment comment: message
|
||||
error('Not performing CI due to lack of labels')
|
||||
} else if (LABEL_CHECK == 'FULL') {
|
||||
do4Gtest = true
|
||||
do5Gtest = true
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == "SHORTEN-4G") {
|
||||
do4Gtest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-5G') {
|
||||
do5Gtest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-5G-UE') {
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == 'SHORTEN-4G-5G-UE') {
|
||||
do4Gtest = true
|
||||
do5GUeTest = true
|
||||
} else if (LABEL_CHECK == 'documentation') {
|
||||
doBuild = false
|
||||
} else {
|
||||
@@ -114,6 +104,7 @@ pipeline {
|
||||
gitCommitAuthorEmailAddr = sh returnStdout: true, script: 'git log -n1 --pretty=format:%ae ${GIT_COMMIT}'
|
||||
gitCommitAuthorEmailAddr = gitCommitAuthorEmailAddr.trim()
|
||||
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
|
||||
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,71 +119,44 @@ pipeline {
|
||||
}
|
||||
}
|
||||
// Build Stages are Mandatory
|
||||
// Later we will add a Ubuntu20 build
|
||||
stage ("Image Building Processes") {
|
||||
when { expression {doBuild} }
|
||||
parallel {
|
||||
stage ("Ubuntu-Image-Builder") {
|
||||
stage ("Ubuntu18-Image-Builder") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu-Image-Builder')
|
||||
triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu18-Image-Builder')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
ubuntuBuildStatus = finalizeSlaveJob('RAN-Ubuntu18-Image-Builder')
|
||||
finalizeSlaveJob('RAN-Ubuntu18-Image-Builder')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += ubuntuBuildStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Ubuntu-ARM-Image-Builder") {
|
||||
stage ("RHEL8-Cluster-Image-Builder") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder')
|
||||
triggerSlaveJob ('RAN-RHEL8-Cluster-Image-Builder', 'RHEL8-Cluster-Image-Builder')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
ubuntuArmBuildStatus = finalizeSlaveJob('RAN-Ubuntu-ARM-Image-Builder')
|
||||
finalizeSlaveJob('RAN-RHEL8-Cluster-Image-Builder')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += ubuntuArmBuildStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("RHEL-Cluster-Image-Builder") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-RHEL8-Cluster-Image-Builder', 'RHEL-Cluster-Image-Builder')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
rhelBuildStatus = finalizeSlaveJob('RAN-RHEL8-Cluster-Image-Builder')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += rhelBuildStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,37 +170,12 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
cppcheckStatus = finalizeSlaveJob('RAN-cppcheck')
|
||||
finalizeSlaveJob('RAN-cppcheck')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += cppcheckStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("ARM-Cross-Compile") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-ARM-Cross-Compile-Builder', 'ARM-Cross-Compilation')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
armBuildStatus = finalizeSlaveJob('RAN-ARM-Cross-Compile-Builder')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += armBuildStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,7 +186,7 @@ pipeline {
|
||||
when { expression {doBuild} }
|
||||
parallel {
|
||||
stage ("PhySim-Cluster") {
|
||||
when { expression {do4Gtest || do5Gtest || do5GUeTest} }
|
||||
when { expression {do4Gtest || do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-PhySim-Cluster', 'PhySim-Cluster')
|
||||
@@ -256,15 +195,12 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
physimStatus = finalizeSlaveJob('RAN-PhySim-Cluster')
|
||||
finalizeSlaveJob('RAN-PhySim-Cluster')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += physimStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,21 +215,18 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
rfSim4GStatus = finalizeSlaveJob('RAN-RF-Sim-Test-4G')
|
||||
finalizeSlaveJob('RAN-RF-Sim-Test-4G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += rfSim4GStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("RF-Sim-Test-5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
|
||||
@@ -302,38 +235,12 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
rfSim5GStatus = finalizeSlaveJob('RAN-RF-Sim-Test-5G')
|
||||
finalizeSlaveJob('RAN-RF-Sim-Test-5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += rfSim5GStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("OAI-FLEXRIC-RAN-Integration-Test") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += flexricRAN5GStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,15 +255,32 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
l2Sim4GStatus = finalizeSlaveJob('RAN-L2-Sim-Test-4G')
|
||||
finalizeSlaveJob('RAN-L2-Sim-Test-4G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("L2-Sim-Test-5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-L2-Sim-Test-5G', 'L2-Sim-Test-5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('RAN-L2-Sim-Test-5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += l2Sim4GStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,45 +289,18 @@ pipeline {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'LTE-FDD-LTEBOX-Container')
|
||||
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'RAN-LTE-FDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
lteTDDB200Status = finalizeSlaveJob('RAN-LTE-FDD-LTEBOX-Container')
|
||||
finalizeSlaveJob('RAN-LTE-FDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += lteTDDB200Status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Pipeline to test OAI LTE-UE
|
||||
stage ("LTE-B200-FDD-OAIUE-OAICN4G-Container") {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-FDD-OAIUE-OAICN4G-Container', 'LTE-FDD-OAIUE-OAICN4G-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
lteFDDB200OAIUEStatus = finalizeSlaveJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += lteFDDB200OAIUEStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,21 +309,18 @@ pipeline {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'LTE-TDD-LTEBOX-Container')
|
||||
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'RAN-LTE-TDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
lteFDDB200Status = finalizeSlaveJob('RAN-LTE-TDD-LTEBOX-Container')
|
||||
finalizeSlaveJob('RAN-LTE-TDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += lteFDDB200Status
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -441,15 +335,12 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
nsaTDDB200Status = finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container')
|
||||
finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += nsaTDDB200Status
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -464,15 +355,12 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saTDDB200Status = finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
|
||||
finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saTDDB200Status
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,180 +375,37 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
phytestLDPCoffloadStatus = finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC')
|
||||
finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += phytestLDPCoffloadStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("LTE-TDD-2x2-Container") {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-TDD-2x2-Container', 'LTE-TDD-2x2-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
lteTDD2x2N3xxStatus = finalizeSlaveJob('RAN-LTE-TDD-2x2-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += lteTDD2x2N3xxStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-AW2S-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-AW2S-CN5G', 'SA-AW2S-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saAW2SStatus = finalizeSlaveJob('RAN-SA-AW2S-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saAW2SStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Sanity-Check OAI-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerCN5GSlaveJob ('OAI-CN5G-COTS-UE-Test', 'OAI-CN5G-COTS-UE-Test')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
cn5gCOTSUESanityCheck = finalizeSlaveJob('OAI-CN5G-COTS-UE-Test')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += cn5gCOTSUESanityCheck
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-AERIAL-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-AERIAL-CN5G', 'SA-AERIAL-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saAERIALStatus = finalizeSlaveJob('RAN-SA-AERIAL-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saAERIALStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-2x2-Module-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-2x2-Module-CN5G', 'SA-2x2-Module-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saTDD2x2Status = finalizeSlaveJob('RAN-SA-2x2-Module-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saTDD2x2Status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-FHI72-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-FHI72-CN5G', 'SA-FHI72-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saFHI72Status = finalizeSlaveJob('RAN-SA-FHI72-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saFHI72Status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-OAIUE-CN5G") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saOAIUEStatus = finalizeSlaveJob('RAN-SA-OAIUE-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saOAIUEStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//avra is offline, re-enable once it is available
|
||||
//stage ("T1-Offload-Test") {
|
||||
// when { expression {do5Gtest} }
|
||||
// steps {
|
||||
// script {
|
||||
// triggerSlaveJob ('RAN-T1-Offload-Test', 'T1-Offload-Test')
|
||||
// }
|
||||
// }
|
||||
// post {
|
||||
// always {
|
||||
// script {
|
||||
// finalizeSlaveJob('RAN-T1-Offload-Test')
|
||||
// }
|
||||
// }
|
||||
// failure {
|
||||
// script {
|
||||
// currentBuild.result = 'FAILURE'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
stage ("DockerHub-Push") {
|
||||
@@ -675,19 +420,39 @@ pipeline {
|
||||
script {
|
||||
echo "Push to Docker-Hub KO"
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += '\n * RAN-DockerHub-Push'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
def eSubject = JOB_NAME + ' - Build # ' + BUILD_ID + ' - ' + currentBuild.result + '!'
|
||||
def eBody = "Hi,\n\n"
|
||||
eBody += "Here are attached HTML report files for " + JOB_NAME + " - Build # " + BUILD_ID + " - " + currentBuild.result + "!\n\n"
|
||||
eBody += "Regards,\n"
|
||||
eBody += "OAI CI Team"
|
||||
emailext attachmentsPattern: '*results*.html',
|
||||
body: eBody,
|
||||
replyTo: 'no-reply@openairinterface.org',
|
||||
subject: eSubject,
|
||||
to: gitCommitAuthorEmailAddr
|
||||
|
||||
if (fileExists('.git/CI_COMMIT_MSG')) {
|
||||
sh "rm -f .git/CI_COMMIT_MSG"
|
||||
}
|
||||
}
|
||||
}
|
||||
success {
|
||||
script {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")"
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
addGitLabMRComment comment: message
|
||||
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
sendSocialMediaMessage('ci-enb', 'good', message2)
|
||||
} else {
|
||||
sendSocialMediaMessage('ci-enb', 'good', message)
|
||||
}
|
||||
echo "Pipeline is SUCCESSFUL"
|
||||
}
|
||||
@@ -696,9 +461,11 @@ pipeline {
|
||||
script {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ")"
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
def fullMessage = message + '\n\nList of failing test stages:' + failingStages
|
||||
addGitLabMRComment comment: fullMessage
|
||||
addGitLabMRComment comment: message
|
||||
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
sendSocialMediaMessage('ci-enb', 'danger', message2)
|
||||
} else {
|
||||
sendSocialMediaMessage('ci-enb', 'danger', message)
|
||||
}
|
||||
echo "Pipeline FAILED"
|
||||
}
|
||||
@@ -733,37 +500,8 @@ def triggerSlaveJob (jobName, gitlabStatusName) {
|
||||
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
echo "${jobName} Slave Job is OK"
|
||||
} else {
|
||||
error "${jobName} Slave Job is KO"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.gitlabMergeRequestLastCommit
|
||||
shortenShaOne = shortenShaOne.trim()
|
||||
branchName = env.gitlabSourceBranch.replaceAll("/", "-").trim()
|
||||
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:' + env.gitlabSourceBranch + '-' + shortenShaOne
|
||||
} else {
|
||||
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.GIT_COMMIT
|
||||
shortenShaOne = shortenShaOne.trim()
|
||||
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:develop-' + shortenShaOne
|
||||
}
|
||||
// Workaround for the "cancelled" GitLab pipeline notification
|
||||
// The slave job is triggered with the propagate false so the following commands are executed
|
||||
// Its status is now PASS/SUCCESS from a stage pipeline point of view
|
||||
// localStatus variable MUST be analyzed to properly assess the status
|
||||
localStatus = build job: jobName,
|
||||
parameters: [
|
||||
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
|
||||
], propagate: false
|
||||
localResult = localStatus.getResult()
|
||||
echo "${jobName} Slave Job status is ${localResult}"
|
||||
gitlabCommitStatus(name: gitlabStatusName) {
|
||||
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
echo "${jobName} Slave Job is OK"
|
||||
} else {
|
||||
error "${jobName} Slave Job is KO"
|
||||
echo "${jobName} Slave Job is KO"
|
||||
sh "ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -792,33 +530,28 @@ def triggerSlaveJobNoGitLab (jobName) {
|
||||
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
echo "${jobName} Slave Job is OK"
|
||||
} else {
|
||||
error "${jobName} Slave Job is KO"
|
||||
echo "${jobName} Slave Job is KO"
|
||||
sh "ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
|
||||
def finalizeSlaveJob(jobName) {
|
||||
lock ('Parent-Lock') {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
if (jobName == 'OAI-CN5G-COTS-UE-Test') {
|
||||
fileName = "test_results_oai_cn5g_cots_ue.html"
|
||||
} else {
|
||||
fileName = "test_results-${jobName}.html"
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
fileName = "test_results-${jobName}.html"
|
||||
if (!fileExists(fileName)) {
|
||||
copyArtifacts(projectName: jobName,
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists(fileName)) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
|
||||
archiveArtifacts artifacts: fileName
|
||||
}
|
||||
artifactUrl = BUILD_URL
|
||||
if (!fileExists(fileName)) {
|
||||
copyArtifacts(projectName: jobName,
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists(fileName)) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
|
||||
archiveArtifacts artifacts: fileName
|
||||
// BUILD_URL is like http://server:port/jenkins/job/foo/15/
|
||||
// no need to add a prefixed '/'
|
||||
artifactUrl += 'artifact/' + fileName
|
||||
}
|
||||
}
|
||||
artifactUrl = "\n * [${jobName}](${artifactUrl})"
|
||||
return artifactUrl
|
||||
}
|
||||
}
|
||||
|
||||
// Abstraction function to send social media messages:
|
||||
// like on Slack or Mattermost
|
||||
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
|
||||
}
|
||||
|
||||
@@ -61,19 +61,13 @@ pipeline {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
@@ -144,6 +138,31 @@ pipeline {
|
||||
echo "no eNB_mergeRequest given - not merging develop"
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
echo "no EPC_IPAddress given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
echo "no EPC_Type given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
echo "no EPC_SourceCodePath given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
echo "no EPC_Credentials given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
echo "no ADB_IPAddress given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
echo "no ADB_IPAddress given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_Credentials == null) {
|
||||
echo "no OC_Credentials given"
|
||||
allParametersPresent = false
|
||||
@@ -183,21 +202,19 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
#!/bin/groovy
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
def node = "${params.JenkinsNode}"
|
||||
def resource = "${params.JenkinsResource}"
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label node
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
timeout(time: 3, unit: 'HOURS')
|
||||
}
|
||||
stages {
|
||||
stage ("Trigger NEU CI") {
|
||||
steps {
|
||||
lock (resource) {
|
||||
script {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
|
||||
]) {
|
||||
// use eNB target branch variable if eNB repository is empty
|
||||
def git_Branch = ""
|
||||
if (params.eNB_Branch.isEmpty()) {
|
||||
echo 'eNB_Branch parameter is empty, using eNB_TargetBranch instead'
|
||||
git_Branch = params.eNB_TargetBranch
|
||||
} else {
|
||||
git_Branch = params.eNB_Branch
|
||||
}
|
||||
|
||||
// use default 10011 rf scenario if not specified
|
||||
if (params.Colosseum_Rf_Scenario.isEmpty()) {
|
||||
echo 'Colosseum_Rf_Scenario parameter is empty, defaulting to 10011'
|
||||
rf_scenario = "10011"
|
||||
} else {
|
||||
rf_scenario = params.Colosseum_Rf_Scenario
|
||||
}
|
||||
|
||||
sh "echo Testing reachability of Colosseum endpoint"
|
||||
sh "ping -c 3 10.100.1.253"
|
||||
|
||||
sh "./ci-scripts/colosseum_scripts/launch-job.sh ${col_username} ${col_password} ${currentBuild.number} ${params.eNB_Repository} ${git_Branch} ${rf_scenario} ${env.JOB_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Wait for job to finish") {
|
||||
steps {
|
||||
lock (resource) {
|
||||
script {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
|
||||
]) {
|
||||
timeout (time: 2, unit: 'HOURS') {
|
||||
sh "./ci-scripts/colosseum_scripts/wait-job-end.sh ${col_username} ${col_password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Get test results") {
|
||||
steps {
|
||||
lock (resource) {
|
||||
script {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ColosseumCredentials}", usernameVariable: 'col_username', passwordVariable: 'col_password'],
|
||||
]) {
|
||||
sh "./ci-scripts/colosseum_scripts/get-test-results.sh ${col_username} ${col_password}"
|
||||
}
|
||||
|
||||
if(fileExists("results.tar.xz")) {
|
||||
archiveArtifacts "results.tar.xz"
|
||||
|
||||
sh "mkdir -p results"
|
||||
sh "tar -xf results.tar.xz -C results --strip-components=1"
|
||||
|
||||
if(fileExists("results/test_summary.html")) {
|
||||
archiveArtifacts "results/test_summary.html"
|
||||
}
|
||||
|
||||
// check if test passed
|
||||
sh "./ci-scripts/colosseum_scripts/check-results.sh results/test_summary.html"
|
||||
|
||||
sh "rm -Rf ./results"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Set job status") {
|
||||
steps {
|
||||
lock (resource) {
|
||||
script {
|
||||
echo 'Set job status'
|
||||
sh "./ci-scripts/colosseum_scripts/set-job-status.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/groovy
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -19,24 +20,29 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef E2_AGENT_PARAMDEF_H_
|
||||
#define E2_AGENT_PARAMDEF_H_
|
||||
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||
|
||||
/* E2 Agent configuration */
|
||||
#define CONFIG_STRING_E2AGENT "e2_agent"
|
||||
// Location of the python executor node shall be in the same subnet as the others servers
|
||||
def pythonExecutor = params.pythonExecutor
|
||||
|
||||
#define E2AGENT_CONFIG_IP "near_ric_ip_addr"
|
||||
#define E2AGENT_CONFIG_SMDIR "sm_dir"
|
||||
|
||||
static const char* const e2agent_config_ip_default = "127.0.0.1";
|
||||
static const char* const e2agent_config_smdir_default = ".";
|
||||
|
||||
#define E2AGENT_PARAMS_DESC { \
|
||||
{E2AGENT_CONFIG_IP, "RIC IP address", 0, strptr:NULL, defstrval:(char*)e2agent_config_ip_default, TYPE_STRING, 0}, \
|
||||
{E2AGENT_CONFIG_SMDIR, "Directory with SMs to load", 0, strptr:NULL, defstrval:(char*)e2agent_config_smdir_default, TYPE_STRING, 0}, \
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
stages {
|
||||
stage ("gDashboard") {
|
||||
steps {
|
||||
script {
|
||||
dir ("ci-scripts/ran_dashboard") {
|
||||
//retrieve MR data from gitlab / mySQL db, build HTML pages and load them to AWS S3 bucket (configured as static web page hosting)
|
||||
//deprecated method : sh returnStdout: true, script: 'python3 ran_dashboard.py'
|
||||
sh returnStdout: true, script: 'python3 Hdashboard.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define E2AGENT_CONFIG_IP_IDX 0
|
||||
#define E2AGENT_CONFIG_SMDIR_IDX 1
|
||||
|
||||
#endif
|
||||
@@ -1,240 +0,0 @@
|
||||
#!/bin/groovy
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
// Location of the executor node
|
||||
def pythonExecutor = params.pythonExecutor
|
||||
|
||||
// Location of the test XML file to be run
|
||||
def testXMLFile = params.pythonTestXmlFile
|
||||
def mainPythonAllXmlFiles = ""
|
||||
def buildStageStatus = true
|
||||
|
||||
// Name of the test stage
|
||||
def testStageName = params.pipelineTestStageName
|
||||
|
||||
// Name of the resource
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// Global Parameters. Normally they should be populated when the master job
|
||||
// triggers the slave job with parameters
|
||||
def eNB_Repository
|
||||
def eNB_Branch
|
||||
def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
// Flags
|
||||
def scmEvent = false
|
||||
def upstreamEvent = false
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Pipeline start
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||
|
||||
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||
|
||||
def allParametersPresent = true
|
||||
|
||||
// It is already to late to check it
|
||||
if (params.pythonExecutor != null) {
|
||||
echo "eNB CI executor node : ${pythonExecutor}"
|
||||
}
|
||||
// If not present picking a default Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB1_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB1_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.eNB1_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
// the following 4 parameters should be pushed by the master trigger
|
||||
// if not present, take the job GIT variables (used for developing)
|
||||
if (params.eNB_Repository == null) {
|
||||
eNB_Repository = env.GIT_URL
|
||||
} else {
|
||||
eNB_Repository = params.eNB_Repository
|
||||
}
|
||||
echo "eNB_Repository : ${eNB_Repository}"
|
||||
if (params.eNB_Branch == null) {
|
||||
eNB_Branch = env.GIT_BRANCH
|
||||
} else {
|
||||
eNB_Branch = params.eNB_Branch
|
||||
}
|
||||
echo "eNB_Branch : ${eNB_Branch}"
|
||||
if (params.eNB_CommitID == null) {
|
||||
eNB_CommitID = env.GIT_COMMIT
|
||||
} else {
|
||||
eNB_CommitID = params.eNB_CommitID
|
||||
}
|
||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||
if (params.eNB_mergeRequest != null) {
|
||||
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
if (params.eNB_TargetBranch != null) {
|
||||
eNB_TargetBranch = params.eNB_TargetBranch
|
||||
} else {
|
||||
eNB_TargetBranch = 'develop'
|
||||
}
|
||||
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||
}
|
||||
}
|
||||
|
||||
if (params.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_ProjectName == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
sh "git fetch"
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||
} else {
|
||||
sh "git fetch"
|
||||
sh "git checkout -f ${eNB_CommitID}"
|
||||
}
|
||||
} else {
|
||||
echo "Some parameters are missing"
|
||||
sh "./ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Deploy and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// If not present picking a default XML file
|
||||
if (params.pythonTestXmlFile == null) {
|
||||
// picking default
|
||||
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||
echo "Test XML file(default): ${testXMLFile}"
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||
} else {
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Log Collection") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
// Zipping all archived log files
|
||||
sh "mkdir test_logs"
|
||||
sh "mv *.log* test_logs || true"
|
||||
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
|
||||
if (fileExists('../cmake_targets/log')) {
|
||||
sh "mv ../cmake_targets/log/* test_logs || true"
|
||||
}
|
||||
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
|
||||
sh "rm -rf *test_log*/"
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,19 +55,13 @@ pipeline {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ('Verify Parameters') {
|
||||
steps {
|
||||
script {
|
||||
@@ -133,6 +127,25 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.OC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
@@ -173,23 +186,21 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
@@ -207,17 +218,11 @@ pipeline {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
// Zipping all archived log files
|
||||
sh "mkdir test_logs"
|
||||
sh "mv *.log* test_logs || true"
|
||||
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
|
||||
if (fileExists('../cmake_targets/log')) {
|
||||
sh "mv ../cmake_targets/log/* test_logs || true"
|
||||
}
|
||||
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
|
||||
sh "rm -rf *test_log*/"
|
||||
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
sh "zip -r -qq physim_deploytest_logs_${env.BUILD_ID}.zip physim_test_logs_*/*"
|
||||
sh "rm -rf physim_test_logs_*/"
|
||||
if (fileExists("physim_deploytest_logs_${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip"
|
||||
}
|
||||
if (fileExists("test_results.html")) {
|
||||
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
|
||||
@@ -36,6 +36,7 @@ pipeline {
|
||||
label nodeExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
@@ -76,7 +77,7 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password']
|
||||
]) {
|
||||
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup", "oai-gnb-fhi72"]
|
||||
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue"]
|
||||
// Logging in on both registries
|
||||
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
|
||||
sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
|
||||
|
||||
@@ -39,8 +39,10 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
|
||||
// Terminate Status
|
||||
def termENB = 0
|
||||
def termStatusArray = new Boolean[termENB + 1]
|
||||
def termOAIUE = 1
|
||||
def termStatusArray = new Boolean[termOAIUE + 1]
|
||||
termStatusArray[termENB] = false
|
||||
termStatusArray[termOAIUE] = false
|
||||
|
||||
// Global Parameters. Normally they should be populated when the master job
|
||||
// triggers the slave job with parameters
|
||||
@@ -59,18 +61,12 @@ pipeline {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ("Verify Parameters") {
|
||||
steps {
|
||||
script {
|
||||
@@ -141,6 +137,31 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
} else {
|
||||
if (params.EPC_IPAddress == "none") {
|
||||
doEpcLogCollection = false
|
||||
echo "No EPC collections (ping/iperf/hss/mme/spgw)"
|
||||
}
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -174,23 +195,21 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
@@ -222,6 +241,23 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate OAI-UE') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate OAI-UE\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termOAIUE] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
@@ -268,7 +304,7 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
||||
@@ -290,6 +326,9 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
@@ -300,6 +339,111 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -329,6 +473,13 @@ pipeline {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||
}
|
||||
}
|
||||
if (!termStatusArray[termOAIUE]) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,17 +50,11 @@ pipeline {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ("Verify Parameters") {
|
||||
steps {
|
||||
script {
|
||||
@@ -143,6 +137,26 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -176,8 +190,6 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,15 +197,15 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
@@ -208,6 +220,20 @@ pipeline {
|
||||
}
|
||||
stage ("Terminate") {
|
||||
parallel {
|
||||
stage('Terminate UE') {
|
||||
// Bypassing this stage if there are no abd server defined
|
||||
when {
|
||||
expression { params.ADB_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate UE\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateUE --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate eNB') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||
@@ -218,6 +244,48 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate SPGW') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate MME') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate HSS') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
@@ -263,6 +331,116 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
// Location of the python executor node shall be in the same subnet as the others servers
|
||||
def pythonExecutor = params.pythonExecutor
|
||||
def DataBaseHost = params.DataBaseHost
|
||||
|
||||
// Location of the test XML file to be run
|
||||
def testXMLFile = params.pythonTestXmlFile
|
||||
@@ -52,6 +53,7 @@ def StatusForDb = ""
|
||||
pipeline {
|
||||
agent {label pythonExecutor}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
@@ -154,6 +156,29 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.DataBaseHost == "none") {
|
||||
DataBaseHost = pythonExecutor
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
@@ -187,8 +212,6 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,16 +219,16 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
@@ -262,7 +285,7 @@ pipeline {
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
||||
@@ -279,6 +302,9 @@ pipeline {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
@@ -289,6 +315,80 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (CN)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type != 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection (MME or AMF)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type == 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./amf.log.${env.BUILD_ID}.zip || true"
|
||||
} else {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW or SMF/UPF)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
if (params.EPC_Type == 'OAICN5G') {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./smf-upf.log.${env.BUILD_ID}.zip || true"
|
||||
} else {
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
}
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("amf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "amf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("smf-upf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "smf-upf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
echo '\u2705 \u001B[32mLog Collection for CoreNetwork Done!\u001B[0m'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SQL Collect"){
|
||||
when {
|
||||
expression { params.DataBaseHost != "none" }
|
||||
}
|
||||
agent {label DataBaseHost}
|
||||
steps {
|
||||
script {
|
||||
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
|
||||
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Result Update"){
|
||||
when {
|
||||
expression { params.DataBaseHost != "none" }
|
||||
}
|
||||
agent {label DataBaseHost}
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts/ran_dashboard') {
|
||||
sh "python3 Hdashboard.py testevent ${params.eNB_MR} "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,24 +58,45 @@ def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
def flexricOption = ""
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
// the following parameter options are commented out so it shows the ones
|
||||
// that you SHALL have to run the job.
|
||||
// You can use them as template
|
||||
/*
|
||||
parameters {
|
||||
//node-test parameters
|
||||
string(name: 'pythonExecutor', defaultValue: 'nodea', description: 'Node where the pipeline - python scripts will be executed')
|
||||
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
|
||||
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
|
||||
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
|
||||
string(name: 'lockResources', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
|
||||
|
||||
//eNB parameters
|
||||
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
|
||||
credentials(name: 'eNB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for eNB')
|
||||
string(name: 'eNB_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of eNB source code')
|
||||
|
||||
//EPC parameters
|
||||
string(name: 'EPC_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of EPC')
|
||||
string(name: 'EPC_Type', defaultValue: 'ltebox', description: 'EPC type: OAI or ltebox')
|
||||
credentials(name: 'EPC_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for EPC')
|
||||
string(name: 'EPC_SourceCodePath', defaultValue: '/tmp/CI-enb', description: 'Full path of EPC source code')
|
||||
|
||||
//ADB server parameters
|
||||
string(name: 'ADB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of ADB server')
|
||||
credentials(name: 'ADB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for ADB')
|
||||
}
|
||||
*/
|
||||
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
steps {
|
||||
// update the build name and description
|
||||
buildName "${params.eNB_MR}"
|
||||
buildDescription "Branch : ${params.eNB_Branch}"
|
||||
}
|
||||
}
|
||||
stage ("Verify Parameters") {
|
||||
steps {
|
||||
script {
|
||||
@@ -137,11 +158,24 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.Flexric_Tag != null) {
|
||||
echo "This pipeline is configured to run with a FlexRIC deployment."
|
||||
echo "Appending FlexRicTag option to the list of options"
|
||||
flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
|
||||
echo "Using new Flexric option: ${flexricOption}"
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
@@ -149,12 +183,13 @@ pipeline {
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
sh "git fetch"
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||
} else if (eNB_CommitID != 'develop') {
|
||||
} else {
|
||||
sh "git fetch"
|
||||
sh "git checkout -f ${eNB_CommitID}"
|
||||
}
|
||||
} else {
|
||||
error "Some parameters are missing"
|
||||
echo "Some parameters are missing"
|
||||
sh "./ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,22 +211,20 @@ pipeline {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
} else {
|
||||
echo "Test XML file ${xmlFile}: no such file"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
timeout (time: 60, unit: 'MINUTES') {
|
||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||
}
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
@@ -206,6 +239,27 @@ pipeline {
|
||||
}
|
||||
stage ("Terminate") {
|
||||
parallel {
|
||||
stage('Terminate UE') {
|
||||
// Bypassing this stage if there are no abd server defined
|
||||
when {
|
||||
expression { params.ADB_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate UE\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateUE --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termUE] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate eNB') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||
@@ -223,6 +277,69 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate SPGW') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termSPGW] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate MME') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termMME] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Terminate HSS') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
termStatusArray[termHSS] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
@@ -268,6 +385,116 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
// Bypassing this stage if EPC server is not defined
|
||||
when {
|
||||
expression { params.EPC_IPAddress != "none" }
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m'
|
||||
sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,6 +517,13 @@ pipeline {
|
||||
// Making sure that we really shutdown every thing before leaving
|
||||
failure {
|
||||
script {
|
||||
if ((!termStatusArray[termUE]) && (params.ADB_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateUE --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password}"
|
||||
}
|
||||
}
|
||||
if (!termStatusArray[termENB]) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||
@@ -297,6 +531,27 @@ pipeline {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termSPGW]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termMME]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
if ((!termStatusArray[termHSS]) && (params.EPC_IPAddress != "none")) {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
273
ci-scripts/Jenkinsfile-tmp-ue
Normal file
273
ci-scripts/Jenkinsfile-tmp-ue
Normal file
@@ -0,0 +1,273 @@
|
||||
#!/bin/groovy
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||
|
||||
// Location of the python executor node shall be in the same subnet as the others servers
|
||||
def pythonExecutor = params.pythonExecutor
|
||||
|
||||
// Location of the test XML file to be run
|
||||
def testXMLFile = params.pythonTestXmlFile
|
||||
def mainPythonAllXmlFiles = ""
|
||||
def buildStageStatus = true
|
||||
|
||||
// Name of the test stage
|
||||
def testStageName = params.pipelineTestStageName
|
||||
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// Terminate Status
|
||||
def termUE = 0
|
||||
def termENB = 1
|
||||
def termSPGW = 2
|
||||
def termMME = 3
|
||||
def termHSS = 4
|
||||
def termStatusArray = new Boolean[termHSS + 1]
|
||||
termStatusArray[termUE] = false
|
||||
termStatusArray[termENB] = false
|
||||
termStatusArray[termSPGW] = false
|
||||
termStatusArray[termMME] = false
|
||||
termStatusArray[termHSS] = false
|
||||
|
||||
// Global Parameters. Normally they should be populated when the master job
|
||||
// triggers the slave job with parameters
|
||||
def eNB_Repository
|
||||
def eNB_Branch
|
||||
def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: lockResources)
|
||||
}
|
||||
stages {
|
||||
stage ("Verify Parameters") {
|
||||
steps {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||
def allParametersPresent = true
|
||||
|
||||
// It is already to late to check it
|
||||
if (params.pythonExecutor != null) {
|
||||
echo "eNB CI executor node : ${pythonExecutor}"
|
||||
}
|
||||
// If not present picking a default Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
// picking default
|
||||
testStageName = 'Template Test Stage'
|
||||
}
|
||||
|
||||
if (params.LockResources == null) {
|
||||
echo "no LockResources given"
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.UE_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.UE_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.UE_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
// the following 4 parameters should be pushed by the master trigger
|
||||
// if not present, take the job GIT variables (used for developing)
|
||||
if (params.eNB_Repository == null) {
|
||||
eNB_Repository = env.GIT_URL
|
||||
} else {
|
||||
eNB_Repository = params.eNB_Repository
|
||||
}
|
||||
echo "eNB_Repository : ${eNB_Repository}"
|
||||
if (params.eNB_Branch == null) {
|
||||
eNB_Branch = env.GIT_BRANCH
|
||||
} else {
|
||||
eNB_Branch = params.eNB_Branch
|
||||
}
|
||||
echo "eNB_Branch : ${eNB_Branch}"
|
||||
if (params.eNB_CommitID == null) {
|
||||
eNB_CommitID = env.GIT_COMMIT
|
||||
} else {
|
||||
eNB_CommitID = params.eNB_CommitID
|
||||
}
|
||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||
if (params.eNB_mergeRequest != null) {
|
||||
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
if (params.eNB_TargetBranch != null) {
|
||||
eNB_TargetBranch = params.eNB_TargetBranch
|
||||
} else {
|
||||
eNB_TargetBranch = 'develop'
|
||||
}
|
||||
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_SourceCodePath == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.EPC_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
*/
|
||||
if (params.ADB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.ADB_Credentials == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
|
||||
if (allParametersPresent) {
|
||||
echo "All parameters are present"
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
sh "git fetch"
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||
} else {
|
||||
sh "git fetch"
|
||||
sh "git checkout -f ${eNB_CommitID}"
|
||||
}
|
||||
} else {
|
||||
echo "Some parameters are missing"
|
||||
sh "./ci-scripts/fail.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build and Test") {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
// If not present picking a default XML file
|
||||
if (params.pythonTestXmlFile == null) {
|
||||
// picking default
|
||||
testXMLFile = 'xml_files/ue_band20_build.xml'
|
||||
echo "Test XML file(default): ${testXMLFile}"
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||
} else {
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
}
|
||||
}
|
||||
}
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
if (fileExists(xmlFile)) {
|
||||
try {
|
||||
sh "python3 main.py --mode=TestUE --UEIPAddress=${params.UE_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection') {
|
||||
parallel {
|
||||
stage('Log Collection (OAI UE - Build)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Log Collection (OAI UE - Run)') {
|
||||
steps {
|
||||
echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
|
||||
]) {
|
||||
sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
|
||||
|
||||
echo '\u2705 \u001B[32mLog Transfer (UE - Run)\u001B[0m'
|
||||
sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
|
||||
}
|
||||
script {
|
||||
if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "ue.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
if(fileExists("ci-scripts/test_results.html")) {
|
||||
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (params.pipelineZipsConsoleLog != null) {
|
||||
if (params.pipelineZipsConsoleLog) {
|
||||
echo "Archiving Jenkins console log"
|
||||
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
||||
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
||||
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
||||
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
160
ci-scripts/Jenkinsfile-trig-nsa
Normal file
160
ci-scripts/Jenkinsfile-trig-nsa
Normal file
@@ -0,0 +1,160 @@
|
||||
#!/bin/groovy
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
// necessary for reading JSON
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||
|
||||
// Location of the python executor node shall be in the same subnet as the others servers
|
||||
def pythonExecutor = params.pythonExecutor
|
||||
|
||||
def TARGET_BRANCH = "develop"
|
||||
def ALLOW_MERGE = true
|
||||
def GitPostArgs = ''
|
||||
def jobStatus
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
}
|
||||
stages {
|
||||
stage ("Launcher") {
|
||||
steps {
|
||||
script {
|
||||
// retrieve MR that are opened nd with tag NSA
|
||||
MR_LIST = sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq -cj "[.[].iid]"'
|
||||
echo "List of selected MRs: ${MR_LIST.trim()}"
|
||||
def MR_ARRAY = new JsonSlurper().parseText(MR_LIST.trim())
|
||||
// for every selected MR, retrieve the branch name and the latest commit
|
||||
for (MR in MR_ARRAY) {
|
||||
SRC_BRANCH=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".source_branch" || true """
|
||||
SRC_BRANCH=SRC_BRANCH.trim()
|
||||
COMMIT_ID=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".sha" || true """
|
||||
COMMIT_ID=COMMIT_ID.trim()
|
||||
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
|
||||
commit = COMMIT_ID.replace("\"","")
|
||||
GitPostArgs = MR + ' ' + commit + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling LTE 2x2
|
||||
jobName = "RAN-LTE-2x2-Module-OAIEPC"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling NSA B200
|
||||
jobName = "RAN-NSA-B200-Module-LTEBOX"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling NSA 2x2
|
||||
jobName = "RAN-NSA-2x2-Module-OAIEPC"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling SA
|
||||
jobName = "RAN-SA-Module-CN5G"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling SA-AmariS
|
||||
jobName = "RAN-SA-AmariS-CN5G"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//calling OAIUE N310-X300
|
||||
jobName = "RAN-SA-OAIUE-N310-X300-CN5G"
|
||||
jobStatus = build job: jobName, wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
jobResult = jobStatus.getResult()
|
||||
build_url = jobStatus.getAbsoluteUrl()
|
||||
build_id = jobStatus.getNumber().toString()
|
||||
GitPostArgs += jobName + ' ' + build_url + ' ' + build_id + ' ' + jobResult + ' '
|
||||
echo GitPostArgs
|
||||
|
||||
//git report the test results in 1 block, at the end of the test sequence of one MR
|
||||
dir ('ci-scripts/ran_dashboard') {
|
||||
sh "python3 Hdashboard.py gitpost ${GitPostArgs}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,4 @@
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
add_subdirectory(nr_rlc)
|
||||
add_subdirectory(nr_pdcp)
|
||||
add_subdirectory(NR_MAC_UE)
|
||||
/inet.*brd/{print "interfaceToUse="$NF"done"}
|
||||
33
ci-scripts/add_user_to_conf_file.awk
Normal file
33
ci-scripts/add_user_to_conf_file.awk
Normal file
@@ -0,0 +1,33 @@
|
||||
BEGIN{lineIdx=0;captureUEDesc=0}
|
||||
{
|
||||
if ($0 ~/UE0/) {
|
||||
captureUEDesc = 1
|
||||
}
|
||||
if (captureUEDesc == 1) {
|
||||
captureLine[lineIdx] = $0
|
||||
lineIdx = lineIdx + 1
|
||||
}
|
||||
print $0
|
||||
}
|
||||
END {
|
||||
for (ueIdx = 1; ueIdx < num_ues; ueIdx++) {
|
||||
print ""
|
||||
for (k = 0; k < lineIdx; k++) {
|
||||
if (captureLine[k] ~/UE0/) {
|
||||
mLine = captureLine[k]
|
||||
gsub("UE0", "UE"ueIdx, mLine)
|
||||
print mLine
|
||||
} else {
|
||||
if (captureLine[k] ~/MSIN=/) {
|
||||
mLine = captureLine[k]
|
||||
MSIN=sprintf("%08d", 1111+int(ueIdx))
|
||||
gsub("00001111", MSIN, mLine)
|
||||
print mLine
|
||||
} else {
|
||||
print captureLine[k]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
27
ci-scripts/add_user_to_subscriber_list.awk
Normal file
27
ci-scripts/add_user_to_subscriber_list.awk
Normal file
@@ -0,0 +1,27 @@
|
||||
BEGIN{lineIdx=0}
|
||||
{
|
||||
captureLine[lineIdx] = $0
|
||||
lineIdx = lineIdx + 1
|
||||
print $0
|
||||
}
|
||||
END{
|
||||
for (ueIdx = 1; ueIdx < num_ues; ueIdx++) {
|
||||
for (k = 0; k < lineIdx; k++) {
|
||||
if (captureLine[k] ~/UserName=/) {
|
||||
mLine = captureLine[k]
|
||||
MSIN=sprintf("%08d", 1111+int(ueIdx))
|
||||
gsub("00001111", MSIN, mLine)
|
||||
print mLine
|
||||
} else {
|
||||
if (captureLine[k] ~/SubscriptionIndex/) {
|
||||
mLine = captureLine[k]
|
||||
MSIN=sprintf("%d", 111+int(ueIdx))
|
||||
gsub("111", MSIN, mLine)
|
||||
print mLine
|
||||
} else {
|
||||
print captureLine[k]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,27 +41,23 @@ import constants as CONST
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
|
||||
|
||||
py_param_file_present = False
|
||||
py_params={}
|
||||
|
||||
force_local = False
|
||||
while len(argvs) > 1:
|
||||
myArgv = argvs.pop(1) # 0th is this file's name
|
||||
|
||||
#--help
|
||||
if re.match(r'^\-\-help$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-help$', myArgv, re.IGNORECASE):
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit(0)
|
||||
if re.match(r'^\-\-local$', myArgv, re.IGNORECASE):
|
||||
force_local = True
|
||||
|
||||
|
||||
#--apply=<filename> as parameters file, to replace inline parameters
|
||||
elif re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
|
||||
py_params_file = matchReg.group(1)
|
||||
with open(py_params_file,'r') as file:
|
||||
# The FullLoader parameter handles the conversion from YAML
|
||||
@@ -71,27 +67,29 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
#AssignParams(py_params) #to be uncommented once validated
|
||||
|
||||
#consider inline parameters
|
||||
elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
|
||||
mode = matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranRepository = matchReg.group(1)
|
||||
RAN.ranRepository=matchReg.group(1)
|
||||
HTML.ranRepository=matchReg.group(1)
|
||||
ldpc.ranRepository=matchReg.group(1)
|
||||
CONTAINERS.ranRepository=matchReg.group(1)
|
||||
SCA.ranRepository=matchReg.group(1)
|
||||
PHYSIM.ranRepository=matchReg.group(1)
|
||||
CLUSTER.ranRepository=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
doMerge = matchReg.group(1)
|
||||
ldpc.ranAllowMerge=matchReg.group(1)
|
||||
if ((doMerge == 'true') or (doMerge == 'True')):
|
||||
CiTestObj.ranAllowMerge = True
|
||||
RAN.ranAllowMerge=True
|
||||
@@ -100,166 +98,197 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
|
||||
SCA.ranAllowMerge=True
|
||||
PHYSIM.ranAllowMerge=True
|
||||
CLUSTER.ranAllowMerge=True
|
||||
elif re.match(r'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranBranch = matchReg.group(1)
|
||||
RAN.ranBranch=matchReg.group(1)
|
||||
HTML.ranBranch=matchReg.group(1)
|
||||
ldpc.ranBranch=matchReg.group(1)
|
||||
CONTAINERS.ranBranch=matchReg.group(1)
|
||||
SCA.ranBranch=matchReg.group(1)
|
||||
PHYSIM.ranBranch=matchReg.group(1)
|
||||
CLUSTER.ranBranch=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranCommitID = matchReg.group(1)
|
||||
RAN.ranCommitID=matchReg.group(1)
|
||||
HTML.ranCommitID=matchReg.group(1)
|
||||
ldpc.ranCommitID=matchReg.group(1)
|
||||
CONTAINERS.ranCommitID=matchReg.group(1)
|
||||
SCA.ranCommitID=matchReg.group(1)
|
||||
PHYSIM.ranCommitID=matchReg.group(1)
|
||||
CLUSTER.ranCommitID=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match(r'^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ranTargetBranch = matchReg.group(1)
|
||||
RAN.ranTargetBranch=matchReg.group(1)
|
||||
HTML.ranTargetBranch=matchReg.group(1)
|
||||
ldpc.ranTargetBranch=matchReg.group(1)
|
||||
CONTAINERS.ranTargetBranch=matchReg.group(1)
|
||||
SCA.ranTargetBranch=matchReg.group(1)
|
||||
PHYSIM.ranTargetBranch=matchReg.group(1)
|
||||
CLUSTER.ranTargetBranch=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBIPAddress=matchReg.group(1)
|
||||
ldpc.eNBIpAddr=matchReg.group(1)
|
||||
CONTAINERS.eNBIPAddress=matchReg.group(1)
|
||||
SCA.eNBIPAddress=matchReg.group(1)
|
||||
PHYSIM.eNBIPAddress=matchReg.group(1)
|
||||
CLUSTER.eNBIPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1IPAddress=matchReg.group(1)
|
||||
CONTAINERS.eNB1IPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2IPAddress=matchReg.group(1)
|
||||
CONTAINERS.eNB2IPAddress=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBUserName=matchReg.group(1)
|
||||
ldpc.eNBUserName=matchReg.group(1)
|
||||
CONTAINERS.eNBUserName=matchReg.group(1)
|
||||
SCA.eNBUserName=matchReg.group(1)
|
||||
PHYSIM.eNBUserName=matchReg.group(1)
|
||||
CLUSTER.eNBUserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1UserName=matchReg.group(1)
|
||||
CONTAINERS.eNB1UserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2UserName=matchReg.group(1)
|
||||
CONTAINERS.eNB2UserName=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBPassword=matchReg.group(1)
|
||||
ldpc.eNBPassWord=matchReg.group(1)
|
||||
CONTAINERS.eNBPassword=matchReg.group(1)
|
||||
SCA.eNBPassword=matchReg.group(1)
|
||||
PHYSIM.eNBPassword=matchReg.group(1)
|
||||
CLUSTER.eNBPassword=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1Password=matchReg.group(1)
|
||||
CONTAINERS.eNB1Password=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2Password=matchReg.group(1)
|
||||
CONTAINERS.eNB2Password=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNBSourceCodePath=matchReg.group(1)
|
||||
ldpc.eNBSourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
|
||||
SCA.eNBSourceCodePath=matchReg.group(1)
|
||||
PHYSIM.eNBSourceCodePath=matchReg.group(1)
|
||||
CLUSTER.eNBSourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB1SourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.eNB2SourceCodePath=matchReg.group(1)
|
||||
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
|
||||
elif re.match(r'^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCIPAddress ignored")
|
||||
elif re.match(r'^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCUserName ignored")
|
||||
elif re.match(r'^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCPassword ignored")
|
||||
elif re.match(r'^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCSourceCodePath ignored")
|
||||
elif re.match(r'^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCType ignored")
|
||||
elif re.match(r'^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
|
||||
print("parameter --EPCContainerPrefix ignored")
|
||||
elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.IPAddress=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.UserName=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.Password=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.SourceCodePath=matchReg.group(1)
|
||||
elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE)
|
||||
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-CUPS', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE):
|
||||
EPC.Type=matchReg.group(1)
|
||||
else:
|
||||
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker)')
|
||||
elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.ContainerPrefix=matchReg.group(1)
|
||||
elif re.match('^\-\-ADBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-ADBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ADBIPAddress = matchReg.group(1)
|
||||
elif re.match('^\-\-ADBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-ADBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ADBUserName = matchReg.group(1)
|
||||
elif re.match('^\-\-ADBType=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-ADBType=(.+)$', myArgv, re.IGNORECASE)
|
||||
if re.match('centralized', matchReg.group(1), re.IGNORECASE) or re.match('distributed', matchReg.group(1), re.IGNORECASE):
|
||||
if re.match('distributed', matchReg.group(1), re.IGNORECASE):
|
||||
CiTestObj.ADBCentralized = False
|
||||
else:
|
||||
CiTestObj.ADBCentralized = True
|
||||
else:
|
||||
sys.exit('Invalid ADB Type: ' + matchReg.group(1) + ' -- (should be centralized or distributed)')
|
||||
elif re.match('^\-\-ADBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-ADBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ADBPassword = matchReg.group(1)
|
||||
elif re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.testXMLfiles.append(matchReg.group(1))
|
||||
HTML.testXMLfiles.append(matchReg.group(1))
|
||||
HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1
|
||||
elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup
|
||||
matchReg = re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEIPAddress = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEUserName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UEPassword = matchReg.group(1)
|
||||
elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.UESourceCodePath = matchReg.group(1)
|
||||
elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
|
||||
finalStatus = matchReg.group(1)
|
||||
if ((finalStatus == 'true') or (finalStatus == 'True')):
|
||||
CiTestObj.finalStatus = True
|
||||
elif re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCUserName = matchReg.group(1)
|
||||
CLUSTER.OCUserName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCPassword = matchReg.group(1)
|
||||
CLUSTER.OCPassword = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||
PHYSIM.OCProjectName = matchReg.group(1)
|
||||
CLUSTER.OCProjectName = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
|
||||
CLUSTER.OCUrl = matchReg.group(1)
|
||||
elif re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
|
||||
CLUSTER.OCRegistry = matchReg.group(1)
|
||||
elif re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
|
||||
elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.BuildId = matchReg.group(1)
|
||||
elif re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
|
||||
CONTAINERS.flexricTag = matchReg.group(1)
|
||||
else:
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Invalid Parameter: ' + myArgv)
|
||||
|
||||
return py_param_file_present, py_params, mode, force_local
|
||||
return py_param_file_present, py_params, mode
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue1.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: 20,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:627360,
|
||||
ssb_nr_arfcn:627360,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 1,
|
||||
"imsi": "001010000000100",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 2,
|
||||
"imsi": "001010000000101",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 3,
|
||||
"imsi": "001010000000102",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, sd: 66051, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, sd: 66051, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 4,
|
||||
"imsi": "001010000000103",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, sd: 66051, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, sd: 66051, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 5,
|
||||
"imsi": "001010000000104",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, sd: 66051, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, sd: 66051, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 6,
|
||||
"imsi": "001010000000105",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, sd: 66051, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, sd: 66051, },
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
/* UE capabilities */
|
||||
|
||||
/* USIM data */
|
||||
"ue_id" : 7,
|
||||
"imsi": "001010000000106",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, sd: 66051, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, sd: 66051, },
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define N_ANTENNA_UL 1
|
||||
#define DL_ARFCN 631296
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver_20/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
ldpc_max_its:8,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: 20,
|
||||
band: 78,
|
||||
dl_nr_arfcn: DL_ARFCN,
|
||||
ssb_nr_arfcn: DL_ARFCN,
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: N_ANTENNA_UL,
|
||||
rx_to_tx_latency:2,
|
||||
global_timing_advance:-1,
|
||||
}],
|
||||
}],
|
||||
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
ue_list: [
|
||||
{
|
||||
"ue_id" : 1,
|
||||
"imsi": "001020000000001",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 2,
|
||||
"imsi": "001020000000002",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 3,
|
||||
"imsi": "001020000000003",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 4,
|
||||
"imsi": "001020000000004",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 5,
|
||||
"imsi": "001020000000005",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 6,
|
||||
"imsi": "001020000000006",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 7,
|
||||
"imsi": "001020000000007",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 8,
|
||||
"imsi": "001020000000008",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 9,
|
||||
"imsi": "001020000000009",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 10,
|
||||
"imsi": "001020000000010",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 11,
|
||||
"imsi": "001020000000011",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 12,
|
||||
"imsi": "001020000000012",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 13,
|
||||
"imsi": "001020000000013",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 14,
|
||||
"imsi": "001020000000014",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 15,
|
||||
"imsi": "001020000000015",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 16,
|
||||
"imsi": "001020000000016",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1,282 +0,0 @@
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 2
|
||||
#define N_ANTENNA_UL 2
|
||||
#define DL_ARFCN 631296
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: 20,
|
||||
band: 78,
|
||||
dl_nr_arfcn: DL_ARFCN,
|
||||
ssb_nr_arfcn: DL_ARFCN,
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: N_ANTENNA_UL,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
ue_list: [
|
||||
{
|
||||
"ue_id" : 1,
|
||||
"imsi": "001020000000001",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 2,
|
||||
"imsi": "001020000000002",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 3,
|
||||
"imsi": "001020000000003",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 4,
|
||||
"imsi": "001020000000004",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 5,
|
||||
"imsi": "001020000000005",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 6,
|
||||
"imsi": "001020000000006",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 7,
|
||||
"imsi": "001020000000007",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 8,
|
||||
"imsi": "001020000000008",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 9,
|
||||
"imsi": "001020000000009",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 10,
|
||||
"imsi": "001020000000010",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 11,
|
||||
"imsi": "001020000000011",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 12,
|
||||
"imsi": "001020000000012",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 13,
|
||||
"imsi": "001020000000013",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 14,
|
||||
"imsi": "001020000000014",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 15,
|
||||
"imsi": "001020000000015",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
{
|
||||
"ue_id" : 16,
|
||||
"imsi": "001020000000016",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [ { sst: 1, }, ],
|
||||
default_pdu_session_snssai: { sst: 1, },
|
||||
tun_setup_script: "ue-ifup",
|
||||
},
|
||||
],
|
||||
}
|
||||
172
ci-scripts/as_ue/oaicicd-3xue-noPing-SATest.cfg
Normal file
172
ci-scripts/as_ue/oaicicd-3xue-noPing-SATest.cfg
Normal file
@@ -0,0 +1,172 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 40
|
||||
#define UE_COUNT 3 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue0.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:621312,
|
||||
ssb_nr_arfcn:621312,
|
||||
|
||||
//band: 41,
|
||||
//dl_nr_arfcn:517020,
|
||||
//ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 0,
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
}, /*end UE object 0*/
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 1,
|
||||
"imsi": "208970100001128",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
}, /*end UE object 1*/
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 2,
|
||||
"imsi": "208970100001129",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
} /*end UE object 2*/
|
||||
],/*end UE list*/
|
||||
}/*end json*/
|
||||
|
||||
142
ci-scripts/as_ue/oaicicd-multi-ue-1xPing-SATest.cfg
Normal file
142
ci-scripts/as_ue/oaicicd-multi-ue-1xPing-SATest.cfg
Normal file
@@ -0,0 +1,142 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 40
|
||||
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue0.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:621312,
|
||||
ssb_nr_arfcn:621312,
|
||||
|
||||
//band: 41,
|
||||
//dl_nr_arfcn:517020,
|
||||
//ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 1,
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
}, /*end UE object 0*/
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 2,
|
||||
"imsi": "208970100001128",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 15,
|
||||
end_time: 25,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
} /*end UE object 1*/
|
||||
],/*end UE list*/
|
||||
}/*end json*/
|
||||
150
ci-scripts/as_ue/oaicicd-multi-ue-2xPing-SATest.cfg
Normal file
150
ci-scripts/as_ue/oaicicd-multi-ue-2xPing-SATest.cfg
Normal file
@@ -0,0 +1,150 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 40
|
||||
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue0.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:621312,
|
||||
ssb_nr_arfcn:621312,
|
||||
|
||||
//band: 41,
|
||||
//dl_nr_arfcn:517020,
|
||||
//ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 1,
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 15,
|
||||
end_time: 25,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
}, /*end UE object 0*/
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 2,
|
||||
"imsi": "208970100001128",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 15,
|
||||
end_time: 25,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}
|
||||
] /*end sim events */
|
||||
} /*end UE object 1*/
|
||||
],/*end UE list*/
|
||||
}/*end json*/
|
||||
150
ci-scripts/as_ue/oaicicd-multi-ue-2xPingSeq-SATest.cfg
Normal file
150
ci-scripts/as_ue/oaicicd-multi-ue-2xPingSeq-SATest.cfg
Normal file
@@ -0,0 +1,150 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 40
|
||||
#define UE_COUNT 2 // number of simulated UEs 208970100001127, 208970100001128, 208970100001129
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue0.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:621312,
|
||||
ssb_nr_arfcn:621312,
|
||||
|
||||
//band: 41,
|
||||
//dl_nr_arfcn:517020,
|
||||
//ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 1,
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 20,
|
||||
end_time: 30,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 60,
|
||||
}
|
||||
] /*end sim events */
|
||||
}, /*end UE object 0*/
|
||||
{
|
||||
/* UE capabilities */
|
||||
/* USIM data */
|
||||
"ue_id" : 2,
|
||||
"imsi": "208970100001128",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
sim_events: [
|
||||
{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
},
|
||||
{
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 40,
|
||||
end_time: 50,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 60,
|
||||
}
|
||||
] /*end sim events */
|
||||
} /*end UE object 1*/
|
||||
],/*end UE list*/
|
||||
}/*end json*/
|
||||
113
ci-scripts/as_ue/oaicicd-ue-Ping-SATest.cfg
Normal file
113
ci-scripts/as_ue/oaicicd-ue-Ping-SATest.cfg
Normal file
@@ -0,0 +1,113 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 40
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue1.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: false,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
band: 78,
|
||||
dl_nr_arfcn:621312,
|
||||
ssb_nr_arfcn:621312,
|
||||
|
||||
//band: 41,
|
||||
//dl_nr_arfcn:517020,
|
||||
//ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
|
||||
/* USIM data */
|
||||
|
||||
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
],
|
||||
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 66051,
|
||||
},
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
|
||||
sim_events: [{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
}, {
|
||||
"tag": "ping",
|
||||
"prog":"oai_ext_app.sh",
|
||||
start_time: 15,
|
||||
end_time: 25,
|
||||
"args":["ping 192.168.70.136"],
|
||||
"event":"ext_app"
|
||||
|
||||
},
|
||||
{
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}]
|
||||
}
|
||||
],
|
||||
}
|
||||
109
ci-scripts/as_ue/oaicicd-ue-iperf-SATest.cfg
Normal file
109
ci-scripts/as_ue/oaicicd-ue-iperf-SATest.cfg
Normal file
@@ -0,0 +1,109 @@
|
||||
/* UE simulator configuration */
|
||||
|
||||
|
||||
|
||||
/* UE simulator configuration file version 2021-06-17
|
||||
* LTE / 5G Non StandAlone
|
||||
* Copyright (C) 2019-2021 Amarisoft
|
||||
*/
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define TDD 1
|
||||
#define CELL_BANDWIDTH 20
|
||||
|
||||
|
||||
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue0.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver/1chan.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: false,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: CELL_BANDWIDTH,
|
||||
#if TDD == 1
|
||||
// band: 78,
|
||||
// dl_nr_arfcn:621312,
|
||||
// ssb_nr_arfcn:621312,*/
|
||||
|
||||
band: 41,
|
||||
dl_nr_arfcn:517020,
|
||||
ssb_nr_arfcn:516990,
|
||||
#else
|
||||
band: 7,
|
||||
dl_nr_arfcn: 536020,
|
||||
ssb_nr_arfcn: 535930,
|
||||
ssb_subcarrier_spacing: 15,
|
||||
#endif
|
||||
subcarrier_spacing: 30,
|
||||
n_antenna_dl: N_ANTENNA_DL,
|
||||
n_antenna_ul: 1,
|
||||
rx_to_tx_latency:2,
|
||||
}],
|
||||
}],
|
||||
|
||||
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_bind_addr: "127.0.10.11",
|
||||
|
||||
ue_list: [
|
||||
{
|
||||
/* UE capabilities */
|
||||
|
||||
/* USIM data */
|
||||
|
||||
"imsi": "208970100001127",
|
||||
"K": "fec86ba6eb707ed08905757b1bb44b8f",
|
||||
"sim_algo":"milenage",
|
||||
"op": "1006020f0a478bf6b699f15c062e42b3",
|
||||
|
||||
|
||||
as_release: 15,
|
||||
ue_category: "nr",
|
||||
apn:"oai",
|
||||
attach_pdn_type:"ipv4",
|
||||
default_nssai: [
|
||||
{
|
||||
sst: 1,
|
||||
sd: 1,
|
||||
},
|
||||
],
|
||||
|
||||
default_pdu_session_snssai: {
|
||||
sst: 1,
|
||||
sd: 1,
|
||||
},
|
||||
|
||||
|
||||
/* Enable it to allow sim_events to be handled remotely */
|
||||
//rue_addr: "127.1.0.0",
|
||||
|
||||
/* Enable it to create a TUN interface for each UE PDN */
|
||||
tun_setup_script: "ue-ifup",
|
||||
|
||||
sim_events: [{
|
||||
event: "power_on",
|
||||
start_time: 5,
|
||||
}, {
|
||||
event: "ext_app",
|
||||
start_time: 15,
|
||||
end_time: 25,
|
||||
prog: "ext_app.sh",
|
||||
args: ["iperf", " -c 172.21.10.5", " -u"," -b 1M"," -i 1"," -t 10"]
|
||||
}, {
|
||||
event: "power_off",
|
||||
start_time: 30,
|
||||
}]
|
||||
}
|
||||
],
|
||||
}
|
||||
83
ci-scripts/build_fr1_from_yaml.py
Executable file
83
ci-scripts/build_fr1_from_yaml.py
Executable file
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Created on Tue Jul 7 23:04:51 2020
|
||||
|
||||
@author: hardy
|
||||
"""
|
||||
|
||||
|
||||
|
||||
import yaml
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
f_yaml=sys.argv[1]
|
||||
f_sh=sys.argv[2]
|
||||
#filename='py_params_template.yaml'
|
||||
with open(f_yaml,'r') as file:
|
||||
# The FullLoader parameter handles the conversion from YAML
|
||||
# scalar values to Python the dictionary format
|
||||
print('Loading '+f_yaml)
|
||||
params = yaml.load(file,Loader=yaml.FullLoader)
|
||||
|
||||
|
||||
with open(f_sh,'w') as f:
|
||||
f.write('#!/bin/sh\n')
|
||||
for i in range (0, len(params['steps'])):
|
||||
step=params['steps'][i].split(',')
|
||||
mode=step[0]
|
||||
f_xml=step[1]
|
||||
line='python3 main.py ' + \
|
||||
'--mode='+ mode + ' ' + \
|
||||
'--ranRepository=' + params['ranRepository'] + ' ' + \
|
||||
'--ranBranch=' + params['ranBranch'] + ' ' + \
|
||||
'--ranCommitID=' + params['ranCommitID'] + ' ' + \
|
||||
'--ranAllowMerge=' + params['ranAllowMerge'] + ' ' + \
|
||||
'--ranTargetBranch=' + params['ranTargetBranch'] + ' ' + \
|
||||
\
|
||||
'--ADBIPAddress=' + params['ADB']['ADBIPAddress'] + ' ' + \
|
||||
'--ADBUserName=' + params['ADB']['ADBUserName'] + ' ' + \
|
||||
'--ADBPassword=' + params['ADB']['ADBPassword'] + ' ' + \
|
||||
\
|
||||
'--UEIPAddress=' + params['UE']['UEIPAddress'] + ' ' + \
|
||||
'--UEUserName=' + params['UE']['UEUserName'] + ' ' + \
|
||||
'--UEPassword=' + params['UE']['UEPassword'] + ' ' + \
|
||||
'--UESourceCodePath=' + params['UE']['UESourceCodePath'] + ' ' + \
|
||||
\
|
||||
'--EPCIPAddress=' + params['EPC']['EPCIPAddress'] + ' ' + \
|
||||
'--EPCUserName=' + params['EPC']['EPCUserName'] + ' ' + \
|
||||
'--EPCPassword=' + params['EPC']['EPCPassword'] + ' ' + \
|
||||
'--EPCSourceCodePath=' + params['EPC']['EPCSourceCodePath'] + ' ' + \
|
||||
'--EPCType=' + params['EPC']['EPCType'] + ' ' + \
|
||||
\
|
||||
'--eNBIPAddress=' + params['RAN'][0]['eNBIPAddress'] + ' ' + \
|
||||
'--eNBUserName=' + params['RAN'][0]['eNBUserName'] + ' ' + \
|
||||
'--eNBPassword=' + params['RAN'][0]['eNBPassword'] + ' ' + \
|
||||
'--eNBSourceCodePath=' + params['RAN'][0]['eNBSourceCodePath'] + ' ' + \
|
||||
\
|
||||
'--eNB1IPAddress=' + params['RAN'][1]['eNB1IPAddress'] + ' ' + \
|
||||
'--eNB1UserName=' + params['RAN'][1]['eNB1UserName'] + ' ' + \
|
||||
'--eNB1Password=' + params['RAN'][1]['eNB1Password'] + ' ' + \
|
||||
'--eNB1SourceCodePath=' + params['RAN'][1]['eNB1SourceCodePath'] + ' '
|
||||
if mode!="InitiateHtml":
|
||||
line+='--XMLTestFile=' + f_xml
|
||||
#if mode is InitiateHTML we have a special processing to mention all xml files from the list
|
||||
#loop starting at 1 to avoid the xml file mentioned with InitiateHtml in yaml file (file is none)
|
||||
else:
|
||||
for i in range (1, len(params['steps'])):
|
||||
step=params['steps'][i].split(',')
|
||||
f_xml=step[1]
|
||||
line+='--XMLTestFile=' + f_xml+' '
|
||||
line+='\n'
|
||||
print(line)
|
||||
f.write(line)
|
||||
subprocess.call(['chmod','777',f_sh])
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
46
ci-scripts/build_fr1_template.yaml
Executable file
46
ci-scripts/build_fr1_template.yaml
Executable file
@@ -0,0 +1,46 @@
|
||||
|
||||
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||
ranBranch : integration_2021_wk13_a
|
||||
ranCommitID : 104aa7eed5d6702c1b9da663414079ef698da206
|
||||
ranAllowMerge : 'yes'
|
||||
ranTargetBranch : develop
|
||||
|
||||
steps:
|
||||
- InitiateHtml,none
|
||||
- TesteNB,xml_files/fr1_multi_node_build.xml
|
||||
- TesteNB,xml_files/fr1_epc_start.xml
|
||||
- TesteNB,xml_files/fr1_nsa_base_next.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
|
||||
- TesteNB,xml_files/fr1_epc_closure.xml
|
||||
|
||||
|
||||
ADB: #on Caracal
|
||||
ADBIPAddress : 172.21.16.132
|
||||
ADBUserName : oaici
|
||||
ADBPassword : KkexF6CErOi1fNuebCPsuIVK
|
||||
|
||||
RAN:
|
||||
- eNBIPAddress : 192.168.18.199 #eNB on Minimassive
|
||||
eNBUserName : oaicicd
|
||||
eNBPassword : HzB*nkryaITdVd08TKlT#2Z5a!7M#~qn
|
||||
eNBSourceCodePath : /tmp/CI-FR1-eNB
|
||||
- eNB1IPAddress : 192.168.18.198 #gNB on Mozart
|
||||
eNB1UserName : oaicicd
|
||||
eNB1Password : 7zkDOFgh@w3HvRBMPTMh@BAx
|
||||
eNB1SourceCodePath : /tmp/CI-FR1-gNB
|
||||
|
||||
|
||||
EPC: #on Nikaia
|
||||
EPCIPAddress : 192.168.18.99
|
||||
EPCUserName : nikaia
|
||||
EPCPassword : linux
|
||||
EPCSourceCodePath : /tmp/CI-FR1-EPC
|
||||
EPCType : ltebox
|
||||
|
||||
|
||||
UE:
|
||||
UEIPAddress : none
|
||||
UEUserName : none
|
||||
UEPassword : none
|
||||
UESourceCodePath : none
|
||||
|
||||
|
||||
@@ -106,11 +106,11 @@ echo "Merged Commit is : $MERGE_COMMMIT"
|
||||
echo "Target Init is : $TARGET_INIT_COMMIT"
|
||||
|
||||
# Retrieve the list of modified files since the latest develop commit
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | grep -E "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
NB_WARNINGS_FILES=0
|
||||
|
||||
# Retrieve list of warnings
|
||||
LIST_WARNING_FILES=`grep -E "error:|warning:" archives/*/*.txt | grep -E -v "jobserver unavailable|Clock skew detected." | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.txt | egrep -v "jobserver unavailable|Clock skew detected." | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
|
||||
echo ""
|
||||
echo "List of files that have been modified by the Merge Request AND"
|
||||
|
||||
@@ -64,19 +64,18 @@ then
|
||||
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
|
||||
|
||||
# Testing if explicit GNU GPL license banner
|
||||
grep -E -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | grep -E -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt
|
||||
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | egrep -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt
|
||||
|
||||
# Looking at exotic/suspect banner
|
||||
LIST_OF_FILES_W_BANNER=`grep -E -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
|
||||
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
|
||||
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
|
||||
for FILE in $LIST_OF_FILES_W_BANNER
|
||||
do
|
||||
IS_NFAPI=`echo $FILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
@@ -147,7 +146,7 @@ echo " ----------------------------------------------------------"
|
||||
echo ""
|
||||
|
||||
# Retrieve the list of modified files since the latest develop commit
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | grep -E "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
NB_TO_FORMAT=0
|
||||
if [ -f header-files-w-incorrect-define.txt ]
|
||||
then
|
||||
@@ -173,21 +172,20 @@ do
|
||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||
then
|
||||
# Testing if explicit GNU GPL license banner
|
||||
GNU_EXCEPTION=`echo $FULLFILE | grep -E -c "openair3/NAS/COMMON/milenage.h" || true`
|
||||
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true`
|
||||
if [ $GNU_EXCEPTION -eq 0 ]
|
||||
then
|
||||
grep -E -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
|
||||
egrep -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
|
||||
fi
|
||||
# Looking at exotic/suspect banner
|
||||
IS_BANNER=`grep -E -i -c "Copyright|copyleft" $FULLFILE || true`
|
||||
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE || true`
|
||||
if [ $IS_BANNER -ne 0 ]
|
||||
then
|
||||
IS_NFAPI=`echo $FULLFILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FULLFILE || true`
|
||||
IS_MIT_LICENCE_PRESENT=`grep -E -c "MIT License" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c|openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_offload.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
|
||||
@@ -78,10 +78,9 @@ IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY`
|
||||
IS_MR_CI=`echo $LABELS | grep -c CI`
|
||||
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE`
|
||||
IS_MR_5G=`echo $LABELS | grep -c 5G-NR`
|
||||
IS_MR_5G_UE=`echo $LABELS | grep -c nrUE`
|
||||
|
||||
# none is present! No CI
|
||||
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ] && [ $IS_MR_5G_UE -eq 0 ]
|
||||
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ]
|
||||
then
|
||||
echo "NONE"
|
||||
exit 0
|
||||
@@ -94,12 +93,6 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $IS_MR_5G_UE -eq 1 ] && [ $IS_MR_4G -eq 1 ]
|
||||
then
|
||||
echo "SHORTEN-4G-5G-UE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 4G is present: run only 4G
|
||||
if [ $IS_MR_4G -eq 1 ]
|
||||
then
|
||||
@@ -114,12 +107,6 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $IS_MR_5G_UE -eq 1 ]
|
||||
then
|
||||
echo "SHORTEN-5G-UE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# BUILD-ONLY is present: only build stages
|
||||
if [ $IS_MR_BUILD_ONLY -eq 1 ]
|
||||
then
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <command> <id>"
|
||||
echo "available commands: initialize, attach, detach, terminate, check"
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cmd=$1
|
||||
id=$2
|
||||
|
||||
flightmode_off() {
|
||||
set +x
|
||||
adb -s $id shell "/data/local/tmp/on"
|
||||
}
|
||||
|
||||
flightmode_on() {
|
||||
set +x
|
||||
adb -s $id shell "/data/local/tmp/off"
|
||||
}
|
||||
|
||||
initialize() {
|
||||
set +x
|
||||
adb -s $id shell "svc data enable" # make sure data services are enabled
|
||||
flightmode_on
|
||||
}
|
||||
|
||||
terminate() {
|
||||
echo "terminate: does nothing"
|
||||
}
|
||||
|
||||
check() {
|
||||
declare -A service=( ["0"]="IN_SERVICE" ["1"]="OUT_OF_SERVICE" ["2"]="EMERGENCY_ONLY" ["3"]="RADIO_POWERED_OFF")
|
||||
declare -A data=( ["0"]="DISCONNECTED" ["1"]="CONNECTING" ["2"]="CONNECTED" ["3"]="SUSPENDED")
|
||||
serv_idx=$(adb -s $id shell "dumpsys telephony.registry" | sed -n 's/.*mServiceState=\([0-3]\).*/\1/p')
|
||||
data_idx=$(adb -s $id shell "dumpsys telephony.registry" | sed -n 's/.*mDataConnectionState=\([0-3]\).*/\1/p')
|
||||
data_reason=$(adb -s $id shell "dumpsys telephony.registry" | sed -n 's/.*mDataConnectionReason=\([0-9a-zA-Z_]\+\).*/\1/p')
|
||||
#echo "Status Check UE $id"
|
||||
echo "Service State: ${service[$serv_idx]}"
|
||||
echo "Data State: ${data[$data_idx]}"
|
||||
echo "Data Reason: ${data_reason}"
|
||||
}
|
||||
|
||||
case "${cmd}" in
|
||||
initialize) initialize;;
|
||||
attach) flightmode_off;;
|
||||
detach) flightmode_on;;
|
||||
terminate) terminate;;
|
||||
check) check;;
|
||||
*) echo "Invalid command $cmd"; usage; exit 1;;
|
||||
esac
|
||||
@@ -33,6 +33,7 @@ import sys
|
||||
import time
|
||||
import serial
|
||||
|
||||
|
||||
class qtel_ctl:
|
||||
#---------------
|
||||
#private methods
|
||||
@@ -74,15 +75,12 @@ class qtel_ctl:
|
||||
self.__set_modem_state(self.modem,'0')
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#argv[1] : usb port
|
||||
#argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...)
|
||||
if len(sys.argv) >= 3:
|
||||
command = sys.argv[2]
|
||||
print(command)
|
||||
Module=qtel_ctl(sys.argv[1])
|
||||
command = sys.argv[2]
|
||||
Module=qtel_ctl(sys.argv[1])
|
||||
#calling the function to be applied
|
||||
Module.cmd_dict[command]()
|
||||
print(Module.cmd_dict[command])
|
||||
else:
|
||||
print("To many arguments")
|
||||
Module.cmd_dict[command]()
|
||||
|
||||
@@ -1,442 +0,0 @@
|
||||
idefix:
|
||||
Host: idefix
|
||||
InitScript: sudo stdbuf -oL /home/oaicicd/quectel-CM/quectel-CM -4 -s oai.ipv4 &> /tmp/quectel-cm.log &
|
||||
TermScript: sudo -S killall --signal SIGKILL quectel-CM
|
||||
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
Trace: True
|
||||
LogStore: /media/usb-drive/ci_qlogs
|
||||
|
||||
up2:
|
||||
Host: up2
|
||||
AttachScript: sudo /opt/mbim/start_quectel_mbim.sh
|
||||
DetachScript: sudo /opt/mbim/stop_quectel_mbim.sh
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
|
||||
up2-fhi72:
|
||||
Host: up2
|
||||
AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
|
||||
DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
|
||||
up2-aerial:
|
||||
Host: up2
|
||||
AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
|
||||
DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
|
||||
NetworkScript: ip a show dev wwan0
|
||||
IF: wwan0
|
||||
MTU: 1500
|
||||
|
||||
adb_ue_1:
|
||||
Host: nano
|
||||
InitScript: /home/oaicicd/ci_ctl_adb.sh initialize R3CM40LZPHT
|
||||
TermScript: /home/oaicicd/ci_ctl_adb.sh terminate R3CM40LZPHT
|
||||
AttachScript: /home/oaicicd/ci_ctl_adb.sh attach R3CM40LZPHT
|
||||
DetachScript: /home/oaicicd/ci_ctl_adb.sh detach R3CM40LZPHT
|
||||
CheckStatusScript: /home/oaicicd/ci_ctl_adb.sh check R3CM40LZPHT
|
||||
DataEnableScript: adb -s R3CM40LZPHT shell "svc data enable"
|
||||
DataDisableScript: adb -s R3CM40LZPHT shell "svc data disable"
|
||||
NetworkScript: adb -s R3CM40LZPHT shell "ip address show | grep rmnet_data0"
|
||||
CmdPrefix: adb -s R3CM40LZPHT shell
|
||||
MTU: 1500
|
||||
LogStore: /media/usb-drive/ci_adb_1-logs
|
||||
adb_ue_2:
|
||||
Host: nano
|
||||
InitScript: /home/oaicicd/ci_ctl_adb.sh initialize 5200c00db4413517
|
||||
TermScript: /home/oaicicd/ci_ctl_adb.sh terminate 5200c00db4413517
|
||||
AttachScript: /home/oaicicd/ci_ctl_adb.sh attach 5200c00db4413517
|
||||
DetachScript: /home/oaicicd/ci_ctl_adb.sh detach 5200c00db4413517
|
||||
CheckStatusScript: /home/oaicicd/ci_ctl_adb.sh check 5200c00db4413517
|
||||
DataEnableScript: adb -s 5200c00db4413517 shell "svc data enable"
|
||||
DataDisableScript: adb -s 5200c00db4413517 shell "svc data disable"
|
||||
NetworkScript: adb -s 5200c00db4413517 shell "ip address show | grep rmnet"
|
||||
CmdPrefix: adb -s 5200c00db4413517 shell
|
||||
MTU: 1500
|
||||
LogStore: /media/usb-drive/ci_adb_2-logs
|
||||
|
||||
oc-cn5g:
|
||||
Host: avra
|
||||
NetworkScript: echo "inet 172.21.6.102"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran %%log_dir%%"
|
||||
|
||||
oc-cn5g-20897:
|
||||
Host: cacofonix
|
||||
NetworkScript: echo "inet 172.21.6.105"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72 %%log_dir%%"
|
||||
|
||||
oc-cn5g-20897-aerial:
|
||||
Host: gracehopper1-oai
|
||||
NetworkScript: echo "inet 172.21.6.105"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial %%log_dir%%"
|
||||
|
||||
matix-cn5g:
|
||||
Host: matix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
RunIperf3Server: False
|
||||
Deploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type start-basic"
|
||||
Undeploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type stop-basic"
|
||||
LogCollect:
|
||||
- "docker logs oai-smf > %%log_dir%%/oai-smf.log"
|
||||
- "docker logs oai-amf > %%log_dir%%/oai-amf.log"
|
||||
- "docker logs oai-upf > %%log_dir%%/oai-upf.log"
|
||||
|
||||
porcepix-cn4g:
|
||||
Host: porcepix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
|
||||
Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
|
||||
LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
|
||||
|
||||
nano-cn4g:
|
||||
Host: nano
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec prod-trf-gen
|
||||
Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
|
||||
Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
|
||||
LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
|
||||
|
||||
ltebox-nano:
|
||||
Host: nano
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
|
||||
- "sleep 1"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
|
||||
|
||||
sabox-nepes:
|
||||
Host: nepes
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
|
||||
- "sleep 1"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
|
||||
|
||||
ltebox-nepes:
|
||||
Host: nepes
|
||||
NetworkScript: ip a show dev tun1
|
||||
Deploy:
|
||||
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
|
||||
- "sleep 1"
|
||||
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
|
||||
- "sleep 1"
|
||||
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
|
||||
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_2x2:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_fhi72:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_1:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue1
|
||||
MTU: 1500
|
||||
amarisoft_ue_2:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
NetworkScript: ip netns exec ue2 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue2
|
||||
MTU: 1500
|
||||
amarisoft_ue_3:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
NetworkScript: ip netns exec ue3 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue3
|
||||
MTU: 1500
|
||||
amarisoft_ue_4:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
NetworkScript: ip netns exec ue4 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue4
|
||||
MTU: 1500
|
||||
amarisoft_ue_5:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
NetworkScript: ip netns exec ue5 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue5
|
||||
MTU: 1500
|
||||
amarisoft_ue_6:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
NetworkScript: ip netns exec ue6 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue6
|
||||
MTU: 1500
|
||||
amarisoft_ue_7:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
NetworkScript: ip netns exec ue7 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue7
|
||||
MTU: 1500
|
||||
amarisoft_ue_8:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
NetworkScript: ip netns exec ue8 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue8
|
||||
MTU: 1500
|
||||
amarisoft_ue_9:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
NetworkScript: ip netns exec ue9 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue9
|
||||
MTU: 1500
|
||||
amarisoft_ue_10:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
NetworkScript: ip netns exec ue10 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue10
|
||||
MTU: 1500
|
||||
amarisoft_ue_11:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
|
||||
NetworkScript: ip netns exec ue11 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue11
|
||||
MTU: 1500
|
||||
amarisoft_ue_12:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
|
||||
NetworkScript: ip netns exec ue12 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue12
|
||||
MTU: 1500
|
||||
amarisoft_ue_13:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
|
||||
NetworkScript: ip netns exec ue13 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue13
|
||||
MTU: 1500
|
||||
amarisoft_ue_14:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
|
||||
NetworkScript: ip netns exec ue14 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue14
|
||||
MTU: 1500
|
||||
amarisoft_ue_15:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
|
||||
NetworkScript: ip netns exec ue15 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue15
|
||||
MTU: 1500
|
||||
amarisoft_ue_16:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
|
||||
NetworkScript: ip netns exec ue16 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue16
|
||||
MTU: 1500
|
||||
|
||||
oai_ue_caracal:
|
||||
Host: caracal
|
||||
AttachScript: 'docker start oai-nr-ue'
|
||||
DetachScript: 'docker stop oai-nr-ue'
|
||||
NetworkScript: ip a show dev oaitun_ue1
|
||||
IF: oaitun_ue1
|
||||
MTU: 1500
|
||||
|
||||
lte_oai_ue_carabe:
|
||||
Host: carabe
|
||||
NetworkScript: docker exec lte-b200-ue-fdd-10Mhz-tm1 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec lte-b200-ue-fdd-10Mhz-tm1
|
||||
IF: oaitun_ue1
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_gnb_nos1:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-gnb ip a show dev oaitun_enb1
|
||||
CmdPrefix: docker exec rfsim5g-oai-gnb
|
||||
IF: oaitun_enb1
|
||||
|
||||
rfsim5g_ue:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue2:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue2 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue2
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue2
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue2
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue3:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue3 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue3
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue3
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue3
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue4:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue4 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue4
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue4
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue4
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue5:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue5 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue5
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue5
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue5
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue6:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue6 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue6
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue6
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue6
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue7:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue7 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue7
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue7
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue7
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue8:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue8 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue8
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue8
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue8
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue9:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue9 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue9
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue9
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue9
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue10:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue10 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue10
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue10
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue10
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0
|
||||
CmdPrefix: docker exec rfsim5g-oai-ext-dn
|
||||
|
||||
oai_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec oai-ext-dn ip a show dev eth0
|
||||
CmdPrefix: docker exec oai-ext-dn
|
||||
|
||||
rfsim5g_5gc_fixed_ip:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: echo "inet 12.1.1.1"
|
||||
|
||||
rfsim4g_ue:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
|
||||
IF: oaitun_ue1
|
||||
AttachScript: docker start rfsim4g-oai-lte-ue0
|
||||
DetachScript: docker stop rfsim4g-oai-lte-ue0
|
||||
MTU: 1500
|
||||
|
||||
rfsim4g_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec rfsim4g-trf-gen
|
||||
|
||||
rfsim4g_enb_nos1:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enb1
|
||||
CmdPrefix: docker exec rfsim4g-oai-enb
|
||||
IF: oaitun_enb1
|
||||
|
||||
rfsim4g_enb_fembms:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enm1
|
||||
CmdPrefix: docker exec rfsim4g-oai-enb
|
||||
IF: oaitun_enm1
|
||||
|
||||
rfsim4g_ue_fembms:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem2
|
||||
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
|
||||
IF: oaitun_uem2
|
||||
|
||||
l2sim4g_ue:
|
||||
Host: "%%current_host%%"
|
||||
AttachScript: docker start l2sim4g-oai-lte-ue1
|
||||
DetachScript: docker stop l2sim4g-oai-lte-ue1
|
||||
NetworkScript: docker exec l2sim4g-oai-lte-ue1 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec l2sim4g-oai-lte-ue1
|
||||
IF: oaitun_ue1
|
||||
MTU: 1500
|
||||
|
||||
l2sim4g_ext_dn:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0
|
||||
CmdPrefix: docker exec l2sim4g-trf-gen
|
||||
106
ci-scripts/ci_ueinfra.yaml
Normal file
106
ci-scripts/ci_ueinfra.yaml
Normal file
@@ -0,0 +1,106 @@
|
||||
idefix:
|
||||
ID: idefix
|
||||
State : enabled
|
||||
Kind : quectel
|
||||
Process :
|
||||
Name : quectel-CM
|
||||
Cmd : /home/oaicicd/quectel-CM/quectel-CM -4 -s
|
||||
Apn :
|
||||
ltebox : oai.ipv4
|
||||
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||
LogStore : /media/usb-drive/ci_qlogs
|
||||
PLMN : 22201
|
||||
UENetwork : wwan0
|
||||
HostIPAddress : 172.21.16.135
|
||||
HostUsername : oaicicd
|
||||
HostPassword : oaicicd
|
||||
HostSourceCodePath : none
|
||||
MTU : 1500
|
||||
nrmodule2_quectel:
|
||||
ID: nrmodule2_quectel
|
||||
State : enabled
|
||||
Kind : quectel
|
||||
Process :
|
||||
Name : quectel-CM
|
||||
Cmd : /home/nrmodule2/quectel-CM/quectel-CM -4 -s
|
||||
Apn :
|
||||
OAICN5G : oai
|
||||
OAI-Rel14-Docker : oai.ipv4
|
||||
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||
LogStore : /media/ci_qlogs
|
||||
PLMN : 20897
|
||||
UENetwork : wwan0
|
||||
HostIPAddress : 172.21.16.139
|
||||
HostUsername : nrmodule2
|
||||
HostPassword : linux
|
||||
HostSourceCodePath : none
|
||||
StartCommands :
|
||||
- sudo -S ip link set dev wwan1 mtu 1500
|
||||
MTU : 1500
|
||||
|
||||
# CAUTION: 192.168.18.89 address has to be changed when the server is moved
|
||||
#single UE single ping
|
||||
amarisoft_ue_1:
|
||||
ID: amarisoft_ue_1
|
||||
State : enabled
|
||||
Kind : amarisoft
|
||||
#not required for AS config but needed for py script
|
||||
WakeupScript : none
|
||||
DetachScript : none
|
||||
#end
|
||||
Cmd : /root/NV18-06-2022/ue/lteue
|
||||
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
|
||||
Duration : 60
|
||||
Ping : /tmp/test_ue1.log
|
||||
UELog : /tmp/ue1.log
|
||||
HostIPAddress : 172.21.16.144
|
||||
HostUsername : root
|
||||
HostPassword : toor
|
||||
HostSourceCodePath : /tmp
|
||||
|
||||
|
||||
#an other scenario example
|
||||
#notice : this will not work as such, only suggestion for multi ue scenario
|
||||
amarisoft_ue_2:
|
||||
ID: amarisoft_ue_2
|
||||
State : enabled
|
||||
Kind : amarisoft
|
||||
#not required for AS config but needed for py script
|
||||
WakeupScript : none
|
||||
DetachScript : none
|
||||
#end
|
||||
Cmd : /root/NV18-06-2022/ue/lteue
|
||||
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
|
||||
Duration : 60
|
||||
Ping :
|
||||
- /tmp/test_ue1.log #to be updated fo an other scenario
|
||||
- /tmp/test_ue2.log #could be a list for a multi ue scenario
|
||||
UELog :
|
||||
- /tmp/ue1.log
|
||||
- /tmp/ue1.log
|
||||
HostIPAddress : 192.168.18.89
|
||||
HostUsername : root
|
||||
HostPassword : toor
|
||||
HostSourceCodePath : /tmp
|
||||
|
||||
|
||||
#do not remove
|
||||
dummy:
|
||||
ID: ''
|
||||
State : ''
|
||||
Kind : ''
|
||||
Process :
|
||||
Name : ''
|
||||
Cmd : ''
|
||||
WakeupScript : ''
|
||||
DetachScript : ''
|
||||
PLMN : 22201
|
||||
UENetwork : wwan0
|
||||
HostIPAddress : 172.21.16.135
|
||||
HostUsername : oaicicd
|
||||
HostPassword : oaicicd
|
||||
HostSourceCodePath : none
|
||||
|
||||
|
||||
81
ci-scripts/cls_amarisoft_ue.py
Normal file
81
ci-scripts/cls_amarisoft_ue.py
Normal file
@@ -0,0 +1,81 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use isfile
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#time.sleep
|
||||
import time
|
||||
|
||||
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class AS_UE:
|
||||
|
||||
def __init__(self,Module):
|
||||
#create attributes as in the UE dictionary
|
||||
for k, v in Module.items():
|
||||
setattr(self, k, v)
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def WaitEndScenario(self):
|
||||
logging.debug('waiting for scenario duration')
|
||||
time.sleep(int(self.Duration))
|
||||
|
||||
def KillASUE(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
mySSH.command('killall --signal SIGKILL lteue-avx2', '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
def RunScenario(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
|
||||
logging.debug("Deleting old artifacts :")
|
||||
cmd='rm -rf ' + self.Ping + ' ' + self.UELog
|
||||
mySSH.command(cmd, '\$',5)
|
||||
logging.debug("Running scenario :")
|
||||
cmd='echo $USER; nohup '+self.Cmd + ' ' + self.Config + ' &'
|
||||
mySSH.command(cmd, '\$',5)
|
||||
|
||||
mySSH.close()
|
||||
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
import logging
|
||||
import re
|
||||
|
||||
# Define the mapping of physim_test values to search patterns
|
||||
PHYSIM_PATTERN_MAPPING = {
|
||||
'nr_ulsim': [
|
||||
r'(Total PHY proc rx)\s+(\d+\.\d+)\s+us', # Pattern for RX PHY processing time
|
||||
r'(ULSCH total decoding time)\s+(\d+\.\d+)\s+us', # Pattern for ULSCH decoding time
|
||||
],
|
||||
'nr_dlsim': [
|
||||
r'(PHY proc tx)\s+(\d+\.\d+)\s+us', # Pattern for TX PHY processing time
|
||||
r'(DLSCH encoding time)\s+(\d+\.\d+)\s+us', # Pattern for DLSCH encoding time
|
||||
],
|
||||
'ldpctest': [
|
||||
r'(Encoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for encoding time mean
|
||||
r'(Decoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for decoding time mean
|
||||
],
|
||||
}
|
||||
# Define test conditions based on the simulation type
|
||||
PHYSIM_TEST_CONDITION = {
|
||||
'nr_ulsim': 'test OK', # For nr_ulsim, check if 'test OK' is present
|
||||
'nr_dlsim': 'test OK', # For nr_dlsim, check if 'test OK' is present
|
||||
'ldpctest': None, # No condition for ldpctest, just process the patterns
|
||||
}
|
||||
|
||||
class Analysis():
|
||||
|
||||
def analyze_physim(log, physim_test, options, threshold):
|
||||
search_patterns = PHYSIM_PATTERN_MAPPING.get(physim_test)
|
||||
test_condition = PHYSIM_TEST_CONDITION.get(physim_test)
|
||||
success = False
|
||||
msg = ''
|
||||
|
||||
try:
|
||||
with open(log, 'r') as f:
|
||||
log_content = f.read()
|
||||
except FileNotFoundError as e:
|
||||
msg = f'{log} file not found, exception: {e}'
|
||||
return False, msg
|
||||
except Exception as e:
|
||||
msg = f'Error while parsing log file {log}: exception: {e}'
|
||||
return False, msg
|
||||
|
||||
if test_condition and test_condition not in log_content:
|
||||
msg = f"Test did not succeed, '{test_condition}' not found in log file {log}."
|
||||
return False, msg
|
||||
|
||||
time1_match = re.search(search_patterns[0], log_content)
|
||||
time2_match = re.search(search_patterns[1], log_content)
|
||||
if not(time1_match and time2_match):
|
||||
msg = f"Processing time not found in log file {log}."
|
||||
return False, msg
|
||||
|
||||
success = float(time2_match.group(2)) < float(threshold)
|
||||
if success:
|
||||
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us'
|
||||
else:
|
||||
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us exceeds a limit of {threshold} us'
|
||||
|
||||
return success,msg
|
||||
@@ -1,4 +1,3 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
@@ -20,28 +19,39 @@
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Rocky 9
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS ran-build
|
||||
#to use isfile
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#time.sleep
|
||||
import time
|
||||
#to load ue infrastructure dictionary
|
||||
import yaml
|
||||
|
||||
class InfraUE:
|
||||
def __init__(self):
|
||||
self.ci_ue_infra ={}
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
#This method reads the yaml file describing the multi-UE infrastructure
|
||||
#and stores the infra permanently in the related class attribute self.ci_ue_infra
|
||||
def Get_UE_Infra(self,ue_infra_filename):
|
||||
f_yaml=ue_infra_filename
|
||||
with open(f_yaml,'r') as file:
|
||||
logging.debug('Loading UE infrastructure from file '+f_yaml)
|
||||
#load it permanently in the class attribute
|
||||
self.ci_ue_infra = yaml.load(file,Loader=yaml.FullLoader)
|
||||
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
CXXFLAGS="-Werror -fstack-protector-strong" CFLAGS="-Werror -fstack-protector-strong" ./build_oai -c --ninja \
|
||||
--eNB --gNB --RU --UE --nrUE \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
--build-tool-opt -k10 \
|
||||
-w USRP -t Ethernet \
|
||||
--noavx512 && \
|
||||
echo "---- ldd on executables ----" && \
|
||||
ldd ran_build/build/*softmodem* ran_build/build/nr-cuup ran_build/build/oairu && \
|
||||
echo "---- ldd on shared libraries ----" && \
|
||||
ldd ran_build/build/*.so
|
||||
@@ -40,29 +40,6 @@ import cls_cmd
|
||||
|
||||
IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc"
|
||||
NAMESPACE = "oaicicd-ran"
|
||||
OCUrl = "https://api.oai.cs.eurecom.fr:6443"
|
||||
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
|
||||
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
|
||||
|
||||
def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
|
||||
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
raise ValueError('Insufficient Parameter: no OC Credentials')
|
||||
if OCRegistry.startswith("http") or OCRegistry.endswith("/"):
|
||||
raise ValueError(f'ocRegistry {OCRegistry} should not start with http:// or https:// and not end on a slash /')
|
||||
ret = cmd.run(f'oc login -u {ocUserName} -p {ocPassword} --server {OCUrl}')
|
||||
if ret.returncode != 0:
|
||||
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
||||
return False
|
||||
ret = cmd.run(f'oc project {ocProjectName}')
|
||||
if ret.returncode != 0:
|
||||
logging.error(f'\u001B[1mUnable to access OC project {ocProjectName}\u001B[0m')
|
||||
OC_logout(cmd)
|
||||
return False
|
||||
return True
|
||||
|
||||
def OC_logout(cmd):
|
||||
cmd.run(f'oc logout')
|
||||
|
||||
class Cluster:
|
||||
def __init__(self):
|
||||
@@ -72,8 +49,8 @@ class Cluster:
|
||||
self.OCUserName = ""
|
||||
self.OCPassword = ""
|
||||
self.OCProjectName = ""
|
||||
self.OCUrl = OCUrl
|
||||
self.OCRegistry = OCRegistry
|
||||
self.OCUrl = "https://api.oai.cs.eurecom.fr:6443"
|
||||
self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
|
||||
self.ranRepository = ""
|
||||
self.ranBranch = ""
|
||||
self.ranCommitID = ""
|
||||
@@ -81,11 +58,22 @@ class Cluster:
|
||||
self.ranTargetBranch = ""
|
||||
self.cmd = None
|
||||
|
||||
|
||||
def _recreate_entitlements(self):
|
||||
# recreating entitlements, don't care if deletion fails
|
||||
self.cmd.run(f'oc delete secret etc-pki-entitlement')
|
||||
ret = self.cmd.run(f"oc get secret etc-pki-entitlement -n openshift-config-managed -o json | jq 'del(.metadata.resourceVersion)' | jq 'del(.metadata.creationTimestamp)' | jq 'del(.metadata.uid)' | jq 'del(.metadata.namespace)' | oc create -f -", silent=True)
|
||||
if ret.returncode != 0:
|
||||
self.cmd.run('oc delete secret etc-pki-entitlement')
|
||||
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????.pem | tail -1', silent=True)
|
||||
regres1 = re.search(r"/etc/pki/entitlement/[0-9]+.pem", ret.stdout)
|
||||
ret = self.cmd.run('ls /etc/pki/entitlement/???????????????????-key.pem | tail -1', silent=True)
|
||||
regres2 = re.search(r"/etc/pki/entitlement/[0-9]+-key.pem", ret.stdout)
|
||||
if regres1 is None or regres2 is None:
|
||||
logging.error("could not find entitlements")
|
||||
return False
|
||||
file1 = regres1.group(0)
|
||||
file2 = regres2.group(0)
|
||||
ret = self.cmd.run(f'oc create secret generic etc-pki-entitlement --from-file {file1} --from-file {file2}')
|
||||
regres = re.search(r"secret/etc-pki-entitlement created", ret.stdout)
|
||||
if ret.returncode != 0 or regres is None:
|
||||
logging.error("could not create secret/etc-pki-entitlement")
|
||||
return False
|
||||
return True
|
||||
@@ -94,7 +82,7 @@ class Cluster:
|
||||
self._retag_image_statement(name, name, newTag, filename)
|
||||
self.cmd.run(f'oc delete -f {filename}')
|
||||
ret = self.cmd.run(f'oc create -f {filename}')
|
||||
if re.search(r'buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
|
||||
if re.search('buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
|
||||
return True
|
||||
logging.error('error while creating buildconfig: ' + ret.stdout)
|
||||
return False
|
||||
@@ -119,7 +107,7 @@ class Cluster:
|
||||
def _start_build(self, name):
|
||||
# will return "immediately" but build runs in background
|
||||
# if multiple builds are started at the same time, this can take some time, however
|
||||
ret = self.cmd.run(f'oc start-build {name} --from-dir={self.eNBSourceCodePath} --exclude=""')
|
||||
ret = self.cmd.run(f'oc start-build {name} --from-file={self.eNBSourceCodePath}')
|
||||
regres = re.search(r'build.build.openshift.io/(?P<jobname>[a-zA-Z0-9\-]+) started', ret.stdout)
|
||||
if ret.returncode != 0 or ret.stdout.count('Uploading finished') != 1 or regres is None:
|
||||
logging.error(f"error during oc start-build: {ret.stdout}")
|
||||
@@ -162,17 +150,19 @@ class Cluster:
|
||||
return -1
|
||||
return int(result.group("size"))
|
||||
|
||||
def _deploy_pod(self, filename, timeout = 120):
|
||||
def _deploy_pod(self, filename, timeout = 30):
|
||||
ret = self.cmd.run(f'oc create -f {filename}')
|
||||
result = re.search(r'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
|
||||
result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
|
||||
if result is None:
|
||||
logging.error(f'could not deploy pod: {ret.stdout}')
|
||||
return None
|
||||
pod = result.group("pod")
|
||||
logging.debug(f'checking if pod {pod} is in Running state')
|
||||
ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True)
|
||||
if ret.returncode == 0:
|
||||
return pod
|
||||
while timeout > 0:
|
||||
ret = self.cmd.run(f'oc get pod {pod} -o json | jq -Mc .status.phase', silent=True)
|
||||
if re.search('"Running"', ret.stdout) is not None: return pod
|
||||
timeout -= 1
|
||||
time.sleep(1)
|
||||
logging.error(f'pod {pod} did not reach Running state')
|
||||
self._undeploy_pod(filename)
|
||||
return None
|
||||
@@ -180,47 +170,23 @@ class Cluster:
|
||||
def _undeploy_pod(self, filename):
|
||||
self.cmd.run(f'oc delete -f {filename}')
|
||||
|
||||
def PullClusterImage(self, HTML, node, images, tag_prefix):
|
||||
logging.debug(f'Pull OC image {images} to server {node}')
|
||||
self.testCase_id = HTML.testCase_id
|
||||
with cls_cmd.getConnection(node) as cmd:
|
||||
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
|
||||
if not succeeded:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
|
||||
return False
|
||||
ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
|
||||
if ret.returncode != 0:
|
||||
logging.error(f'cannot authenticate at registry')
|
||||
OC_logout(cmd)
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
|
||||
return False
|
||||
tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
|
||||
registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
|
||||
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, None, None)
|
||||
OC_logout(cmd)
|
||||
param = f"on node {node}"
|
||||
if success:
|
||||
HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
|
||||
return success
|
||||
|
||||
def BuildClusterImage(self, HTML):
|
||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
|
||||
sys.exit(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
|
||||
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
if lIpAddr == '' or lSourcePath == '':
|
||||
raise ValueError('Insufficient Parameter: eNBSourceCodePath missing')
|
||||
sys.exit('Insufficient Parameter: eNBSourceCodePath missing')
|
||||
ocUserName = self.OCUserName
|
||||
ocPassword = self.OCPassword
|
||||
ocProjectName = self.OCProjectName
|
||||
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
raise ValueError('Insufficient Parameter: no OC Credentials')
|
||||
if self.OCRegistry.startswith("http") or self.OCRegistry.endswith("/"):
|
||||
raise ValueError(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and not end on a slash /')
|
||||
sys.exit('Insufficient Parameter: no OC Credentials')
|
||||
if self.OCRegistry.startswith("http") and not self.OCRegistry.endswith("/"):
|
||||
sys.exit(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and end on a slash /')
|
||||
|
||||
logging.debug(f'Building on cluster triggered from server: {lIpAddr}')
|
||||
self.cmd = cls_cmd.RemoteCmd(lIpAddr)
|
||||
@@ -228,29 +194,26 @@ class Cluster:
|
||||
self.testCase_id = HTML.testCase_id
|
||||
|
||||
# Workaround for some servers, we need to erase completely the workspace
|
||||
self.cmd.cd(lSourcePath)
|
||||
if self.forcedWorkspaceCleanup:
|
||||
self.cmd.run(f'rm -Rf {lSourcePath}')
|
||||
cls_containerize.CreateWorkspace(self.cmd, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
|
||||
|
||||
# to reduce the amount of data send to OpenShift, we
|
||||
# manually delete all generated files in the workspace
|
||||
self.cmd.run(f'rm -rf {lSourcePath}/cmake_targets/ran_build');
|
||||
|
||||
baseTag = 'develop'
|
||||
forceBaseImageBuild = False
|
||||
imageTag = 'develop'
|
||||
if self.ranAllowMerge: # merging MR branch into develop -> temporary image
|
||||
branchName = self.ranBranch.replace('/','-')
|
||||
imageTag = f'{branchName}-{self.ranCommitID[0:8]}'
|
||||
imageTag = f'{self.ranBranch}-{self.ranCommitID[0:8]}'
|
||||
if self.ranTargetBranch == 'develop':
|
||||
ret = self.cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.rhel9 | grep --colour=never -i INDEX')
|
||||
ret = self.cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.rhel8.2 | grep --colour=never -i INDEX')
|
||||
result = re.search('index', ret.stdout)
|
||||
if result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
# if the branch name contains integration_20xx_wyy, let rebuild ran-base
|
||||
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.ranBranch)
|
||||
if not forceBaseImageBuild and result is not None:
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
else:
|
||||
imageTag = f'develop-{self.ranCommitID[0:8]}'
|
||||
forceBaseImageBuild = True
|
||||
|
||||
# logging to OC Cluster and then switch to corresponding project
|
||||
@@ -267,14 +230,6 @@ class Cluster:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
|
||||
return False
|
||||
|
||||
# delete old images by Sagar Arora <sagar.arora@openairinterface.org>:
|
||||
# 1. retrieve all images and their timestamp
|
||||
# 2. awk retrieves those whose timestamp is older than 3 weeks
|
||||
# 3. issue delete command on corresponding istags (the images are dangling and will be cleaned by the registry)
|
||||
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-3weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
|
||||
response = self.cmd.run(delete_cmd)
|
||||
logging.debug(f"deleted images:\n{response.stdout}")
|
||||
|
||||
self._recreate_entitlements()
|
||||
|
||||
status = True # flag to abandon compiling if any image fails
|
||||
@@ -284,7 +239,7 @@ class Cluster:
|
||||
self._recreate_bc('ran-base', baseTag, 'openshift/ran-base-bc.yaml')
|
||||
ranbase_job = self._start_build('ran-base')
|
||||
attemptedImages += ['ran-base']
|
||||
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 1000)
|
||||
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 600)
|
||||
if not status: logging.error('failure during build of ran-base')
|
||||
self.cmd.run(f'oc logs {ranbase_job} &> cmake_targets/log/ran-base.log') # cannot use cmd.run because of redirect
|
||||
# recover logs by mounting image
|
||||
@@ -300,53 +255,46 @@ class Cluster:
|
||||
if status:
|
||||
self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml')
|
||||
self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.phySim.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.phySim.rhel8.2')
|
||||
physim_job = self._start_build('oai-physim')
|
||||
attemptedImages += ['oai-physim']
|
||||
|
||||
self._recreate_is_tag('ran-build', imageTag, 'openshift/ran-build-is.yaml')
|
||||
self._recreate_bc('ran-build', imageTag, 'openshift/ran-build-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.rhel8.2')
|
||||
ranbuild_job = self._start_build('ran-build')
|
||||
attemptedImages += ['ran-build']
|
||||
|
||||
self._recreate_is_tag('oai-clang', imageTag, 'openshift/oai-clang-is.yaml')
|
||||
self._recreate_bc('oai-clang', imageTag, 'openshift/oai-clang-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.clang.rhel9')
|
||||
clang_job = self._start_build('oai-clang')
|
||||
attemptedImages += ['oai-clang']
|
||||
|
||||
wait = ranbuild_job is not None and physim_job is not None and clang_job is not None and self._wait_build_end([ranbuild_job, physim_job, clang_job], 1200)
|
||||
if not wait: logging.error('error during build of ranbuild_job or physim_job or clang_job')
|
||||
wait = ranbuild_job is not None and physim_job is not None and self._wait_build_end([ranbuild_job, physim_job], 1200)
|
||||
if not wait: logging.error('error during build of ranbuild_job or physim_job')
|
||||
status = status and wait
|
||||
self.cmd.run(f'oc logs {ranbuild_job} &> cmake_targets/log/ran-build.log')
|
||||
self.cmd.run(f'oc logs {physim_job} &> cmake_targets/log/oai-physim.log')
|
||||
self.cmd.run(f'oc logs {clang_job} &> cmake_targets/log/oai-clang.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml')
|
||||
self._recreate_bc('oai-enb', imageTag, 'openshift/oai-enb-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.eNB.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.eNB.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.eNB.rhel8.2')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.eNB.rhel8.2')
|
||||
enb_job = self._start_build('oai-enb')
|
||||
attemptedImages += ['oai-enb']
|
||||
|
||||
self._recreate_is_tag('oai-gnb', imageTag, 'openshift/oai-gnb-is.yaml')
|
||||
self._recreate_bc('oai-gnb', imageTag, 'openshift/oai-gnb-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.rhel8.2')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.rhel8.2')
|
||||
gnb_job = self._start_build('oai-gnb')
|
||||
attemptedImages += ['oai-gnb']
|
||||
|
||||
self._recreate_is_tag('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-is.yaml')
|
||||
self._recreate_bc('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.aw2s.rhel8.2')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.aw2s.rhel8.2')
|
||||
gnb_aw2s_job = self._start_build('oai-gnb-aw2s')
|
||||
attemptedImages += ['oai-gnb-aw2s']
|
||||
|
||||
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 800)
|
||||
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 600)
|
||||
if not wait: logging.error('error during build of eNB/gNB')
|
||||
status = status and wait
|
||||
# recover logs
|
||||
@@ -354,68 +302,33 @@ class Cluster:
|
||||
self.cmd.run(f'oc logs {gnb_job} &> cmake_targets/log/oai-gnb.log')
|
||||
self.cmd.run(f'oc logs {gnb_aw2s_job} &> cmake_targets/log/oai-gnb-aw2s.log')
|
||||
|
||||
self._recreate_is_tag('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-is.yaml')
|
||||
self._recreate_bc('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nr-cuup.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nr-cuup.rhel9')
|
||||
nr_cuup_job = self._start_build('oai-nr-cuup')
|
||||
attemptedImages += ['oai-nr-cuup']
|
||||
|
||||
self._recreate_is_tag('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-is.yaml')
|
||||
self._recreate_bc('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.lteUE.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel8.2')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.lteUE.rhel8.2')
|
||||
lteue_job = self._start_build('oai-lte-ue')
|
||||
attemptedImages += ['oai-lte-ue']
|
||||
|
||||
self._recreate_is_tag('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-is.yaml')
|
||||
self._recreate_bc('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nrUE.rhel9')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nrUE.rhel9')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nrUE.rhel8.2')
|
||||
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nrUE.rhel8.2')
|
||||
nrue_job = self._start_build('oai-nr-ue')
|
||||
attemptedImages += ['oai-nr-ue']
|
||||
|
||||
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 800)
|
||||
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
|
||||
wait = lteue_job is not None and nrue_job is not None and self._wait_build_end([lteue_job, nrue_job], 600)
|
||||
if not wait: logging.error('error during build of lteUE/nrUE')
|
||||
status = status and wait
|
||||
# recover logs
|
||||
self.cmd.run(f'oc logs {nr_cuup_job} &> cmake_targets/log/oai-nr-cuup.log')
|
||||
self.cmd.run(f'oc logs {lteue_job} &> cmake_targets/log/oai-lte-ue.log')
|
||||
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml')
|
||||
self._recreate_bc('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.fhi72.rhel9')
|
||||
ranbuildfhi72_job = self._start_build('ran-build-fhi72')
|
||||
attemptedImages += ['ran-build-fhi72']
|
||||
|
||||
wait = ranbuildfhi72_job is not None and self._wait_build_end([ranbuildfhi72_job], 1200)
|
||||
if not wait: logging.error('error during build of ranbuildfhi72_job')
|
||||
status = status and wait
|
||||
self.cmd.run(f'oc logs {ranbuildfhi72_job} &> cmake_targets/log/ran-build-fhi72.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
|
||||
if status:
|
||||
self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml')
|
||||
self._recreate_bc('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-bc.yaml')
|
||||
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
|
||||
self._retag_image_statement('ran-build-fhi72', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build-fhi72', imageTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
|
||||
gnb_fhi72_job = self._start_build('oai-gnb-fhi72')
|
||||
attemptedImages += ['oai-gnb-fhi72']
|
||||
|
||||
wait = gnb_fhi72_job is not None and self._wait_build_end([gnb_fhi72_job], 600)
|
||||
if not wait: logging.error('error during build of gNB-fhi72')
|
||||
status = status and wait
|
||||
# recover logs
|
||||
self.cmd.run(f'oc logs {gnb_fhi72_job} &> cmake_targets/log/oai-gnb-fhi72.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
|
||||
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
|
||||
|
||||
# split and analyze logs
|
||||
imageSize = {}
|
||||
for image in attemptedImages:
|
||||
self.cmd.run(f'mkdir -p cmake_targets/log/{image}')
|
||||
self.cmd.run(f'python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/{image}.log')
|
||||
tag = imageTag if image != 'ran-base' else baseTag
|
||||
size = self._get_image_size(image, tag)
|
||||
if size <= 0:
|
||||
@@ -426,9 +339,9 @@ class Cluster:
|
||||
imageSize[image] = f'{sizeMb:.1f} Mbytes (uncompressed: ~{sizeMb*2.5:.1f} Mbytes)'
|
||||
logging.info(f'\u001B[1m{image} size is {imageSize[image]}\u001B[0m')
|
||||
|
||||
grep_exp = r"\|".join(attemptedImages)
|
||||
grep_exp = "\|".join(attemptedImages)
|
||||
self.cmd.run(f'oc get images | grep -e \'{grep_exp}\' &> cmake_targets/log/image_registry.log');
|
||||
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done')
|
||||
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done', '\$', 60)
|
||||
|
||||
build_log_name = f'build_log_{self.testCase_id}'
|
||||
cls_containerize.CopyLogsToExecutor(self.cmd, lSourcePath, build_log_name)
|
||||
|
||||
@@ -31,30 +31,11 @@ import subprocess as sp
|
||||
import os
|
||||
import paramiko
|
||||
import uuid
|
||||
import time
|
||||
|
||||
SSHTIMEOUT=7
|
||||
|
||||
def is_local(host):
|
||||
return host is None or host.lower() in ["", "none", "localhost"]
|
||||
|
||||
# helper that returns either LocalCmd or RemoteCmd based on passed host name
|
||||
def getConnection(host, d=None):
|
||||
if is_local(host):
|
||||
return LocalCmd(d=d)
|
||||
else:
|
||||
return RemoteCmd(host, d=d)
|
||||
|
||||
def runScript(host, path, timeout, parameters=None, redirect=None, silent=False):
|
||||
if is_local(host):
|
||||
return LocalCmd.exec_script(path, timeout, parameters, redirect, silent)
|
||||
else:
|
||||
return RemoteCmd.exec_script(host, path, timeout, parameters, redirect, silent)
|
||||
|
||||
# provides a partial interface for the legacy SSHconnection class (getBefore(), command())
|
||||
class Cmd(metaclass=abc.ABCMeta):
|
||||
def cd(self, d, silent=False):
|
||||
if d == None or d == '':
|
||||
if d == None or d == '' or d == []:
|
||||
self.cwd = None
|
||||
elif d[0] == '/':
|
||||
self.cwd = d
|
||||
@@ -66,21 +47,13 @@ class Cmd(metaclass=abc.ABCMeta):
|
||||
if not silent:
|
||||
logging.debug(f'cd {self.cwd}')
|
||||
|
||||
@abc.abstractmethod
|
||||
def exec_script(path, timeout, parameters=None, redirect=None, silent=False):
|
||||
return
|
||||
|
||||
@abc.abstractmethod
|
||||
def run(self, line, timeout=300, silent=False):
|
||||
return
|
||||
|
||||
def command(self, commandline, expectedline=None, timeout=300, silent=False, resync=False):
|
||||
splitted = commandline.split(' ')
|
||||
if splitted[0] == 'cd':
|
||||
self.cd(' '.join(splitted[1:]), silent)
|
||||
else:
|
||||
self.run(commandline, timeout, silent)
|
||||
return 0
|
||||
@abc.abstractmethod
|
||||
def command(self, commandline, expectedline, timeout, silent=False, resync=False):
|
||||
return
|
||||
|
||||
@abc.abstractmethod
|
||||
def close(self):
|
||||
@@ -99,126 +72,61 @@ class Cmd(metaclass=abc.ABCMeta):
|
||||
return
|
||||
|
||||
class LocalCmd(Cmd):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_traceback):
|
||||
self.close()
|
||||
|
||||
def __init__(self, d = None):
|
||||
self.cwd = d
|
||||
if self.cwd is not None:
|
||||
logging.debug(f'Working dir is {self.cwd}')
|
||||
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
|
||||
|
||||
def exec_script(path, timeout, parameters=None, redirect=None, silent=False):
|
||||
if redirect and not redirect.startswith("/"):
|
||||
raise ValueError(f"redirect must be absolute, but is {redirect}")
|
||||
c = f"{path} {parameters}" if parameters else path
|
||||
if not redirect:
|
||||
ret = sp.run(c, shell=True, timeout=timeout, stdout=sp.PIPE, stderr=sp.STDOUT)
|
||||
ret.stdout = ret.stdout.decode('utf-8').strip()
|
||||
else:
|
||||
with open(redirect, "w") as f:
|
||||
ret = sp.run(c, shell=True, timeout=timeout, stdout=f, stderr=f)
|
||||
ret.args += f" &> {redirect}"
|
||||
ret.stdout = ""
|
||||
if not silent:
|
||||
logging.debug(f"local> {ret.args}")
|
||||
return ret
|
||||
|
||||
def run(self, line, timeout=300, silent=False, reportNonZero=True):
|
||||
if type(line) is str:
|
||||
line = [s for s in line.split(' ') if len(s) > 0]
|
||||
if not silent:
|
||||
logging.debug(f"local> {line}")
|
||||
logging.debug(' '.join(line))
|
||||
try:
|
||||
if line.strip().endswith('&'):
|
||||
# if we wait for stdout, subprocess does not return before the end of the command
|
||||
# however, we don't want to wait for commands with &, so just return fake command
|
||||
ret = sp.run(line, shell=True, cwd=self.cwd, timeout=5, executable='/bin/bash')
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
ret = sp.run(line, shell=True, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout, executable='/bin/bash')
|
||||
ret = sp.run(line, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout)
|
||||
except Exception as e:
|
||||
ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
|
||||
if ret.stdout is None:
|
||||
ret.stdout = b''
|
||||
ret.stdout = ret.stdout.decode('utf-8').strip()
|
||||
if reportNonZero and ret.returncode != 0:
|
||||
logging.warning(f'command "{ret.args}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
|
||||
cmd = ' '.join(ret.args)
|
||||
logging.warning(f'command "{cmd}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
|
||||
self.cp = ret
|
||||
return ret
|
||||
|
||||
def command(self, commandline, expectedline=None, timeout=300, silent=False, resync=False):
|
||||
line = [s for s in commandline.split(' ') if len(s) > 0]
|
||||
if line[0] == 'cd':
|
||||
self.cd(line[1], silent)
|
||||
else:
|
||||
self.run(line, timeout, silent)
|
||||
return 0
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
|
||||
def getBefore(self):
|
||||
return self.cp.stdout
|
||||
|
||||
def copyin(self, src, tgt, recursive=False):
|
||||
if src[0] != '/' or tgt[0] != '/':
|
||||
raise Exception(f'support only absolute file paths (src {src} tgt {tgt})!')
|
||||
if src == tgt:
|
||||
return # nothing to copy, file is already where it should go
|
||||
opt = '-r' if recursive else ''
|
||||
return self.run(f'cp {opt} {src} {tgt}').returncode == 0
|
||||
def copyin(self, scpIp, scpUser, scpPw, src, tgt):
|
||||
logging.warning("LocalCmd emulating sshconnection.copyin() function")
|
||||
self.run(f'cp -r {src} {tgt}')
|
||||
|
||||
def copyout(self, src, tgt, recursive=False):
|
||||
return self.copyin(src, tgt, recursive)
|
||||
|
||||
def PutFile(client, src, tgt):
|
||||
success = True
|
||||
sftp = client.open_sftp()
|
||||
try:
|
||||
sftp.put(src, tgt)
|
||||
except FileNotFoundError as error:
|
||||
logging.error(f"error while putting {src}: {error}")
|
||||
success = False
|
||||
sftp.close()
|
||||
return success
|
||||
|
||||
def GetFile(client, src, tgt):
|
||||
success = True
|
||||
sftp = client.open_sftp()
|
||||
try:
|
||||
sftp.get(src, tgt)
|
||||
except FileNotFoundError as error:
|
||||
logging.error(f"error while getting {src}: {error}")
|
||||
success = False
|
||||
sftp.close()
|
||||
return success
|
||||
def copyout(self, scpIp, scpUser, scpPw, src, tgt):
|
||||
logging.warning("LocalCmd emulating sshconnection.copyout() function")
|
||||
self.run(f'cp -r {src} {tgt}')
|
||||
|
||||
class RemoteCmd(Cmd):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_traceback):
|
||||
self.close()
|
||||
|
||||
def __init__(self, hostname, d=None):
|
||||
cIdx = 0
|
||||
self.hostname = hostname
|
||||
self.client = RemoteCmd._ssh_init()
|
||||
logging.getLogger('paramiko').setLevel(logging.INFO) # prevent spamming through Paramiko
|
||||
self.client = paramiko.SSHClient()
|
||||
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
cfg = RemoteCmd._lookup_ssh_config(hostname)
|
||||
self.client.connect(**cfg)
|
||||
self.cwd = d
|
||||
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
|
||||
while cIdx < 3:
|
||||
try:
|
||||
self.client.connect(**cfg)
|
||||
return
|
||||
except:
|
||||
logging.error(f'Could not connect to {hostname}, tried for {cIdx} time')
|
||||
cIdx +=1
|
||||
raise Exception ("Error: max retries, did not connect to host")
|
||||
|
||||
def _ssh_init():
|
||||
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
return client
|
||||
|
||||
def _lookup_ssh_config(hostname):
|
||||
if is_local(hostname):
|
||||
raise ValueError("Using localhost as SSH target is not allowed: use LocalCmd instead.")
|
||||
ssh_config = paramiko.SSHConfig()
|
||||
user_config_file = os.path.expanduser("~/.ssh/config")
|
||||
if os.path.exists(user_config_file):
|
||||
@@ -229,7 +137,7 @@ class RemoteCmd(Cmd):
|
||||
ucfg = ssh_config.lookup(hostname)
|
||||
if 'identityfile' not in ucfg or 'user' not in ucfg:
|
||||
raise KeyError(f'no identityfile or user in SSH config for host {hostname}')
|
||||
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile'], 'timeout':SSHTIMEOUT}
|
||||
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile']}
|
||||
if 'hostname' in ucfg:
|
||||
cfg['hostname'] = ucfg['hostname'] # override user-given hostname with what is in config
|
||||
if 'port' in ucfg:
|
||||
@@ -238,91 +146,72 @@ class RemoteCmd(Cmd):
|
||||
cfg['sock'] = paramiko.ProxyCommand(ucfg['proxycommand'])
|
||||
return cfg
|
||||
|
||||
def exec_script(host, path, timeout, parameters=None, redirect=None, silent=False):
|
||||
if redirect and not redirect.startswith("/"):
|
||||
raise ValueError(f"redirect must be absolute, but is {redirect}")
|
||||
p = parameters if parameters else ""
|
||||
r = f"> {redirect}" if redirect else ""
|
||||
if not silent:
|
||||
logging.debug(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
|
||||
client = RemoteCmd._ssh_init()
|
||||
cfg = RemoteCmd._lookup_ssh_config(host)
|
||||
client.connect(**cfg)
|
||||
bash_opt = 'BASH_XTRACEFD=1' # write bash set -x output to stdout, see bash(1)
|
||||
stdin, stdout, stderr = client.exec_command(f"{bash_opt} bash -s {p} {r}", timeout=timeout)
|
||||
# open() the file f at path, read() it and write() it into the stdin of the bash -s cmd
|
||||
with open(path) as f:
|
||||
stdin.write(f.read())
|
||||
stdin.close()
|
||||
cmd = path
|
||||
if parameters: cmd += f" {parameters}"
|
||||
if redirect: cmd += f" &> {redirect}"
|
||||
ret = sp.CompletedProcess(args=cmd, returncode=stdout.channel.recv_exit_status(), stdout=stdout.read(size=None) + stderr.read(size=None))
|
||||
ret.stdout = ret.stdout.decode('utf-8').strip()
|
||||
client.close()
|
||||
return ret
|
||||
|
||||
def run(self, line, timeout=300, silent=False, reportNonZero=True):
|
||||
if type(line) is list:
|
||||
line = ' '.join(line)
|
||||
if not silent:
|
||||
logging.debug(f"ssh[{self.hostname}]> {line}")
|
||||
logging.debug(line)
|
||||
if self.cwd:
|
||||
line = f"cd {self.cwd} && {line}"
|
||||
args = line.split(' ')
|
||||
try:
|
||||
if line.strip().endswith('&'):
|
||||
# if we wait for stdout, Paramiko does not return before the end of the command
|
||||
# however, we don't want to wait for commands with &, so just return fake command
|
||||
self.client.exec_command(line, timeout = 5)
|
||||
ret = sp.CompletedProcess(args=line, returncode=0, stdout=b'')
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
stdin, stdout, stderr = self.client.exec_command(line, timeout=timeout)
|
||||
ret = sp.CompletedProcess(args=line, returncode=stdout.channel.recv_exit_status(), stdout=stdout.read(size=None) + stderr.read(size=None))
|
||||
stdin, stdout, stderr = self.client.exec_command(line, timeout=timeout)
|
||||
ret = sp.CompletedProcess(args=args, returncode=stdout.channel.recv_exit_status(), stdout=stdout.read(size=None) + stderr.read(size=None))
|
||||
except Exception as e:
|
||||
ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
|
||||
ret = sp.CompletedProcess(args=args, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
|
||||
ret.stdout = ret.stdout.decode('utf-8').strip()
|
||||
if reportNonZero and ret.returncode != 0:
|
||||
logging.warning(f'command "{line}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
|
||||
cmd = ' '.join(ret.args)
|
||||
logging.warning(f'command "{cmd}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
|
||||
self.cp = ret
|
||||
return ret
|
||||
|
||||
def command(self, commandline, expectedline=None, timeout=300, silent=False, resync=False):
|
||||
line = [s for s in commandline.split(' ') if len(s) > 0]
|
||||
if line[0] == 'cd':
|
||||
self.cd(line[1], silent)
|
||||
else:
|
||||
self.run(line, timeout, silent)
|
||||
return 0
|
||||
|
||||
def close(self):
|
||||
self.client.close()
|
||||
|
||||
def getBefore(self):
|
||||
return self.cp.stdout
|
||||
|
||||
# if recursive is True, tgt must be a directory (and src is file or directory)
|
||||
# if recursive is False, tgt and src must be a file name
|
||||
def copyout(self, src, tgt, recursive=False):
|
||||
logging.debug(f"copyout: local:{src} -> {self.hostname}:{tgt}")
|
||||
logging.warning("RemoteCmd emulating sshconnection.copyout() function, ignoring scpIp")
|
||||
logging.debug(f"copyout: local:{src} -> remote:{tgt}")
|
||||
if recursive:
|
||||
tmpfile = f"{uuid.uuid4()}.tar"
|
||||
abstmpfile = f"/tmp/{tmpfile}"
|
||||
with LocalCmd() as cmd:
|
||||
if cmd.run(f"tar -cf {abstmpfile} {src}").returncode != 0:
|
||||
return False
|
||||
if not PutFile(self.client, abstmpfile, abstmpfile):
|
||||
return False
|
||||
cmd.run(f"rm {abstmpfile}")
|
||||
ret = self.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
return ret.returncode == 0
|
||||
cmd = LocalCmd()
|
||||
cmd.run(f"tar -cf {abstmpfile} {src}")
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.put(abstmpfile, abstmpfile)
|
||||
sftp.close()
|
||||
cmd.run(f"rm {abstmpfile}")
|
||||
self.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
else:
|
||||
return PutFile(self.client, src, tgt)
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.put(src, tgt)
|
||||
sftp.close()
|
||||
|
||||
# if recursive is True, tgt must be a directory (and src is file or directory)
|
||||
# if recursive is False, tgt and src must be a file name
|
||||
def copyin(self, src, tgt, recursive=False):
|
||||
logging.debug(f"copyin: {self.hostname}:{src} -> local:{tgt}")
|
||||
logging.warning("RemoteCmd emulating sshconnection.copyout() function")
|
||||
logging.debug(f"copyin: remote:{src} -> local:{tgt}")
|
||||
if recursive:
|
||||
tmpfile = f"{uuid.uuid4()}.tar"
|
||||
abstmpfile = f"/tmp/{tmpfile}"
|
||||
if self.run(f"tar -cf {abstmpfile} {src}").returncode != 0:
|
||||
return False
|
||||
if not GetFile(self.client, abstmpfile, abstmpfile):
|
||||
return False
|
||||
self.run(f"tar -cf {abstmpfile} {src}")
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.get(abstmpfile, abstmpfile)
|
||||
sftp.close()
|
||||
self.run(f"rm {abstmpfile}")
|
||||
with LocalCmd() as cmd:
|
||||
ret = cmd.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
return ret.returncode == 0
|
||||
cmd = LocalCmd()
|
||||
cmd.run(f"mv {abstmpfile} {tgt}; cd {tgt} && tar -xf {tmpfile} && rm {tmpfile}")
|
||||
else:
|
||||
return GetFile(self.client, src, tgt)
|
||||
sftp = self.client.open_sftp()
|
||||
sftp.get(src, tgt)
|
||||
sftp.close()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,172 +0,0 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
import logging
|
||||
import yaml
|
||||
import re
|
||||
|
||||
import cls_cmd
|
||||
|
||||
def listify(s):
|
||||
if s is None:
|
||||
return None
|
||||
if isinstance(s, list):
|
||||
return [str(x) for x in s]
|
||||
return [str(s)]
|
||||
|
||||
class CoreNetwork:
|
||||
|
||||
def __init__(self, cn_name, node=None, d=None, filename="ci_infra.yaml"):
|
||||
with open(filename, "r") as f:
|
||||
all_cns = yaml.load(f, Loader=yaml.FullLoader) # TODO why full?
|
||||
c = all_cns.get(cn_name)
|
||||
if c is None:
|
||||
raise Exception(f'no such core network name "{cn_name}" in "{filename}"')
|
||||
self._cn_name = cn_name
|
||||
self._host = c.get('Host').strip()
|
||||
if self._host == "%%current_host%%":
|
||||
if node is None:
|
||||
raise Exception(f"core network {cn_name} requires node, but none provided (cannot replace %%current_host%%)")
|
||||
self._host = node
|
||||
if d is not None:
|
||||
raise Exception("directory handling not implemented")
|
||||
self._deploy = listify(c.get('Deploy'))
|
||||
self._undeploy = listify(c.get('Undeploy'))
|
||||
self._logCollect = listify(c.get('LogCollect'))
|
||||
# check if at least one command contains "%%log_dir%%"
|
||||
if self._logCollect and not any(filter(lambda s: "%%log_dir%%" in s, self._logCollect)):
|
||||
raise ValueError(f"(At least one) LogCollect expression for {cn_name} must contain \"%%log_dir%%\"")
|
||||
self._getNetwork = listify(c.get('NetworkScript'))
|
||||
self._cmd_prefix = c.get('CmdPrefix')
|
||||
iperf = c.get('RunIperf3Server')
|
||||
self._run_iperf = bool(iperf if iperf is not None else True)
|
||||
logging.info(f'initialized core {self} from {filename}')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self._cn_name}@{self._host}"
|
||||
|
||||
def __repr__(self):
|
||||
return self.__str__()
|
||||
|
||||
def _exec_script(host, line, silent):
|
||||
# take off "!", split in words
|
||||
words = line[1:].strip().split(" ")
|
||||
script_name = words[0]
|
||||
options = " ".join(words[1:])
|
||||
ret = cls_cmd.runScript(host, script_name, 300, parameters=options, silent=silent)
|
||||
return ret
|
||||
|
||||
def _command(self, cmd_list, must_succeed=False, silent=False):
|
||||
succeeded = True
|
||||
output = ""
|
||||
with cls_cmd.getConnection(self._host) as c:
|
||||
for cmd in cmd_list:
|
||||
cmd = cmd.strip()
|
||||
if cmd.startswith("!"):
|
||||
ret = CoreNetwork._exec_script(self._host, cmd, silent=silent)
|
||||
else:
|
||||
ret = c.run(cmd, silent=silent)
|
||||
output += ret.stdout
|
||||
if ret.returncode != 0:
|
||||
logging.warn(f"cmd \"{cmd}\" returned code {ret.returncode}, stdout {ret.stdout}")
|
||||
if ret.returncode != 0 and must_succeed:
|
||||
succeeded = False
|
||||
break
|
||||
return succeeded, output
|
||||
|
||||
def deploy(self):
|
||||
# we first undeploy to make sure the core has been stopped
|
||||
logging.info(f'undeploy core network {self} before deployment')
|
||||
self._command(self._undeploy)
|
||||
logging.info(f'deploy core network {self}')
|
||||
success, output = self._command(self._deploy, must_succeed=True)
|
||||
if not success:
|
||||
logging.error(f'failure during deployment of core network {self}:\n{output}')
|
||||
return False, output
|
||||
logging.info(f'retrieve IP address')
|
||||
ip = self.getIP()
|
||||
if ip is None:
|
||||
logging.error(f'could not retrieve pingable address of core network {self}')
|
||||
return False, output
|
||||
logging.info(f'deployed core network {self}, pingable IP address {ip}')
|
||||
return True, output
|
||||
|
||||
def _collect_logs(self, log_dir):
|
||||
logging.info(f'collecting logs into (local) {log_dir}')
|
||||
remote_dir = "/tmp/cn-undeploy-logs"
|
||||
with cls_cmd.getConnection(self._host) as c:
|
||||
# create a directory for log collection
|
||||
c.run(f'rm -rf {remote_dir}')
|
||||
ret = c.run(f'mkdir {remote_dir}')
|
||||
if ret.returncode != 0:
|
||||
logging.error("cannot create directory for log collection")
|
||||
return []
|
||||
# inform core network implementation where to store logs
|
||||
# (remote_dir), and trigger log collection
|
||||
log_cmd = [s.replace('%%log_dir%%', remote_dir) for s in self._logCollect]
|
||||
self._command(log_cmd)
|
||||
# enumerate collected files
|
||||
ret = c.run(f'ls {remote_dir}/*')
|
||||
if ret.returncode != 0:
|
||||
logging.error("cannot enumerate log files")
|
||||
return []
|
||||
log_files = []
|
||||
# copy them to the executor one by one, and store in log_dir
|
||||
for f in ret.stdout.split("\n"):
|
||||
l = f.replace(remote_dir, log_dir)
|
||||
c.copyin(f, l)
|
||||
log_files.append(l)
|
||||
c.run(f'rm -rf {remote_dir}')
|
||||
return log_files
|
||||
|
||||
def undeploy(self, log_dir=None):
|
||||
log_files = []
|
||||
if log_dir is not None:
|
||||
log_files = self._collect_logs(log_dir)
|
||||
else:
|
||||
logging.warning("no directory for log collection specified, cannot retrieve core network logs")
|
||||
logging.info(f'undeploy core network {self}')
|
||||
_, output = self._command(self._undeploy)
|
||||
return log_files, output
|
||||
|
||||
def getIP(self):
|
||||
success, output = self._command(self._getNetwork)
|
||||
result = re.search(r'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output)
|
||||
if success and result and result.group('ip'):
|
||||
return result.group('ip')
|
||||
return None
|
||||
|
||||
def getCmdPrefix(self):
|
||||
return self._cmd_prefix or ""
|
||||
|
||||
def getName(self):
|
||||
return self._cn_name
|
||||
|
||||
def getHost(self):
|
||||
return self._host
|
||||
|
||||
def runIperf3Server(self):
|
||||
return self._run_iperf
|
||||
138
ci-scripts/cls_cots_ue.py
Normal file
138
ci-scripts/cls_cots_ue.py
Normal file
@@ -0,0 +1,138 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use isfile
|
||||
import os
|
||||
import sys
|
||||
#to use logging.info()
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#time.sleep
|
||||
import time
|
||||
#to load cots_ue dictionary
|
||||
import yaml
|
||||
|
||||
class CotsUe:
|
||||
def __init__(self,ADBIPAddr,ADBUserName,ADBPassWord):
|
||||
self.cots_id = '' #cots id from yaml oppo, s10 etc...
|
||||
self.ADBIPAddr = ADBIPAddr
|
||||
self.ADBUserName = ADBUserName
|
||||
self.ADBPassWord = ADBPassWord
|
||||
self.cots_run_mode = '' #on of off to toggle airplane mode on/off
|
||||
self.__cots_cde_dict_file = 'cots_ue_ctl.yaml'
|
||||
self.__SetAirplaneRetry = 3
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def Check_Airplane(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
|
||||
status=mySSH.cde_check_value('adb shell settings get global airplane_mode_on ', ['0','1'],5)
|
||||
mySSH.close()
|
||||
return status
|
||||
|
||||
#simply check if the device id exists in the dictionary
|
||||
#returns true if it exists, false otherwise
|
||||
def Check_Exists(self,target_id):
|
||||
#load cots commands dictionary
|
||||
if (os.path.isfile(self.__cots_cde_dict_file)):
|
||||
yaml_file=self.__cots_cde_dict_file
|
||||
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
|
||||
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
|
||||
else:
|
||||
logging.error("COTS UE dictionary yaml file cannot be found")
|
||||
sys.exit("COTS UE dictionary yaml file cannot be found")
|
||||
|
||||
#load cots commands dictionary
|
||||
with open(yaml_file,'r') as file:
|
||||
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
|
||||
#check if ue id is in the dictionary
|
||||
if target_id in cots_ue_ctl:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def Set_Airplane(self, target_id, target_state_str):
|
||||
#loading cots commands dictionary
|
||||
|
||||
if (os.path.isfile(self.__cots_cde_dict_file)):
|
||||
yaml_file=self.__cots_cde_dict_file
|
||||
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
|
||||
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
|
||||
else:
|
||||
logging.error("COTS UE dictionary yaml file cannot be found")
|
||||
sys.exit("COTS UE dictionary yaml file cannot be found")
|
||||
|
||||
#load cots commands dictionary
|
||||
with open(yaml_file,'r') as file:
|
||||
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
|
||||
#check if ue id is in the dictionary
|
||||
if target_id in cots_ue_ctl:
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
|
||||
logging.info(str(self.ADBIPAddr)+' '+str(self.ADBUserName)+' '+str(self.ADBPassWord))
|
||||
mySSH.command('adb start-server','\$',5)
|
||||
mySSH.command('adb devices','\$',5)
|
||||
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
|
||||
#get current state
|
||||
current_state = self.Check_Airplane()
|
||||
if target_state_str.lower()=="on":
|
||||
target_state=1
|
||||
else:
|
||||
target_state=0
|
||||
if current_state != target_state:
|
||||
#toggle state
|
||||
retry = 0
|
||||
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
|
||||
#loop over the command list from dictionary for the selected ue, to switch to required state
|
||||
for i in range (0,len(cots_ue_ctl[target_id])):
|
||||
mySSH.command(cots_ue_ctl[target_id][i], '\$', 5)
|
||||
time.sleep(1)
|
||||
current_state = self.Check_Airplane()
|
||||
retry+=1
|
||||
#could not toggle despite the retry
|
||||
if current_state != target_state:
|
||||
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
|
||||
logging.error("Current state is : "+ str(current_state))
|
||||
else:
|
||||
logging.info("Airplane mode is already "+ target_state_str)
|
||||
mySSH.command('adb kill-server','\$',5)
|
||||
mySSH.close()
|
||||
#ue id is NOT in the dictionary
|
||||
else:
|
||||
logging.error("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
|
||||
sys.exit("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
|
||||
|
||||
|
||||
|
||||
|
||||
94
ci-scripts/cls_log_mgt.py
Normal file
94
ci-scripts/cls_log_mgt.py
Normal file
@@ -0,0 +1,94 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#USAGE:
|
||||
# log=Log_Mgt(Username,IPAddress,Password,Path)
|
||||
# log.LogRotation()
|
||||
|
||||
|
||||
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
import sshconnection
|
||||
|
||||
class Log_Mgt:
|
||||
|
||||
def __init__(self,Username, IPAddress,Password,Path):
|
||||
self.Username=Username
|
||||
self.IPAddress=IPAddress
|
||||
self.Password=Password
|
||||
self.path=Path
|
||||
|
||||
#-----------------$
|
||||
#PRIVATE# Methods$
|
||||
#-----------------$
|
||||
|
||||
|
||||
def __CheckUsedSpace(self):
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="df "+ self.path
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
s=result[1].decode('utf-8').rstrip()#result[1] is the second line with the results we are looking for
|
||||
used=s.split()[4] #get 4th field ex: 70%
|
||||
m = re.match('^(\d+)\%',used)
|
||||
if m is not None:
|
||||
return int(m.group(1))
|
||||
|
||||
def __RemoveOldest(self, days):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.Username, self.Password)
|
||||
COMMAND='echo ' + self.Password + ' | sudo -S find ' + self.path + ' -type f -mtime +' + str(days) + ' -delete'
|
||||
mySSH.command(COMMAND,'\$',20)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
|
||||
def LogRotation(self):
|
||||
doLoop = True
|
||||
nbDays = 14
|
||||
while doLoop and nbDays > 1:
|
||||
used_space = self.__CheckUsedSpace() #avail space in target folder
|
||||
if used_space > 80 :
|
||||
logging.debug('\u001B[1;37;41m Used Disk (' + str(used_space) + '%) > 80%, on ' + self.Username+'@'+self.IPAddress + '\u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Removing Artifacts older than ' + str(nbDays) + ' days \u001B[0m')
|
||||
self.__RemoveOldest(nbDays)
|
||||
nbDays -= 1
|
||||
else:
|
||||
logging.debug('Used Disk (' + str(used_space) + '%) < 80%, on ' + self.Username+'@'+self.IPAddress +', no cleaning required')
|
||||
doLoop = False
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,200 +0,0 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use isfile
|
||||
import logging
|
||||
#time.sleep
|
||||
import time
|
||||
import re
|
||||
import yaml
|
||||
|
||||
import cls_cmd
|
||||
|
||||
class Module_UE:
|
||||
|
||||
def __init__(self, module_name, node=None, filename="ci_infra.yaml"):
|
||||
with open(filename, 'r') as f:
|
||||
all_ues = yaml.load(f, Loader=yaml.FullLoader)
|
||||
m = all_ues.get(module_name)
|
||||
if m is None:
|
||||
raise Exception(f'no such module name "{module_name}" in "{filename}"')
|
||||
self.module_name = module_name
|
||||
self.host = m['Host'] if m['Host'] != "%%current_host%%" else None
|
||||
if node is None and self.host is None:
|
||||
raise Exception(f'node not provided when needed')
|
||||
elif node is not None and self.host is None:
|
||||
self.host = node
|
||||
self.cmd_dict = {
|
||||
"attach": m.get('AttachScript'),
|
||||
"detach": m.get('DetachScript'),
|
||||
"initialize": m.get('InitScript'),
|
||||
"terminate": m.get('TermScript'),
|
||||
"getNetwork": m.get('NetworkScript'),
|
||||
"check": m.get('CheckStatusScript'),
|
||||
"dataEnable": m.get('DataEnableScript'),
|
||||
"dataDisable": m.get('DataDisableScript'),
|
||||
}
|
||||
self.interface = m.get('IF')
|
||||
self.MTU = m.get('MTU')
|
||||
self.trace = m.get('trace') == True
|
||||
self.logStore = m.get('LogStore')
|
||||
self.cmd_prefix = m.get('CmdPrefix')
|
||||
logging.info(f'initialized UE {self} from {filename}')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.module_name}@{self.host} [IP: {self.getIP()}]"
|
||||
|
||||
def __repr__(self):
|
||||
return self.__str__()
|
||||
|
||||
def _command(self, cmd, silent = False):
|
||||
if cmd is None:
|
||||
raise Exception("no command provided")
|
||||
if self.host == "" or self.host == "localhost":
|
||||
c = cls_cmd.LocalCmd()
|
||||
else:
|
||||
c = cls_cmd.RemoteCmd(self.host)
|
||||
response = c.run(cmd, silent=silent)
|
||||
c.close()
|
||||
return response
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def initialize(self):
|
||||
if self.trace:
|
||||
raise Exception("UE tracing not implemented yet")
|
||||
self._enableTrace()
|
||||
# we first terminate to make sure the UE has been stopped
|
||||
if self.cmd_dict["detach"]:
|
||||
self._command(self.cmd_dict["detach"], silent=True)
|
||||
self._command(self.cmd_dict["terminate"], silent=True)
|
||||
ret = self._command(self.cmd_dict["initialize"])
|
||||
logging.info(f'For command: {ret.args} | return output: {ret.stdout} | Code: {ret.returncode}')
|
||||
# Here each UE returns differently for the successful initialization, requires check based on UE
|
||||
return ret.returncode == 0
|
||||
|
||||
|
||||
def terminate(self):
|
||||
self._command(self.cmd_dict["terminate"])
|
||||
if self.trace:
|
||||
raise Exception("UE tracing not implemented yet")
|
||||
self._disableTrace()
|
||||
return self._logCollect()
|
||||
return None
|
||||
|
||||
def attach(self, attach_tries = 4, attach_timeout = 60):
|
||||
ip = None
|
||||
while attach_tries > 0:
|
||||
self._command(self.cmd_dict["attach"])
|
||||
timeout = attach_timeout
|
||||
logging.debug("Waiting for IP address to be assigned")
|
||||
while timeout > 0 and not ip:
|
||||
time.sleep(5)
|
||||
timeout -= 5
|
||||
ip = self.getIP()
|
||||
if ip:
|
||||
break
|
||||
logging.warning(f"UE did not receive IP address after {attach_timeout} s, detaching")
|
||||
attach_tries -= 1
|
||||
self._command(self.cmd_dict["detach"])
|
||||
time.sleep(5)
|
||||
if ip:
|
||||
logging.debug(f'\u001B[1mUE IP Address for UE {self.module_name} is {ip}\u001B[0m')
|
||||
else:
|
||||
logging.debug(f'\u001B[1;37;41mUE IP Address for UE {self.module_name} Not Found!\u001B[0m')
|
||||
return ip
|
||||
|
||||
def detach(self):
|
||||
self._command(self.cmd_dict["detach"])
|
||||
|
||||
def check(self):
|
||||
cmd = self.cmd_dict["check"]
|
||||
if cmd:
|
||||
return self._command(cmd).stdout
|
||||
else:
|
||||
logging.warning(f"requested status check of UE {self.getName()}, but operation is not supported")
|
||||
return f"UE {self.getName()} does not support status checking"
|
||||
|
||||
def dataEnable(self):
|
||||
cmd = self.cmd_dict["dataEnable"]
|
||||
if cmd:
|
||||
self._command(cmd)
|
||||
return True
|
||||
else:
|
||||
message = f"requested enabling data of UE {self.getName()}, but operation is not supported"
|
||||
logging.error(message)
|
||||
return False
|
||||
|
||||
def dataDisable(self):
|
||||
cmd = self.cmd_dict["dataDisable"]
|
||||
if cmd:
|
||||
self._command(cmd)
|
||||
return True
|
||||
else:
|
||||
message = f"requested disabling data of UE {self.getName()}, but operation is not supported"
|
||||
logging.error(message)
|
||||
return False
|
||||
|
||||
def getIP(self):
|
||||
output = self._command(self.cmd_dict["getNetwork"], silent=True)
|
||||
result = re.search(r'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
|
||||
if result and result.group('ip'):
|
||||
ip = result.group('ip')
|
||||
return ip
|
||||
return None
|
||||
|
||||
def checkMTU(self):
|
||||
output = self._command(self.cmd_dict["getNetwork"], silent=True)
|
||||
result = re.search(r'mtu (?P<mtu>[0-9]+)', output.stdout)
|
||||
if result and result.group('mtu') and int(result.group('mtu')) == self.MTU:
|
||||
logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m')
|
||||
return True
|
||||
else:
|
||||
logging.debug(f'\u001B[1;37;41m UE module {self.module_name} has incorrect Module NIC MTU or MTU not found! Expected: {self.MTU} \u001B[0m')
|
||||
return False
|
||||
|
||||
def getName(self):
|
||||
return self.module_name
|
||||
|
||||
def getIFName(self):
|
||||
return self.interface
|
||||
|
||||
def getHost(self):
|
||||
return self.host
|
||||
|
||||
def getCmdPrefix(self):
|
||||
return self.cmd_prefix if self.cmd_prefix else ""
|
||||
|
||||
def _enableTrace(self):
|
||||
raise Exception("not implemented")
|
||||
|
||||
def _disableTrace(self):
|
||||
raise Exception("not implemented")
|
||||
|
||||
def _logCollect(self):
|
||||
raise Exception("not implemented")
|
||||
204
ci-scripts/cls_module_ue.py
Normal file
204
ci-scripts/cls_module_ue.py
Normal file
@@ -0,0 +1,204 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use isfile
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#time.sleep
|
||||
import time
|
||||
|
||||
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
#for log rotation mgt
|
||||
import cls_log_mgt
|
||||
|
||||
class Module_UE:
|
||||
|
||||
def __init__(self,Module):
|
||||
#create attributes as in the Module dictionary
|
||||
for k, v in Module.items():
|
||||
setattr(self, k, v)
|
||||
self.UEIPAddress = ""
|
||||
#dictionary linking command names and related module scripts
|
||||
self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts
|
||||
self.ue_trace=''
|
||||
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
#this method checks if the specified Process is running on the server hosting the module
|
||||
#if not it will be started
|
||||
def CheckCMProcess(self,CNType):
|
||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||
COMMAND="ps aux | grep --colour=never " + self.Process['Name'] + " | grep -v grep "
|
||||
logging.debug(COMMAND)
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
if len(result)!=0:
|
||||
logging.debug(self.Process['Name'] + " process found")
|
||||
return True
|
||||
else:#start process and check again
|
||||
logging.debug(self.Process['Name'] + " process NOT found")
|
||||
#starting the process
|
||||
logging.debug('Starting ' + self.Process['Name'])
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -f /tmp/quectel-cm.log','\$',5)
|
||||
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S stdbuf -o0 ' + self.Process['Cmd'] + ' ' + self.Process['Apn'][CNType] + ' > /tmp/quectel-cm.log 2>&1 &','\$',5)
|
||||
mySSH.close()
|
||||
#checking the process
|
||||
time.sleep(5)
|
||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||
COMMAND="ps aux | grep --colour=never " + self.Process['Name'] + " | grep -v grep "
|
||||
logging.debug(COMMAND)
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
if len(result)!=0:
|
||||
logging.debug(self.Process['Name'] + " process found")
|
||||
return True
|
||||
else:
|
||||
logging.debug(self.Process['Name'] + " process NOT found")
|
||||
return False
|
||||
|
||||
#Generic command function, using function pointers dictionary
|
||||
def Command(self,cmd):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',10)
|
||||
time.sleep(5)
|
||||
logging.debug("Module "+ cmd)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
#this method retrieves the Module IP address (not the Host IP address)
|
||||
def GetModuleIPAddress(self):
|
||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||
response= []
|
||||
tentative = 8
|
||||
while (len(response)==0) and (tentative>0):
|
||||
COMMAND="ip a show dev " + self.UENetwork + " | grep --colour=never inet | grep " + self.UENetwork
|
||||
if tentative == 8:
|
||||
logging.debug(COMMAND)
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
response = ssh.stdout.readlines()
|
||||
tentative-=1
|
||||
time.sleep(2)
|
||||
if (tentative==0) and (len(response)==0):
|
||||
logging.debug('\u001B[1;37;41m Module IP Address Not Found! Time expired \u001B[0m')
|
||||
return -1
|
||||
else: #check response
|
||||
result = re.search('inet (?P<moduleipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', response[0].decode("utf-8") )
|
||||
if result is not None:
|
||||
if result.group('moduleipaddress') is not None:
|
||||
self.UEIPAddress = result.group('moduleipaddress')
|
||||
logging.debug('\u001B[1mUE Module IP Address is ' + self.UEIPAddress + '\u001B[0m')
|
||||
return 0
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
|
||||
return -1
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
|
||||
return -1
|
||||
|
||||
def CheckModuleMTU(self):
|
||||
HOST=self.HostUsername+'@'+self.HostIPAddress
|
||||
response= []
|
||||
tentative = 3
|
||||
while (len(response)==0) and (tentative>0):
|
||||
COMMAND="ip a show dev " + self.UENetwork + " | grep --colour=never mtu"
|
||||
logging.debug(COMMAND)
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
response = ssh.stdout.readlines()
|
||||
tentative-=1
|
||||
time.sleep(10)
|
||||
if (tentative==0) and (len(response)==0):
|
||||
logging.debug('\u001B[1;37;41m Module NIC MTU Not Found! Time expired \u001B[0m')
|
||||
return -1
|
||||
else: #check response
|
||||
result = re.search('mtu (?P<mtu>[0-9]+)', response[0].decode("utf-8") )
|
||||
if result is not None:
|
||||
if (result.group('mtu') is not None) and (str(result.group('mtu'))==str(self.MTU)) :
|
||||
logging.debug('\u001B[1mUE Module NIC MTU is ' + str(self.MTU) + ' as expected\u001B[0m')
|
||||
return 0
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Incorrect Module NIC MTU ' + str(result.group('mtu')) + '! Expected : ' + str(self.MTU) + '\u001B[0m')
|
||||
return -1
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Module NIC MTU Not Found! \u001B[0m')
|
||||
return -1
|
||||
|
||||
def EnableTrace(self):
|
||||
if self.ue_trace=="yes":
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
#delete old artifacts
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5)
|
||||
#start Trace, artifact is created in home dir
|
||||
mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg > /dev/null 2>&1 &','\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
def DisableTrace(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
def DisableCM(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal SIGKILL *'+self.Process['Name']+'*', '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
def LogCollect(self):
|
||||
if self.ue_trace=="yes":
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
|
||||
now=datetime.now()
|
||||
now_string = now.strftime("%Y%m%d-%H%M")
|
||||
source='ci_qlog'
|
||||
destination= self.LogStore + '/ci_qlog_'+now_string+'.zip'
|
||||
#qlog artifact is zipped into the target folder
|
||||
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' > /dev/null 2>&1 &','\$', 10)
|
||||
mySSH.close()
|
||||
#post action : log cleaning to make sure enough space is reserved for the next run
|
||||
Log_Mgt=cls_log_mgt.Log_Mgt(self.HostUsername,self.HostIPAddress, self.HostPassword, self.LogStore)
|
||||
Log_Mgt.LogRotation()
|
||||
else:
|
||||
destination=""
|
||||
return destination
|
||||
@@ -1,84 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
import logging
|
||||
import re
|
||||
import os
|
||||
|
||||
import cls_cmd
|
||||
import cls_oai_html
|
||||
import cls_analysis
|
||||
import constants as CONST
|
||||
|
||||
LOG_PATH_PHYSIM = 'phy_sim_logs'
|
||||
|
||||
class Native():
|
||||
|
||||
def Build(test_case, HTML, host, directory, options):
|
||||
logging.debug(f'Building on server: {host}')
|
||||
HTML.testCase_id = test_case
|
||||
|
||||
with cls_cmd.getConnection(host) as ssh:
|
||||
base = f"{directory}/cmake_targets"
|
||||
ret = ssh.run(f"{base}/build_oai {options} > {base}/log/build_oai.log", timeout=900)
|
||||
success = ret.returncode == 0
|
||||
logs = ssh.run(f"cat {base}/log/build_oai.log", silent=True)
|
||||
logging.debug(f"build finished with code {ret.returncode}, output:\n{logs.stdout}")
|
||||
|
||||
# create log directory, and copy build logs
|
||||
target = f"{base}/build_log_{test_case}/"
|
||||
ssh.run(f"mkdir -p {target}")
|
||||
ssh.run(f"mv {base}/log/* {target}")
|
||||
|
||||
# check if build artifacts are there
|
||||
# NOTE: build_oai should fail with exit code if it could not build, but it does not
|
||||
build_dir = f"{base}/ran_build/build"
|
||||
build_gnb = re.search('--gNB', options) is not None
|
||||
if build_gnb:
|
||||
success = success and ssh.run(f"ls {build_dir}/nr-softmodem").returncode == 0
|
||||
build_enb = re.search('--eNB', options) is not None
|
||||
if build_enb:
|
||||
success = success and ssh.run(f"ls {build_dir}/lte-softmodem").returncode == 0
|
||||
|
||||
if success:
|
||||
logging.info('\u001B[1m Building OAI Pass\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(options, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
logging.error('\u001B[1m Building OAI Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
return success
|
||||
|
||||
def Run_Physim(HTML, host, directory, options, physim_test, threshold):
|
||||
logging.debug(f'Runnin {physim_test} on server: {host}')
|
||||
workSpacePath = f'{directory}/cmake_targets'
|
||||
os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}')
|
||||
runLogFile=f'physim_{HTML.testCase_id}.log'
|
||||
with cls_cmd.getConnection(host) as cmd:
|
||||
cmd.run(f'sudo {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
|
||||
cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}')
|
||||
success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold)
|
||||
if success:
|
||||
HTML.CreateHtmlTestRowQueue(options, 'OK', [msg])
|
||||
else:
|
||||
logging.error(msg)
|
||||
HTML.CreateHtmlTestRowQueue(options, 'KO', [msg])
|
||||
return success
|
||||
@@ -31,12 +31,14 @@
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
import sys # arg
|
||||
import re # reg
|
||||
import fileinput
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
import constants as CONST
|
||||
|
||||
@@ -63,6 +65,10 @@ class HTMLManagement():
|
||||
self.htmlTabIcons = []
|
||||
self.testXMLfiles = []
|
||||
|
||||
self.testUnstable = False
|
||||
self.testMinStableId = '999999'
|
||||
self.testStabilityPointReached = False
|
||||
|
||||
self.htmleNBFailureMsg = ''
|
||||
self.htmlUEFailureMsg = ''
|
||||
|
||||
@@ -78,6 +84,16 @@ class HTMLManagement():
|
||||
self.CpuModel = ['', '']
|
||||
self.CpuMHz = ['', '']
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setters and Getters
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def SethtmlUEConnected(self, nbUEs):
|
||||
if nbUEs > 0:
|
||||
self.htmlUEConnected = nbUEs
|
||||
else:
|
||||
self.htmlUEConnected = 1
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
@@ -85,7 +101,7 @@ class HTMLManagement():
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def CreateHtmlHeader(self):
|
||||
def CreateHtmlHeader(self, ADBIPAddress):
|
||||
if (not self.htmlHeaderCreated):
|
||||
logging.info('\u001B[1m----------------------------------------\u001B[0m')
|
||||
logging.info('\u001B[1m Creating HTML header \u001B[0m')
|
||||
@@ -100,7 +116,7 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>\n')
|
||||
self.htmlFile.write(' <title>Test Results for TEMPLATE_JOB_NAME job build #TEMPLATE_BUILD_ID</title>\n')
|
||||
self.htmlFile.write('</head>\n')
|
||||
self.htmlFile.write('<body><div class="container-fluid" style="margin-left:1em; margin-right:1em">\n')
|
||||
self.htmlFile.write('<body><div class="container">\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
self.htmlFile.write(' <table style="border-collapse: collapse; border: none;">\n')
|
||||
self.htmlFile.write(' <tr style="border-collapse: collapse; border: none;">\n')
|
||||
@@ -147,7 +163,7 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
|
||||
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
if self.ranAllowMerge != '' and self.ranCommitID != 'develop':
|
||||
if self.ranAllowMerge != '':
|
||||
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
|
||||
commit_message = commit_message.strip()
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
@@ -167,6 +183,15 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
|
||||
if (ADBIPAddress != 'none') and (ADBIPAddress != 'modules'):
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_Smartphones) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_CATM_Modules) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
||||
elif (ADBIPAddress == 'modules'):
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 commercial module is connected to CI bench</h2>\n')
|
||||
else:
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 OAI UE(s) is(are) connected to CI bench</h2>\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
self.htmlFile.write(' <ul class="nav nav-pills">\n')
|
||||
count = 0
|
||||
@@ -200,26 +225,36 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <div id="build-tab" class="tab-pane fade">\n')
|
||||
self.htmlFile.write(' <table class="table" border = "1">\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th style="width:5%">Relative Time (s)</th>\n')
|
||||
self.htmlFile.write(' <th style="width:5%">Test Id</th>\n')
|
||||
self.htmlFile.write(' <th>Relative Time (s)</th>\n')
|
||||
self.htmlFile.write(' <th>Test Id</th>\n')
|
||||
self.htmlFile.write(' <th>Test Desc</th>\n')
|
||||
self.htmlFile.write(' <th>Test Options</th>\n')
|
||||
self.htmlFile.write(' <th style="width:5%">Test Status</th>\n')
|
||||
self.htmlFile.write(' <th>Test Status</th>\n')
|
||||
|
||||
self.htmlFile.write(' <th>Info</th>\n')
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
self.htmlFile.write(' <th>UE' + str(i) + ' Status</th>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
self.htmlHeaderCreated = True
|
||||
|
||||
def CreateHtmlTabFooter(self, passStatus):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
testOkEvenIfUnstable = False
|
||||
if self.testUnstable and not passStatus:
|
||||
if self.testStabilityPointReached or self.testMinStableId == '999999':
|
||||
testOkEvenIfUnstable = True
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan="3">Final Tab Status</th>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan=3>Final Tab Status</th>\n')
|
||||
if passStatus:
|
||||
self.htmlFile.write(' <th bgcolor = "green" colspan="3"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "green" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "red" colspan="3"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
if testOkEvenIfUnstable:
|
||||
self.htmlFile.write(' <th bgcolor = "orange" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">KNOWN UNSTABLE SCENARIO <span class="glyphicon glyphicon-exclamation-sign"></span> </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' </div>\n')
|
||||
@@ -229,7 +264,10 @@ class HTMLManagement():
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
if testOkEvenIfUnstable:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-exclamation-sign\"><\/span>/' test_results.html"
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
self.htmlFooterCreated = False
|
||||
|
||||
@@ -249,12 +287,45 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <p></p>\n')
|
||||
self.htmlFile.write(' <table class="table table-condensed">\n')
|
||||
|
||||
machines = [ 'eNB', 'UE' ]
|
||||
for machine in machines:
|
||||
if machine == 'eNB':
|
||||
idx = 0
|
||||
else:
|
||||
idx = 1
|
||||
if self.OsVersion[idx] == '':
|
||||
continue
|
||||
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str(machine) + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.OsVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>Kernel Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.KernelVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>UHD Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UhdVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>USRP Board</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UsrpBoard[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>Nb CPUs</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuNb[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Model Name</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuModel[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Frequency</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuMHz[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan="5" bgcolor = "#33CCFF">Final Status</th>\n')
|
||||
self.htmlFile.write(' <th colspan=5 bgcolor = "#33CCFF">Final Status</th>\n')
|
||||
if passStatus:
|
||||
self.htmlFile.write(' <th colspan="3" bgcolor="green"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span></font></th>\n')
|
||||
self.htmlFile.write(' <th colspan=3 bgcolor="green"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span></font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th colspan="3" bgcolor="red"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' <th colspan=3 bgcolor="red"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' <p></p>\n')
|
||||
@@ -263,6 +334,14 @@ class HTMLManagement():
|
||||
self.htmlFile.write('</html>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlRetrySeparator(self, cntnumfails):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- Try Run #' + str(cntnumfails) + ' ---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlTestRow(self, options, status, processesStatus, machine='eNB'):
|
||||
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
|
||||
return
|
||||
@@ -325,7 +404,7 @@ class HTMLManagement():
|
||||
result = re.search('showed|Reestablishment|Could not copy eNB logfile', self.htmleNBFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'orange'
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan="1"><pre style="background-color:' + cellBgColor + '">' + self.htmleNBFailureMsg + '</pre></td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan=' + str(self.htmlUEConnected) + '><pre style="background-color:' + cellBgColor + '">' + self.htmleNBFailureMsg + '</pre></td>\n')
|
||||
self.htmleNBFailureMsg = ''
|
||||
elif (len(str(self.htmlUEFailureMsg)) > 2):
|
||||
cellBgColor = 'white'
|
||||
@@ -336,10 +415,13 @@ class HTMLManagement():
|
||||
result = re.search('showed|Could not copy UE logfile|oaitun_ue1 interface is either NOT mounted or NOT configured', self.htmlUEFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'orange'
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan="1"><pre style="background-color:' + cellBgColor + '">' + self.htmlUEFailureMsg + '</pre></td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan=' + str(self.htmlUEConnected) + '><pre style="background-color:' + cellBgColor + '">' + self.htmlUEFailureMsg + '</pre></td>\n')
|
||||
self.htmlUEFailureMsg = ''
|
||||
else:
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
@@ -350,7 +432,7 @@ class HTMLManagement():
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
if bool(collectInfo) == False:
|
||||
self.htmlFile.write(' <tr bgcolor = "red" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ----IMAGES BUILDING FAILED - Unable to recover the image logs ---- </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ----IMAGES BUILDING FAILED - Unable to recover the image logs ---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
else:
|
||||
for image in collectInfo:
|
||||
@@ -362,13 +444,13 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <tr bgcolor = "red" >\n')
|
||||
else:
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th colspan="2">Element</th>\n')
|
||||
self.htmlFile.write(' <th>Nb Errors</th>\n')
|
||||
self.htmlFile.write(' <th>Nb Warnings</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">Status</th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>Status</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
for fil in files:
|
||||
@@ -387,11 +469,11 @@ class HTMLManagement():
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(parameters['warnings']) + '</td>\n')
|
||||
if (parameters['errors'] == 0) and (parameters['warnings'] == 0):
|
||||
self.htmlFile.write(' <th colspan="2" bgcolor = "green" ><font color="white">OK </font></th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "green" ><font color="white">OK </font></th>\n')
|
||||
elif (parameters['errors'] == 0):
|
||||
self.htmlFile.write(' <th colspan="2" bgcolor = "orange" ><font color="white">OK </font></th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "orange" ><font color="white">OK </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th colspan="2" bgcolor = "red" > NOT OK </th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "red" > NOT OK </th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
@@ -403,34 +485,28 @@ class HTMLManagement():
|
||||
|
||||
# TabHeader
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ---- ' + DataLog['Title'] + ' ---- </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- ' + DataLog['Title'] + ' ---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">' + DataLog['ColNames'][1] + '</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">'+ DataLog['ColNames'][2] +'</th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>'+ DataLog['ColNames'][2] +'</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
for k in DataLog['Data']:
|
||||
# TestRow
|
||||
avg = DataLog['Data'][k][0]
|
||||
maxval = DataLog['Data'][k][1]
|
||||
count = DataLog['Data'][k][2]
|
||||
valnorm = float(DataLog['Data'][k][3])
|
||||
dev = DataLog['DeviationThreshold'][k]
|
||||
ref = DataLog['Ref'][k]
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td colspan="3" bgcolor = "lightcyan" >' + k + ' </td>\n')
|
||||
self.htmlFile.write(f' <td colspan="2" bgcolor = "lightcyan" >{avg}; {maxval}; {count}</td>\n')
|
||||
if valnorm > 1.0 + dev or valnorm < 1.0 - dev:
|
||||
self.htmlFile.write(f' <th bgcolor = "red" >{valnorm} (Avg over Ref = {avg} over {ref}; max allowed deviation = {dev})</th>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + DataLog['Data'][k][0] + '; ' + DataLog['Data'][k][1] + '; ' + DataLog['Data'][k][2] + ' </td>\n')
|
||||
if float(DataLog['Data'][k][3])> DataLog['Threshold'][k]:
|
||||
self.htmlFile.write(' <th bgcolor = "red" >' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
else:
|
||||
self.htmlFile.write(f' <th bgcolor = "green" ><font color="white">{valnorm} (Avg over Ref = {avg} over {ref}; max allowed deviation = {dev})</font></th>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "green" ><font color="white">' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
|
||||
def CreateHtmlTestRowQueue(self, options, status, infoList):
|
||||
def CreateHtmlTestRowQueue(self, options, status, ue_status, ue_queue):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
currentTime = int(round(time.time() * 1000)) - self.startTime
|
||||
@@ -441,22 +517,25 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <td>' + self.desc + '</td>\n')
|
||||
self.htmlFile.write(' <td>' + str(options) + '</td>\n')
|
||||
if (str(status) == 'OK'):
|
||||
self.htmlFile.write(f' <td bgcolor = "lightgreen" >{status}</td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightgreen" >' + str(status) + '</td>\n')
|
||||
elif (str(status) == 'KO'):
|
||||
self.htmlFile.write(f' <td bgcolor = "lightcoral" >{status}</td>\n')
|
||||
elif str(status) == 'SKIP':
|
||||
self.htmlFile.write(f' <td bgcolor = "lightgray" >{status}</td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
||||
else:
|
||||
addOrangeBK = True
|
||||
self.htmlFile.write(f' <td bgcolor = "orange" >{status}</td>\n')
|
||||
if (addOrangeBK):
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >')
|
||||
else:
|
||||
self.htmlFile.write(' <td>')
|
||||
for i in infoList: # add custom style to have elements side-by-side to reduce need for vertical space
|
||||
self.htmlFile.write(f' <pre style="display: inline flow-root list-item; margin: 0 3px 0 3px; min-width: 24em;">{i}</pre>')
|
||||
|
||||
self.htmlFile.write(' </td>')
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(status) + '</td>\n')
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
if (i < ue_status):
|
||||
if (not ue_queue.empty()):
|
||||
if (addOrangeBK):
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(ue_queue.get()).replace('white', 'orange') + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>' + str(ue_queue.get()) + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
@@ -467,80 +546,80 @@ class HTMLManagement():
|
||||
vId = 0
|
||||
for version in CCR.versions:
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> Results for cppcheck v ' + version + ' </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> Results for cppcheck v ' + version + ' </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> NB ERRORS</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> NB ERRORS</b></td>\n')
|
||||
if CCR.nbErrors[vId] == 0:
|
||||
myColor = 'lightgreen'
|
||||
elif CCR.nbErrors[vId] < 20:
|
||||
myColor = 'orange'
|
||||
else:
|
||||
myColor = 'lightcoral'
|
||||
self.htmlFile.write(' <td colspan="3" bgcolor = "' + myColor + '"><b>' + str(CCR.nbErrors[vId]) + '</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + ' bgcolor = "' + myColor + '"><b>' + str(CCR.nbErrors[vId]) + '</b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> NB WARNINGS</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> NB WARNINGS</b></td>\n')
|
||||
if CCR.nbWarnings[vId] == 0:
|
||||
myColor = 'lightgreen'
|
||||
elif CCR.nbWarnings[vId] < 20:
|
||||
myColor = 'orange'
|
||||
else:
|
||||
myColor = 'lightcoral'
|
||||
self.htmlFile.write(' <td colspan="3" bgcolor = "' + myColor + '"><b>' + str(CCR.nbWarnings[vId]) + '</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + ' bgcolor = "' + myColor + '"><b>' + str(CCR.nbWarnings[vId]) + '</b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"> ----------------- </td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '> ----------------- </td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Memory leak</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbMemLeaks[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Memory leak</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbMemLeaks[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Possible null pointer deference</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbNullPtrs[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Possible null pointer deference</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbNullPtrs[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Uninitialized variable</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbUninitVars[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Uninitialized variable</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbUninitVars[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Undefined behaviour shifting</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbTooManyBitsShift[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Undefined behaviour shifting</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbTooManyBitsShift[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Signed integer overflow</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbIntegerOverflow[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Signed integer overflow</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbIntegerOverflow[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"> </td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '> </td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Printf formatting issues</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbInvalidPrintf[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Printf formatting issues</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbInvalidPrintf[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Modulo result is predetermined</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbModuloAlways[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Modulo result is predetermined</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbModuloAlways[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Opposite Condition -> dead code</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbOppoInnerCondition[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Opposite Condition -> dead code</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbOppoInnerCondition[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Wrong Scanf Nb Args</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbWrongScanfArg[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=2 bgcolor = "lightcyan" ><b> Wrong Scanf Nb Args</b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(2+self.htmlUEConnected) + '>' + str(CCR.nbWrongScanfArg[vId]) + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
vId += 1
|
||||
|
||||
@@ -550,12 +629,12 @@ class HTMLManagement():
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
if bool(testResult) == False and bool(testSummary) == False:
|
||||
self.htmlFile.write(' <tr bgcolor = "red" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ----PHYSIM TESTING FAILED - Unable to recover the test logs ---- </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ----PHYSIM TESTING FAILED - Unable to recover the test logs ---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
else:
|
||||
# Tab header
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ---- PHYSIM TEST SUMMARY---- </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- PHYSIM TEST SUMMARY---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th colspan="2">LogFile Name</th>\n')
|
||||
@@ -573,27 +652,27 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <td gcolor = "lightcyan" >' + str(testSummary['Nbpass']) + ' </td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan="6"><b> ---- PHYSIM TEST DETAIL INFO---- </b></td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- PHYSIM TEST DETAIL INFO---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th colspan="2">Test Name</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">Test Description</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">Result</th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>Result</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
y = ''
|
||||
for key, value in testResult.items():
|
||||
x = key.split(".")
|
||||
if x[0] != y:
|
||||
self.htmlFile.write(' <tr bgcolor = "lightgreen" >\n')
|
||||
self.htmlFile.write(' <td style="text-align: center;" colspan="6"><b>"' + x[0] + '" series </b></td>\n')
|
||||
self.htmlFile.write(' <td style="text-align: center;" colspan=' + str(5+self.htmlUEConnected) + '><b>"' + x[0] + '" series </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
y = x[0]
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + key + ' </td>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + value[0] + '</td>\n')
|
||||
if 'PASS' in value:
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "green" >' + value[1] + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "green" >' + value[1] + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "red" >' + value[1] + '</td>\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(1+self.htmlUEConnected) + ' bgcolor = "red" >' + value[1] + '</td>\n')
|
||||
|
||||
self.htmlFile.close()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
230
ci-scripts/cls_physim.py
Normal file
230
ci-scripts/cls_physim.py
Normal file
@@ -0,0 +1,230 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#to use logging.info()
|
||||
import logging
|
||||
#to create a SSH object locally in the methods
|
||||
import sshconnection
|
||||
#to update the HTML object
|
||||
import cls_oai_html
|
||||
from multiprocessing import SimpleQueue
|
||||
#for log folder maintenance
|
||||
import os
|
||||
|
||||
class PhySim:
|
||||
def __init__(self):
|
||||
self.buildargs = ""
|
||||
self.runargs = ""
|
||||
self.eNBIpAddr = ""
|
||||
self.eNBUserName = ""
|
||||
self.eNBPassWord = ""
|
||||
self.eNBSourceCodePath = ""
|
||||
self.ranRepository = ""
|
||||
self.ranBranch = ""
|
||||
self.ranCommitID= ""
|
||||
self.ranAllowMerge= ""
|
||||
self.ranTargetBranch= ""
|
||||
self.exitStatus=0
|
||||
self.forced_workspace_cleanup=False
|
||||
#private attributes
|
||||
self.__workSpacePath=''
|
||||
self.__buildLogFile='compile_phy_sim.log'
|
||||
self.__runLogFile=''
|
||||
self.__runLogPath='phy_sim_logs'
|
||||
|
||||
|
||||
#-----------------
|
||||
#PRIVATE Methods
|
||||
#-----------------
|
||||
|
||||
def __CheckResults_LDPCTest(self,HTML,CONST,testcase_id):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
#retrieve run log file and store it locally$
|
||||
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.')
|
||||
mySSH.close()
|
||||
#parse results looking for Encoding and Decoding mean values
|
||||
runResults=[]
|
||||
with open(self.__runLogFile) as f:
|
||||
for line in f:
|
||||
if 'mean' in line:
|
||||
runResults.append(line)
|
||||
#the values are appended for each mean value (2), so we take these 2 values from the list
|
||||
info = runResults[0] + runResults[1]
|
||||
|
||||
#once parsed move the local logfile to its folder for tidiness
|
||||
os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
|
||||
|
||||
#updating the HTML with results
|
||||
html_cell = '<pre style="background-color:white">' + info + '</pre>'
|
||||
html_queue=SimpleQueue()
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
||||
return HTML
|
||||
|
||||
def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id):
|
||||
html_queue = SimpleQueue()
|
||||
#retrieve run log file and store it locally
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
filename = self.__workSpacePath + self.__runLogFile
|
||||
ret = mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, filename, '.')
|
||||
if ret != 0:
|
||||
error_msg = f'could not recover test result file {filename}'
|
||||
logging.error(error_msg)
|
||||
html_queue.put(f'<pre style="background-color:white">{error_msg}</pre>')
|
||||
HTML.CreateHtmlTestRowQueue("could not recover results", 'KO', 1, html_queue)
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
PUSCH_OK = False
|
||||
with open(self.__runLogFile) as f:
|
||||
PUSCH_OK = 'PUSCH test OK' in f.read()
|
||||
|
||||
# once parsed move the local logfile to its folder for tidiness
|
||||
os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.')
|
||||
|
||||
#updating the HTML with results
|
||||
if PUSCH_OK:
|
||||
html_queue.put('<pre style="background-color:white">succeeded</pre>')
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
|
||||
else:
|
||||
error_msg = 'error: no "PUSCH test OK"'
|
||||
logging.error(error_msg)
|
||||
html_queue.put(f'<pre style="background-color:white">{error_msg}</pre>')
|
||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, html_queue)
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
def __CheckBuild_PhySim(self, HTML, CONST):
|
||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
#retrieve compile log file and store it locally
|
||||
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.')
|
||||
#delete older run log file
|
||||
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
||||
mySSH.close()
|
||||
#check build result from local compile log file
|
||||
with open(self.__buildLogFile) as f:
|
||||
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
|
||||
self.exitStatus=0
|
||||
return HTML
|
||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
#exitStatus=1 will do a sys.exit in main
|
||||
self.exitStatus = 1
|
||||
return HTML
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def Build_PhySim(self,htmlObj,constObj):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
|
||||
#create working dir
|
||||
mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5)
|
||||
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
||||
|
||||
if not self.ranRepository.lower().endswith('.git'):
|
||||
self.ranRepository+='.git'
|
||||
|
||||
#git clone
|
||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||
#git config
|
||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||
|
||||
#git clean depending on self.forced_workspace_cleanup captured in xml
|
||||
if self.forced_workspace_cleanup==True:
|
||||
logging.info('Cleaning workspace ...')
|
||||
mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
else:
|
||||
logging.info('Workspace cleaning was disabled')
|
||||
|
||||
# if the commit ID is provided, use it to point to it
|
||||
if self.ranCommitID != '':
|
||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||
# if the branch is not develop, then it is a merge request and we need to do
|
||||
# the potential merge. Note that merge conflicts should have already been checked earlier
|
||||
if (self.ranAllowMerge):
|
||||
if self.ranTargetBranch == '':
|
||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
|
||||
else:
|
||||
logging.info('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
|
||||
|
||||
#build
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
mySSH.command('mkdir -p log', '\$', 5)
|
||||
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
|
||||
|
||||
mySSH.close()
|
||||
#check build status and update HTML object
|
||||
lHTML = cls_oai_html.HTMLManagement()
|
||||
lHTML=self.__CheckBuild_PhySim(htmlObj,constObj)
|
||||
return lHTML
|
||||
|
||||
|
||||
def Run_LDPCTest(self,htmlObj,constObj,testcase_id):
|
||||
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
|
||||
#create run logs folder locally
|
||||
os.system('mkdir -p ./'+self.__runLogPath)
|
||||
#log file is tc_<testcase_id>.log remotely
|
||||
self.__runLogFile='physim_'+str(testcase_id)+'.log'
|
||||
#open a session for test run
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
mySSH.command('cd '+self.__workSpacePath,'\$',5)
|
||||
#run and redirect the results to a log file
|
||||
mySSH.command(self.__workSpacePath+'ran_build/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30)
|
||||
mySSH.close()
|
||||
#return updated HTML to main
|
||||
lHTML = cls_oai_html.HTMLManagement()
|
||||
lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id)
|
||||
return lHTML
|
||||
|
||||
def Run_NRulsimTest(self, htmlObj, constObj, testcase_id):
|
||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
||||
os.system(f'mkdir -p ./{self.__runLogPath}')
|
||||
self.__runLogFile = f'physim_{testcase_id}.log'
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
||||
mySSH.command(f'cd {self.__workSpacePath}', '\$', 5)
|
||||
mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30)
|
||||
mySSH.close()
|
||||
#return updated HTML to main
|
||||
lHTML = self.__CheckResults_NRulsimTest(htmlObj, constObj, testcase_id)
|
||||
return lHTML
|
||||
@@ -65,7 +65,7 @@ class PhySim:
|
||||
#PUBLIC Methods$
|
||||
#-----------------$
|
||||
|
||||
def Deploy_PhySim(self, HTML):
|
||||
def Deploy_PhySim(self, HTML, RAN):
|
||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
@@ -106,8 +106,7 @@ class PhySim:
|
||||
if self.ranCommitID != '':
|
||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||
if self.ranAllowMerge:
|
||||
branchName = self.ranBranch.replace('/','-')
|
||||
imageTag = f'{branchName}-{self.ranCommitID[0:8]}'
|
||||
imageTag = f'{self.ranBranch}-{self.ranCommitID[0:8]}'
|
||||
if self.ranTargetBranch == '':
|
||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
|
||||
@@ -115,7 +114,7 @@ class PhySim:
|
||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
|
||||
else:
|
||||
imageTag = f'develop-{self.ranCommitID[0:8]}'
|
||||
imageTag = "develop"
|
||||
|
||||
# logging to OC Cluster and then switch to corresponding project
|
||||
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server https://api.oai.cs.eurecom.fr:6443', '\$', 30)
|
||||
@@ -123,7 +122,8 @@ class PhySim:
|
||||
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
|
||||
return False
|
||||
RAN.prematureExit = True
|
||||
return
|
||||
else:
|
||||
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
|
||||
mySSH.command(f'oc project {ocProjectName}', '\$', 30)
|
||||
@@ -132,12 +132,15 @@ class PhySim:
|
||||
mySSH.command('oc logout', '\$', 30)
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
|
||||
return False
|
||||
RAN.prematureExit = True
|
||||
return
|
||||
else:
|
||||
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
|
||||
|
||||
# Using helm charts deployment
|
||||
mySSH.command(f'helm install physim ./charts/physims/ --set global.image.version={imageTag} --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
|
||||
mySSH.command(f'grep -rl OAICICD_PROJECT ./charts/ | xargs sed -i -e "s#OAICICD_PROJECT#{ocProjectName}#"', '\$', 30)
|
||||
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
|
||||
mySSH.command('helm install physim ./charts/physims/ --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30)
|
||||
if mySSH.getBefore().count('STATUS: deployed') == 0:
|
||||
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
|
||||
mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30)
|
||||
@@ -150,18 +153,19 @@ class PhySim:
|
||||
mySSH.command('oc logout', '\$', 30)
|
||||
mySSH.close()
|
||||
self.AnalyzeLogFile_phySim()
|
||||
return False
|
||||
RAN.prematureExit = True
|
||||
return
|
||||
else:
|
||||
logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m')
|
||||
isRunning = False
|
||||
count = 0
|
||||
# Check whether the containers are in Running state or not under 2 mins
|
||||
while(count < 5 and isRunning == False):
|
||||
while(count < 2 and isRunning == False):
|
||||
time.sleep(60)
|
||||
mySSH.command('oc get pods -o wide -l app=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 30, resync=True)
|
||||
running_count = mySSH.getBefore().count('Running')
|
||||
completed_count = mySSH.getBefore().count('Completed')
|
||||
if (running_count + completed_count) == 23:
|
||||
if (running_count + completed_count) == 21:
|
||||
logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
|
||||
isRunning = True
|
||||
podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore())
|
||||
@@ -181,7 +185,8 @@ class PhySim:
|
||||
mySSH.command('oc logout', '\$', 30)
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL)
|
||||
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||
return False
|
||||
RAN.prematureExit = True
|
||||
return
|
||||
# Waiting to complete the running test
|
||||
count = 0
|
||||
isFinished = False
|
||||
@@ -208,7 +213,7 @@ class PhySim:
|
||||
mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done', '\$', 10)
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/log/physim_test.txt', '.')
|
||||
try:
|
||||
listLogFiles = subprocess.check_output('grep -E --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
|
||||
listLogFiles = subprocess.check_output('egrep --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
|
||||
for line in listLogFiles.split('\n'):
|
||||
res1 = re.search('Linux (?P<pod>oai-[a-zA-Z0-9\-]+) ', str(line))
|
||||
res2 = re.search('Execution Log file = (?P<name>[a-zA-Z0-9\-\/\.\_\+]+)', str(line))
|
||||
@@ -242,13 +247,13 @@ class PhySim:
|
||||
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
|
||||
else:
|
||||
RAN.prematureExit = True
|
||||
if isFinished:
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('Some test(s) timed-out!', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
|
||||
return self.testStatus
|
||||
|
||||
def AnalyzeLogFile_phySim(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
|
||||
@@ -36,13 +36,15 @@ import re # reg
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import time
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
import sshconnection as SSH
|
||||
import helpreadme as HELP
|
||||
import constants as CONST
|
||||
import cls_cmd
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
@@ -93,30 +95,53 @@ class StaticCodeAnalysis():
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('Building on server: ' + lIpAddr)
|
||||
cmd = cls_cmd.getConnection(lIpAddr)
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
|
||||
# on RedHat/CentOS .git extension is mandatory
|
||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||
if result is not None:
|
||||
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||
else:
|
||||
full_ran_repo_name = self.ranRepository + '.git'
|
||||
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||
|
||||
cmd.cd(lSourcePath)
|
||||
logDir = f'{lSourcePath}/cmake_targets/build_log_{self.testCase_id}'
|
||||
cmd.run(f'mkdir -p {logDir}')
|
||||
cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal')
|
||||
cmd.run(f'sed -e "s@xenial@bionic@" {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.xenial > {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.bionic')
|
||||
cmd.run(f'docker build --tag oai-cppcheck:bionic --file {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.bionic . > {logDir}/cppcheck-bionic.txt 2>&1')
|
||||
cmd.run(f'sed -e "s@xenial@focal@" {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.xenial > {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.focal')
|
||||
cmd.run(f'docker build --tag oai-cppcheck:focal --file {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.focal . > {logDir}/cppcheck-focal.txt 2>&1')
|
||||
cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal')
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||
# if the commit ID is provided use it to point to it
|
||||
if self.ranCommitID != '':
|
||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||
# if the branch is not develop, then it is a merge request and we need to do
|
||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||
if (self.ranAllowMerge):
|
||||
if self.ranTargetBranch == '':
|
||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
|
||||
else:
|
||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
|
||||
|
||||
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:focal || true', '\$', 60)
|
||||
mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6)
|
||||
mySSH.command('docker build --tag oai-cppcheck:bionic --file ci-scripts/docker/Dockerfile.cppcheck.bionic . > cmake_targets/log/cppcheck-bionic.txt 2>&1', '\$', 600)
|
||||
mySSH.command('sed -e "s@xenial@focal@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.focal', '\$', 6)
|
||||
mySSH.command('docker build --tag oai-cppcheck:focal --file ci-scripts/docker/Dockerfile.cppcheck.focal . > cmake_targets/log/cppcheck-focal.txt 2>&1', '\$', 600)
|
||||
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:focal || true', '\$', 30)
|
||||
|
||||
# Analyzing the logs
|
||||
cmd.copyin(f'{logDir}/cppcheck-bionic.txt', 'cppcheck-bionic.txt')
|
||||
cmd.copyin(f'{logDir}/cppcheck-focal.txt', 'cppcheck-focal.txt')
|
||||
cmd.close()
|
||||
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.')
|
||||
CCR = CppCheckResults()
|
||||
CCR_ref = CppCheckResults()
|
||||
vId = 0
|
||||
@@ -138,7 +163,7 @@ class StaticCodeAnalysis():
|
||||
xmlStart = False
|
||||
with open('./cppcheck-'+ variant + '.txt', 'r') as logfile:
|
||||
for line in logfile:
|
||||
ret = re.search('cppcheck version="(?P<version>[0-9\.]+)"', str(line))
|
||||
ret = re.search('Unpacking cppcheck \((?P<version>[0-9\.]+)', str(line))
|
||||
if ret is not None:
|
||||
CCR.versions[vId] = ret.group('version')
|
||||
if re.search('RUN cat cmake_targets/log/cppcheck.xml', str(line)) is not None:
|
||||
@@ -211,12 +236,12 @@ class StaticCodeAnalysis():
|
||||
HTML.CreateHtmlTestRowCppCheckResults(CCR)
|
||||
logging.info('\u001B[1m Static Code Analysis Pass\u001B[0m')
|
||||
|
||||
return True
|
||||
return 0
|
||||
|
||||
def LicenceAndFormattingCheck(self, HTML):
|
||||
# Workspace is no longer recreated from scratch.
|
||||
# It implies that this method shall be called last within a build pipeline
|
||||
# where workspace is already created
|
||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lUserName = self.eNBUserName
|
||||
lPassWord = self.eNBPassword
|
||||
@@ -226,30 +251,57 @@ class StaticCodeAnalysis():
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('Building on server: ' + lIpAddr)
|
||||
cmd = cls_cmd.getConnection(lIpAddr)
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
|
||||
check_options = ''
|
||||
if self.ranAllowMerge:
|
||||
check_options = f'--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH={self.ranBranch}'
|
||||
# on RedHat/CentOS .git extension is mandatory
|
||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||
if result is not None:
|
||||
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||
else:
|
||||
full_ran_repo_name = self.ranRepository + '.git'
|
||||
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||
# if the commit ID is provided use it to point to it
|
||||
if self.ranCommitID != '':
|
||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||
# if the branch is not develop, then it is a merge request and we need to do
|
||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||
argToPass = ''
|
||||
if (self.ranAllowMerge):
|
||||
argToPass = '--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH=' + self.ranBranch
|
||||
if self.ranTargetBranch == '':
|
||||
if self.ranBranch != 'develop' and self.ranBranch != 'origin/develop':
|
||||
check_options += ' --build-arg TARGET_BRANCH=develop'
|
||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
|
||||
argToPass += ' --build-arg TARGET_BRANCH=develop '
|
||||
else:
|
||||
check_options += f' --build-arg TARGET_BRANCH={self.ranTargetBranch}'
|
||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
|
||||
argToPass += ' --build-arg TARGET_BRANCH=' + self.ranTargetBranch + ' '
|
||||
|
||||
logDir = f'{lSourcePath}/cmake_targets/build_log_{self.testCase_id}'
|
||||
cmd.run(f'mkdir -p {logDir}')
|
||||
cmd.run('docker image rm oai-formatting-check:latest')
|
||||
cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.bionic {lSourcePath} > {logDir}/oai-formatting-check.txt 2>&1')
|
||||
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
|
||||
mySSH.command('docker build --target oai-formatting-check --tag oai-formatting-check:latest ' + argToPass + '--file ci-scripts/docker/Dockerfile.formatting.bionic . > cmake_targets/log/oai-formatting-check.txt 2>&1', '\$', 600)
|
||||
|
||||
cmd.run('docker image rm oai-formatting-check:latest')
|
||||
cmd.run('docker image prune --force')
|
||||
cmd.run('docker volume prune --force')
|
||||
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
|
||||
mySSH.command('docker image prune --force', '\$', 60)
|
||||
mySSH.command('docker volume prune --force', '\$', 60)
|
||||
|
||||
# Analyzing the logs
|
||||
cmd.copyin(f'{logDir}/oai-formatting-check.txt', 'oai-formatting-check.txt')
|
||||
cmd.close()
|
||||
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.')
|
||||
|
||||
finalStatus = 0
|
||||
if (os.path.isfile('./oai-formatting-check.txt')):
|
||||
@@ -272,7 +324,7 @@ class StaticCodeAnalysis():
|
||||
if re.search('=== Files with incorrect define protection ===', str(line)) is not None:
|
||||
circularHeaderDependency = True
|
||||
if circularHeaderDependency:
|
||||
if re.search('DONE', str(line)) is not None:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
circularHeaderDependency = False
|
||||
elif re.search('Running in|Files with incorrect define protection', str(line)) is not None:
|
||||
pass
|
||||
@@ -282,7 +334,7 @@ class StaticCodeAnalysis():
|
||||
if re.search('=== Files with a GNU GPL licence Banner ===', str(line)) is not None:
|
||||
gnuGplLicence = True
|
||||
if gnuGplLicence:
|
||||
if re.search('DONE', str(line)) is not None:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
gnuGplLicence = False
|
||||
elif re.search('Running in|Files with a GNU GPL licence Banner', str(line)) is not None:
|
||||
pass
|
||||
@@ -292,7 +344,7 @@ class StaticCodeAnalysis():
|
||||
if re.search('=== Files with a suspect Banner ===', str(line)) is not None:
|
||||
suspectLicence = True
|
||||
if suspectLicence:
|
||||
if re.search('DONE', str(line)) is not None:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
suspectLicence = False
|
||||
elif re.search('Running in|Files with a suspect Banner', str(line)) is not None:
|
||||
pass
|
||||
@@ -305,43 +357,63 @@ class StaticCodeAnalysis():
|
||||
if nbFilesNotFormatted == 0:
|
||||
HTML.CreateHtmlTestRow('File(s) Format', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_cell = f'Number of files not following OAI Rules: {nbFilesNotFormatted}\n'
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not following OAI Rules: ' + str(nbFilesNotFormatted) + '\n'
|
||||
for nFile in listFilesNotFormatted:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
HTML.CreateHtmlTestRowQueue('File(s) Format', 'KO', [html_cell])
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('File(s) Format', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
|
||||
logging.debug('header files not respecting the circular dependency protection: ' + str(len(circularHeaderDependencyFiles)))
|
||||
if len(circularHeaderDependencyFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Header Circular Dependency', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_cell = f'Number of files not respecting: {len(circularHeaderDependencyFiles)}\n'
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(circularHeaderDependencyFiles)) + '\n'
|
||||
for nFile in circularHeaderDependencyFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
HTML.CreateHtmlTestRowQueue('Header Circular Dependency', 'KO', [html_cell])
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Header Circular Dependency', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
logging.debug('files with a GNU GPL license: ' + str(len(gnuGplLicenceFiles)))
|
||||
if len(gnuGplLicenceFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Files w/ GNU GPL License', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_cell = f'Number of files not respecting: {len(gnuGplLicenceFiles)}\n'
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(gnuGplLicenceFiles)) + '\n'
|
||||
for nFile in gnuGplLicenceFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
HTML.CreateHtmlTestRowQueue('Files w/ GNU GPL License', 'KO', [html_cell])
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Files w/ GNU GPL License', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
logging.debug('files with a suspect license: ' + str(len(suspectLicenceFiles)))
|
||||
if len(suspectLicenceFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Files with suspect license', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_cell = f'Number of files not respecting: {len(suspectLicenceFiles)}\n'
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(suspectLicenceFiles)) + '\n'
|
||||
for nFile in suspectLicenceFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
HTML.CreateHtmlTestRowQueue('Files with suspect license', 'KO', [html_cell])
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Files with suspect license', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
else:
|
||||
@@ -353,4 +425,4 @@ class StaticCodeAnalysis():
|
||||
HTML.htmleNBFailureMsg = 'Could not access oai-formatting-check.txt file'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
|
||||
return finalStatus == 0
|
||||
return finalStatus
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Colosseum Automated Testing
|
||||
|
||||
These scripts are used by a Jenkins [job](../Jenkinsfile-colosseum) to trigger automated testing of OpenAirInterface (OAI) gNB and softUE on the [Colosseum](https://www.northeastern.edu/colosseum/) Open RAN digital twin.
|
||||
Once a test is triggered, a new OAI LXC container at the specified OAI version will be built on Colosseum (if not already present), and gNB and softUE will perform TCP uplink and downlink connectivity test via the iPerf [tool](https://iperf.fr/).
|
||||
The OAI branch to build and test can be specified through the `eNB_Branch` parameter passed through Jenkins (`eNB_TargetBranch`, which defaults to the `develop` branch, is used if `eNB_Branch` is not specified).
|
||||
The Colosseum network scenario to test is specified through the `Colosseum_Rf_Scenario` Jenkins parameter, which defaults to a base Colosseum scenario without artificially added channel effects (e.g., only hardware impariments of software-defined radios, cables, and channel emulator).
|
||||
|
||||
Once the test ends, results are analyzed through the OAI automated test report generation tool available [here](https://github.com/ztouchnetworks/openairinterface-automated-test-reports), which builds a test report from the iPerf and OAI logs, and marks the test as successful or unsuccessful.
|
||||
Results from successful tests are saved in history files and used to compare more recent tests.
|
||||
A test is considered successful if the downlink throughput achieved during the test is greather than or equal to the average of the test history, which spans successful test executed since May 2024.
|
||||
This is used to identify possible regressions of OAI runs executed on the Colosseum testbed.
|
||||
@@ -29,8 +29,7 @@ Examples:
|
||||
- standard monolithic gNB, 2x2 configuration, with SDAP: `gnb.sa.band78.162prb.usrpn310.2x2-sdap.conf`
|
||||
- gNB-CU: `gnb-cu.sa.f1.conf`
|
||||
- monolithic gNB, L2sim: `gnb.sa.band77.106prb.l2sim.conf`
|
||||
- monolithic eNB: `enb.band7.25prb.usrpb200.conf`
|
||||
- RCC (4G eNB with IF4.5 split): `enb-rcc.band7.25prb.tm1.if4p5.conf`
|
||||
- RCC (4G eNB with IF4.5 split): `enb.band40.25prb.if45.tm1-fairscheduler.conf`
|
||||
|
||||
Notes:
|
||||
- there is no need for TDD/FDD, this is encoded in the band number
|
||||
|
||||
@@ -176,7 +176,12 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ({ ipv4 = "CI_MME_IP_ADDR"; });
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "yes";
|
||||
|
||||
@@ -189,7 +194,9 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1";
|
||||
@@ -118,7 +118,9 @@ gNBs =
|
||||
hoppingId = 40;
|
||||
#p0_nominal = -90;
|
||||
p0_nominal = -118;
|
||||
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1; #0x80;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
@@ -164,7 +166,12 @@ gNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ({ ipv4 "CI_MME_IP_ADDR"; });
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
///X2
|
||||
enable_x2 = "yes";
|
||||
@@ -172,12 +179,19 @@ gNBs =
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
target_enb_x2_ip_address = ({ ipv4 = "127.0.0.1"; });
|
||||
target_enb_x2_ip_address = (
|
||||
{ ipv4 = "127.0.0.1";
|
||||
ipv6 = "192:168:30::17";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24";
|
||||
207
ci-scripts/conf_files/cu.band7.tm1.100PRB.conf
Normal file
207
ci-scripts/conf_files/cu.band7.tm1.100PRB.conf
Normal file
@@ -0,0 +1,207 @@
|
||||
Active_eNBs = ( "eNB-CU-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs = (
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-CU-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } )
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
tr_s_preference = "f1"
|
||||
|
||||
local_s_if_name = "lo";
|
||||
remote_s_address = "127.0.0.3";
|
||||
local_s_address = "127.0.0.4";
|
||||
local_s_portc = 501;
|
||||
remote_s_portc = 500;
|
||||
local_s_portd = 601;
|
||||
remote_s_portd = 600;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNodeB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnable = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff= 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES : {
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level = "info";
|
||||
pdcp_log_level = "info";
|
||||
rrc_log_level = "info";
|
||||
gtp_log_level = "info";
|
||||
};
|
||||
207
ci-scripts/conf_files/cu.band7.tm1.25PRB.conf
Normal file
207
ci-scripts/conf_files/cu.band7.tm1.25PRB.conf
Normal file
@@ -0,0 +1,207 @@
|
||||
Active_eNBs = ( "eNB-CU-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs = (
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-CU-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } )
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
tr_s_preference = "f1"
|
||||
|
||||
local_s_if_name = "lo";
|
||||
remote_s_address = "127.0.0.3";
|
||||
local_s_address = "127.0.0.4";
|
||||
local_s_portc = 501;
|
||||
remote_s_portc = 500;
|
||||
local_s_portd = 601;
|
||||
remote_s_portd = 600;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNodeB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -25;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnable = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff= 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES : {
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level = "info";
|
||||
pdcp_log_level = "info";
|
||||
rrc_log_level = "info";
|
||||
gtp_log_level = "info";
|
||||
};
|
||||
207
ci-scripts/conf_files/cu.band7.tm1.50PRB.conf
Normal file
207
ci-scripts/conf_files/cu.band7.tm1.50PRB.conf
Normal file
@@ -0,0 +1,207 @@
|
||||
Active_eNBs = ( "eNB-CU-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs = (
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-CU-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } )
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
tr_s_preference = "f1"
|
||||
|
||||
local_s_if_name = "lo";
|
||||
remote_s_address = "127.0.0.3";
|
||||
local_s_address = "127.0.0.4";
|
||||
local_s_portc = 501;
|
||||
remote_s_portc = 500;
|
||||
local_s_portd = 601;
|
||||
remote_s_portd = 600;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNodeB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnable = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff= 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = (
|
||||
{
|
||||
ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
port = 36412 ;
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES : {
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level = "info";
|
||||
pdcp_log_level = "info";
|
||||
rrc_log_level = "info";
|
||||
gtp_log_level = "info";
|
||||
};
|
||||
112
ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf
Normal file
112
ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf
Normal file
@@ -0,0 +1,112 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-DU");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_CU_ID = 0xe00;
|
||||
|
||||
eNB_name = "eNB-Eurecom-DU";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } )
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "f1";
|
||||
local_n_if_name = "lo";
|
||||
remote_n_address = "127.0.0.4";
|
||||
local_n_address = "127.0.0.3";
|
||||
local_n_portc = 500;
|
||||
remote_n_portc = 501;
|
||||
local_n_portd = 600;
|
||||
remote_n_portd = 601;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes";
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
att_tx = 10;
|
||||
att_rx = 10;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -29;
|
||||
max_rxgain = 115;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level = "info";
|
||||
hw_log_level = "info";
|
||||
phy_log_level = "info";
|
||||
mac_log_level = "info";
|
||||
rlc_log_level = "info";
|
||||
};
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
# #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user