mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 03:48:09 +00:00
write reservation ID to file (#333)
Signed-off-by: Max Brenner <xamrennerb@gmail.com>
This commit is contained in:
25
.github/workflows/quali-advanced.yml
vendored
25
.github/workflows/quali-advanced.yml
vendored
@@ -116,14 +116,15 @@ jobs:
|
|||||||
run: pip install -r wlan-testing/.quali/requirements.txt
|
run: pip install -r wlan-testing/.quali/requirements.txt
|
||||||
|
|
||||||
- name: start reservation
|
- name: start reservation
|
||||||
id: start
|
|
||||||
run: |
|
run: |
|
||||||
RES_ID=$(python wlan-testing/.quali/start_reservation.py --openwifi-version "${{ needs.vars.outputs.openwifi_revision }}" --ap-model "${{ matrix.ap_model }}" --blueprint "Advance Lab")
|
python wlan-testing/.quali/start_reservation.py --openwifi-version "${{ needs.vars.outputs.openwifi_revision }}" --ap-model "${{ matrix.ap_model }}" --blueprint "Advance Lab"
|
||||||
echo ::set-output name=res_id::"$RES_ID"
|
|
||||||
|
|
||||||
- name: set reservation identifier
|
- name: set reservation outputs
|
||||||
|
if: always()
|
||||||
id: reservation
|
id: reservation
|
||||||
run: echo ::set-output name=identifier::$(echo ${{ steps.start.outputs.res_id }} | cut -d "-" -f 1)
|
run: |
|
||||||
|
echo ::set-output name=identifier::"$(cat ./reservation_id.txt)"
|
||||||
|
echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)"
|
||||||
|
|
||||||
- name: get EKS access credentials
|
- name: get EKS access credentials
|
||||||
run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||||
@@ -151,7 +152,7 @@ jobs:
|
|||||||
Customer = ""
|
Customer = ""
|
||||||
server = ""
|
server = ""
|
||||||
CONFIGURATION = {
|
CONFIGURATION = {
|
||||||
"advanced": $(python wlan-testing/.quali/get_configuration.py ${{ steps.start.outputs.res_id }})
|
"advanced": $(python wlan-testing/.quali/get_configuration.py ${{ steps.reservation.outputs.identifier }})
|
||||||
}
|
}
|
||||||
|
|
||||||
open_flow = {}
|
open_flow = {}
|
||||||
@@ -470,7 +471,7 @@ jobs:
|
|||||||
- -x
|
- -x
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
HOSTS="sec-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build"
|
HOSTS="sec-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build"
|
||||||
for HOST in \$HOSTS; do
|
for HOST in \$HOSTS; do
|
||||||
HOST_ENTRY=""
|
HOST_ENTRY=""
|
||||||
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
||||||
@@ -527,19 +528,19 @@ jobs:
|
|||||||
|
|
||||||
- name: show gw logs
|
- name: show gw logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owgw
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owgw
|
||||||
|
|
||||||
- name: show fms logs
|
- name: show fms logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owfms
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owfms
|
||||||
|
|
||||||
- name: show prov logs
|
- name: show prov logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owprov
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov
|
||||||
|
|
||||||
- name: show sec logs
|
- name: show sec logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owsec
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec
|
||||||
|
|
||||||
- name: upload Allure results as artifact
|
- name: upload Allure results as artifact
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -555,7 +556,7 @@ jobs:
|
|||||||
|
|
||||||
- name: stop reservation
|
- name: stop reservation
|
||||||
if: always()
|
if: always()
|
||||||
run: python wlan-testing/.quali/stop_reservation.py ${{ steps.start.outputs.res_id }}
|
run: python wlan-testing/.quali/stop_reservation.py ${{ steps.reservation.outputs.identifier }}
|
||||||
|
|
||||||
report:
|
report:
|
||||||
needs: [ vars, generate-matrix, test ]
|
needs: [ vars, generate-matrix, test ]
|
||||||
|
|||||||
17
.github/workflows/quali-basic-manual.yml
vendored
17
.github/workflows/quali-basic-manual.yml
vendored
@@ -98,18 +98,19 @@ jobs:
|
|||||||
run: pip install -r .quali/requirements.txt
|
run: pip install -r .quali/requirements.txt
|
||||||
|
|
||||||
- name: start reservation
|
- name: start reservation
|
||||||
id: start
|
|
||||||
env:
|
env:
|
||||||
CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build
|
CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build
|
||||||
CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
|
CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
|
||||||
CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }}
|
CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
RES_ID=$(python .quali/start_reservation.py --openwifi-version "${{ github.event.inputs.openwifi_revision }}" --openwifi-gw-version "${{ github.event.inputs.openwifi_gw_revision }}" --openwifi-sec-version "${{ github.event.inputs.openwifi_sec_revision }}" --openwifi-fms-version "${{ github.event.inputs.openwifi_fms_revision }}" --openwifi-ui-version "${{ github.event.inputs.openwifi_ui_revision }}" --ap-model "${{ github.event.inputs.ap_model }}")
|
python .quali/start_reservation.py --openwifi-version "${{ github.event.inputs.openwifi_revision }}" --openwifi-gw-version "${{ github.event.inputs.openwifi_gw_revision }}" --openwifi-sec-version "${{ github.event.inputs.openwifi_sec_revision }}" --openwifi-fms-version "${{ github.event.inputs.openwifi_fms_revision }}" --openwifi-ui-version "${{ github.event.inputs.openwifi_ui_revision }}" --ap-model "${{ github.event.inputs.ap_model }}"
|
||||||
echo ::set-output name=res_id::"$RES_ID"
|
|
||||||
|
|
||||||
- name: set reservation identifier
|
- name: set reservation outputs
|
||||||
|
if: always()
|
||||||
id: reservation
|
id: reservation
|
||||||
run: echo ::set-output name=identifier::$(echo ${{ steps.start.outputs.res_id }} | cut -d "-" -f 1)
|
run: |
|
||||||
|
echo ::set-output name=identifier::"$(cat ./reservation_id.txt)"
|
||||||
|
echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)"
|
||||||
|
|
||||||
- name: install JRE
|
- name: install JRE
|
||||||
run: |
|
run: |
|
||||||
@@ -157,7 +158,7 @@ jobs:
|
|||||||
Customer = ""
|
Customer = ""
|
||||||
server = ""
|
server = ""
|
||||||
CONFIGURATION = {
|
CONFIGURATION = {
|
||||||
"basic": $(python .quali/get_configuration.py ${{ steps.start.outputs.res_id }})
|
"basic": $(python .quali/get_configuration.py ${{ steps.reservation.outputs.identifier }})
|
||||||
}
|
}
|
||||||
|
|
||||||
open_flow = {}
|
open_flow = {}
|
||||||
@@ -474,7 +475,7 @@ jobs:
|
|||||||
- -x
|
- -x
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
HOSTS="sec-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build"
|
HOSTS="sec-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build"
|
||||||
for HOST in \$HOSTS; do
|
for HOST in \$HOSTS; do
|
||||||
HOST_ENTRY=""
|
HOST_ENTRY=""
|
||||||
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
||||||
@@ -548,7 +549,7 @@ jobs:
|
|||||||
|
|
||||||
- name: stop reservation
|
- name: stop reservation
|
||||||
if: always()
|
if: always()
|
||||||
run: python .quali/stop_reservation.py ${{ steps.start.outputs.res_id }}
|
run: python .quali/stop_reservation.py ${{ steps.reservation.outputs.identifier }}
|
||||||
env:
|
env:
|
||||||
CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build
|
CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build
|
||||||
CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
|
CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
|
||||||
|
|||||||
25
.github/workflows/quali.yml
vendored
25
.github/workflows/quali.yml
vendored
@@ -125,14 +125,15 @@ jobs:
|
|||||||
run: pip install -r .quali/requirements.txt
|
run: pip install -r .quali/requirements.txt
|
||||||
|
|
||||||
- name: start reservation
|
- name: start reservation
|
||||||
id: start
|
|
||||||
run: |
|
run: |
|
||||||
RES_ID=$(python .quali/start_reservation.py --openwifi-version "${{ needs.vars.outputs.openwifi_revision }}" --openwifi-gw-version "${{ needs.vars.outputs.openwifi_gw_revision }}" --openwifi-sec-version "${{ needs.vars.outputs.openwifi_sec_revision }}" --openwifi-fms-version "${{ needs.vars.outputs.openwifi_fms_revision }}" --openwifi-ui-version "${{ needs.vars.outputs.openwifi_ui_revision }}" --ap-model "${{ matrix.ap_model }}")
|
python .quali/start_reservation.py --openwifi-version "${{ needs.vars.outputs.openwifi_revision }}" --openwifi-gw-version "${{ needs.vars.outputs.openwifi_gw_revision }}" --openwifi-sec-version "${{ needs.vars.outputs.openwifi_sec_revision }}" --openwifi-fms-version "${{ needs.vars.outputs.openwifi_fms_revision }}" --openwifi-ui-version "${{ needs.vars.outputs.openwifi_ui_revision }}" --ap-model "${{ matrix.ap_model }}"
|
||||||
echo ::set-output name=res_id::"$RES_ID"
|
|
||||||
|
|
||||||
- name: set reservation identifier
|
- name: set reservation outputs
|
||||||
|
if: always()
|
||||||
id: reservation
|
id: reservation
|
||||||
run: echo ::set-output name=identifier::$(echo ${{ steps.start.outputs.res_id }} | cut -d "-" -f 1)
|
run: |
|
||||||
|
echo ::set-output name=identifier::"$(cat ./reservation_id.txt)"
|
||||||
|
echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)"
|
||||||
|
|
||||||
- name: get EKS access credentials
|
- name: get EKS access credentials
|
||||||
run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||||
@@ -160,7 +161,7 @@ jobs:
|
|||||||
Customer = ""
|
Customer = ""
|
||||||
server = ""
|
server = ""
|
||||||
CONFIGURATION = {
|
CONFIGURATION = {
|
||||||
"basic": $(python .quali/get_configuration.py ${{ steps.start.outputs.res_id }})
|
"basic": $(python .quali/get_configuration.py ${{ steps.reservation.outputs.identifier }})
|
||||||
}
|
}
|
||||||
|
|
||||||
open_flow = {}
|
open_flow = {}
|
||||||
@@ -496,7 +497,7 @@ jobs:
|
|||||||
- -x
|
- -x
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
HOSTS="sec-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.identifier }}.cicd.lab.wlan.tip.build"
|
HOSTS="sec-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build gw-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build fms-${{ steps.reservation.outputs.namespace }}.cicd.lab.wlan.tip.build"
|
||||||
for HOST in \$HOSTS; do
|
for HOST in \$HOSTS; do
|
||||||
HOST_ENTRY=""
|
HOST_ENTRY=""
|
||||||
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
until [[ ! -z "\$HOST_ENTRY" ]]; do sleep 1; HOST_ENTRY=\$(getent hosts \$HOST); done;
|
||||||
@@ -553,19 +554,19 @@ jobs:
|
|||||||
|
|
||||||
- name: show gw logs
|
- name: show gw logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owgw
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owgw
|
||||||
|
|
||||||
- name: show fms logs
|
- name: show fms logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owfms
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owfms
|
||||||
|
|
||||||
- name: show prov logs
|
- name: show prov logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owprov
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov
|
||||||
|
|
||||||
- name: show sec logs
|
- name: show sec logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owsec
|
run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec
|
||||||
|
|
||||||
- name: upload Allure results as artifact
|
- name: upload Allure results as artifact
|
||||||
if: always()
|
if: always()
|
||||||
@@ -581,7 +582,7 @@ jobs:
|
|||||||
|
|
||||||
- name: stop reservation
|
- name: stop reservation
|
||||||
if: always()
|
if: always()
|
||||||
run: python .quali/stop_reservation.py ${{ steps.start.outputs.res_id }}
|
run: python .quali/stop_reservation.py ${{ steps.reservation.outputs.identifier }}
|
||||||
|
|
||||||
report:
|
report:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ def main():
|
|||||||
parser.add_argument('--ap-model', default='[Any]')
|
parser.add_argument('--ap-model', default='[Any]')
|
||||||
parser.add_argument('--wifi-type', default='[Any]')
|
parser.add_argument('--wifi-type', default='[Any]')
|
||||||
parser.add_argument('--blueprint', default='Basic Lab')
|
parser.add_argument('--blueprint', default='Basic Lab')
|
||||||
|
parser.add_argument('--reservation-id-file', default='./reservation_id.txt')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
session = get_session()
|
session = get_session()
|
||||||
@@ -44,7 +45,8 @@ def main():
|
|||||||
]
|
]
|
||||||
).Reservation
|
).Reservation
|
||||||
|
|
||||||
print(reservation.Id)
|
with open(args.reservation_id_file, 'w') as f:
|
||||||
|
f.write(reservation.Id)
|
||||||
|
|
||||||
wait_for_provisioning_status(session, reservation.Id, 'Ready')
|
wait_for_provisioning_status(session, reservation.Id, 'Ready')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user