mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2026-01-16 18:41:17 +00:00
Merge branch 'master' into WIFI-4698
This commit is contained in:
67
.github/workflows/get_redirector_url.yml
vendored
Normal file
67
.github/workflows/get_redirector_url.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Get testbeds current redirector urls
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
testbeds:
|
||||
default: 'basic-01,basic-02,basic-03,basic-04,basic-05,basic-06,basic-07,basic-08'
|
||||
description: 'Testbed(s) to test'
|
||||
required: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
generate-matrix:
|
||||
name: generate testbed matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: generate-matrix
|
||||
id: set-matrix
|
||||
run: |
|
||||
TESTBEDS="${{ github.event.inputs.testbeds || 'basic-01,basic-02,basic-03,basic-04,basic-05,basic-06,basic-07,basic-08' }}"
|
||||
TESTBEDS=$(echo $TESTBEDS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')
|
||||
TESTBEDS=$(echo "$TESTBEDS" | jq -c 'map({"testbed":.})')
|
||||
echo "::set-output name=matrix::{\"include\":${TESTBEDS}}"
|
||||
|
||||
get-redirector-url:
|
||||
needs: [ generate-matrix ]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
steps:
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-testing
|
||||
path: wlan-testing
|
||||
|
||||
- name: checkout pki cert scripts repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-pki-cert-scripts
|
||||
path: wlan-pki-cert-scripts
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y python3-pip
|
||||
pip install paramiko scp
|
||||
|
||||
- name: create configuration.py file
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
|
||||
- name: Get redirector URL
|
||||
env:
|
||||
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
|
||||
run: |
|
||||
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
|
||||
do
|
||||
./wlan-pki-cert-scripts/digicert-get-ap-redirector.sh $id
|
||||
echo "Exit code - $?"
|
||||
done
|
||||
11
.github/workflows/ow_sdk_docker-compose.yml
vendored
Normal file
11
.github/workflows/ow_sdk_docker-compose.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: 2.x SDK testing with Docker Compose deployment
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Run echo
|
||||
run: echo "This is a dummy workflow."
|
||||
221
.github/workflows/uc_sanity.yml
vendored
221
.github/workflows/uc_sanity.yml
vendored
@@ -67,85 +67,6 @@ jobs:
|
||||
- name: push docker image
|
||||
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
|
||||
|
||||
deploy-controller:
|
||||
name: Deploy OpenWIFI Cloud SDK
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
gateway_url: ${{ steps.gateway_url.outputs.value }}
|
||||
sec_url: ${{ steps.sec_url.outputs.value }}
|
||||
namespace: ${{ steps.namespace.outputs.value }}
|
||||
steps:
|
||||
- name: Checkout repo with Helm values
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: Prepare certificates from secrets
|
||||
working-directory: wlan-testing/helm/ucentral
|
||||
run: |
|
||||
echo "${{ secrets.DIGICERT_CERT }}" | base64 -d > cert.pem
|
||||
echo "${{ secrets.DIGICERT_KEY }}" | base64 -d > key.pem
|
||||
|
||||
- name: Fetch kubeconfig
|
||||
run: |
|
||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
|
||||
- name: Set namespace output
|
||||
id: namespace
|
||||
run: echo "::set-output name=value::openwifi-${{ github.run_id }}"
|
||||
|
||||
- name: Set gateway URL output
|
||||
id: gateway_url
|
||||
run: echo "::set-output name=value::gw-${{ github.run_id }}.cicd.lab.wlan.tip.build"
|
||||
|
||||
- name: Set sec service URL output
|
||||
id: sec_url
|
||||
run: echo "::set-output name=value::sec-${{ github.run_id }}.cicd.lab.wlan.tip.build"
|
||||
|
||||
- name: Deploy OpenWIFI Cloud SDK
|
||||
working-directory: wlan-testing/helm/ucentral
|
||||
run: |
|
||||
export NAMESPACE=${{ github.run_id }}
|
||||
export DEPLOY_METHOD=git
|
||||
export CHART_VERSION=v2.2.0-RC1
|
||||
export OWGW_VERSION=v2.2.0-RC1
|
||||
export OWGWUI_VERSION=v2.2.0-RC1
|
||||
export OWSEC_VERSION=v2.2.0-RC1
|
||||
export OWFMS_VERSION=v2.2.0-RC1
|
||||
export OWPROV_VERSION=main
|
||||
export OWPROVUI_VERSION=main
|
||||
export VALUES_FILE_LOCATION=values.ucentral-qa.yaml
|
||||
export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }}
|
||||
export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }}
|
||||
export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }}
|
||||
export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }}
|
||||
export OWFMS_S3_KEY=${{ secrets.UCENTRALFMS_S3_KEY }}
|
||||
export CERT_LOCATION=cert.pem
|
||||
export KEY_LOCATION=key.pem
|
||||
./deploy.sh
|
||||
|
||||
- name: Show resource state on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl get pods --namespace openwifi-${{ github.run_id }}
|
||||
kubectl get services --namespace openwifi-${{ github.run_id }}
|
||||
kubectl get persistentvolumeclaims --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe pods on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe pods --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe services on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe services --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe persistentvolumeclaims on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe persistentvolumeclaims --namespace openwifi-${{ github.run_id }}
|
||||
|
||||
- name: wait for DNS to propagate
|
||||
run: sleep 900
|
||||
|
||||
generate-matrix:
|
||||
name: generate testbed matrix
|
||||
runs-on: ubuntu-latest
|
||||
@@ -160,70 +81,9 @@ jobs:
|
||||
TESTBEDS=$(echo "$TESTBEDS" | jq -c 'map({"testbed":.})')
|
||||
echo "::set-output name=matrix::{\"include\":${TESTBEDS}}"
|
||||
|
||||
set-redirector-url:
|
||||
needs: [ deploy-controller, generate-matrix ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-testing
|
||||
path: wlan-testing
|
||||
ref: WIFI-3620
|
||||
|
||||
- name: checkout pki cert scripts repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-pki-cert-scripts
|
||||
path: wlan-pki-cert-scripts
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y python3-pip
|
||||
pip install paramiko scp allure-pytest
|
||||
|
||||
- name: create configuration.py file
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
|
||||
- name: set redirector URL
|
||||
env:
|
||||
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
|
||||
run: |
|
||||
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
|
||||
do
|
||||
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id "${{ needs.deploy-controller.outputs.gateway_url }}"
|
||||
done
|
||||
|
||||
- name: factory reset APs
|
||||
run: |
|
||||
set -x
|
||||
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
|
||||
for index in $(seq 0 $AP_LEN)
|
||||
do
|
||||
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
|
||||
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
|
||||
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
|
||||
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
|
||||
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
|
||||
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
|
||||
|
||||
cd wlan-testing/tools
|
||||
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
|
||||
cd ../..
|
||||
done
|
||||
|
||||
- name: wait for APs to come up again
|
||||
run: sleep 300
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, generate-matrix, deploy-controller, set-redirector-url ]
|
||||
needs: [ build, generate-matrix ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
@@ -251,8 +111,6 @@ jobs:
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
|
||||
cat configuration.py
|
||||
kubectl create secret generic configuration --from-file=configuration=./configuration.py
|
||||
- name: run sanity tests
|
||||
run: |
|
||||
@@ -423,80 +281,3 @@ jobs:
|
||||
steps:
|
||||
- name: cleanup Docker image
|
||||
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"
|
||||
|
||||
destroy-controller:
|
||||
needs: [ test ]
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- name: Checkout repo with Helm values
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: Fetch kubeconfig
|
||||
run: |
|
||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
|
||||
- name: Delete namespace
|
||||
run: kubectl delete ns --ignore-not-found=true "openwifi-${{ github.run_id }}"
|
||||
|
||||
reset-redirector-url:
|
||||
needs: [ test, generate-matrix ]
|
||||
if: always()
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-testing
|
||||
path: wlan-testing
|
||||
ref: WIFI-3620
|
||||
|
||||
- name: checkout pki cert scripts repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-pki-cert-scripts
|
||||
path: wlan-pki-cert-scripts
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip install paramiko scp allure-pytest
|
||||
|
||||
- name: create configuration.py file
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
|
||||
- name: reset redirector URL
|
||||
env:
|
||||
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
|
||||
run: |
|
||||
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
|
||||
do
|
||||
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id gw-qa01.cicd.lab.wlan.tip.build
|
||||
done
|
||||
|
||||
- name: factory reset APs
|
||||
run: |
|
||||
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
|
||||
for index in $(seq 0 $AP_LEN)
|
||||
do
|
||||
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
|
||||
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
|
||||
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
|
||||
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
|
||||
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
|
||||
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
|
||||
|
||||
cd wlan-testing/tools
|
||||
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
|
||||
cd ../..
|
||||
done
|
||||
|
||||
- name: wait for APs to come up again
|
||||
run: sleep 300
|
||||
|
||||
503
.github/workflows/uc_sanity_dynamic.yml
vendored
Normal file
503
.github/workflows/uc_sanity_dynamic.yml
vendored
Normal file
@@ -0,0 +1,503 @@
|
||||
name: 2.x sanity testing in dynamic environment
|
||||
env:
|
||||
# thirdparties
|
||||
DOCKER_SERVER: tip-tip-wlan-cloud-docker-repo.jfrog.io
|
||||
DOCKER_USER_NAME: wlan-testing-cicd
|
||||
DOCKER_USER_PASSWORD: ${{ secrets.DOCKER_USER_PASSWORD }}
|
||||
# AWS credentials
|
||||
AWS_EKS_NAME: tip-wlan-main
|
||||
AWS_DEFAULT_OUTPUT: json
|
||||
AWS_DEFAULT_REGION: us-east-2
|
||||
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CLIENT_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CLIENT_KEY }}
|
||||
# Cloud SDK certs
|
||||
CACERT: ${{ secrets.CACERT }}
|
||||
CAKEY: ${{ secrets.CAKEY }}
|
||||
ALLURE_CLI_VERSION: 2.14.0
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
testbeds:
|
||||
default: 'basic-01,basic-02,basic-03,basic-04,basic-05,basic-06,basic-07,basic-08'
|
||||
description: 'Testbed(s) to test'
|
||||
required: false
|
||||
marker_expression:
|
||||
default: 'uc_sanity'
|
||||
description: 'Markers expression that will be passed to the pytest command.'
|
||||
required: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# checkout needed repositories
|
||||
- name: Checkout Testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: Checkout LANforge scripts
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-lanforge-scripts
|
||||
repository: Telecominfraproject/wlan-lanforge-scripts
|
||||
|
||||
- name: import LANforge scripts
|
||||
working-directory: wlan-testing
|
||||
run: ./sync_repos.bash
|
||||
|
||||
# build and push docker image
|
||||
- name: docker login
|
||||
run: docker login ${{ env.DOCKER_SERVER }} -u ${{ env.DOCKER_USER_NAME }} -p ${{ env.DOCKER_USER_PASSWORD }}
|
||||
- name: build docker image
|
||||
working-directory: wlan-testing
|
||||
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }} -f docker/Dockerfile .
|
||||
- name: push docker image
|
||||
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
|
||||
|
||||
deploy-controller:
|
||||
name: Deploy OpenWIFI Cloud SDK
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
gateway_url: ${{ steps.gateway_url.outputs.value }}
|
||||
sec_url: ${{ steps.sec_url.outputs.value }}
|
||||
namespace: ${{ steps.namespace.outputs.value }}
|
||||
steps:
|
||||
- name: Checkout repo with Helm values
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: Prepare certificates from secrets
|
||||
working-directory: wlan-testing/helm/ucentral
|
||||
run: |
|
||||
echo "${{ secrets.DIGICERT_CERT }}" | base64 -d > cert.pem
|
||||
echo "${{ secrets.DIGICERT_KEY }}" | base64 -d > key.pem
|
||||
|
||||
- name: Fetch kubeconfig
|
||||
run: |
|
||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
|
||||
- name: Set namespace output
|
||||
id: namespace
|
||||
run: echo "::set-output name=value::openwifi-${{ github.run_id }}"
|
||||
|
||||
- name: Set gateway URL output
|
||||
id: gateway_url
|
||||
run: echo "::set-output name=value::gw-${{ github.run_id }}.cicd.lab.wlan.tip.build"
|
||||
|
||||
- name: Set sec service URL output
|
||||
id: sec_url
|
||||
run: echo "::set-output name=value::sec-${{ github.run_id }}.cicd.lab.wlan.tip.build"
|
||||
|
||||
- name: Deploy OpenWIFI Cloud SDK
|
||||
working-directory: wlan-testing/helm/ucentral
|
||||
run: |
|
||||
export NAMESPACE=${{ github.run_id }}
|
||||
export DEPLOY_METHOD=git
|
||||
export CHART_VERSION=main
|
||||
export OWGW_VERSION=master
|
||||
export OWGWUI_VERSION=main
|
||||
export OWSEC_VERSION=main
|
||||
export OWFMS_VERSION=main
|
||||
export OWPROV_VERSION=main
|
||||
export OWPROVUI_VERSION=main
|
||||
export VALUES_FILE_LOCATION=values.ucentral-qa.yaml
|
||||
export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }}
|
||||
export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }}
|
||||
export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }}
|
||||
export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }}
|
||||
export OWFMS_S3_KEY=${{ secrets.UCENTRALFMS_S3_KEY }}
|
||||
export CERT_LOCATION=cert.pem
|
||||
export KEY_LOCATION=key.pem
|
||||
./deploy.sh
|
||||
|
||||
- name: Show resource state on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl get pods --namespace openwifi-${{ github.run_id }}
|
||||
kubectl get services --namespace openwifi-${{ github.run_id }}
|
||||
kubectl get persistentvolumeclaims --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe pods on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe pods --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe services on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe services --namespace openwifi-${{ github.run_id }}
|
||||
- name: Describe persistentvolumeclaims on deployment failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl describe persistentvolumeclaims --namespace openwifi-${{ github.run_id }}
|
||||
|
||||
generate-matrix:
|
||||
name: generate testbed matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: generate-matrix
|
||||
id: set-matrix
|
||||
run: |
|
||||
TESTBEDS="${{ github.event.inputs.testbeds || 'basic-01,basic-02,basic-03,basic-04,basic-05,basic-06,basic-07,basic-08' }}"
|
||||
TESTBEDS=$(echo $TESTBEDS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')
|
||||
TESTBEDS=$(echo "$TESTBEDS" | jq -c 'map({"testbed":.})')
|
||||
echo "::set-output name=matrix::{\"include\":${TESTBEDS}}"
|
||||
|
||||
set-redirector-url:
|
||||
needs: [ deploy-controller, generate-matrix ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-testing
|
||||
path: wlan-testing
|
||||
ref: WIFI-3620
|
||||
|
||||
- name: checkout pki cert scripts repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-pki-cert-scripts
|
||||
path: wlan-pki-cert-scripts
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y python3-pip
|
||||
pip install paramiko scp allure-pytest
|
||||
|
||||
- name: create configuration.py file
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
|
||||
- name: set redirector URL
|
||||
env:
|
||||
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
|
||||
run: |
|
||||
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
|
||||
do
|
||||
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id "${{ needs.deploy-controller.outputs.gateway_url }}"
|
||||
current_redirector=$(./wlan-pki-cert-scripts/digicert-get-ap-redirector.sh $id)
|
||||
if [[ "$current_redirector" != "${{ needs.deploy-controller.outputs.gateway_url }}" ]]; then
|
||||
echo "Current redirector in DigiCert ($current_redirector) is different from the required one (${{ needs.deploy-controller.outputs.gateway_url }})"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: factory reset APs
|
||||
run: |
|
||||
set -x
|
||||
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
|
||||
for index in $(seq 0 $AP_LEN)
|
||||
do
|
||||
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
|
||||
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
|
||||
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
|
||||
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
|
||||
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
|
||||
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
|
||||
|
||||
cd wlan-testing/tools
|
||||
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
|
||||
cd ../..
|
||||
done
|
||||
|
||||
- name: wait for APs to come up again
|
||||
run: sleep 300
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, generate-matrix, deploy-controller, set-redirector-url ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
steps:
|
||||
- name: get EKS access credentials
|
||||
run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
|
||||
- name: install Allure CLI tool
|
||||
run: |
|
||||
wget https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${{ env.ALLURE_CLI_VERSION }}/allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
|
||||
tar -xzf allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
|
||||
- name: set job name
|
||||
id: job
|
||||
run: echo "::set-output name=name::testing-${{ github.run_number }}"
|
||||
|
||||
- name: prepare namespace
|
||||
id: namespace
|
||||
run: |
|
||||
NAMESPACE="testing-${{ github.run_id }}-${{ matrix.testbed }}"
|
||||
kubectl create ns $NAMESPACE
|
||||
kubectl config set-context --current --namespace=$NAMESPACE
|
||||
echo "::set-output name=name::${NAMESPACE}"
|
||||
- name: create configuration.py secret
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
|
||||
cat configuration.py
|
||||
kubectl create secret generic configuration --from-file=configuration=./configuration.py
|
||||
- name: run sanity tests
|
||||
run: |
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "${{ steps.job.outputs.name }}"
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: tests
|
||||
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -x
|
||||
- -c
|
||||
- |
|
||||
cd tests
|
||||
pytest -m "${{ github.event.inputs.marker_expression || 'uc_sanity' }}" -s -vvv --testbed="${{ matrix.testbed }}" --alluredir=/tmp/allure-results
|
||||
ret=\$?
|
||||
# sleep some time to be able to download the Allure results
|
||||
sleep 60
|
||||
exit \$ret
|
||||
volumeMounts:
|
||||
- name: configuration
|
||||
mountPath: "/wlan-testing/tests/configuration.py"
|
||||
subPath: configuration
|
||||
readOnly: true
|
||||
imagePullSecrets:
|
||||
- name: tip-docker-registry-key
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: configuration
|
||||
secret:
|
||||
secretName: configuration
|
||||
backoffLimit: 0
|
||||
EOF
|
||||
# wait for pod to spawn
|
||||
sleep 1
|
||||
podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///")
|
||||
kubectl wait "pod/$podname" --for condition=ready --timeout=600s
|
||||
kubectl logs -f $podname &
|
||||
#sleep 30 # wait for the pod to come up
|
||||
until [ -s test_everything.xml ]
|
||||
do
|
||||
sleep 10
|
||||
kubectl cp $podname:/wlan-testing/tests/test_everything.xml test_everything.xml >/dev/null 2>&1
|
||||
done
|
||||
echo "tests completed"
|
||||
echo "downloading allure results..."
|
||||
kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
|
||||
echo "waiting for pod to exit"
|
||||
kubectl logs -f $podname >/dev/null 2>&1
|
||||
exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
|
||||
- name: print logs
|
||||
if: always()
|
||||
run: |
|
||||
podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///")
|
||||
kubectl logs $podname
|
||||
- name: upload Allure results as artifact
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: allure-results-${{ matrix.testbed }}
|
||||
path: allure-results
|
||||
|
||||
- name: cleanup
|
||||
if: always()
|
||||
run: |
|
||||
kubectl delete ns "${{ steps.namespace.outputs.name }}" --wait=true
|
||||
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ test, generate-matrix ]
|
||||
if: always()
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
steps:
|
||||
- name: install Allure CLI tool
|
||||
run: |
|
||||
wget https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${{ env.ALLURE_CLI_VERSION }}/allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
|
||||
tar -xzf allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: allure-results-${{ matrix.testbed }}
|
||||
path: allure-results
|
||||
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: get reports branch
|
||||
uses: actions/checkout@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: reports
|
||||
|
||||
- name: copy history into results
|
||||
run: |
|
||||
if [ -e "reports/sanity/${{ matrix.testbed }}/latest" ] ; then
|
||||
cp -r reports/sanity/${{ matrix.testbed }}/latest/history/ allure-results/history
|
||||
fi
|
||||
|
||||
- name: add report metadata
|
||||
run: |
|
||||
cat << EOF >> allure-results/environment.properties
|
||||
Testbed=${{ matrix.testbed }}
|
||||
Tests.CommitId=$(cd wlan-testing && git rev-parse --short HEAD)
|
||||
CiRun.Id=${{ github.run_id }}
|
||||
CiRun.Number=${{ github.run_number }}
|
||||
CiRun.Url=https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
|
||||
EOF
|
||||
|
||||
- name: generate Allure report
|
||||
run: allure-${{ env.ALLURE_CLI_VERSION }}/bin/allure generate
|
||||
|
||||
- name: upload Allure report as artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: allure-report-${{ matrix.testbed }}
|
||||
path: allure-report
|
||||
|
||||
# doing this to be able to aggregate multiple reports together later on
|
||||
- name: copy results into report
|
||||
run: cp -r allure-results allure-report/results
|
||||
|
||||
- name: copy new report
|
||||
if: ${{ (github.event.inputs.marker_expression || 'uc_sanity') == 'uc_sanity' }}
|
||||
run: |
|
||||
mkdir -p reports/sanity/${{ matrix.testbed }}
|
||||
cp -Tr allure-report reports/sanity/${{ matrix.testbed }}/${{ github.run_number }}
|
||||
|
||||
- name: update latest symlink
|
||||
if: ${{ (github.event.inputs.marker_expression || 'uc_sanity') == 'uc_sanity' }}
|
||||
working-directory: reports/sanity/${{ matrix.testbed }}
|
||||
run: ln -fns ${{ github.run_number }} latest
|
||||
|
||||
- name: generate new index.html
|
||||
run: python wlan-testing/.github/tools/generate_directory_index.py -r reports
|
||||
|
||||
- name: commit reports update
|
||||
working-directory: reports
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "Automated deployment: $(date -u)"
|
||||
|
||||
- name: push
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: ad-m/github-push-action@v0.6.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
directory: reports
|
||||
|
||||
delete-docker-image:
|
||||
needs: [ test ]
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- name: cleanup Docker image
|
||||
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"
|
||||
|
||||
destroy-controller:
|
||||
needs: [ test ]
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- name: Checkout repo with Helm values
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: wlan-testing
|
||||
|
||||
- name: Fetch kubeconfig
|
||||
run: |
|
||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
|
||||
- name: Delete namespace
|
||||
run: kubectl delete ns --ignore-not-found=true "openwifi-${{ github.run_id }}"
|
||||
|
||||
reset-redirector-url:
|
||||
needs: [ test, generate-matrix ]
|
||||
if: always()
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: checkout testing repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-testing
|
||||
path: wlan-testing
|
||||
ref: WIFI-3620
|
||||
|
||||
- name: checkout pki cert scripts repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Telecominfraproject/wlan-pki-cert-scripts
|
||||
path: wlan-pki-cert-scripts
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip install paramiko scp allure-pytest
|
||||
|
||||
- name: create configuration.py file
|
||||
run: |
|
||||
cat << EOF > configuration.py
|
||||
${{ secrets.LAB_CONFIGURATION }}
|
||||
EOF
|
||||
|
||||
- name: reset redirector URL
|
||||
env:
|
||||
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
|
||||
run: |
|
||||
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
|
||||
do
|
||||
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id gw-qa01.cicd.lab.wlan.tip.build
|
||||
current_redirector=$(./wlan-pki-cert-scripts/digicert-get-ap-redirector.sh $id)
|
||||
if [[ "$current_redirector" != "gw-qa01.cicd.lab.wlan.tip.build" ]]; then
|
||||
echo "Current redirector in DigiCert ($current_redirector) is different from the required one (gw-qa01.cicd.lab.wlan.tip.build)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: factory reset APs
|
||||
run: |
|
||||
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
|
||||
for index in $(seq 0 $AP_LEN)
|
||||
do
|
||||
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
|
||||
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
|
||||
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
|
||||
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
|
||||
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
|
||||
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
|
||||
|
||||
cd wlan-testing/tools
|
||||
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
|
||||
cd ../..
|
||||
done
|
||||
|
||||
- name: wait for APs to come up again
|
||||
run: sleep 300
|
||||
10
.github/workflows/ucentralgw-qa-deployment.yaml
vendored
10
.github/workflows/ucentralgw-qa-deployment.yaml
vendored
@@ -31,12 +31,12 @@ env:
|
||||
{
|
||||
"namespace": "qa01",
|
||||
"deploy_method": "git",
|
||||
"chart_version": "main",
|
||||
"owgw_version": "master",
|
||||
"owsec_version": "main",
|
||||
"owfms_version": "main",
|
||||
"chart_version": "v2.3.0-RC1",
|
||||
"owgw_version": "v2.3.0-RC1",
|
||||
"owsec_version": "v2.3.0-RC1",
|
||||
"owfms_version": "v2.3.0-RC1",
|
||||
"owprov_version": "main",
|
||||
"owgwui_version": "main",
|
||||
"owgwui_version": "v2.3.0-RC1",
|
||||
"owprovui_version": "main"
|
||||
}
|
||||
]'
|
||||
|
||||
@@ -127,6 +127,7 @@ helm upgrade --install --create-namespace --wait --timeout 20m \
|
||||
--set owprovui.ingresses.default.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=provui-${NAMESPACE}.cicd.lab.wlan.tip.build \
|
||||
--set owprovui.ingresses.default.hosts={provui-${NAMESPACE}.cicd.lab.wlan.tip.build} \
|
||||
--set owprovui.public_env_variables.DEFAULT_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
|
||||
--set clustersysteminfo.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
|
||||
--set-file owgw.certs."restapi-cert\.pem"=$CERT_LOCATION \
|
||||
--set-file owgw.certs."restapi-key\.pem"=$KEY_LOCATION \
|
||||
--set-file owgw.certs."websocket-cert\.pem"=$CERT_LOCATION \
|
||||
|
||||
@@ -9,6 +9,7 @@ owgw:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,17002"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
configProperties:
|
||||
# -> Public part
|
||||
@@ -19,8 +20,13 @@ owgw:
|
||||
storage.type.postgresql.host: owgw-pgsql
|
||||
storage.type.postgresql.database: owgw
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -68,9 +74,15 @@ owsec:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16001,17001"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 15Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -110,6 +122,15 @@ rttys:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "5912,5913"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 15Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
owgwui:
|
||||
services:
|
||||
@@ -126,6 +147,7 @@ owgwui:
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owgwui
|
||||
@@ -134,6 +156,14 @@ owgwui:
|
||||
public_env_variables:
|
||||
ALLOW_UCENTRALSEC_CHANGE: false
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
limits:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
|
||||
owfms:
|
||||
services:
|
||||
owfms:
|
||||
@@ -145,9 +175,15 @@ owfms:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 80Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -185,9 +221,15 @@ owprov:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16005,17005"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -229,6 +271,7 @@ owprovui:
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owprovui
|
||||
@@ -237,6 +280,14 @@ owprovui:
|
||||
public_env_variables:
|
||||
ALLOW_UCENTRALSEC_CHANGE: false
|
||||
|
||||
# resources:
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 30m
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 100m
|
||||
|
||||
kafka:
|
||||
heapOpts: -Xmx512m -Xms512m
|
||||
resources:
|
||||
@@ -245,7 +296,11 @@ kafka:
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 700Mi
|
||||
memory: 1Gi
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 45
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
zookeeper:
|
||||
heapSize: 256
|
||||
resources:
|
||||
@@ -255,3 +310,6 @@ kafka:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 384Mi
|
||||
|
||||
clustersysteminfo:
|
||||
enabled: true
|
||||
|
||||
@@ -9,6 +9,7 @@ owgw:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,17002"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
configProperties:
|
||||
# -> Public part
|
||||
@@ -16,8 +17,13 @@ owgw:
|
||||
# rtty
|
||||
rtty.enabled: "true"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -55,9 +61,15 @@ owsec:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16001,17001"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 15Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -97,6 +109,15 @@ rttys:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "5912,5913"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 15Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
owgwui:
|
||||
services:
|
||||
@@ -113,6 +134,7 @@ owgwui:
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owgwui
|
||||
@@ -121,6 +143,14 @@ owgwui:
|
||||
public_env_variables:
|
||||
ALLOW_UCENTRALSEC_CHANGE: false
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
limits:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
|
||||
owfms:
|
||||
services:
|
||||
owfms:
|
||||
@@ -132,9 +162,15 @@ owfms:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 30Mi
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 80Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -172,9 +208,15 @@ owprov:
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
|
||||
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16005,17005"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
|
||||
public_env_variables:
|
||||
READINESS_METHOD: systeminfo
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
certs:
|
||||
restapi-ca.pem: |
|
||||
@@ -216,6 +258,7 @@ owprovui:
|
||||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285
|
||||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
|
||||
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
paths:
|
||||
- path: /*
|
||||
serviceName: owprovui
|
||||
@@ -224,6 +267,14 @@ owprovui:
|
||||
public_env_variables:
|
||||
ALLOW_UCENTRALSEC_CHANGE: false
|
||||
|
||||
# resources:
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 30m
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 100m
|
||||
|
||||
kafka:
|
||||
heapOpts: -Xmx512m -Xms512m
|
||||
resources:
|
||||
@@ -246,3 +297,6 @@ kafka:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 384Mi
|
||||
|
||||
clustersysteminfo:
|
||||
enabled: true
|
||||
|
||||
@@ -337,8 +337,11 @@ class APNOS:
|
||||
active = output.decode('utf-8').splitlines()[4].split(":")[1].replace(" ", "").replace(",", "")
|
||||
client.close()
|
||||
except Exception as e:
|
||||
pytest.exit("ubus call ucentral status: error" + output)
|
||||
print(e)
|
||||
if output.__contains__(b'"connected":'):
|
||||
pass
|
||||
else:
|
||||
pytest.exit("ubus call ucentral status: error" + str(output))
|
||||
print(e)
|
||||
connected, latest, active = "Error", "Error", "Error"
|
||||
return connected, latest, active
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class ConfigureController:
|
||||
|
||||
class Controller(ConfigureController):
|
||||
"""
|
||||
constructor for cloud_controller_tests library : can be used from pytest framework
|
||||
constructor for cloud_controller_tests library
|
||||
"""
|
||||
|
||||
def __init__(self, controller_data=None, customer_id=None):
|
||||
@@ -275,8 +275,7 @@ class Controller(ConfigureController):
|
||||
|
||||
class ProfileUtility:
|
||||
"""
|
||||
constructor for Access Point Utility library : can be used from pytest framework
|
||||
to control Access Points
|
||||
constructor for Access Point Utility library
|
||||
"""
|
||||
|
||||
def __init__(self, sdk_client=None, controller_data=None, customer_id=None):
|
||||
|
||||
@@ -226,7 +226,7 @@ class FMSUtils:
|
||||
devices = self.get_device_set()
|
||||
model_name = ""
|
||||
for device in devices['deviceTypes']:
|
||||
if str(device).__contains__(model):
|
||||
if str(device).__eq__(model):
|
||||
model_name = device
|
||||
return model_name
|
||||
|
||||
@@ -433,7 +433,7 @@ class UProfileUtility:
|
||||
"band": "5G",
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 80,
|
||||
"channel-width": 160,
|
||||
# "channel": "auto"
|
||||
})
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ from lf_ap_auto_test import ApAutoTest
|
||||
from csv_to_influx import CSVtoInflux
|
||||
from influx2 import RecordInflux
|
||||
from lf_multipsk import MultiPsk
|
||||
from lf_rvr_test import RvrTest
|
||||
|
||||
|
||||
class RunTest:
|
||||
@@ -478,7 +479,7 @@ class RunTest:
|
||||
influx.glob()
|
||||
return self.apstab_obj
|
||||
|
||||
|
||||
|
||||
def ratevsrange(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
||||
upload_rate="0", duration="1m", instance_name="test_demo", raw_lines=None):
|
||||
if mode == "BRIDGE":
|
||||
@@ -763,7 +764,7 @@ if __name__ == '__main__':
|
||||
"influx_tag": ["basic-03", "ec420"],
|
||||
}
|
||||
lanforge_data = {
|
||||
"ip": "192.168.200.80",
|
||||
"ip": "192.168.200.10",
|
||||
"port": 8080,
|
||||
"ssh_port": 22,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
@@ -777,8 +778,20 @@ if __name__ == '__main__':
|
||||
"AX-Station-Name": "ax"
|
||||
}
|
||||
obj = RunTest(lanforge_data=lanforge_data, debug=False, influx_params=influx_params)
|
||||
obj.Client_Connect(ssid="ssid_wpa_5g_br", passkey="something", security="wpa", station_name=['sta0000'])
|
||||
obj.dataplane(station_name=["sta0000"])
|
||||
upstream = lanforge_data['upstream']
|
||||
data = obj.staConnect.json_get("/port/all")
|
||||
for i in data["interfaces"]:
|
||||
if list(i.keys())[0] == "1.1.eth1.10":
|
||||
print(i)
|
||||
# print(dict(list(data['interfaces'])).keys())
|
||||
# print(obj.staConnect.json_get("/port/" + upstream.split(".")[0] +
|
||||
# "/" + upstream.split(".")[1] +
|
||||
# "/" + upstream.split(".")[2] + "/" + "10"))
|
||||
# print("/port/" + upstream.split(".")[0] +
|
||||
# "/" + upstream.split(".")[1] +
|
||||
# "/" + upstream.split(".")[2] + "/" + "100")
|
||||
# obj.Client_Connect(ssid="ssid_wpa_5g_br", passkey="something", security="wpa", station_name=['sta0000'])
|
||||
# obj.dataplane(station_name=["sta0000"])
|
||||
# a = obj.staConnect.json_get("/events/since/")
|
||||
# print(a)
|
||||
# print(obj.eap_connect.json_get("port/1/1/sta0000?fields=ap,ip"))
|
||||
|
||||
@@ -18,7 +18,7 @@ sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity")
|
||||
sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
import allure
|
||||
|
||||
from sta_connect2 import StaConnect2
|
||||
from create_chamberview import CreateChamberview
|
||||
from create_chamberview_dut import DUT
|
||||
import time
|
||||
@@ -88,6 +88,7 @@ class ChamberView:
|
||||
self.exit_on_error = False
|
||||
self.dut_idx_mapping = {}
|
||||
self.ssid_list = []
|
||||
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug)
|
||||
self.raw_line = [
|
||||
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
||||
[2] + ",AUTO -1 NA"],
|
||||
@@ -148,10 +149,17 @@ class ChamberView:
|
||||
return self.CreateChamberview, self.scenario_name
|
||||
|
||||
def add_vlan(self, vlan_ids=[]):
|
||||
data = self.staConnect.json_get("/port/all")
|
||||
flag = 0
|
||||
for vlans in vlan_ids:
|
||||
self.raw_line.append(["profile_link 1.1 " + "vlan-100 1 " + self.upstream_port
|
||||
+ " NA " + self.upstream_port.split(".")[2] + ",AUTO -1 " + str(vlans)])
|
||||
self.Chamber_View()
|
||||
for i in data["interfaces"]:
|
||||
if list(i.keys())[0] != self.upstream_port + "." + str(vlans):
|
||||
flag = 1
|
||||
if flag == 1:
|
||||
for vlans in vlan_ids:
|
||||
self.raw_line.append(["profile_link 1.1 " + "vlan-100 1 " + self.upstream_port
|
||||
+ " NA " + self.upstream_port.split(".")[2] + ",AUTO -1 " + str(vlans)])
|
||||
self.Chamber_View()
|
||||
|
||||
def add_stations(self, band="2G", num_stations="max", dut="NA", ssid_name=[]):
|
||||
idx = 0
|
||||
@@ -281,7 +289,8 @@ class ChamberView:
|
||||
if df.empty == True:
|
||||
return "empty"
|
||||
else:
|
||||
return df
|
||||
result = df.to_string(index=False)
|
||||
return result
|
||||
|
||||
def attach_report_graphs(self, report_name=None, pdf_name="WIFI Capacity Test PDF Report"):
|
||||
relevant_path = "../reports/" + report_name + "/"
|
||||
|
||||
@@ -343,7 +343,7 @@ CONFIGURATION = {
|
||||
}
|
||||
}
|
||||
}, # checked
|
||||
"advanced-02": {
|
||||
"advanced-01": {
|
||||
"controller": {
|
||||
'url':'https://sec-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
|
||||
'username': "tip@ucentral.com",
|
||||
@@ -353,7 +353,7 @@ CONFIGURATION = {
|
||||
{
|
||||
'model': 'eap102',
|
||||
'mode': 'wifi6',
|
||||
'serial': '903cb39d6958',
|
||||
'serial': '903cb3bd7335',
|
||||
'jumphost': True,
|
||||
'ip': "10.28.3.102", # 10.28.3.103
|
||||
'username': "lanforge",
|
||||
@@ -366,13 +366,52 @@ CONFIGURATION = {
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "10.28.3.26",
|
||||
"ip": "10.28.3.24",
|
||||
"port": 8080, # 8080
|
||||
"ssh_port": 22,
|
||||
"2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2","1.1.wiphy4"],
|
||||
"5G-Radio": ["1.1.wiphy1", "1.1.wiphy3", "1.1.wiphy5"],
|
||||
"AX-Radio": [],
|
||||
"upstream": "1.1.eth2",
|
||||
"upstream": "1.1.eth1",
|
||||
"upstream_subnet": "10.28.2.1/24",
|
||||
"uplink": "1.1.eth3",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan0",
|
||||
"AX-Station-Name": "ax"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
"advanced-02": {
|
||||
"controller": {
|
||||
'url':'https://sec-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
|
||||
'username': "tip@ucentral.com",
|
||||
'password': 'openwifi',
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'eap102',
|
||||
'mode': 'wifi6',
|
||||
'serial': '903cb39d6958',
|
||||
'jumphost': True,
|
||||
'ip': "10.28.3.102", # 10.28.3.102
|
||||
'username': "lanforge",
|
||||
'password': "pumpkin77",
|
||||
'port': 8803, # 22
|
||||
'jumphost_tty': '/dev/ttyAP3',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/cig_wf194c/20210729-cig_wf194c-v2.0.0-rc2-02244b8-upgrade.bin"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "10.28.3.26", # 10.28.3.26
|
||||
"port": 8802, # 8080
|
||||
"ssh_port": 8804,
|
||||
"2.4G-Radio": ["1.1.wiphy0", "1.1.wiphy2","1.1.wiphy4"],
|
||||
"5G-Radio": ["1.1.wiphy1", "1.1.wiphy3", "1.1.wiphy5"],
|
||||
"AX-Radio": [],
|
||||
"upstream": "1.1.eth1",
|
||||
"upstream_subnet": "10.28.2.1/24",
|
||||
"uplink": "1.1.eth3",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,10 +47,9 @@ def create_lanforge_chamberview_dut(lf_tools):
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtures_ver,
|
||||
def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtures_ver, reset_scenario_lf,
|
||||
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info):
|
||||
lf_tools.reset_scenario()
|
||||
param = dict(request.param)
|
||||
|
||||
# VLAN Setup
|
||||
@@ -84,8 +83,6 @@ def setup_profiles(request, setup_controller, testbed, get_equipment_ref, fixtur
|
||||
yield return_var
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def station_names_twog(request, get_configuration):
|
||||
station_names = []
|
||||
@@ -101,6 +98,7 @@ def station_names_fiveg(request, get_configuration):
|
||||
station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i))
|
||||
yield station_names
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def station_names_ax(request, get_configuration):
|
||||
station_names = []
|
||||
@@ -108,6 +106,7 @@ def station_names_ax(request, get_configuration):
|
||||
station_names.append(get_configuration["traffic_generator"]["details"]["AX-Station-Name"] + "0" + str(i))
|
||||
yield station_names
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def num_stations(request):
|
||||
num_sta = int(request.config.getini("num_stations"))
|
||||
@@ -131,3 +130,14 @@ def get_vlan_list(get_apnos, get_configuration):
|
||||
vlan_list = list(ap_ssh.get_vlan())
|
||||
vlan_list.sort()
|
||||
yield vlan_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def reset_scenario_lf(request, lf_tools):
|
||||
lf_tools.reset_scenario()
|
||||
|
||||
def teardown_session():
|
||||
lf_tools.reset_scenario()
|
||||
|
||||
request.addfinalizer(teardown_session)
|
||||
yield ""
|
||||
|
||||
@@ -52,7 +52,7 @@ class TestResources(object):
|
||||
class TestFMS(object):
|
||||
|
||||
@pytest.mark.get_firmware_list
|
||||
def test_fms_version_list(self, fixtures_ver, get_configuration):
|
||||
def test_fms_version_list(self, fixtures_ver, get_configuration, get_ap_logs):
|
||||
PASS = []
|
||||
for ap in get_configuration['access_point']:
|
||||
# get the latest branch
|
||||
@@ -135,18 +135,18 @@ class TestFMS(object):
|
||||
assert False not in PASS
|
||||
|
||||
@pytest.mark.firmware_upgrade
|
||||
def test_firmware_upgrade_request(self, firmware_upgrade):
|
||||
def test_firmware_upgrade_request(self, firmware_upgrade, get_ap_logs):
|
||||
for update in firmware_upgrade:
|
||||
allure.attach(name='serial: ' + update[0], body="")
|
||||
assert True
|
||||
|
||||
@pytest.mark.test_firmware_ap
|
||||
def test_firmware_upgrade_status_AP(self, firmware_upgrade):
|
||||
def test_firmware_upgrade_status_AP(self, firmware_upgrade, get_ap_logs):
|
||||
allure.attach(name="firmware Upgrade Status:", body="")
|
||||
assert True
|
||||
|
||||
@pytest.mark.test_firmware_gw
|
||||
def test_firmware_upgrade_status_gateway(self, get_apnos, get_configuration, setup_controller):
|
||||
def test_firmware_upgrade_status_gateway(self, get_apnos, get_configuration, setup_controller, get_ap_logs):
|
||||
status = []
|
||||
for ap in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x")
|
||||
|
||||
Reference in New Issue
Block a user