mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-03 20:38:05 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/Telecominfraproject/wlan-testing into WIFI-6758-scrolling-api-is-not-working-with-iphone-7
This commit is contained in:
		@@ -57,9 +57,6 @@ runs:
 | 
				
			|||||||
      cat << EOF >> "${{ inputs.results_path }}/environment.properties"
 | 
					      cat << EOF >> "${{ inputs.results_path }}/environment.properties"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      Tests.CommitId=${{ github.sha }}
 | 
					      Tests.CommitId=${{ github.sha }}
 | 
				
			||||||
      CiRun.Id=${{ github.run_id }}
 | 
					 | 
				
			||||||
      CiRun.Number=${{ github.run_number }}
 | 
					 | 
				
			||||||
      CiRun.Url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
 | 
					 | 
				
			||||||
      EOF
 | 
					      EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - name: generate Allure report
 | 
					  - name: generate Allure report
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								.github/actions/run-tests/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/actions/run-tests/action.yml
									
									
									
									
										vendored
									
									
								
							@@ -50,6 +50,8 @@ runs:
 | 
				
			|||||||
  - name: run tests
 | 
					  - name: run tests
 | 
				
			||||||
    shell: bash
 | 
					    shell: bash
 | 
				
			||||||
    run: |
 | 
					    run: |
 | 
				
			||||||
 | 
					      set -x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      cat <<EOF | kubectl apply -f -
 | 
					      cat <<EOF | kubectl apply -f -
 | 
				
			||||||
      apiVersion: batch/v1
 | 
					      apiVersion: batch/v1
 | 
				
			||||||
      kind: Job
 | 
					      kind: Job
 | 
				
			||||||
@@ -73,7 +75,6 @@ runs:
 | 
				
			|||||||
                  cpu: "250m"
 | 
					                  cpu: "250m"
 | 
				
			||||||
              command:
 | 
					              command:
 | 
				
			||||||
                - /bin/bash
 | 
					                - /bin/bash
 | 
				
			||||||
                - -x
 | 
					 | 
				
			||||||
                - -c
 | 
					                - -c
 | 
				
			||||||
                - |
 | 
					                - |
 | 
				
			||||||
                  cd tests
 | 
					                  cd tests
 | 
				
			||||||
@@ -120,7 +121,9 @@ runs:
 | 
				
			|||||||
      kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					      kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
      echo "waiting for pod to exit"
 | 
					      echo "waiting for pod to exit"
 | 
				
			||||||
      kubectl logs -f $podname >/dev/null 2>&1
 | 
					      kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
      exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					      until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					      exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - name: upload Allure results as artifact
 | 
					  - name: upload Allure results as artifact
 | 
				
			||||||
    if: ${{ always() }}
 | 
					    if: ${{ always() }}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								.github/workflows/advanced.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/advanced.yml
									
									
									
									
										vendored
									
									
								
							@@ -104,7 +104,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
@@ -151,7 +150,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: upload Allure results as artifact
 | 
					    - name: upload Allure results as artifact
 | 
				
			||||||
      if: ${{ always() }}
 | 
					      if: ${{ always() }}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										18
									
								
								.github/workflows/interop.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/interop.yml
									
									
									
									
										vendored
									
									
								
							@@ -38,7 +38,7 @@ jobs:
 | 
				
			|||||||
  test-galaxy-s9:
 | 
					  test-galaxy-s9:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ build ]
 | 
					    needs: [ build ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -50,7 +50,7 @@ jobs:
 | 
				
			|||||||
      with:
 | 
					      with:
 | 
				
			||||||
        namespace: interop-${{ github.run_id }}-galaxy-s9
 | 
					        namespace: interop-${{ github.run_id }}-galaxy-s9
 | 
				
			||||||
        testbed: interop-01
 | 
					        testbed: interop-01
 | 
				
			||||||
        marker_expression: "interop_uc_sanity and client_connect and android"
 | 
					        marker_expression: "interop_uc_sanity and client_connect and android and not wpa3_personal"
 | 
				
			||||||
        configuration: "${{ secrets.LAB_CONFIGURATION }}"
 | 
					        configuration: "${{ secrets.LAB_CONFIGURATION }}"
 | 
				
			||||||
        testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }}
 | 
					        testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }}
 | 
				
			||||||
        additional_args: "-o model-android='Galaxy S9' -o 'jobName=Github-Interop-galaxy-s9' -o 'jobNumber=${{ github.run_number }}' --skip-lanforge"
 | 
					        additional_args: "-o model-android='Galaxy S9' -o 'jobName=Github-Interop-galaxy-s9' -o 'jobNumber=${{ github.run_number }}' --skip-lanforge"
 | 
				
			||||||
@@ -59,7 +59,7 @@ jobs:
 | 
				
			|||||||
  test-iphone-12:
 | 
					  test-iphone-12:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ test-galaxy-s9 ]
 | 
					    needs: [ test-galaxy-s9 ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -80,7 +80,7 @@ jobs:
 | 
				
			|||||||
  test-pixel-4:
 | 
					  test-pixel-4:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ test-iphone-12 ]
 | 
					    needs: [ test-iphone-12 ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -102,7 +102,7 @@ jobs:
 | 
				
			|||||||
  test-galaxy-s10:
 | 
					  test-galaxy-s10:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ build ]
 | 
					    needs: [ build ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -123,7 +123,7 @@ jobs:
 | 
				
			|||||||
  test-iphone-7:
 | 
					  test-iphone-7:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ test-galaxy-s10 ]
 | 
					    needs: [ test-galaxy-s10 ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -144,7 +144,7 @@ jobs:
 | 
				
			|||||||
  test-iphone-11:
 | 
					  test-iphone-11:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ test-iphone-7 ]
 | 
					    needs: [ test-iphone-7 ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -166,7 +166,7 @@ jobs:
 | 
				
			|||||||
  test-galaxy-s20:
 | 
					  test-galaxy-s20:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ build ]
 | 
					    needs: [ build ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -187,7 +187,7 @@ jobs:
 | 
				
			|||||||
  test-iphone-xr:
 | 
					  test-iphone-xr:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    needs: [ test-galaxy-s20 ]
 | 
					    needs: [ test-galaxy-s20 ]
 | 
				
			||||||
    continue-on-error: true
 | 
					    if: always()
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								.github/workflows/manual.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/manual.yml
									
									
									
									
										vendored
									
									
								
							@@ -72,6 +72,7 @@ jobs:
 | 
				
			|||||||
  test:
 | 
					  test:
 | 
				
			||||||
    runs-on: [ self-hosted, small ]
 | 
					    runs-on: [ self-hosted, small ]
 | 
				
			||||||
    needs: [ build ]
 | 
					    needs: [ build ]
 | 
				
			||||||
 | 
					    timeout-minutes: 1440
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: install JRE
 | 
					    - name: install JRE
 | 
				
			||||||
@@ -143,7 +144,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
@@ -187,7 +187,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: upload Allure results as artifact
 | 
					    - name: upload Allure results as artifact
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								.github/workflows/ow_docker-compose.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/ow_docker-compose.yml
									
									
									
									
										vendored
									
									
								
							@@ -385,7 +385,6 @@ jobs:
 | 
				
			|||||||
        EOF
 | 
					        EOF
 | 
				
			||||||
        sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
 | 
					        sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
 | 
				
			||||||
        sed -i -r "s/'password': ('|\")openwifi('|\")/'password': '"${{ secrets.OWSEC_NEW_PASSWORD }}"'/" configuration.py
 | 
					        sed -i -r "s/'password': ('|\")openwifi('|\")/'password': '"${{ secrets.OWSEC_NEW_PASSWORD }}"'/" configuration.py
 | 
				
			||||||
        cat configuration.py
 | 
					 | 
				
			||||||
        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
					        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: run tests
 | 
					    - name: run tests
 | 
				
			||||||
@@ -413,7 +412,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
@@ -458,7 +456,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: print logs
 | 
					    - name: print logs
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								.github/workflows/performance.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/performance.yml
									
									
									
									
										vendored
									
									
								
							@@ -114,7 +114,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
@@ -159,7 +158,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: print logs
 | 
					    - name: print logs
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								.github/workflows/quali-advanced.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/quali-advanced.yml
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,7 @@ on:
 | 
				
			|||||||
        description: 'revision of the Open Wifi Helm chart'
 | 
					        description: 'revision of the Open Wifi Helm chart'
 | 
				
			||||||
      ap_models:
 | 
					      ap_models:
 | 
				
			||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        default: 'EAP102,cig_wf194c'
 | 
					        default: 'edgecore_eap102,cig_wf194c4'
 | 
				
			||||||
        description: 'the AP models to test'
 | 
					        description: 'the AP models to test'
 | 
				
			||||||
      ap_version:
 | 
					      ap_version:
 | 
				
			||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
@@ -43,7 +43,7 @@ jobs:
 | 
				
			|||||||
        id: vars
 | 
					        id: vars
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          echo ::set-output name=openwifi::$(echo "${{ github.event.inputs.openwifi_revision || 'main' }}")
 | 
					          echo ::set-output name=openwifi::$(echo "${{ github.event.inputs.openwifi_revision || 'main' }}")
 | 
				
			||||||
          echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'EAP102,cig_wf194c' }}")
 | 
					          echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf194c4' }}")
 | 
				
			||||||
          echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}")
 | 
					          echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}")
 | 
				
			||||||
          echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'advance' }}")
 | 
					          echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'advance' }}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -117,7 +117,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - name: start reservation
 | 
					    - name: start reservation
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        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 --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}"}' --reservation-duration 720 "Advance Lab"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: set reservation outputs
 | 
					    - name: set reservation outputs
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
@@ -267,8 +267,6 @@ jobs:
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        EOF
 | 
					        EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cat configuration.py
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
					        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: run tests
 | 
					    - name: run tests
 | 
				
			||||||
@@ -296,7 +294,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    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"
 | 
					                    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"
 | 
				
			||||||
@@ -352,7 +349,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: show gw logs
 | 
					    - name: show gw logs
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								.github/workflows/quali-basic-manual.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/quali-basic-manual.yml
									
									
									
									
										vendored
									
									
								
							@@ -23,22 +23,6 @@ on:
 | 
				
			|||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        default: 'main'
 | 
					        default: 'main'
 | 
				
			||||||
        description: 'revision of the Open Wifi Helm chart'
 | 
					        description: 'revision of the Open Wifi Helm chart'
 | 
				
			||||||
      openwifi_gw_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'master'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi gateway service'
 | 
					 | 
				
			||||||
      openwifi_sec_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi security service'
 | 
					 | 
				
			||||||
      openwifi_fms_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi fms service'
 | 
					 | 
				
			||||||
      openwifi_ui_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi UI'
 | 
					 | 
				
			||||||
      ap_model:
 | 
					      ap_model:
 | 
				
			||||||
        description: 'AP model to test, one of edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4'
 | 
					        description: 'AP model to test, one of edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4'
 | 
				
			||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
@@ -86,6 +70,7 @@ jobs:
 | 
				
			|||||||
  test:
 | 
					  test:
 | 
				
			||||||
    runs-on: [ self-hosted, small ]
 | 
					    runs-on: [ self-hosted, small ]
 | 
				
			||||||
    needs: [ build ]
 | 
					    needs: [ build ]
 | 
				
			||||||
 | 
					    timeout-minutes: 1440
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v2
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
@@ -103,7 +88,7 @@ jobs:
 | 
				
			|||||||
        CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
 | 
					        CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }}
 | 
				
			||||||
        CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }}
 | 
					        CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        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 --global-inputs '{"Chart Version":"${{ github.event.inputs.openwifi_revision }}","AP Model":"${{ github.event.inputs.ap_model }}"}' "Basic Lab"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: set reservation outputs
 | 
					    - name: set reservation outputs
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
@@ -283,7 +268,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    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"
 | 
					                    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"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										79
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										79
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							@@ -20,22 +20,6 @@ on:
 | 
				
			|||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        default: 'main'
 | 
					        default: 'main'
 | 
				
			||||||
        description: 'revision of the Open Wifi Helm chart'
 | 
					        description: 'revision of the Open Wifi Helm chart'
 | 
				
			||||||
      openwifi_gw_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'master'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi gateway service'
 | 
					 | 
				
			||||||
      openwifi_sec_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi security service'
 | 
					 | 
				
			||||||
      openwifi_fms_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi fms service'
 | 
					 | 
				
			||||||
      openwifi_ui_revision:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
        default: 'main'
 | 
					 | 
				
			||||||
        description: 'revision of the Open Wifi UI'
 | 
					 | 
				
			||||||
      ap_models:
 | 
					      ap_models:
 | 
				
			||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        default: 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4'
 | 
					        default: 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4'
 | 
				
			||||||
@@ -48,6 +32,11 @@ on:
 | 
				
			|||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        default: 'uc_sanity'
 | 
					        default: 'uc_sanity'
 | 
				
			||||||
        description: 'Marker expression to select tests to execute'
 | 
					        description: 'Marker expression to select tests to execute'
 | 
				
			||||||
 | 
					      use_qa01:
 | 
				
			||||||
 | 
					        type: boolean
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					        default: 'true'
 | 
				
			||||||
 | 
					        description: 'Use openwifi-qa01 instead of dynamic cloud controller'
 | 
				
			||||||
  schedule:
 | 
					  schedule:
 | 
				
			||||||
  - cron: '30 20 * * *'
 | 
					  - cron: '30 20 * * *'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,26 +45,20 @@ jobs:
 | 
				
			|||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    outputs:
 | 
					    outputs:
 | 
				
			||||||
      openwifi_revision: ${{ steps.vars.outputs.openwifi}}
 | 
					      openwifi_revision: ${{ steps.vars.outputs.openwifi}}
 | 
				
			||||||
      openwifi_gw_revision: ${{ steps.vars.outputs.gw}}
 | 
					 | 
				
			||||||
      openwifi_sec_revision: ${{ steps.vars.outputs.sec}}
 | 
					 | 
				
			||||||
      openwifi_fms_revision: ${{ steps.vars.outputs.fms}}
 | 
					 | 
				
			||||||
      openwifi_ui_revision: ${{ steps.vars.outputs.ui}}
 | 
					 | 
				
			||||||
      ap_models: ${{ steps.vars.outputs.ap_models}}
 | 
					      ap_models: ${{ steps.vars.outputs.ap_models}}
 | 
				
			||||||
      ap_version: ${{ steps.vars.outputs.ap_version}}
 | 
					      ap_version: ${{ steps.vars.outputs.ap_version}}
 | 
				
			||||||
      marker_expression: ${{ steps.vars.outputs.marker_expression }}
 | 
					      marker_expression: ${{ steps.vars.outputs.marker_expression }}
 | 
				
			||||||
 | 
					      use_qa01: ${{ steps.vars.outputs.use_qa01 }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: set variables
 | 
					      - name: set variables
 | 
				
			||||||
        id: vars
 | 
					        id: vars
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          echo ::set-output name=openwifi::$(echo "${{ github.event.inputs.openwifi_revision || 'v2.4.0-RC3' }}")
 | 
					          echo ::set-output name=openwifi::$(echo "${{ github.event.inputs.openwifi_revision || 'main' }}")
 | 
				
			||||||
          echo ::set-output name=gw::$(echo "${{ github.event.inputs.openwifi_gw_revision || 'v2.4.0-RC3' }}")
 | 
					 | 
				
			||||||
          echo ::set-output name=sec::$(echo "${{ github.event.inputs.openwifi_sec_revision || 'v2.4.0-RC2' }}")
 | 
					 | 
				
			||||||
          echo ::set-output name=fms::$(echo "${{ github.event.inputs.openwifi_fms_revision || 'v2.4.0-RC2' }}")
 | 
					 | 
				
			||||||
          echo ::set-output name=ui::$(echo "${{ github.event.inputs.openwifi_ui_revision || 'v2.4.0-RC2' }}")
 | 
					 | 
				
			||||||
          echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4' }}")
 | 
					          echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4' }}")
 | 
				
			||||||
          echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}")
 | 
					          echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}")
 | 
				
			||||||
          echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'uc_sanity' }}")
 | 
					          echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'uc_sanity' }}")
 | 
				
			||||||
 | 
					          echo ::set-output name=use_qa01::$(echo "${{ github.event.inputs.use_qa01 || 'true' }}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  generate-matrix:
 | 
					  generate-matrix:
 | 
				
			||||||
    name: generate AP model matrix
 | 
					    name: generate AP model matrix
 | 
				
			||||||
@@ -126,14 +109,24 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - name: start reservation
 | 
					    - name: start reservation
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        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 }}"
 | 
					        if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ]
 | 
				
			||||||
 | 
					        then
 | 
				
			||||||
 | 
					          python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}","Optional Existing SDK Namespace":"qa01"}' "Basic Lab"
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}"}' "Basic Lab"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: set reservation outputs
 | 
					    - name: set reservation outputs
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
      id: reservation
 | 
					      id: reservation
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo ::set-output name=identifier::"$(cat ./reservation_id.txt)"
 | 
					        echo ::set-output name=identifier::"$(cat ./reservation_id.txt)"
 | 
				
			||||||
        echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)"
 | 
					        if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ]
 | 
				
			||||||
 | 
					        then
 | 
				
			||||||
 | 
					          echo ::set-output name=namespace::"qa01"
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - 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 }}
 | 
				
			||||||
@@ -184,6 +177,24 @@ jobs:
 | 
				
			|||||||
            "pk_password": "whatever"
 | 
					            "pk_password": "whatever"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					        DYNAMIC_VLAN_RADIUS_SERVER_DATA = {
 | 
				
			||||||
 | 
					          "ip": "3.20.165.131",
 | 
				
			||||||
 | 
					          "port": 1812,
 | 
				
			||||||
 | 
					          "secret": "testing123",
 | 
				
			||||||
 | 
					          "user": "user",
 | 
				
			||||||
 | 
					          "password": "password",
 | 
				
			||||||
 | 
					          "pk_password": "whatever"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = {
 | 
				
			||||||
 | 
					            "ip": "3.20.165.131",
 | 
				
			||||||
 | 
					            "port": 1813,
 | 
				
			||||||
 | 
					            "secret": "testing123",
 | 
				
			||||||
 | 
					            "user": "user",
 | 
				
			||||||
 | 
					            "password": "password",
 | 
				
			||||||
 | 
					            "pk_password": "whatever"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        PASSPOINT_RADIUS_SERVER_DATA = {
 | 
					        PASSPOINT_RADIUS_SERVER_DATA = {
 | 
				
			||||||
            "ip": "52.234.179.191",
 | 
					            "ip": "52.234.179.191",
 | 
				
			||||||
            "port": 11812,
 | 
					            "port": 11812,
 | 
				
			||||||
@@ -276,12 +287,19 @@ jobs:
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        EOF
 | 
					        EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cat configuration.py
 | 
					
 | 
				
			||||||
 | 
					        # fix wrong configuration value from Quali
 | 
				
			||||||
 | 
					        if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ]
 | 
				
			||||||
 | 
					        then
 | 
				
			||||||
 | 
					          sed -i "s/https:\/\/sec-.*\.cicd\.lab\.wlan\.tip\.build/https:\/\/sec-qa01.cicd.lab.wlan.tip.build/g" configuration.py
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
					        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: run tests
 | 
					    - name: run tests
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
 | 
					        set -x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cat <<EOF | kubectl apply -f -
 | 
					        cat <<EOF | kubectl apply -f -
 | 
				
			||||||
        apiVersion: batch/v1
 | 
					        apiVersion: batch/v1
 | 
				
			||||||
        kind: Job
 | 
					        kind: Job
 | 
				
			||||||
@@ -305,7 +323,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    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"
 | 
					                    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"
 | 
				
			||||||
@@ -361,7 +378,9 @@ jobs:
 | 
				
			|||||||
        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
					        kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1
 | 
				
			||||||
        echo "waiting for pod to exit"
 | 
					        echo "waiting for pod to exit"
 | 
				
			||||||
        kubectl logs -f $podname >/dev/null 2>&1
 | 
					        kubectl logs -f $podname >/dev/null 2>&1
 | 
				
			||||||
        exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}")
 | 
					
 | 
				
			||||||
 | 
					        until [[ ! -z "$EXIT_CODE" ]]; do EXIT_CODE=$(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}"); sleep 1; done;
 | 
				
			||||||
 | 
					        exit $EXIT_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: show gw logs
 | 
					    - name: show gw logs
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										52
									
								
								.github/workflows/uc_loadsim.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										52
									
								
								.github/workflows/uc_loadsim.yml
									
									
									
									
										vendored
									
									
								
							@@ -23,10 +23,6 @@ defaults:
 | 
				
			|||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  loadsim:
 | 
					  loadsim:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    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:
 | 
					    steps:
 | 
				
			||||||
    - name: Checkout Testing repo
 | 
					    - name: Checkout Testing repo
 | 
				
			||||||
      uses: actions/checkout@v2
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
@@ -42,19 +38,19 @@ jobs:
 | 
				
			|||||||
        NAMESPACE="ls-${{ github.run_number }}"
 | 
					        NAMESPACE="ls-${{ github.run_number }}"
 | 
				
			||||||
        kubectl create ns $NAMESPACE
 | 
					        kubectl create ns $NAMESPACE
 | 
				
			||||||
        kubectl config set-context --current --namespace=$NAMESPACE
 | 
					        kubectl config set-context --current --namespace=$NAMESPACE
 | 
				
			||||||
        echo "::set-output name=name::${NAMESPACE}"
 | 
					        echo "::set-output name=namespace::${NAMESPACE}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Set gateway URL output
 | 
					    - name: Set gateway URL output
 | 
				
			||||||
      id: gateway_url
 | 
					      id: gateway
 | 
				
			||||||
      run: echo "::set-output name=name::gw-${{ steps.namespace.outputs.name }}.cicd.lab.wlan.tip.build"
 | 
					      run: echo "::set-output name=url::gw-${{ steps.namespace.outputs.namespace }}.cicd.lab.wlan.tip.build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Set sec service URL output
 | 
					    - name: Set sec service URL output
 | 
				
			||||||
      id: sec_url
 | 
					      id: sec
 | 
				
			||||||
      run: echo "::set-output name=value::sec-${{ steps.namespace.outputs.name }}.cicd.lab.wlan.tip.build"
 | 
					      run: echo "::set-output name=url::sec-${{ steps.namespace.outputs.namespace }}.cicd.lab.wlan.tip.build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Set ls service URL output
 | 
					    - name: Set ls service URL output
 | 
				
			||||||
      id: ls_url
 | 
					      id: ls
 | 
				
			||||||
      run: echo "::set-output name=value::ls-${{ steps.namespace.outputs.name }}.cicd.lab.wlan.tip.build"
 | 
					      run: echo "::set-output name=url::ls-${{ steps.namespace.outputs.namespace }}.cicd.lab.wlan.tip.build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Prepare certificates from secrets
 | 
					    - name: Prepare certificates from secrets
 | 
				
			||||||
      working-directory: wlan-testing/helm/ucentral
 | 
					      working-directory: wlan-testing/helm/ucentral
 | 
				
			||||||
@@ -67,7 +63,7 @@ jobs:
 | 
				
			|||||||
    - name: Deploy CloudSDK instance with load simulator
 | 
					    - name: Deploy CloudSDK instance with load simulator
 | 
				
			||||||
      working-directory: wlan-testing/helm/ucentral
 | 
					      working-directory: wlan-testing/helm/ucentral
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        export NAMESPACE="openwifi-${{ steps.namespace.outputs.name }}"
 | 
					        export NAMESPACE="${{ steps.namespace.outputs.namespace }}"
 | 
				
			||||||
        export DEPLOY_METHOD=git
 | 
					        export DEPLOY_METHOD=git
 | 
				
			||||||
        export CHART_VERSION="${{ github.event.inputs.sdk_version }}"
 | 
					        export CHART_VERSION="${{ github.event.inputs.sdk_version }}"
 | 
				
			||||||
        export OWGW_VERSION=master
 | 
					        export OWGW_VERSION=master
 | 
				
			||||||
@@ -89,9 +85,6 @@ jobs:
 | 
				
			|||||||
        export OWSEC_NEW_PASSWORD=${{ secrets.OWSEC_NEW_PASSWORD }}
 | 
					        export OWSEC_NEW_PASSWORD=${{ secrets.OWSEC_NEW_PASSWORD }}
 | 
				
			||||||
        ./deploy.sh
 | 
					        ./deploy.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Wait for DNS to propagate
 | 
					 | 
				
			||||||
      run: sleep 300
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Checkout OWLS for CLI tool
 | 
					    - name: Checkout OWLS for CLI tool
 | 
				
			||||||
      uses: actions/checkout@v2
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
@@ -101,20 +94,21 @@ jobs:
 | 
				
			|||||||
    - name: Run simulation
 | 
					    - name: Run simulation
 | 
				
			||||||
      working-directory: wlan-cloud-owls/test_scripts/curl
 | 
					      working-directory: wlan-cloud-owls/test_scripts/curl
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        export OWGW="${{ steps.gw_url.ouputs.name }}:15002"
 | 
					        export OWGW="${{ steps.gateway.outputs.url }}:15002"
 | 
				
			||||||
        export OWSEC="${{ steps.sec_url.ouputs.name }}:16001"
 | 
					        export OWSEC="${{ steps.sec.outputs.url }}:16001"
 | 
				
			||||||
        export OWLS="${{ steps.ls_url.output.name }}:16007"
 | 
					        export OWLS="${{ steps.ls.outputs.url }}:16007"
 | 
				
			||||||
 | 
					        echo "OWGW - $OWGW"
 | 
				
			||||||
 | 
					        echo "OWSEC - $OWSEC"
 | 
				
			||||||
 | 
					        echo "OWLS - $OWLS"
 | 
				
			||||||
        curl -s -X POST -H 'Content-Type: application/json' https://$OWSEC/api/v1/oauth2 -d '{"userId": "tip@ucentral.com", "password": "'${{ secrets.OWSEC_NEW_PASSWORD }}'"}' | jq '.access_token' -r > access_token
 | 
					        curl -s -X POST -H 'Content-Type: application/json' https://$OWSEC/api/v1/oauth2 -d '{"userId": "tip@ucentral.com", "password": "'${{ secrets.OWSEC_NEW_PASSWORD }}'"}' | jq '.access_token' -r > access_token
 | 
				
			||||||
        echo
 | 
					        echo
 | 
				
			||||||
        echo "[Info] Creating simulation"
 | 
					        echo "[Info] Creating simulation"
 | 
				
			||||||
        cat > input_sim_info.json <<EOF
 | 
					        cat > input_sim_info.json <<EOF
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "name":"${{ steps.namespace.outputs.name }}",
 | 
					          "name":"${{ steps.namespace.outputs.namespace }}",
 | 
				
			||||||
          "deviceType":"edgecore_ecw5410",
 | 
					          "deviceType":"edgecore_ecw5410",
 | 
				
			||||||
          "devices":5,
 | 
					          "devices":5,
 | 
				
			||||||
          "gateway":"https://$OWGW",
 | 
					          "gateway":"https://$OWGW",
 | 
				
			||||||
          "certificate":"cert",
 | 
					 | 
				
			||||||
          "key":"key",
 | 
					 | 
				
			||||||
          "macPrefix":"030000",
 | 
					          "macPrefix":"030000",
 | 
				
			||||||
          "simulationLength":600
 | 
					          "simulationLength":600
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -140,24 +134,24 @@ jobs:
 | 
				
			|||||||
    - name: Show resource state on deployment failure
 | 
					    - name: Show resource state on deployment failure
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        kubectl get pods --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl get pods --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
        kubectl get services --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl get services --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
        kubectl get persistentvolumeclaims --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl get persistentvolumeclaims --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
    - name: Describe pods on deployment failure
 | 
					    - name: Describe pods on deployment failure
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        kubectl describe pods --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl describe pods --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
    - name: Describe services on deployment failure
 | 
					    - name: Describe services on deployment failure
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        kubectl describe services --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl describe services --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
    - name: Describe persistentvolumeclaims on deployment failure
 | 
					    - name: Describe persistentvolumeclaims on deployment failure
 | 
				
			||||||
      if: failure()
 | 
					      if: failure()
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        kubectl describe persistentvolumeclaims --namespace openwifi-${{ steps.namespace.outputs.name }}
 | 
					        kubectl describe persistentvolumeclaims --namespace openwifi-${{ steps.namespace.outputs.namespace }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Cleanup
 | 
					    - name: Cleanup
 | 
				
			||||||
      if: always()
 | 
					      if: always()
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        helm delete -n openwifi-${{ steps.namespace.outputs.name }} tip-openwifi || true
 | 
					        helm delete -n openwifi-${{ steps.namespace.outputs.namespace }} tip-openwifi || true
 | 
				
			||||||
        kubectl delete ns "${{ steps.namespace.outputs.name }}" --wait=true
 | 
					        kubectl delete ns openwifi-"${{ steps.namespace.outputs.namespace }}" --wait=true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								.github/workflows/uc_sanity.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/uc_sanity.yml
									
									
									
									
										vendored
									
									
								
							@@ -136,7 +136,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/uc_sanity_dynamic.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/uc_sanity_dynamic.yml
									
									
									
									
										vendored
									
									
								
							@@ -253,7 +253,6 @@ jobs:
 | 
				
			|||||||
        EOF
 | 
					        EOF
 | 
				
			||||||
        sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
 | 
					        sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
 | 
				
			||||||
        sed -i -r "s/'password': ('|\")openwifi('|\")/'password': '"${{ secrets.OWSEC_NEW_PASSWORD }}"'/" configuration.py
 | 
					        sed -i -r "s/'password': ('|\")openwifi('|\")/'password': '"${{ secrets.OWSEC_NEW_PASSWORD }}"'/" configuration.py
 | 
				
			||||||
        cat configuration.py
 | 
					 | 
				
			||||||
        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
					        kubectl create secret generic configuration --from-file=configuration=./configuration.py
 | 
				
			||||||
    - name: run sanity tests
 | 
					    - name: run sanity tests
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
@@ -280,7 +279,6 @@ jobs:
 | 
				
			|||||||
                    cpu: "250m"
 | 
					                    cpu: "250m"
 | 
				
			||||||
                command:
 | 
					                command:
 | 
				
			||||||
                  - /bin/bash
 | 
					                  - /bin/bash
 | 
				
			||||||
                  - -x
 | 
					 | 
				
			||||||
                  - -c
 | 
					                  - -c
 | 
				
			||||||
                  - |
 | 
					                  - |
 | 
				
			||||||
                    cd tests
 | 
					                    cd tests
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								.github/workflows/ucentralgw-dev-deployment.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/ucentralgw-dev-deployment.yaml
									
									
									
									
										vendored
									
									
								
							@@ -31,12 +31,12 @@ env:
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      "namespace": "dev01",
 | 
					      "namespace": "dev01",
 | 
				
			||||||
      "deploy_method": "git",
 | 
					      "deploy_method": "git",
 | 
				
			||||||
      "chart_version": "v2.4.0",
 | 
					      "chart_version": "main",
 | 
				
			||||||
      "owgw_version": "v2.4.0",
 | 
					      "owgw_version": "master",
 | 
				
			||||||
      "owsec_version": "v2.4.0",
 | 
					      "owsec_version": "main",
 | 
				
			||||||
      "owfms_version": "v2.4.0",
 | 
					      "owfms_version": "main",
 | 
				
			||||||
      "owprov_version": "main",
 | 
					      "owprov_version": "main",
 | 
				
			||||||
      "owgwui_version": "v2.4.0",
 | 
					      "owgwui_version": "main",
 | 
				
			||||||
      "owprovui_version": "main"
 | 
					      "owprovui_version": "main"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]'
 | 
					  ]'
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								.github/workflows/ucentralgw-qa-deployment.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/ucentralgw-qa-deployment.yaml
									
									
									
									
										vendored
									
									
								
							@@ -31,12 +31,12 @@ env:
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      "namespace": "qa01",
 | 
					      "namespace": "qa01",
 | 
				
			||||||
      "deploy_method": "git",
 | 
					      "deploy_method": "git",
 | 
				
			||||||
      "chart_version": "v2.4.0",
 | 
					      "chart_version": "main",
 | 
				
			||||||
      "owgw_version": "v2.4.0",
 | 
					      "owgw_version": "master",
 | 
				
			||||||
      "owsec_version": "v2.4.0",
 | 
					      "owsec_version": "main",
 | 
				
			||||||
      "owfms_version": "v2.4.0",
 | 
					      "owfms_version": "main",
 | 
				
			||||||
      "owprov_version": "main",
 | 
					      "owprov_version": "main",
 | 
				
			||||||
      "owgwui_version": "v2.4.0",
 | 
					      "owgwui_version": "main",
 | 
				
			||||||
      "owprovui_version": "main"
 | 
					      "owprovui_version": "main"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]'
 | 
					  ]'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,23 +12,30 @@ def get_session() -> CloudShellAPISession:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return CloudShellAPISession(url, user, password, "Global")
 | 
					    return CloudShellAPISession(url, user, password, "Global")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def __wait_for_status(session, res_id, field, target_status):
 | 
					def __wait_for_status(session, res_id, field, target_statuses=[], exit_statuses=[]):
 | 
				
			||||||
    timer = 0
 | 
					    timer = 0
 | 
				
			||||||
    sleep_time = 5
 | 
					    sleep_time = 5
 | 
				
			||||||
    while True:
 | 
					    while True:
 | 
				
			||||||
        status = session.GetReservationStatus(res_id).ReservationSlimStatus.__dict__[field]
 | 
					        status = session.GetReservationStatus(res_id).ReservationSlimStatus.__dict__[field]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if status == target_status:
 | 
					        if status in target_statuses:
 | 
				
			||||||
 | 
					            print(f'reached target status: {status}')
 | 
				
			||||||
            break
 | 
					            break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if status in exit_statuses:
 | 
				
			||||||
 | 
					            print(f'reached exit status: {status}')
 | 
				
			||||||
 | 
					            exit(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        print(f'current reservation status: {status}')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if timer >= TIMEOUT:
 | 
					        if timer >= TIMEOUT:
 | 
				
			||||||
            raise RuntimeError(f'waiting for reservation to reach status {target_status} timed out')
 | 
					            raise RuntimeError(f'waiting for reservation to reach one of {target_statuses} or {exit_statuses} statuses timed out')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        time.sleep(sleep_time)
 | 
					        time.sleep(sleep_time)
 | 
				
			||||||
        timer += sleep_time
 | 
					        timer += sleep_time
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def wait_for_provisioning_status(session, res_id, target_status):
 | 
					def wait_for_provisioning_status(session, res_id, target_statuses, exit_statuses=[]):
 | 
				
			||||||
    __wait_for_status(session, res_id, 'ProvisioningStatus', target_status)
 | 
					    __wait_for_status(session, res_id, 'ProvisioningStatus', target_statuses, exit_statuses)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def wait_for_reservation_status(session, res_id, target_status):
 | 
					def wait_for_reservation_status(session, res_id, target_statuses, exit_statuses=[]):
 | 
				
			||||||
    __wait_for_status(session, res_id, 'Status', target_status)
 | 
					    __wait_for_status(session, res_id, 'Status', target_statuses, exit_statuses)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					import json
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from cloudshell.api.cloudshell_api import UpdateTopologyGlobalInputsRequest
 | 
					from cloudshell.api.cloudshell_api import UpdateTopologyGlobalInputsRequest
 | 
				
			||||||
@@ -6,49 +7,40 @@ import argparse
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from common import wait_for_provisioning_status, get_session
 | 
					from common import wait_for_provisioning_status, get_session
 | 
				
			||||||
 | 
					
 | 
				
			||||||
run_id = os.environ.get('GITHUB_RUN_NUMBER', 1)
 | 
					run_number = os.environ.get('GITHUB_RUN_NUMBER', 1)
 | 
				
			||||||
 | 
					run_id = os.environ.get('GITHUB_JOB', 'job')
 | 
				
			||||||
 | 
					workflow = os.environ.get('GITHUB_WORKFLOW', "workflow")
 | 
				
			||||||
marker_expression = os.environ.get('MARKER_EXPRESSION', 'sanity') 
 | 
					marker_expression = os.environ.get('MARKER_EXPRESSION', 'sanity') 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
    parser = argparse.ArgumentParser()
 | 
					    parser = argparse.ArgumentParser()
 | 
				
			||||||
    parser.add_argument('--openwifi-version', default='main')
 | 
					    parser.add_argument('--global-inputs', help="JSON dictionary that contains global inputs that will be passed to Quali", default="{}")
 | 
				
			||||||
    parser.add_argument('--openwifi-gw-version', default='master')
 | 
					    parser.add_argument('--reservation-duration', help='duration of reservation', default=360)
 | 
				
			||||||
    parser.add_argument('--openwifi-sec-version', default='main')
 | 
					    parser.add_argument('--reservation-id-file', help='file that the reservation ID will be written to', default='./reservation_id.txt')
 | 
				
			||||||
    parser.add_argument('--openwifi-fms-version', default='main')
 | 
					    parser.add_argument('blueprint', help='name of blueprint to create reservation from')
 | 
				
			||||||
    parser.add_argument('--openwifi-ui-version', default='main')
 | 
					 | 
				
			||||||
    parser.add_argument('--ap-model', default='[Any]')
 | 
					 | 
				
			||||||
    parser.add_argument('--wifi-type', default='[Any]')
 | 
					 | 
				
			||||||
    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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if marker_expression == 'advance':
 | 
					    global_inputs = {}
 | 
				
			||||||
        reservation_duration = 720
 | 
					    try:
 | 
				
			||||||
    else:
 | 
					        global_inputs = json.loads(args.global_inputs)
 | 
				
			||||||
        reservation_duration = 360
 | 
					    except json.JSONDecodeError as e:
 | 
				
			||||||
 | 
					        print(f'failed to decode global inputs: {e}')
 | 
				
			||||||
 | 
					        exit(1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    reservation = session.CreateImmediateTopologyReservation(
 | 
					    reservation = session.CreateImmediateTopologyReservation(
 | 
				
			||||||
        reservationName=f'{marker_expression}-{run_id}',
 | 
					        reservationName=f'{workflow}/{run_number}/{run_id}',
 | 
				
			||||||
        owner=session.username,
 | 
					        owner=session.username,
 | 
				
			||||||
        durationInMinutes=reservation_duration,
 | 
					        durationInMinutes=args.reservation_duration,
 | 
				
			||||||
        topologyFullPath=args.blueprint,
 | 
					        topologyFullPath=args.blueprint,
 | 
				
			||||||
        globalInputs=[
 | 
					        globalInputs=[UpdateTopologyGlobalInputsRequest(key, value) for key, value in global_inputs.items()]
 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('Chart Version', args.openwifi_version),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('owgw Version', args.openwifi_gw_version),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('owsec Version', args.openwifi_sec_version),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('owfms Version', args.openwifi_fms_version),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('owgwui Version', args.openwifi_ui_version),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('AP Model', args.ap_model),
 | 
					 | 
				
			||||||
            UpdateTopologyGlobalInputsRequest('Wifi type', args.wifi_type),
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
    ).Reservation
 | 
					    ).Reservation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    with open(args.reservation_id_file, 'w') as f:
 | 
					    with open(args.reservation_id_file, 'w') as f:
 | 
				
			||||||
        f.write(reservation.Id)
 | 
					        f.write(reservation.Id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wait_for_provisioning_status(session, reservation.Id, 'Ready')
 | 
					    wait_for_provisioning_status(session, reservation.Id, ['Ready'], ['Teardown'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    main()
 | 
					    main()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@ def main():
 | 
				
			|||||||
    session = get_session()
 | 
					    session = get_session()
 | 
				
			||||||
    res_id = sys.argv[1]
 | 
					    res_id = sys.argv[1]
 | 
				
			||||||
    session.EndReservation(res_id)
 | 
					    session.EndReservation(res_id)
 | 
				
			||||||
    wait_for_reservation_status(session, res_id, 'Completed')
 | 
					    wait_for_reservation_status(session, res_id, ['Completed'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    main()
 | 
					    main()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,37 +145,37 @@ helm upgrade --install --create-namespace --wait --timeout 60m \
 | 
				
			|||||||
  --set owgw.configProperties."openwifi\.fileuploader\.host\.0\.name"=gw-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owgw.configProperties."openwifi\.fileuploader\.host\.0\.name"=gw-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owgw.configProperties."rtty\.server"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owgw.configProperties."rtty\.server"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owgw.configProperties."openwifi\.system\.uri\.public"=https://gw-${NAMESPACE}.cicd.lab.wlan.tip.build:16002 \
 | 
					  --set owgw.configProperties."openwifi\.system\.uri\.public"=https://gw-${NAMESPACE}.cicd.lab.wlan.tip.build:16002 \
 | 
				
			||||||
  --set owgw.configProperties."openwifi\.system\.uri\.private"=https://gw-${NAMESPACE}.cicd.lab.wlan.tip.build:17002 \
 | 
					  --set owgw.configProperties."openwifi\.system\.uri\.private"=https://owgw-owgw:17002 \
 | 
				
			||||||
  --set owgw.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owgw.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owgw.configProperties."rtty\.token"=${RTTY_TOKEN} \
 | 
					  --set owgw.configProperties."rtty\.token"=${RTTY_TOKEN} \
 | 
				
			||||||
  --set owgw.public_env_variables.OWSEC=owsec-pwsec:16001 \
 | 
					  --set owgw.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set owsec.configProperties."authentication\.default\.username"=${OWGW_AUTH_USERNAME} \
 | 
					  --set owsec.configProperties."authentication\.default\.username"=${OWGW_AUTH_USERNAME} \
 | 
				
			||||||
  --set owsec.configProperties."authentication\.default\.password"=${OWGW_AUTH_PASSWORD} \
 | 
					  --set owsec.configProperties."authentication\.default\.password"=${OWGW_AUTH_PASSWORD} \
 | 
				
			||||||
  --set owsec.services.owsec.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=sec-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owsec.services.owsec.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=sec-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owsec.configProperties."openwifi\.system\.uri\.public"=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
					  --set owsec.configProperties."openwifi\.system\.uri\.public"=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set owsec.configProperties."openwifi\.system\.uri\.private"=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:17001 \
 | 
					  --set owsec.configProperties."openwifi\.system\.uri\.private"=https://owsec-owsec:17001 \
 | 
				
			||||||
  --set owsec.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owsec.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owfms.configProperties."s3\.secret"=${OWFMS_S3_SECRET} \
 | 
					  --set owfms.configProperties."s3\.secret"=${OWFMS_S3_SECRET} \
 | 
				
			||||||
  --set owfms.configProperties."s3\.key"=${OWFMS_S3_KEY} \
 | 
					  --set owfms.configProperties."s3\.key"=${OWFMS_S3_KEY} \
 | 
				
			||||||
  --set owfms.services.owfms.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=fms-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owfms.services.owfms.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=fms-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owfms.configProperties."openwifi\.system\.uri\.public"=https://fms-${NAMESPACE}.cicd.lab.wlan.tip.build:16004 \
 | 
					  --set owfms.configProperties."openwifi\.system\.uri\.public"=https://fms-${NAMESPACE}.cicd.lab.wlan.tip.build:16004 \
 | 
				
			||||||
  --set owfms.configProperties."openwifi\.system\.uri\.private"=https://fms-${NAMESPACE}.cicd.lab.wlan.tip.build:17004 \
 | 
					  --set owfms.configProperties."openwifi\.system\.uri\.private"=https://owfms-owfms:17004 \
 | 
				
			||||||
  --set owfms.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owfms.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owfms.public_env_variables.OWSEC=owsec-owsec:16001 \
 | 
					  --set owfms.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set owgwui.ingresses.default.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owgwui.ingresses.default.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owgwui.ingresses.default.hosts={webui-${NAMESPACE}.cicd.lab.wlan.tip.build} \
 | 
					  --set owgwui.ingresses.default.hosts={webui-${NAMESPACE}.cicd.lab.wlan.tip.build} \
 | 
				
			||||||
  --set owgwui.public_env_variables.DEFAULT_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
					  --set owgwui.public_env_variables.DEFAULT_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set owprov.services.owprov.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=prov-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owprov.services.owprov.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=prov-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owprov.configProperties."openwifi\.system\.uri\.public"=https://prov-${NAMESPACE}.cicd.lab.wlan.tip.build:16005 \
 | 
					  --set owprov.configProperties."openwifi\.system\.uri\.public"=https://prov-${NAMESPACE}.cicd.lab.wlan.tip.build:16005 \
 | 
				
			||||||
  --set owprov.configProperties."openwifi\.system\.uri\.private"=https://prov-${NAMESPACE}.cicd.lab.wlan.tip.build:17005 \
 | 
					  --set owprov.configProperties."openwifi\.system\.uri\.private"=https://owprov-owprov:17005 \
 | 
				
			||||||
  --set owprov.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owprov.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owprov.public_env_variables.OWSEC=owsec-owsec:16001 \
 | 
					  --set owprov.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set owprovui.ingresses.default.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=provui-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --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.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 owprovui.public_env_variables.DEFAULT_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set rttys.config.token=${RTTY_TOKEN} \
 | 
					  --set rttys.config.token=${RTTY_TOKEN} \
 | 
				
			||||||
  --set rttys.services.rttys.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set rttys.services.rttys.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set clustersysteminfo.public_env_variables.OWSEC=owsec-owsec:16001 \
 | 
					  --set clustersysteminfo.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \
 | 
				
			||||||
  --set clustersysteminfo.secret_env_variables.OWSEC_NEW_PASSWORD=${OWSEC_NEW_PASSWORD} \
 | 
					  --set clustersysteminfo.secret_env_variables.OWSEC_NEW_PASSWORD=${OWSEC_NEW_PASSWORD} \
 | 
				
			||||||
  --set owls.services.owls.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=ls-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
					  --set owls.services.owls.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=ls-${NAMESPACE}.cicd.lab.wlan.tip.build \
 | 
				
			||||||
  --set owls.configProperties."openwifi\.system\.uri\.public"=https://ls-${NAMESPACE}.cicd.lab.wlan.tip.build:16007 \
 | 
					  --set owls.configProperties."openwifi\.system\.uri\.public"=https://ls-${NAMESPACE}.cicd.lab.wlan.tip.build:16007 \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,179 +0,0 @@
 | 
				
			|||||||
owgw:
 | 
					 | 
				
			||||||
  public_env_variables:
 | 
					 | 
				
			||||||
    SELFSIGNED_CERTS: "true"
 | 
					 | 
				
			||||||
  configProperties:
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.system.uri.private: https://owgw-owgw:17002
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    owgw:
 | 
					 | 
				
			||||||
      - name: config
 | 
					 | 
				
			||||||
        mountPath: /owgw-data/owgw.properties
 | 
					 | 
				
			||||||
        subPath: owgw.properties
 | 
					 | 
				
			||||||
        # Template below will be rendered in template
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owgw.fullname" . }}-config
 | 
					 | 
				
			||||||
      - name: certs
 | 
					 | 
				
			||||||
        mountPath: /owgw-data/certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owgw.fullname" . }}-certs
 | 
					 | 
				
			||||||
      - name: certs-cas
 | 
					 | 
				
			||||||
        mountPath: /owgw-data/certs/cas
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owgw.fullname" . }}-certs-cas
 | 
					 | 
				
			||||||
      - name: persist
 | 
					 | 
				
			||||||
        mountPath: /owgw-data/persist
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          persistentVolumeClaim:
 | 
					 | 
				
			||||||
            claimName: {{ template "owgw.fullname" . }}-pvc
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: restapi-certs
 | 
					 | 
				
			||||||
        mountPath: /owgw-data/certs/restapi-certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
 | 
					 | 
				
			||||||
      - name: restapi-ca
 | 
					 | 
				
			||||||
        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
					 | 
				
			||||||
        subPath: ca.crt
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
owsec:
 | 
					 | 
				
			||||||
  public_env_variables:
 | 
					 | 
				
			||||||
    SELFSIGNED_CERTS: "true"
 | 
					 | 
				
			||||||
  configProperties:
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.system.uri.private: https://owsec-owsec:17001
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    owsec:
 | 
					 | 
				
			||||||
      - name: config
 | 
					 | 
				
			||||||
        mountPath: /owsec-data/owsec.properties
 | 
					 | 
				
			||||||
        subPath: owsec.properties
 | 
					 | 
				
			||||||
        # Template below will be rendered in template
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owsec.fullname" . }}-config
 | 
					 | 
				
			||||||
      - name: certs
 | 
					 | 
				
			||||||
        mountPath: /owsec-data/certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owsec.fullname" . }}-certs
 | 
					 | 
				
			||||||
      - name: persist
 | 
					 | 
				
			||||||
        mountPath: /owsec-data/persist
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          persistentVolumeClaim:
 | 
					 | 
				
			||||||
            claimName: {{ template "owsec.fullname" . }}-pvc
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: restapi-certs
 | 
					 | 
				
			||||||
        mountPath: /owsec-data/certs/restapi-certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
 | 
					 | 
				
			||||||
      - name: restapi-ca
 | 
					 | 
				
			||||||
        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
					 | 
				
			||||||
        subPath: ca.crt
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
owfms:
 | 
					 | 
				
			||||||
  public_env_variables:
 | 
					 | 
				
			||||||
    SELFSIGNED_CERTS: "true"
 | 
					 | 
				
			||||||
  configProperties:
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.system.uri.private: https://owfms-owfms:17004
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    owfms:
 | 
					 | 
				
			||||||
      - name: config
 | 
					 | 
				
			||||||
        mountPath: /owfms-data/owfms.properties
 | 
					 | 
				
			||||||
        subPath: owfms.properties
 | 
					 | 
				
			||||||
        # Template below will be rendered in template
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owfms.fullname" . }}-config
 | 
					 | 
				
			||||||
      - name: certs
 | 
					 | 
				
			||||||
        mountPath: /owfms-data/certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owfms.fullname" . }}-certs
 | 
					 | 
				
			||||||
      - name: persist
 | 
					 | 
				
			||||||
        mountPath: /owfms-data/persist
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          persistentVolumeClaim:
 | 
					 | 
				
			||||||
            claimName: {{ template "owfms.fullname" . }}-pvc
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: restapi-certs
 | 
					 | 
				
			||||||
        mountPath: /owfms-data/certs/restapi-certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
 | 
					 | 
				
			||||||
      - name: restapi-ca
 | 
					 | 
				
			||||||
        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
					 | 
				
			||||||
        subPath: ca.crt
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
owprov:
 | 
					 | 
				
			||||||
  public_env_variables:
 | 
					 | 
				
			||||||
    SELFSIGNED_CERTS: "true"
 | 
					 | 
				
			||||||
  configProperties:
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.internal.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
 | 
					 | 
				
			||||||
    openwifi.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
 | 
					 | 
				
			||||||
    openwifi.system.uri.private: https://owprov-owprov:17005
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    owprov:
 | 
					 | 
				
			||||||
      - name: config
 | 
					 | 
				
			||||||
        mountPath: /owprov-data/owprov.properties
 | 
					 | 
				
			||||||
        subPath: owprov.properties
 | 
					 | 
				
			||||||
        # Template below will be rendered in template
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owprov.fullname" . }}-config
 | 
					 | 
				
			||||||
      - name: certs
 | 
					 | 
				
			||||||
        mountPath: /owprov-data/certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owprov.fullname" . }}-certs
 | 
					 | 
				
			||||||
      - name: persist
 | 
					 | 
				
			||||||
        mountPath: /owprov-data/persist
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          persistentVolumeClaim:
 | 
					 | 
				
			||||||
            claimName: {{ template "owprov.fullname" . }}-pvc
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: restapi-certs
 | 
					 | 
				
			||||||
        mountPath: /owprov-data/certs/restapi-certs
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
 | 
					 | 
				
			||||||
      - name: restapi-ca
 | 
					 | 
				
			||||||
        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
					 | 
				
			||||||
        subPath: ca.crt
 | 
					 | 
				
			||||||
        volumeDefinition: |
 | 
					 | 
				
			||||||
          secret:
 | 
					 | 
				
			||||||
            secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
restapiCerts:
 | 
					 | 
				
			||||||
  enabled: true
 | 
					 | 
				
			||||||
@@ -4,7 +4,6 @@ owgw:
 | 
				
			|||||||
      type: LoadBalancer
 | 
					      type: LoadBalancer
 | 
				
			||||||
      annotations:
 | 
					      annotations:
 | 
				
			||||||
        service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
 | 
					        service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
 | 
				
			||||||
        service.beta.kubernetes.io/aws-load-balancer-type: "none"
 | 
					 | 
				
			||||||
        service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
 | 
					        service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
 | 
				
			||||||
        service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16102"
 | 
					        service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16102"
 | 
				
			||||||
        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
 | 
					        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,6 +62,22 @@ owprovui:
 | 
				
			|||||||
    operator: "Exists"
 | 
					    operator: "Exists"
 | 
				
			||||||
    effect: "NoSchedule"
 | 
					    effect: "NoSchedule"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					owls:
 | 
				
			||||||
 | 
					  nodeSelector:
 | 
				
			||||||
 | 
					    env: tests
 | 
				
			||||||
 | 
					  tolerations:
 | 
				
			||||||
 | 
					  - key: "tests"
 | 
				
			||||||
 | 
					    operator: "Exists"
 | 
				
			||||||
 | 
					    effect: "NoSchedule"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					owlsui:
 | 
				
			||||||
 | 
					  nodeSelector:
 | 
				
			||||||
 | 
					    env: tests
 | 
				
			||||||
 | 
					  tolerations:
 | 
				
			||||||
 | 
					  - key: "tests"
 | 
				
			||||||
 | 
					    operator: "Exists"
 | 
				
			||||||
 | 
					    effect: "NoSchedule"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rttys:
 | 
					rttys:
 | 
				
			||||||
  nodeSelector:
 | 
					  nodeSelector:
 | 
				
			||||||
    env: tests
 | 
					    env: tests
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,52 @@ owgw:
 | 
				
			|||||||
      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
					      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
				
			||||||
      -----END CERTIFICATE-----
 | 
					      -----END CERTIFICATE-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  public_env_variables:
 | 
				
			||||||
 | 
					    SELFSIGNED_CERTS: "true"
 | 
				
			||||||
 | 
					  configProperties:
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.rootca: $OWGW_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.cert: $OWGW_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.key: $OWGW_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					    owgw:
 | 
				
			||||||
 | 
					      - name: config
 | 
				
			||||||
 | 
					        mountPath: /owgw-data/owgw.properties
 | 
				
			||||||
 | 
					        subPath: owgw.properties
 | 
				
			||||||
 | 
					        # Template below will be rendered in template
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owgw.fullname" . }}-config
 | 
				
			||||||
 | 
					      - name: certs
 | 
				
			||||||
 | 
					        mountPath: /owgw-data/certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owgw.fullname" . }}-certs
 | 
				
			||||||
 | 
					      - name: certs-cas
 | 
				
			||||||
 | 
					        mountPath: /owgw-data/certs/cas
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owgw.fullname" . }}-certs-cas
 | 
				
			||||||
 | 
					      - name: persist
 | 
				
			||||||
 | 
					        mountPath: /owgw-data/persist
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          persistentVolumeClaim:
 | 
				
			||||||
 | 
					            claimName: {{ template "owgw.fullname" . }}-pvc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: restapi-certs
 | 
				
			||||||
 | 
					        mountPath: /owgw-data/certs/restapi-certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
 | 
				
			||||||
 | 
					      - name: restapi-ca
 | 
				
			||||||
 | 
					        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
				
			||||||
 | 
					        subPath: ca.crt
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owgw.fullname" . }}-owgw-restapi-tls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
owsec:
 | 
					owsec:
 | 
				
			||||||
  # https://telecominfraproject.atlassian.net/browse/WIFI-5840
 | 
					  # https://telecominfraproject.atlassian.net/browse/WIFI-5840
 | 
				
			||||||
  checks:
 | 
					  checks:
 | 
				
			||||||
@@ -109,6 +155,47 @@ owsec:
 | 
				
			|||||||
      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
					      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
				
			||||||
      -----END CERTIFICATE-----
 | 
					      -----END CERTIFICATE-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  public_env_variables:
 | 
				
			||||||
 | 
					    SELFSIGNED_CERTS: "true"
 | 
				
			||||||
 | 
					  configProperties:
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.rootca: $OWSEC_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.cert: $OWSEC_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.key: $OWSEC_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					    owsec:
 | 
				
			||||||
 | 
					      - name: config
 | 
				
			||||||
 | 
					        mountPath: /owsec-data/owsec.properties
 | 
				
			||||||
 | 
					        subPath: owsec.properties
 | 
				
			||||||
 | 
					        # Template below will be rendered in template
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owsec.fullname" . }}-config
 | 
				
			||||||
 | 
					      - name: certs
 | 
				
			||||||
 | 
					        mountPath: /owsec-data/certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owsec.fullname" . }}-certs
 | 
				
			||||||
 | 
					      - name: persist
 | 
				
			||||||
 | 
					        mountPath: /owsec-data/persist
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          persistentVolumeClaim:
 | 
				
			||||||
 | 
					            claimName: {{ template "owsec.fullname" . }}-pvc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: restapi-certs
 | 
				
			||||||
 | 
					        mountPath: /owsec-data/certs/restapi-certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
 | 
				
			||||||
 | 
					      - name: restapi-ca
 | 
				
			||||||
 | 
					        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
				
			||||||
 | 
					        subPath: ca.crt
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rttys:
 | 
					rttys:
 | 
				
			||||||
  enabled: true
 | 
					  enabled: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -209,6 +296,47 @@ owfms:
 | 
				
			|||||||
      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
					      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
				
			||||||
      -----END CERTIFICATE-----
 | 
					      -----END CERTIFICATE-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  public_env_variables:
 | 
				
			||||||
 | 
					    SELFSIGNED_CERTS: "true"
 | 
				
			||||||
 | 
					  configProperties:
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.rootca: $OWFMS_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.cert: $OWFMS_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.key: $OWFMS_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					    owfms:
 | 
				
			||||||
 | 
					      - name: config
 | 
				
			||||||
 | 
					        mountPath: /owfms-data/owfms.properties
 | 
				
			||||||
 | 
					        subPath: owfms.properties
 | 
				
			||||||
 | 
					        # Template below will be rendered in template
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owfms.fullname" . }}-config
 | 
				
			||||||
 | 
					      - name: certs
 | 
				
			||||||
 | 
					        mountPath: /owfms-data/certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owfms.fullname" . }}-certs
 | 
				
			||||||
 | 
					      - name: persist
 | 
				
			||||||
 | 
					        mountPath: /owfms-data/persist
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          persistentVolumeClaim:
 | 
				
			||||||
 | 
					            claimName: {{ template "owfms.fullname" . }}-pvc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: restapi-certs
 | 
				
			||||||
 | 
					        mountPath: /owfms-data/certs/restapi-certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
 | 
				
			||||||
 | 
					      - name: restapi-ca
 | 
				
			||||||
 | 
					        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
				
			||||||
 | 
					        subPath: ca.crt
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owfms.fullname" . }}-owfms-restapi-tls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
owprov:
 | 
					owprov:
 | 
				
			||||||
  checks:
 | 
					  checks:
 | 
				
			||||||
    owprov:
 | 
					    owprov:
 | 
				
			||||||
@@ -256,6 +384,47 @@ owprov:
 | 
				
			|||||||
      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
					      5IOM7ItsRmen6u3qu+JXros54e4juQ==
 | 
				
			||||||
      -----END CERTIFICATE-----
 | 
					      -----END CERTIFICATE-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  public_env_variables:
 | 
				
			||||||
 | 
					    SELFSIGNED_CERTS: "true"
 | 
				
			||||||
 | 
					  configProperties:
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.internal.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.rootca: $OWPROV_ROOT/certs/restapi-certs/ca.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.cert: $OWPROV_ROOT/certs/restapi-certs/tls.crt
 | 
				
			||||||
 | 
					    openwifi.restapi.host.0.key: $OWPROV_ROOT/certs/restapi-certs/tls.key
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					    owprov:
 | 
				
			||||||
 | 
					      - name: config
 | 
				
			||||||
 | 
					        mountPath: /owprov-data/owprov.properties
 | 
				
			||||||
 | 
					        subPath: owprov.properties
 | 
				
			||||||
 | 
					        # Template below will be rendered in template
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owprov.fullname" . }}-config
 | 
				
			||||||
 | 
					      - name: certs
 | 
				
			||||||
 | 
					        mountPath: /owprov-data/certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owprov.fullname" . }}-certs
 | 
				
			||||||
 | 
					      - name: persist
 | 
				
			||||||
 | 
					        mountPath: /owprov-data/persist
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          persistentVolumeClaim:
 | 
				
			||||||
 | 
					            claimName: {{ template "owprov.fullname" . }}-pvc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: restapi-certs
 | 
				
			||||||
 | 
					        mountPath: /owprov-data/certs/restapi-certs
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
 | 
				
			||||||
 | 
					      - name: restapi-ca
 | 
				
			||||||
 | 
					        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
 | 
				
			||||||
 | 
					        subPath: ca.crt
 | 
				
			||||||
 | 
					        volumeDefinition: |
 | 
				
			||||||
 | 
					          secret:
 | 
				
			||||||
 | 
					            secretName: {{ include "owprov.fullname" . }}-owprov-restapi-tls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
owprovui:
 | 
					owprovui:
 | 
				
			||||||
  services:
 | 
					  services:
 | 
				
			||||||
    owprovui:
 | 
					    owprovui:
 | 
				
			||||||
@@ -299,7 +468,7 @@ kafka:
 | 
				
			|||||||
      cpu: 100m
 | 
					      cpu: 100m
 | 
				
			||||||
      memory: 512Mi
 | 
					      memory: 512Mi
 | 
				
			||||||
    limits:
 | 
					    limits:
 | 
				
			||||||
      cpu: 200m
 | 
					      cpu: 500m
 | 
				
			||||||
      memory: 1Gi
 | 
					      memory: 1Gi
 | 
				
			||||||
  readinessProbe:
 | 
					  readinessProbe:
 | 
				
			||||||
    initialDelaySeconds: 45
 | 
					    initialDelaySeconds: 45
 | 
				
			||||||
@@ -321,12 +490,6 @@ clustersysteminfo:
 | 
				
			|||||||
  enabled: true
 | 
					  enabled: true
 | 
				
			||||||
  delay: 60 # delaying to wait for AWS Route53 DNS propagation
 | 
					  delay: 60 # delaying to wait for AWS Route53 DNS propagation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public_env_variables:
 | 
					 | 
				
			||||||
    FLAGS: "-s --connect-timeout 3 -k"
 | 
					 | 
				
			||||||
    OWGW_OVERRIDE: owgw-owgw:16002
 | 
					 | 
				
			||||||
    OWFMS_OVERRIDE: owfms-owfms:16004
 | 
					 | 
				
			||||||
    OWPROV_OVERRIDE: owprov-owprov:16005
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
haproxy:
 | 
					haproxy:
 | 
				
			||||||
  enabled: true
 | 
					  enabled: true
 | 
				
			||||||
  service:
 | 
					  service:
 | 
				
			||||||
@@ -338,3 +501,6 @@ haproxy:
 | 
				
			|||||||
      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-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,16002,16003,17002,16005,17005,16001,17001,5912,5913"
 | 
					      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913"
 | 
				
			||||||
      service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
 | 
					      service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					restapiCerts:
 | 
				
			||||||
 | 
					  enabled: true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,7 +36,10 @@ class APNOS:
 | 
				
			|||||||
        self.password = credentials['password']  # if mode=1, enter jumphost password else ap password
 | 
					        self.password = credentials['password']  # if mode=1, enter jumphost password else ap password
 | 
				
			||||||
        self.port = credentials['port']  # if mode=1, enter jumphost ssh port else ap ssh port
 | 
					        self.port = credentials['port']  # if mode=1, enter jumphost ssh port else ap ssh port
 | 
				
			||||||
        self.mode = credentials['jumphost']  # 1 for jumphost, 0 for direct ssh
 | 
					        self.mode = credentials['jumphost']  # 1 for jumphost, 0 for direct ssh
 | 
				
			||||||
        self.model = credentials['mode']
 | 
					
 | 
				
			||||||
 | 
					        if 'mode' in credentials:
 | 
				
			||||||
 | 
					            self.type = credentials['mode']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if self.mode:
 | 
					        if self.mode:
 | 
				
			||||||
            self.tty = credentials['jumphost_tty']  # /dev/ttyAP1
 | 
					            self.tty = credentials['jumphost_tty']  # /dev/ttyAP1
 | 
				
			||||||
            # kill minicom instance
 | 
					            # kill minicom instance
 | 
				
			||||||
@@ -603,13 +606,13 @@ class APNOS:
 | 
				
			|||||||
        return status
 | 
					        return status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def dfs(self):
 | 
					    def dfs(self):
 | 
				
			||||||
        if self.model == "wifi5":
 | 
					        if self.type == "wifi5":
 | 
				
			||||||
            cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
 | 
					            cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
 | 
				
			||||||
            print("cmd: ", cmd)
 | 
					            print("cmd: ", cmd)
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
                command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
					                command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
                          f"cmd --value \"{cmd}\" "
 | 
					                          f"cmd --value \"{cmd}\" "
 | 
				
			||||||
        elif self.model == "wifi6":
 | 
					        elif self.type == "wifi6":
 | 
				
			||||||
            cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar'
 | 
					            cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar'
 | 
				
			||||||
            print("cmd: ", cmd)
 | 
					            print("cmd: ", cmd)
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
@@ -622,13 +625,13 @@ class APNOS:
 | 
				
			|||||||
        client.close()
 | 
					        client.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def dfs_logread(self):
 | 
					    def dfs_logread(self):
 | 
				
			||||||
        if self.model == "wifi5":
 | 
					        if self.type == "wifi5":
 | 
				
			||||||
            cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
 | 
					            cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
 | 
				
			||||||
            print("cmd: ", cmd)
 | 
					            print("cmd: ", cmd)
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
                cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
					                cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
 | 
				
			||||||
                      f"cmd --value \"{cmd}\" "
 | 
					                      f"cmd --value \"{cmd}\" "
 | 
				
			||||||
        elif self.model == "wifi6":
 | 
					        elif self.type == "wifi6":
 | 
				
			||||||
            cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS'
 | 
					            cmd = f'cd  && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS'
 | 
				
			||||||
            print("cmd: ", cmd)
 | 
					            print("cmd: ", cmd)
 | 
				
			||||||
            if self.mode:
 | 
					            if self.mode:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,7 @@
 | 
				
			|||||||
    Base Library for Ucentral
 | 
					    Base Library for Ucentral
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					import datetime
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import ssl
 | 
					import ssl
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
@@ -627,6 +628,7 @@ class UProfileUtility:
 | 
				
			|||||||
                      body=str(self.base_profile_config).replace("'", '"'),
 | 
					                      body=str(self.base_profile_config).replace("'", '"'),
 | 
				
			||||||
                      attachment_type=allure.attachment_type.JSON)
 | 
					                      attachment_type=allure.attachment_type.JSON)
 | 
				
			||||||
        print(self.base_profile_config)
 | 
					        print(self.base_profile_config)
 | 
				
			||||||
 | 
					        print("Sending Configure Command: ", datetime.datetime.utcnow())
 | 
				
			||||||
        resp = requests.post(uri, data=basic_cfg_str, headers=self.sdk_client.make_headers(),
 | 
					        resp = requests.post(uri, data=basic_cfg_str, headers=self.sdk_client.make_headers(),
 | 
				
			||||||
                             verify=False, timeout=100)
 | 
					                             verify=False, timeout=100)
 | 
				
			||||||
        print(resp.json())
 | 
					        print(resp.json())
 | 
				
			||||||
@@ -647,7 +649,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    obj = Controller(controller_data=controller)
 | 
					    obj = Controller(controller_data=controller)
 | 
				
			||||||
    print(obj.get_device_by_serial_number(serial_number="903cb36ae224"))
 | 
					    print(obj.get_device_by_serial_number(serial_number="903cb36ae224"))
 | 
				
			||||||
 | 
					    # print(datetime.datetime.utcnow())
 | 
				
			||||||
    # fms = FMSUtils(sdk_client=obj)
 | 
					    # fms = FMSUtils(sdk_client=obj)
 | 
				
			||||||
    # new = fms.get_firmwares(model='ecw5410')
 | 
					    # new = fms.get_firmwares(model='ecw5410')
 | 
				
			||||||
    # for i in new:
 | 
					    # for i in new:
 | 
				
			||||||
@@ -657,4 +659,4 @@ if __name__ == '__main__':
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # print(profile.get_ssid_info())
 | 
					    # print(profile.get_ssid_info())
 | 
				
			||||||
    # # print(obj.get_devices())
 | 
					    # # print(obj.get_devices())
 | 
				
			||||||
    obj.logout()
 | 
					    # obj.logout()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -132,13 +132,17 @@ class RunTest:
 | 
				
			|||||||
                    print("test result: " + result)
 | 
					                    print("test result: " + result)
 | 
				
			||||||
                pytest.exit("Test Failed: Debug True")
 | 
					                pytest.exit("Test Failed: Debug True")
 | 
				
			||||||
        self.staConnect.cleanup()
 | 
					        self.staConnect.cleanup()
 | 
				
			||||||
        supplicqant = "/home/lanforge/wifi/wpa_supplicant_log_" + self.staConnect.radio.split(".")[2] + ".txt"
 | 
					        try:
 | 
				
			||||||
        obj = SCP_File(ip=self.lanforge_ip, port=self.lanforge_ssh_port, username="root", password="lanforge",
 | 
					            supplicant = "/home/lanforge/wifi/wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt"
 | 
				
			||||||
                       remote_path=supplicqant,
 | 
					            obj = SCP_File(ip=self.lanforge_ip, port=self.lanforge_ssh_port, username="root", password="lanforge",
 | 
				
			||||||
                       local_path=".")
 | 
					                           remote_path=supplicant,
 | 
				
			||||||
        obj.pull_file()
 | 
					                           local_path=".")
 | 
				
			||||||
        allure.attach.file(source="wpa_supplicant_log_" + self.staConnect.radio.split(".")[2] + ".txt",
 | 
					            obj.pull_file()
 | 
				
			||||||
                           name="supplicant_log")
 | 
					            allure.attach.file(source="wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt",
 | 
				
			||||||
 | 
					                               name="supplicant_log")
 | 
				
			||||||
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
					            print(e)
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
        for result in run_results:
 | 
					        for result in run_results:
 | 
				
			||||||
            print("test result: " + result)
 | 
					            print("test result: " + result)
 | 
				
			||||||
        result = True
 | 
					        result = True
 | 
				
			||||||
@@ -165,7 +169,7 @@ class RunTest:
 | 
				
			|||||||
                    station_name=[], key_mgmt="WPA-EAP",
 | 
					                    station_name=[], key_mgmt="WPA-EAP",
 | 
				
			||||||
                    pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
					                    pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
                    ttls_passwd="nolastart", ieee80211w=1,
 | 
					                    ttls_passwd="nolastart", ieee80211w=1,
 | 
				
			||||||
                    wep_key="NA", ca_cert="NA", eap="TTLS", identity="nolaradius",cleanup=True):
 | 
					                    wep_key="NA", ca_cert="NA", eap="TTLS", identity="nolaradius",d_vlan=False,cleanup=True):
 | 
				
			||||||
        self.eap_connect = TTLSTest(host=self.lanforge_ip, port=self.lanforge_port,
 | 
					        self.eap_connect = TTLSTest(host=self.lanforge_ip, port=self.lanforge_port,
 | 
				
			||||||
                                    sta_list=station_name, vap=False, _debug_on=self.debug)
 | 
					                                    sta_list=station_name, vap=False, _debug_on=self.debug)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -209,15 +213,21 @@ class RunTest:
 | 
				
			|||||||
        self.eap_connect.sta_list = station_name
 | 
					        self.eap_connect.sta_list = station_name
 | 
				
			||||||
        self.eap_connect.build(extra_securities=extra_securities)
 | 
					        self.eap_connect.build(extra_securities=extra_securities)
 | 
				
			||||||
        self.eap_connect.start(station_name, True, True)
 | 
					        self.eap_connect.start(station_name, True, True)
 | 
				
			||||||
 | 
					        if d_vlan:
 | 
				
			||||||
 | 
					           self.station_ip = {}
 | 
				
			||||||
        for sta_name in station_name:
 | 
					        for sta_name in station_name:
 | 
				
			||||||
            # try:
 | 
					            # try:
 | 
				
			||||||
            station_data_str = ""
 | 
					            station_data_str = ""
 | 
				
			||||||
            # sta_url = self.eap_connect.get_station_url(sta_name)
 | 
					            # sta_url = self.eap_connect.get_station_url(sta_name)
 | 
				
			||||||
            # station_info = self.eap_connect.json_get(sta_url)
 | 
					            # station_info = self.eap_connect.json_get(sta_url)
 | 
				
			||||||
            station_info = self.eap_connect.json_get("port/1/1/" + sta_name)
 | 
					            station_info = self.eap_connect.json_get("port/1/1/" + sta_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for i in station_info["interface"]:
 | 
					            for i in station_info["interface"]:
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    station_data_str = station_data_str + i + "  :  " + str(station_info["interface"][i]) + "\n"
 | 
					                    station_data_str = station_data_str + i + "  :  " + str(station_info["interface"][i]) + "\n"
 | 
				
			||||||
 | 
					                    if d_vlan:
 | 
				
			||||||
 | 
					                        if i == "ip":
 | 
				
			||||||
 | 
					                            self.station_ip[sta_name] = station_info["interface"][i]
 | 
				
			||||||
                except Exception as e:
 | 
					                except Exception as e:
 | 
				
			||||||
                    print(e)
 | 
					                    print(e)
 | 
				
			||||||
            allure.attach(name=str(sta_name), body=str(station_data_str))
 | 
					            allure.attach(name=str(sta_name), body=str(station_data_str))
 | 
				
			||||||
@@ -225,13 +235,17 @@ class RunTest:
 | 
				
			|||||||
            #     print(e)
 | 
					            #     print(e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.eap_connect.stop()
 | 
					        self.eap_connect.stop()
 | 
				
			||||||
        supplicqant = "/home/lanforge/wifi/wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt"
 | 
					        try:
 | 
				
			||||||
        obj = SCP_File(ip=self.lanforge_ip, port=self.lanforge_ssh_port, username="root", password="lanforge",
 | 
					            supplicant = "/home/lanforge/wifi/wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt"
 | 
				
			||||||
                       remote_path=supplicqant,
 | 
					            obj = SCP_File(ip=self.lanforge_ip, port=self.lanforge_ssh_port, username="root", password="lanforge",
 | 
				
			||||||
                       local_path=".")
 | 
					                           remote_path=supplicant,
 | 
				
			||||||
        obj.pull_file()
 | 
					                           local_path=".")
 | 
				
			||||||
        allure.attach.file(source="wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt",
 | 
					            obj.pull_file()
 | 
				
			||||||
                           name="supplicant_log")
 | 
					            allure.attach.file(source="wpa_supplicant_log_" + self.eap_connect.radio.split(".")[2] + ".txt",
 | 
				
			||||||
 | 
					                               name="supplicant_log")
 | 
				
			||||||
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
					            print(e)
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
        if not self.eap_connect.passes():
 | 
					        if not self.eap_connect.passes():
 | 
				
			||||||
            if self.debug:
 | 
					            if self.debug:
 | 
				
			||||||
                print("test result: " + self.eap_connect.passes())
 | 
					                print("test result: " + self.eap_connect.passes())
 | 
				
			||||||
@@ -246,7 +260,7 @@ class RunTest:
 | 
				
			|||||||
            cx_data = cx_data + "\n"
 | 
					            cx_data = cx_data + "\n"
 | 
				
			||||||
        allure.attach(name="cx_data", body=str(cx_data))
 | 
					        allure.attach(name="cx_data", body=str(cx_data))
 | 
				
			||||||
        if cleanup:
 | 
					        if cleanup:
 | 
				
			||||||
            self.eap_connect.cleanup(station_name)
 | 
					           self.eap_connect.cleanup(station_name)
 | 
				
			||||||
        return self.eap_connect.passes()
 | 
					        return self.eap_connect.passes()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def wifi_capacity(self, mode="BRIDGE", vlan_id=100, batch_size="1,5,10,20,40,64,128",
 | 
					    def wifi_capacity(self, mode="BRIDGE", vlan_id=100, batch_size="1,5,10,20,40,64,128",
 | 
				
			||||||
@@ -339,10 +353,10 @@ class RunTest:
 | 
				
			|||||||
    def Client_Connect_Using_Radio(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE",
 | 
					    def Client_Connect_Using_Radio(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE",
 | 
				
			||||||
                                   vlan_id=100, radio=None, sta_mode=0,
 | 
					                                   vlan_id=100, radio=None, sta_mode=0,
 | 
				
			||||||
                                   station_name=[]):
 | 
					                                   station_name=[]):
 | 
				
			||||||
        self.client_connect = CreateStation(_host=self.lanforge_ip, _port=self.lanforge_port,
 | 
					        self.client_connect = CreateStation(_host=self.lanforge_ip, _port=self.lanforge_port, _mode=sta_mode,
 | 
				
			||||||
                                            _sta_list=station_name, _password=passkey, _ssid=ssid, _security=security)
 | 
					                                            _sta_list=station_name, _password=passkey, _ssid=ssid, _security=security)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.client_connect.station_profile.sta_mode = sta_mode
 | 
					        # self.client_connect.station_profile.sta_mode = sta_mode
 | 
				
			||||||
        self.client_connect.upstream_resource = 1
 | 
					        self.client_connect.upstream_resource = 1
 | 
				
			||||||
        if mode == "BRIDGE":
 | 
					        if mode == "BRIDGE":
 | 
				
			||||||
            self.client_connect.upstream_port = self.upstream_port
 | 
					            self.client_connect.upstream_port = self.upstream_port
 | 
				
			||||||
@@ -808,6 +822,55 @@ class RunTest:
 | 
				
			|||||||
        atten_obj = CreateAttenuator(self.lanforge_ip, self.lanforge_port, serno, idx, val)
 | 
					        atten_obj = CreateAttenuator(self.lanforge_ip, self.lanforge_port, serno, idx, val)
 | 
				
			||||||
        atten_obj.build()
 | 
					        atten_obj.build()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def attenuator_serial_2g_radio(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE",
 | 
				
			||||||
 | 
					                                   vlan_id=100, sta_mode=0, station_name=[], lf_tools_obj=None):
 | 
				
			||||||
 | 
					        radio = self.twog_radios[0]
 | 
				
			||||||
 | 
					        #index 0 of atten_serial_radio will ser no of 1st 2g radio and index 1 will ser no of 2nd and 3rd 2g radio
 | 
				
			||||||
 | 
					        atten_serial_radio = []
 | 
				
			||||||
 | 
					        atten_serial = self.attenuator_serial()
 | 
				
			||||||
 | 
					        self.Client_Connect_Using_Radio(ssid=ssid, passkey=passkey, security=security, mode=mode,
 | 
				
			||||||
 | 
					                                   vlan_id=vlan_id, radio=radio, sta_mode=sta_mode,
 | 
				
			||||||
 | 
					                                   station_name=station_name)
 | 
				
			||||||
 | 
					        signal1 = lf_tools_obj.station_data_query(station_name=station_name[0], query="signal")
 | 
				
			||||||
 | 
					        atten_sr = atten_serial[0].split(".")
 | 
				
			||||||
 | 
					        for i in range(4):
 | 
				
			||||||
 | 
					            self.attenuator_modify(int(atten_sr[2]), i, 400)
 | 
				
			||||||
 | 
					            time.sleep(0.5)
 | 
				
			||||||
 | 
					        signal2 = lf_tools_obj.station_data_query(station_name=station_name[0], query="signal")
 | 
				
			||||||
 | 
					        if abs(int(signal2.split(" ")[0])) - abs(int(signal1.split(" ")[0])) >= 5:
 | 
				
			||||||
 | 
					            atten_serial_radio = atten_serial
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            atten_serial_radio = atten_serial[::-1]
 | 
				
			||||||
 | 
					        self.Client_disconnect(station_name=station_name)
 | 
				
			||||||
 | 
					        return atten_serial_radio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def attenuator_serial_5g_radio(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE",
 | 
				
			||||||
 | 
					                                   vlan_id=100, sta_mode=0, station_name=[], lf_tools_obj=None):
 | 
				
			||||||
 | 
					        radio = self.fiveg_radios[0]
 | 
				
			||||||
 | 
					        #index 0 of atten_serial_radio will ser no of 1st 5g radio and index 1 will ser no of 2nd and 3rd 5g radio
 | 
				
			||||||
 | 
					        atten_serial_radio = []
 | 
				
			||||||
 | 
					        atten_serial = self.attenuator_serial()
 | 
				
			||||||
 | 
					        self.Client_Connect_Using_Radio(ssid=ssid, passkey=passkey, security=security, mode=mode,
 | 
				
			||||||
 | 
					                                   vlan_id=vlan_id, radio=radio, sta_mode=sta_mode,
 | 
				
			||||||
 | 
					                                   station_name=station_name)
 | 
				
			||||||
 | 
					        signal1 = lf_tools_obj.station_data_query(station_name=station_name[0], query="signal")
 | 
				
			||||||
 | 
					        atten_sr = atten_serial[0].split(".")
 | 
				
			||||||
 | 
					        for i in range(4):
 | 
				
			||||||
 | 
					            self.attenuator_modify(int(atten_sr[2]), i, 400)
 | 
				
			||||||
 | 
					            time.sleep(0.5)
 | 
				
			||||||
 | 
					        signal2 = lf_tools_obj.station_data_query(station_name=station_name[0], query="signal")
 | 
				
			||||||
 | 
					        if abs(int(signal2.split(" ")[0])) - abs(int(signal1.split(" ")[0])) >= 5:
 | 
				
			||||||
 | 
					            atten_serial_radio = atten_serial
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            atten_serial_radio = atten_serial[::-1]
 | 
				
			||||||
 | 
					        self.Client_disconnect(station_name=station_name)
 | 
				
			||||||
 | 
					        return atten_serial_radio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ import pandas as pd
 | 
				
			|||||||
class ChamberView:
 | 
					class ChamberView:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, lanforge_data=None, access_point_data=None, debug=True, testbed=None):
 | 
					    def __init__(self, lanforge_data=None, access_point_data=None, debug=True, testbed=None):
 | 
				
			||||||
        print("lanforge data",lanforge_data)
 | 
					        print("lanforge data", lanforge_data)
 | 
				
			||||||
        print("access point data", access_point_data)
 | 
					        print("access point data", access_point_data)
 | 
				
			||||||
        self.access_point_data = access_point_data
 | 
					        self.access_point_data = access_point_data
 | 
				
			||||||
        print("testbed", testbed)
 | 
					        print("testbed", testbed)
 | 
				
			||||||
@@ -62,9 +62,12 @@ class ChamberView:
 | 
				
			|||||||
                self.testbed = "mesh"
 | 
					                self.testbed = "mesh"
 | 
				
			||||||
                self.scenario_name = "TIP-" + self.testbed
 | 
					                self.scenario_name = "TIP-" + self.testbed
 | 
				
			||||||
                self.raw_line = [
 | 
					                self.raw_line = [
 | 
				
			||||||
                    ["profile_link " + self.upstream_resource_1 + " upstream-dhcp 1 NA NA " + self.upstream_port_1.split(".")[2] + ",AUTO -1 NA"],
 | 
					                    ["profile_link " + self.upstream_resource_1 + " upstream-dhcp 1 NA NA " +
 | 
				
			||||||
                    ["profile_link " + self.uplink_resource_1 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " + self.uplink_port_1.split(".")[2] + "," + self.upstream_port_1.split(".")[2] + " -1 NA"]
 | 
					                     self.upstream_port_1.split(".")[2] + ",AUTO -1 NA"],
 | 
				
			||||||
                    ]
 | 
					                    [
 | 
				
			||||||
 | 
					                        "profile_link " + self.uplink_resource_1 + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet + "' NA " +
 | 
				
			||||||
 | 
					                        self.uplink_port_1.split(".")[2] + "," + self.upstream_port_1.split(".")[2] + " -1 NA"]
 | 
				
			||||||
 | 
					                ]
 | 
				
			||||||
                self.CreateChamberview = CreateChamberview(self.lanforge_ip, self.lanforge_port)
 | 
					                self.CreateChamberview = CreateChamberview(self.lanforge_ip, self.lanforge_port)
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.lanforge_ip = lanforge_data["ip"]
 | 
					            self.lanforge_ip = lanforge_data["ip"]
 | 
				
			||||||
@@ -90,10 +93,10 @@ class ChamberView:
 | 
				
			|||||||
            self.ssid_list = []
 | 
					            self.ssid_list = []
 | 
				
			||||||
            self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug)
 | 
					            self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=self.debug)
 | 
				
			||||||
            self.raw_line = [
 | 
					            self.raw_line = [
 | 
				
			||||||
            ["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
 | 
					                ["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
 | 
				
			||||||
            [2] + ",AUTO -1 NA"],
 | 
					                [2] + ",AUTO -1 NA"],
 | 
				
			||||||
            ["profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet
 | 
					                ["profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet
 | 
				
			||||||
             + "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"]
 | 
					                 + "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"]
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # This is for rawline input | see create_chamberview_dut.py for more details
 | 
					            # This is for rawline input | see create_chamberview_dut.py for more details
 | 
				
			||||||
@@ -328,7 +331,9 @@ class ChamberView:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def read_csv_individual_station_throughput(self, dir_name, option):
 | 
					    def read_csv_individual_station_throughput(self, dir_name, option):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            df = pd.read_csv("../reports/" + str(dir_name) + "/csv-data/data-Combined_bps__60_second_running_average-1.csv", sep=r'\t', engine='python')
 | 
					            df = pd.read_csv(
 | 
				
			||||||
 | 
					                "../reports/" + str(dir_name) + "/csv-data/data-Combined_bps__60_second_running_average-1.csv",
 | 
				
			||||||
 | 
					                sep=r'\t', engine='python')
 | 
				
			||||||
            print("csv file opened")
 | 
					            print("csv file opened")
 | 
				
			||||||
        except FileNotFoundError:
 | 
					        except FileNotFoundError:
 | 
				
			||||||
            print("csv file does not exist")
 | 
					            print("csv file does not exist")
 | 
				
			||||||
@@ -378,6 +383,7 @@ class ChamberView:
 | 
				
			|||||||
                               name=i,
 | 
					                               name=i,
 | 
				
			||||||
                               attachment_type="image/png", extension=None)
 | 
					                               attachment_type="image/png", extension=None)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def create_mesh_scenario(self):
 | 
					    def create_mesh_scenario(self):
 | 
				
			||||||
        # upstream_list = []
 | 
					        # upstream_list = []
 | 
				
			||||||
        # for data in range(0,len(self.access_point_data)):
 | 
					        # for data in range(0,len(self.access_point_data)):
 | 
				
			||||||
@@ -449,6 +455,7 @@ class ChamberView:
 | 
				
			|||||||
            # [['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58']]
 | 
					            # [['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58']]
 | 
				
			||||||
            self.update_ssid(ssid_data=ssid_data[ssid])
 | 
					            self.update_ssid(ssid_data=ssid_data[ssid])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def set_radio_antenna(self, req_url, shelf, resources, radio, antenna):
 | 
					    def set_radio_antenna(self, req_url, shelf, resources, radio, antenna):
 | 
				
			||||||
        data = {
 | 
					        data = {
 | 
				
			||||||
            "shelf": shelf,
 | 
					            "shelf": shelf,
 | 
				
			||||||
@@ -463,84 +470,84 @@ class ChamberView:
 | 
				
			|||||||
def main():
 | 
					def main():
 | 
				
			||||||
    # lanforge_data = {'ip': 'localhost', 'port': 8802, 'ssh_port': 8804, '2.4G-Radio': ['1.1.wiphy0', '1.1.wiphy2'], '5G-Radio': ['1.1.wiphy1', '1.1.wiphy3'], 'AX-Radio': ['1.1.wiphy4', '1.1.wiphy5', '1.1.wiphy6', '1.1.wiphy7'], 'upstream': '1.1.eth2', 'upstream_subnet': '10.28.2.1/24', 'uplink': '1.1.eth1', '2.4G-Station-Name': 'sta00', '5G-Station-Name': 'sta10', 'AX-Station-Name': 'ax'}
 | 
					    # lanforge_data = {'ip': 'localhost', 'port': 8802, 'ssh_port': 8804, '2.4G-Radio': ['1.1.wiphy0', '1.1.wiphy2'], '5G-Radio': ['1.1.wiphy1', '1.1.wiphy3'], 'AX-Radio': ['1.1.wiphy4', '1.1.wiphy5', '1.1.wiphy6', '1.1.wiphy7'], 'upstream': '1.1.eth2', 'upstream_subnet': '10.28.2.1/24', 'uplink': '1.1.eth1', '2.4G-Station-Name': 'sta00', '5G-Station-Name': 'sta10', 'AX-Station-Name': 'ax'}
 | 
				
			||||||
    lanforge_data = {
 | 
					    lanforge_data = {
 | 
				
			||||||
                "type": "mesh",
 | 
					        "type": "mesh",
 | 
				
			||||||
                "ip": "localhost",  # 10.28.3.14
 | 
					        "ip": "localhost",  # 10.28.3.14
 | 
				
			||||||
                "port": 8802,  # 8080
 | 
					        "port": 8802,  # 8080
 | 
				
			||||||
                "ssh_port": 8804,
 | 
					        "ssh_port": 8804,
 | 
				
			||||||
                "2.4G-Radio-mobile-sta": ["1.1.wiphy0", "1.1.wiphy2"],
 | 
					        "2.4G-Radio-mobile-sta": ["1.1.wiphy0", "1.1.wiphy2"],
 | 
				
			||||||
                "5G-Radio-mobile-sta": ["1.1.wiphy1", "1.1.wiphy3"],
 | 
					        "5G-Radio-mobile-sta": ["1.1.wiphy1", "1.1.wiphy3"],
 | 
				
			||||||
                "AX-Radio-mobile-sta": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"],
 | 
					        "AX-Radio-mobile-sta": ["1.1.wiphy4", "1.1.wiphy5", "1.1.wiphy6", "1.1.wiphy7"],
 | 
				
			||||||
                "upstream-mobile-sta": "1.1.eth2",
 | 
					        "upstream-mobile-sta": "1.1.eth2",
 | 
				
			||||||
                "upstream_subnet-mobile-sta": "10.28.2.1/24",
 | 
					        "upstream_subnet-mobile-sta": "10.28.2.1/24",
 | 
				
			||||||
                "uplink-mobile-sta": "1.1.eth3",
 | 
					        "uplink-mobile-sta": "1.1.eth3",
 | 
				
			||||||
                "2.4G-Radio-root": ["1.2.wiphy0"],
 | 
					        "2.4G-Radio-root": ["1.2.wiphy0"],
 | 
				
			||||||
                "5G-Radio-root": ["1.2.wiphy1"],
 | 
					        "5G-Radio-root": ["1.2.wiphy1"],
 | 
				
			||||||
                "AX-Radio-root": [],
 | 
					        "AX-Radio-root": [],
 | 
				
			||||||
                "upstream-root": "1.2.eth2",
 | 
					        "upstream-root": "1.2.eth2",
 | 
				
			||||||
                "upstream_subnet-root": "10.28.2.1/24",
 | 
					        "upstream_subnet-root": "10.28.2.1/24",
 | 
				
			||||||
                "uplink-root": "1.2.eth3",
 | 
					        "uplink-root": "1.2.eth3",
 | 
				
			||||||
                "2.4G-Radio-node-1": ["1.3.wiphy0"],
 | 
					        "2.4G-Radio-node-1": ["1.3.wiphy0"],
 | 
				
			||||||
                "5G-Radio-node-1": ["1.3.wiphy1"],
 | 
					        "5G-Radio-node-1": ["1.3.wiphy1"],
 | 
				
			||||||
                "AX-Radio-node-1": [],
 | 
					        "AX-Radio-node-1": [],
 | 
				
			||||||
                "upstream-node-1": "1.3.eth2",
 | 
					        "upstream-node-1": "1.3.eth2",
 | 
				
			||||||
                "upstream_subnet-node-1": "10.28.2.1/24",
 | 
					        "upstream_subnet-node-1": "10.28.2.1/24",
 | 
				
			||||||
                "uplink--node-1": "1.3.eth3",
 | 
					        "uplink--node-1": "1.3.eth3",
 | 
				
			||||||
                "2.4G-Radio-node-2": ["1.4.wiphy0"],
 | 
					        "2.4G-Radio-node-2": ["1.4.wiphy0"],
 | 
				
			||||||
                "5G-Radio-node-2": ["1.4.wiphy1"],
 | 
					        "5G-Radio-node-2": ["1.4.wiphy1"],
 | 
				
			||||||
                "AX-Radio-node-2": [],
 | 
					        "AX-Radio-node-2": [],
 | 
				
			||||||
                "upstream-node-2": "1.4.eth2",
 | 
					        "upstream-node-2": "1.4.eth2",
 | 
				
			||||||
                "upstream_subnet-node-2": "10.28.2.1/24",
 | 
					        "upstream_subnet-node-2": "10.28.2.1/24",
 | 
				
			||||||
                "uplink--node-2": "1.4.eth3",
 | 
					        "uplink--node-2": "1.4.eth3",
 | 
				
			||||||
                "2.4G-Station-Name": "wlan0",
 | 
					        "2.4G-Station-Name": "wlan0",
 | 
				
			||||||
                "5G-Station-Name": "wlan0",
 | 
					        "5G-Station-Name": "wlan0",
 | 
				
			||||||
                "AX-Station-Name": "ax"
 | 
					        "AX-Station-Name": "ax"
 | 
				
			||||||
            }
 | 
					    }
 | 
				
			||||||
    # ap_data = [{'model': 'wf188n', 'mode': 'wifi6', 'serial': '0000c1018812', 'jumphost': True, 'ip': 'localhost', 'username': 'lanforge', 'password': 'pumpkin77', 'port': 8803, 'jumphost_tty': '/dev/ttyAP1', 'version': 'https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/cig_wf188/20210729-cig_wf188-v2.0.0-rc2-ec3662e-upgrade.bin'}]
 | 
					    # ap_data = [{'model': 'wf188n', 'mode': 'wifi6', 'serial': '0000c1018812', 'jumphost': True, 'ip': 'localhost', 'username': 'lanforge', 'password': 'pumpkin77', 'port': 8803, 'jumphost_tty': '/dev/ttyAP1', 'version': 'https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/cig_wf188/20210729-cig_wf188-v2.0.0-rc2-ec3662e-upgrade.bin'}]
 | 
				
			||||||
    ap_data = [
 | 
					    ap_data = [
 | 
				
			||||||
            {
 | 
					        {
 | 
				
			||||||
                'type' : 'root',
 | 
					            'type': 'root',
 | 
				
			||||||
                'model': 'eap101',
 | 
					            'model': 'eap101',
 | 
				
			||||||
                'mode': 'wifi6',
 | 
					            'mode': 'wifi6',
 | 
				
			||||||
                'serial': '34efb6af4a7a',
 | 
					            'serial': '34efb6af4a7a',
 | 
				
			||||||
                'jumphost': True,
 | 
					            'jumphost': True,
 | 
				
			||||||
                'ip': "localhost",  # 10\.28\.3\.101
 | 
					            'ip': "localhost",  # 10\.28\.3\.101
 | 
				
			||||||
                'username': "lanforge",
 | 
					            'username': "lanforge",
 | 
				
			||||||
                'password': "pumpkin77",
 | 
					            'password': "pumpkin77",
 | 
				
			||||||
                'port': 8803,  # 22
 | 
					            'port': 8803,  # 22
 | 
				
			||||||
                'jumphost_tty': '/dev/ttyAP2',
 | 
					            'jumphost_tty': '/dev/ttyAP2',
 | 
				
			||||||
                'version': "latest"
 | 
					            'version': "latest"
 | 
				
			||||||
            },
 | 
					        },
 | 
				
			||||||
            {
 | 
					        {
 | 
				
			||||||
                'type': 'node-1',
 | 
					            'type': 'node-1',
 | 
				
			||||||
                'model': 'eap101',
 | 
					            'model': 'eap101',
 | 
				
			||||||
                'mode': 'wifi6',
 | 
					            'mode': 'wifi6',
 | 
				
			||||||
                'serial': '34efb6af4903',
 | 
					            'serial': '34efb6af4903',
 | 
				
			||||||
                'jumphost': True,
 | 
					            'jumphost': True,
 | 
				
			||||||
                'ip': "localhost", #10\.28\.3\.101
 | 
					            'ip': "localhost",  # 10\.28\.3\.101
 | 
				
			||||||
                'username': "lanforge",
 | 
					            'username': "lanforge",
 | 
				
			||||||
                'password': "pumpkin77",
 | 
					            'password': "pumpkin77",
 | 
				
			||||||
                'port': 8803,  # 22
 | 
					            'port': 8803,  # 22
 | 
				
			||||||
                'jumphost_tty': '/dev/ttyAP3',
 | 
					            'jumphost_tty': '/dev/ttyAP3',
 | 
				
			||||||
                'version': "latest"
 | 
					            'version': "latest"
 | 
				
			||||||
            },
 | 
					        },
 | 
				
			||||||
            {
 | 
					        {
 | 
				
			||||||
                'type' : 'node-2',
 | 
					            'type': 'node-2',
 | 
				
			||||||
                'model': 'eap102',
 | 
					            'model': 'eap102',
 | 
				
			||||||
                'mode': 'wifi6',
 | 
					            'mode': 'wifi6',
 | 
				
			||||||
                'serial': '34efb6af4a7a',
 | 
					            'serial': '34efb6af4a7a',
 | 
				
			||||||
                'jumphost': True,
 | 
					            'jumphost': True,
 | 
				
			||||||
                'ip': "localhost",  # 10\.28\.3\.101
 | 
					            'ip': "localhost",  # 10\.28\.3\.101
 | 
				
			||||||
                'username': "lanforge",
 | 
					            'username': "lanforge",
 | 
				
			||||||
                'password': "pumpkin77",
 | 
					            'password': "pumpkin77",
 | 
				
			||||||
                'port': 8803,  # 22
 | 
					            'port': 8803,  # 22
 | 
				
			||||||
                'jumphost_tty': '/dev/ttyAP4',
 | 
					            'jumphost_tty': '/dev/ttyAP4',
 | 
				
			||||||
                'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.1.0.tar.gz"
 | 
					            'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.1.0.tar.gz"
 | 
				
			||||||
            }
 | 
					        }
 | 
				
			||||||
        ]
 | 
					    ]
 | 
				
			||||||
    testbed = "mesh"
 | 
					    testbed = "mesh"
 | 
				
			||||||
    obj = ChamberView(lanforge_data=lanforge_data, access_point_data=ap_data, testbed="mesh")
 | 
					    obj = ChamberView(lanforge_data=lanforge_data, access_point_data=ap_data, testbed="mesh")
 | 
				
			||||||
    obj.create_mesh_dut()
 | 
					    obj.create_mesh_dut()
 | 
				
			||||||
    obj.create_mesh()
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    main()
 | 
					    main()
 | 
				
			||||||
@@ -1331,11 +1331,37 @@ def get_ip_address_and(request, WifiName, WifiPass, setup_perfectoMobile, connDa
 | 
				
			|||||||
                                print("Device IP address is :", ip_address_element_text)
 | 
					                                print("Device IP address is :", ip_address_element_text)
 | 
				
			||||||
                            except:
 | 
					                            except:
 | 
				
			||||||
                                print("IP address element not found")
 | 
					                                print("IP address element not found")
 | 
				
			||||||
                               #allure.attach(name= body=str("IP address element not found"))
 | 
					                                closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                                assert False
 | 
				
			||||||
                            # closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
					                           #allure.attach(name= body=str("IP address element not found"))
 | 
				
			||||||
                            # return ip_address_element_text, ssid_with_internet
 | 
					                        #--------------------Added for ssid security check--------------------------
 | 
				
			||||||
 | 
					                        try:
 | 
				
			||||||
 | 
					                            time.sleep(2)
 | 
				
			||||||
 | 
					                            security_name_element = driver.find_element_by_xpath(
 | 
				
			||||||
 | 
					                                "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']")
 | 
				
			||||||
 | 
					                            security_name_element_text = security_name_element.text
 | 
				
			||||||
 | 
					                            print("Ssid security is :", security_name_element_text)
 | 
				
			||||||
 | 
					                            allure.attach(name="Ssid Security:", body=str(security_name_element_text))
 | 
				
			||||||
 | 
					                        except:
 | 
				
			||||||
 | 
					                            print("Security is not available")
 | 
				
			||||||
 | 
					                        # --------------------Added for ssid Name check--------------------------
 | 
				
			||||||
 | 
					                        try:
 | 
				
			||||||
 | 
					                            time.sleep(2)
 | 
				
			||||||
 | 
					                            ssid_name_element = driver.find_element_by_xpath(
 | 
				
			||||||
 | 
					                                "//*[@resource-id='com.android.settings:id/entity_header_title']")
 | 
				
			||||||
 | 
					                            ssid_name_element_text = ssid_name_element.text
 | 
				
			||||||
 | 
					                            print("Ssid Name is :", ssid_name_element_text)
 | 
				
			||||||
 | 
					                            allure.attach(name="Ssid connected:", body=str(ssid_name_element_text))
 | 
				
			||||||
 | 
					                        except:
 | 
				
			||||||
 | 
					                            print("Ssid name not available")
 | 
				
			||||||
 | 
					                            closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                            assert False
 | 
				
			||||||
 | 
					                        if(ssid_name_element_text == WifiName):
 | 
				
			||||||
 | 
					                            print("Wifi is connected to the expected ssid")
 | 
				
			||||||
 | 
					                        else:
 | 
				
			||||||
 | 
					                            print("Wifi is not connected to the expected ssid")
 | 
				
			||||||
 | 
					                            closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                            assert False
 | 
				
			||||||
                        try:
 | 
					                        try:
 | 
				
			||||||
                            check_if_no_internet_popup(driver)
 | 
					                            check_if_no_internet_popup(driver)
 | 
				
			||||||
                            driver.implicitly_wait(3)
 | 
					                            driver.implicitly_wait(3)
 | 
				
			||||||
@@ -3034,8 +3060,36 @@ def get_ip_address_eap_and(request, WifiName, User, ttls_passwd, setup_perfectoM
 | 
				
			|||||||
                                print("Device IP address is :", ip_address_element_text)
 | 
					                                print("Device IP address is :", ip_address_element_text)
 | 
				
			||||||
                            except:
 | 
					                            except:
 | 
				
			||||||
                                print("IP address element not found")
 | 
					                                print("IP address element not found")
 | 
				
			||||||
                               #allure.attach(name= body=str("IP address element not found"))
 | 
					                                closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                                assert False
 | 
				
			||||||
 | 
					                        # --------------------Added for ssid security check--------------------------
 | 
				
			||||||
 | 
					                        try:
 | 
				
			||||||
 | 
					                            time.sleep(2)
 | 
				
			||||||
 | 
					                            security_name_element = driver.find_element_by_xpath(
 | 
				
			||||||
 | 
					                                "//*[@text='Security']/parent::*/android.widget.TextView[@resource-id='com.android.settings:id/summary']")
 | 
				
			||||||
 | 
					                            security_name_element_text = security_name_element.text
 | 
				
			||||||
 | 
					                            print("Ssid security is :", security_name_element_text)
 | 
				
			||||||
 | 
					                            allure.attach(name="Ssid Security:", body=str(security_name_element_text))
 | 
				
			||||||
 | 
					                        except:
 | 
				
			||||||
 | 
					                            print("Security is not available")
 | 
				
			||||||
 | 
					                        # --------------------Added for ssid Name check--------------------------
 | 
				
			||||||
 | 
					                        try:
 | 
				
			||||||
 | 
					                            time.sleep(2)
 | 
				
			||||||
 | 
					                            ssid_name_element = driver.find_element_by_xpath(
 | 
				
			||||||
 | 
					                                "//*[@resource-id='com.android.settings:id/entity_header_title']")
 | 
				
			||||||
 | 
					                            ssid_name_element_text = ssid_name_element.text
 | 
				
			||||||
 | 
					                            print("Ssid Name is :", ssid_name_element_text)
 | 
				
			||||||
 | 
					                            allure.attach(name="Ssid connected:", body=str(ssid_name_element_text))
 | 
				
			||||||
 | 
					                        except:
 | 
				
			||||||
 | 
					                            print("Ssid name not available")
 | 
				
			||||||
 | 
					                            closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                            assert False
 | 
				
			||||||
 | 
					                        if (ssid_name_element_text == WifiName):
 | 
				
			||||||
 | 
					                            print("Wifi is connected to the expected ssid")
 | 
				
			||||||
 | 
					                        else:
 | 
				
			||||||
 | 
					                            print("Wifi is not connected to the expected ssid")
 | 
				
			||||||
 | 
					                            closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
 | 
					                            assert False
 | 
				
			||||||
                            # closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
					                            # closeApp(connData["appPackage-android"], setup_perfectoMobile)
 | 
				
			||||||
                            # return ip_address_element_text, ssid_with_internet
 | 
					                            # return ip_address_element_text, ssid_with_internet
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -3311,6 +3365,7 @@ def get_ip_address_eap_and(request, WifiName, User, ttls_passwd, setup_perfectoM
 | 
				
			|||||||
                    try:
 | 
					                    try:
 | 
				
			||||||
                        driver.implicitly_wait(3)
 | 
					                        driver.implicitly_wait(3)
 | 
				
			||||||
                        report.step_start("Click Connect Button")
 | 
					                        report.step_start("Click Connect Button")
 | 
				
			||||||
 | 
					                        print("Click Connect Button")
 | 
				
			||||||
                        join_element = driver.find_element_by_xpath("//*[@text='Connect']")
 | 
					                        join_element = driver.find_element_by_xpath("//*[@text='Connect']")
 | 
				
			||||||
                        join_element.click()
 | 
					                        join_element.click()
 | 
				
			||||||
                    except NoSuchElementException:
 | 
					                    except NoSuchElementException:
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -617,6 +617,23 @@ RATE_LIMITING_RADIUS_ACCOUNTING_DATA = {
 | 
				
			|||||||
    "password": "password",
 | 
					    "password": "password",
 | 
				
			||||||
    "pk_password": "whatever"
 | 
					    "pk_password": "whatever"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					DYNAMIC_VLAN_RADIUS_SERVER_DATA = {
 | 
				
			||||||
 | 
					    "ip": "3.20.165.131",
 | 
				
			||||||
 | 
					    "port": 1812,
 | 
				
			||||||
 | 
					    "secret": "testing123",
 | 
				
			||||||
 | 
					    "user": "user",
 | 
				
			||||||
 | 
					    "password": "password",
 | 
				
			||||||
 | 
					    "pk_password": "whatever"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = {
 | 
				
			||||||
 | 
					    "ip": "3.20.165.131",
 | 
				
			||||||
 | 
					    "port": 1813,
 | 
				
			||||||
 | 
					    "secret": "testing123",
 | 
				
			||||||
 | 
					    "user": "user",
 | 
				
			||||||
 | 
					    "password": "password",
 | 
				
			||||||
 | 
					    "pk_password": "whatever"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASSPOINT_RADIUS_SERVER_DATA = {
 | 
					PASSPOINT_RADIUS_SERVER_DATA = {
 | 
				
			||||||
    "ip": "52.234.179.191",
 | 
					    "ip": "52.234.179.191",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,168 @@
 | 
				
			|||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					import pandas as pd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.advance, pytest.mark.atf, pytest.mark.bridge]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestAtfBridge(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6394", name="WIFI-6394")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_2g
 | 
				
			||||||
 | 
					    def test_atf_sta1_greenfieldmode_sta2_atten30dB_2g(self, lf_test, lf_tools, station_names_twog):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        station_name = station_names_twog[0]
 | 
				
			||||||
 | 
					        radio_name1 = lf_tools.twog_radios[0]
 | 
				
			||||||
 | 
					        radio_name2 = lf_tools.twog_radios[1]
 | 
				
			||||||
 | 
					        sta = []
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            sta.append(station_name + str(i))
 | 
				
			||||||
 | 
					        print(sta)
 | 
				
			||||||
 | 
					        atten_serial = lf_test.attenuator_serial_2g_radio(ssid=ssid_name, passkey=profile_data["security_key"], station_name=station_names_twog, lf_tools_obj=lf_tools)
 | 
				
			||||||
 | 
					        atten_serial_split = atten_serial[1].split(".")
 | 
				
			||||||
 | 
					        sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                    radio=radio_name1, station_name=sta[0:1], sta_mode=11)
 | 
				
			||||||
 | 
					        sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                    radio=radio_name2, station_name=sta[1:2], sta_mode=11)
 | 
				
			||||||
 | 
					        if (not sta_ip1) or (not sta_ip2):
 | 
				
			||||||
 | 
					            print("test failed due to no station ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            lf_test.attenuator_modify(int(atten_serial_split[2]), i, 300)
 | 
				
			||||||
 | 
					            time.sleep(0.5)
 | 
				
			||||||
 | 
					        wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_atten30dB_2g", mode=mode, vlan_id=vlan,
 | 
				
			||||||
 | 
					                                        download_rate="1Gbps", batch_size="1,2",
 | 
				
			||||||
 | 
					                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_tools.attach_report_graphs(report_name=report_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6395", name="WIFI-6395")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_2g
 | 
				
			||||||
 | 
					    def test_atf_sta1_greenfieldmode_sta2_legacymode_2g(self, lf_test, lf_tools, station_names_twog):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        station_name = station_names_twog[0]
 | 
				
			||||||
 | 
					        radio_name1 = lf_tools.twog_radios[0]
 | 
				
			||||||
 | 
					        radio_name2 = lf_tools.twog_radios[1]
 | 
				
			||||||
 | 
					        sta = []
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            sta.append(station_name + str(i))
 | 
				
			||||||
 | 
					        print(sta)
 | 
				
			||||||
 | 
					        sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name1, station_name=sta[0:1], sta_mode=11)
 | 
				
			||||||
 | 
					        sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name2, station_name=sta[1:2], sta_mode=2)
 | 
				
			||||||
 | 
					        if (not sta_ip1) or (not sta_ip2):
 | 
				
			||||||
 | 
					            print("test failed due to no station ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_legacymode_2g", mode=mode, vlan_id=vlan,
 | 
				
			||||||
 | 
					                                        download_rate="1Gbps", batch_size="1,2",
 | 
				
			||||||
 | 
					                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_tools.attach_report_graphs(report_name=report_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6396", name="WIFI-6396")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_5g
 | 
				
			||||||
 | 
					    def test_atf_sta1_greenfieldmode_sta2_atten30dB_5g(self, lf_test, lf_tools, station_names_fiveg):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        station_name = station_names_fiveg[0]
 | 
				
			||||||
 | 
					        radio_name1 = lf_tools.fiveg_radios[0]
 | 
				
			||||||
 | 
					        radio_name2 = lf_tools.fiveg_radios[1]
 | 
				
			||||||
 | 
					        sta = []
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            sta.append(station_name + str(i))
 | 
				
			||||||
 | 
					        print(sta)
 | 
				
			||||||
 | 
					        atten_serial = lf_test.attenuator_serial_5g_radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                          station_name=station_names_fiveg, lf_tools_obj=lf_tools)
 | 
				
			||||||
 | 
					        atten_serial_split = atten_serial[1].split(".")
 | 
				
			||||||
 | 
					        sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name1, station_name=sta[0:1], sta_mode=9)
 | 
				
			||||||
 | 
					        sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name2, station_name=sta[1:2], sta_mode=9)
 | 
				
			||||||
 | 
					        if (not sta_ip1) or (not sta_ip2):
 | 
				
			||||||
 | 
					            print("test failed due to no station ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            lf_test.attenuator_modify(int(atten_serial_split[2]), i, 300)
 | 
				
			||||||
 | 
					            time.sleep(0.5)
 | 
				
			||||||
 | 
					        wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_atten30dB_5g", mode=mode,
 | 
				
			||||||
 | 
					                                        vlan_id=vlan,
 | 
				
			||||||
 | 
					                                        download_rate="1Gbps", batch_size="1,2",
 | 
				
			||||||
 | 
					                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_tools.attach_report_graphs(report_name=report_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6397", name="WIFI-6397")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_5g
 | 
				
			||||||
 | 
					    def test_atf_sta1_greenfieldmode_sta2_legacymode_5g(self, lf_test, lf_tools, station_names_fiveg):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        station_name = station_names_fiveg[0]
 | 
				
			||||||
 | 
					        radio_name1 = lf_tools.fiveg_radios[0]
 | 
				
			||||||
 | 
					        radio_name2 = lf_tools.fiveg_radios[1]
 | 
				
			||||||
 | 
					        sta = []
 | 
				
			||||||
 | 
					        for i in range(2):
 | 
				
			||||||
 | 
					            sta.append(station_name + str(i))
 | 
				
			||||||
 | 
					        print(sta)
 | 
				
			||||||
 | 
					        sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name1, station_name=sta[0:1], sta_mode=9)
 | 
				
			||||||
 | 
					        sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
 | 
				
			||||||
 | 
					                                                     radio=radio_name2, station_name=sta[1:2], sta_mode=1)
 | 
				
			||||||
 | 
					        if (not sta_ip1) or (not sta_ip2):
 | 
				
			||||||
 | 
					            print("test failed due to no station ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_legacymode_5g", mode=mode,
 | 
				
			||||||
 | 
					                                        vlan_id=vlan,
 | 
				
			||||||
 | 
					                                        download_rate="1Gbps", batch_size="1,2",
 | 
				
			||||||
 | 
					                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_tools.attach_report_graphs(report_name=report_name)
 | 
				
			||||||
@@ -0,0 +1,969 @@
 | 
				
			|||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					import pandas as pd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.dfs, pytest.mark.bridge]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general1 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 52,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general1],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel52Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6472", name="WIFI-6472")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_52_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_52_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general1["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general2 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 100,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general2],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel100Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6473", name="WIFI-6473")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_100_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_100_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general2["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general3 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 104,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general3],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel104Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6474", name="WIFI-6474")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_104_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_104_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general3["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general4 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 56,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general4],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel56Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6475", name="WIFI-6475")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_56_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_56_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general4["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general5 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 60,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general5],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel60Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6476", name="WIFI-6476")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_60_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_60_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general5["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general6 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 64,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general6],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel64Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6477", name="WIFI-6477")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_64_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_64_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general6["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general7 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 108,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general7],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel108Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6478", name="WIFI-6478")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_108_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_108_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general7["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general8 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 112,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general8],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel112Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6479", name="WIFI-6479")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_112_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_112_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general8["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# setup_params_general9 = {
 | 
				
			||||||
 | 
					#     "mode": "BRIDGE",
 | 
				
			||||||
 | 
					#     "ssid_modes": {
 | 
				
			||||||
 | 
					#         "wpa2_personal": [
 | 
				
			||||||
 | 
					#             {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					#         ]
 | 
				
			||||||
 | 
					#     },
 | 
				
			||||||
 | 
					#     "dfs": {
 | 
				
			||||||
 | 
					#         "channel": 124,
 | 
				
			||||||
 | 
					#         "channel_bandwidth": 20
 | 
				
			||||||
 | 
					#     },
 | 
				
			||||||
 | 
					#     "rf": {},
 | 
				
			||||||
 | 
					#     "radius": False
 | 
				
			||||||
 | 
					# }
 | 
				
			||||||
 | 
					# @pytest.mark.parametrize(
 | 
				
			||||||
 | 
					#     'setup_profiles',
 | 
				
			||||||
 | 
					#     [setup_params_general9],
 | 
				
			||||||
 | 
					#     indirect=True,
 | 
				
			||||||
 | 
					#     scope="class"
 | 
				
			||||||
 | 
					# )
 | 
				
			||||||
 | 
					# @pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# class TestDFSChannel124Bw20(object):
 | 
				
			||||||
 | 
					#     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6480", name="WIFI-6480")
 | 
				
			||||||
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					#     @pytest.mark.fiveg
 | 
				
			||||||
 | 
					#     @pytest.mark.dfs_channel_124_bw_20
 | 
				
			||||||
 | 
					#     def test_dfs_channel_124_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					#         lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					#         profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					#         ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					#         channel = setup_params_general9["dfs"]["channel"]
 | 
				
			||||||
 | 
					#         security = "wpa2"
 | 
				
			||||||
 | 
					#         band = "fiveg"
 | 
				
			||||||
 | 
					#         mode = "BRIDGE"
 | 
				
			||||||
 | 
					#         vlan = 1
 | 
				
			||||||
 | 
					#         dfs_fail = True
 | 
				
			||||||
 | 
					#         print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					#         station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					#                                          passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					#                                          station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					#         print("station", station)
 | 
				
			||||||
 | 
					#         channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					#         print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					#         if channel1 == str(channel):
 | 
				
			||||||
 | 
					#             dfs_start.dfs()
 | 
				
			||||||
 | 
					#             time.sleep(15)
 | 
				
			||||||
 | 
					#         else:
 | 
				
			||||||
 | 
					#             print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					#             allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					#             assert False
 | 
				
			||||||
 | 
					#         channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					#         log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					#         if channel1 != channel2:
 | 
				
			||||||
 | 
					#             print(log)
 | 
				
			||||||
 | 
					#             print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					#             allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					#         else:
 | 
				
			||||||
 | 
					#             print(log)
 | 
				
			||||||
 | 
					#             print("dfs not happened")
 | 
				
			||||||
 | 
					#             allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					#             dfs_fail = False
 | 
				
			||||||
 | 
					#         dfs_start.reboot()
 | 
				
			||||||
 | 
					#         time.sleep(200)
 | 
				
			||||||
 | 
					#         while True:
 | 
				
			||||||
 | 
					#             connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					#             if connected is True:
 | 
				
			||||||
 | 
					#                 print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					#                 break
 | 
				
			||||||
 | 
					#             time.sleep(1)
 | 
				
			||||||
 | 
					#         if not dfs_fail:
 | 
				
			||||||
 | 
					#             assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general10 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 132,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general10],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel132Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6481", name="WIFI-6481")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_132_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_132_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general10["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general11 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 136,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general11],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel136Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6482", name="WIFI-6482")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_136_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_136_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general11["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general12 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 140,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general12],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel140Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6483", name="WIFI-6483")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_140_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_140_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general12["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general13 = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "dfs": {
 | 
				
			||||||
 | 
					        "channel": 144,
 | 
				
			||||||
 | 
					        "channel_bandwidth": 20
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general13],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TestDFSChannel144Bw20(object):
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6484", name="WIFI-6484")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.dfs_channel_144_bw_20
 | 
				
			||||||
 | 
					    def test_dfs_channel_144_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
 | 
					        channel = setup_params_general13["dfs"]["channel"]
 | 
				
			||||||
 | 
					        security = "wpa2"
 | 
				
			||||||
 | 
					        band = "fiveg"
 | 
				
			||||||
 | 
					        mode = "BRIDGE"
 | 
				
			||||||
 | 
					        vlan = 1
 | 
				
			||||||
 | 
					        dfs_fail = True
 | 
				
			||||||
 | 
					        print("station_names_fiveg :", station_names_fiveg)
 | 
				
			||||||
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 | 
					        print("station", station)
 | 
				
			||||||
 | 
					        channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        print("channel before dfs: ", channel1)
 | 
				
			||||||
 | 
					        if channel1 == str(channel):
 | 
				
			||||||
 | 
					            dfs_start.dfs()
 | 
				
			||||||
 | 
					            time.sleep(15)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print("Station not connected to applied channel")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body="Station not connected to applied channel")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
 | 
				
			||||||
 | 
					        log = dfs_start.dfs_logread()
 | 
				
			||||||
 | 
					        if channel1 != channel2:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("channel after dfs: ", channel2)
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            print(log)
 | 
				
			||||||
 | 
					            print("dfs not happened")
 | 
				
			||||||
 | 
					            allure.attach(name="log Data", body=log)
 | 
				
			||||||
 | 
					            dfs_fail = False
 | 
				
			||||||
 | 
					        dfs_start.reboot()
 | 
				
			||||||
 | 
					        time.sleep(200)
 | 
				
			||||||
 | 
					        while True:
 | 
				
			||||||
 | 
					            connected, latest, active = dfs_start.get_ucentral_status()
 | 
				
			||||||
 | 
					            if connected is True:
 | 
				
			||||||
 | 
					                print("status is connected after reboot: ", connected)
 | 
				
			||||||
 | 
					                break
 | 
				
			||||||
 | 
					            time.sleep(1)
 | 
				
			||||||
 | 
					        if not dfs_fail:
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -11,7 +11,7 @@ import time
 | 
				
			|||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
import allure
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pytestmark = [pytest.mark.throughput_benchmark_test, pytest.mark.bridge] # pytest.mark.usefixtures("setup_test_run")]
 | 
					pytestmark = [pytest.mark.performance, pytest.mark.throughput_benchmark_test, pytest.mark.bridge] # pytest.mark.usefixtures("setup_test_run")]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setup_params_general = {
 | 
					setup_params_general = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,110 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Dynamic_Vlan: VLAN Mode
 | 
				
			||||||
 | 
					    pytest -m "dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.dynamic_vlan, pytest.mark.wpa2_enterprise, pytest.mark.vlan,pytest.mark.fiveg]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2e_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something",
 | 
				
			||||||
 | 
					             "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA,
 | 
				
			||||||
 | 
					             "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA,
 | 
				
			||||||
 | 
					             "vlan": 100
 | 
				
			||||||
 | 
					             }]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite("regression")
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestDynamicVlan(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.dynamic_precedence_over_ssid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5705")
 | 
				
			||||||
 | 
					    def test_dynamic_precedence_over_ssid_vlan(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs,
 | 
				
			||||||
 | 
					                                                    create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                    station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100,200]
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan[0],
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                               "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_radius_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("vlan ip...", eth_radius_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_upstream_ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("radius configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,648 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Dynamic_Vlan: VLAN Mode
 | 
				
			||||||
 | 
					    pytest -m "dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.dynamic_vlan, pytest.mark.wpa2_enterprise, pytest.mark.vlan,
 | 
				
			||||||
 | 
					              pytest.mark.fiveg]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2e_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something",
 | 
				
			||||||
 | 
					             "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA,
 | 
				
			||||||
 | 
					             "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA,
 | 
				
			||||||
 | 
					             "vlan": 100
 | 
				
			||||||
 | 
					             }]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite("regression")
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestDynamicVlan(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.absence_of_radius_vlan_identifier
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5704")
 | 
				
			||||||
 | 
					    def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                                                create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                                get_configuration,
 | 
				
			||||||
 | 
					                                                                station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan_id = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan_id])
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg",
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        print(sta_ip_1)
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        # eth_ip_1 = eth_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("upstream ip...", eth_ip)
 | 
				
			||||||
 | 
					        print("ssid configured vlan ip", eth_vlan_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            elif i == j:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.invalidradiusvlan
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_invalid_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5706")
 | 
				
			||||||
 | 
					    def test_dynamic_invalid_vlan(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                  create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                  station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "invalidradiusvlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan_id = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan_id])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan_id,
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("ssid vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("upstream ip..", eth_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.periodic_reauthentication
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5707")
 | 
				
			||||||
 | 
					    def test_radius_vlan_info_retained_after_periodic_reauthentication(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                                       get_ap_logs,
 | 
				
			||||||
 | 
					                                                                       create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                                       get_configuration,
 | 
				
			||||||
 | 
					                                                                       station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "periodic_reauthentication and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan[1],
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					        sta_ip = lf_test.station_ip[station_names_fiveg[0]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        count = 0
 | 
				
			||||||
 | 
					        # print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        # print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        # print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                             "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                            "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_rad_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        sta_ip_1 = sta_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("radius configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print(sta_ip_1)
 | 
				
			||||||
 | 
					        for k in range(0, 2):
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    break
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    if count == 2:
 | 
				
			||||||
 | 
					                        break  # allure.attach(name="station ip",body=str(sta_ip))
 | 
				
			||||||
 | 
					                    continue
 | 
				
			||||||
 | 
					            count = count + 1
 | 
				
			||||||
 | 
					            time.sleep(30)
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_names_fiveg[0]], option="up")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                       "/" + station_names_fiveg[0])["interface"]["ip"]
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip.split('.')
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(sta_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if count == 2:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					        elif count == 0:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.absenceofvlanid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5708")
 | 
				
			||||||
 | 
					    def test_ssid_vlan_used_in_absence_of_radius_vlan(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                                      create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                      station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "absenceofvlanid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan,
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("ssid configured vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("upstream ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid configured vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid configured vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    '''
 | 
				
			||||||
 | 
					    @pytest.mark.unsupported
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_unsupported_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5710")
 | 
				
			||||||
 | 
					    def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools,
 | 
				
			||||||
 | 
					                                      create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                      station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "unsupported and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=100,
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					                print("Station ip not assigned as per vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					                print("Station ip assigned as per vlan")
 | 
				
			||||||
 | 
					    '''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.outofboundvlanid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_outof_bound_vlanid",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5711")
 | 
				
			||||||
 | 
					    def test_out_of_bound_vlanid(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "outofboundvlanid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan,
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if lf_test.station_ip[station_names_fiveg[0]] == "0.0.0.0":
 | 
				
			||||||
 | 
					            print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					            allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					            allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="out of bound vlan id..", body=str(7000))
 | 
				
			||||||
 | 
					            print("Test Passsed...Client Connection failed")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.client_association_ap_with_dynamic_vlan
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_client_association_ap_with_dynamic_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5712")
 | 
				
			||||||
 | 
					    def test_client_association_ap_with_dynamic_vlan(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs,
 | 
				
			||||||
 | 
					                                                     create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                     station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="fiveg", vlan_id=vlan[0],
 | 
				
			||||||
 | 
					                            station_name=station_names_fiveg, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                             "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                               "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
 | 
				
			||||||
 | 
					        print("radius vlan ip...", eth_radius_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_upstream_ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_radius_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="Upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.subsequent_user_for_same_user_account
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_subsequent_user_for_same_user_account",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5713")
 | 
				
			||||||
 | 
					    def test_subsequent_user_for_same_user_account(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                   get_ap_logs,
 | 
				
			||||||
 | 
					                                                   create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                   get_configuration,
 | 
				
			||||||
 | 
					                                                   station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        station_list = []
 | 
				
			||||||
 | 
					        sta_ip = []
 | 
				
			||||||
 | 
					        for i in range(0, 2):
 | 
				
			||||||
 | 
					            station_list.append(lf_tools.fiveg_prefix + str(i))
 | 
				
			||||||
 | 
					        print(station_list)
 | 
				
			||||||
 | 
					        print([station_list[0]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for m in range(0, len(station_list)):
 | 
				
			||||||
 | 
					            lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                                mode=mode, band="fiveg", vlan_id=100,
 | 
				
			||||||
 | 
					                                station_name=[station_list[m]], key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                                pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                                ttls_passwd="passwordA", ieee80211w=0,
 | 
				
			||||||
 | 
					                                wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_list[m]], option="up")
 | 
				
			||||||
 | 
					            sta_ip.append(lf_test.station_ip[station_list[m]])
 | 
				
			||||||
 | 
					            if sta_ip[m] == "0.0.0.0":
 | 
				
			||||||
 | 
					                allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					            time.sleep(30)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        for n in range(0, len(station_list)):
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip[n].split('.')
 | 
				
			||||||
 | 
					            print("station ip...", sta_ip[n])
 | 
				
			||||||
 | 
					            print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					            print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    val = False
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    val = True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(sta_ip[n]))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            if val:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                print("Station ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					            elif not val:
 | 
				
			||||||
 | 
					                print("Station ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.subsequent_user_for_different_user_account
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5714")
 | 
				
			||||||
 | 
					    def test_subsequent_user_for_different_user_account(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                        get_ap_logs,
 | 
				
			||||||
 | 
					                                                        create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                        get_configuration,
 | 
				
			||||||
 | 
					                                                        station_names_fiveg):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_5G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        station_list = []
 | 
				
			||||||
 | 
					        sta_ip = []
 | 
				
			||||||
 | 
					        dynamic_vlan_user = ["userA", "userB"]
 | 
				
			||||||
 | 
					        dynamic_vlan_pass = ["passwordA", "passwordB"]
 | 
				
			||||||
 | 
					        for i in range(0, 2):
 | 
				
			||||||
 | 
					            station_list.append(lf_tools.fiveg_prefix + str(i))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))):
 | 
				
			||||||
 | 
					            lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                                mode=mode, band="fiveg", vlan_id=vlan[sta],
 | 
				
			||||||
 | 
					                                station_name=[station_list[sta]], key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                                pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                                ttls_passwd=user_pass, ieee80211w=0,
 | 
				
			||||||
 | 
					                                wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            sta_ip.append(lf_test.station_ip[station_list[sta]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                            "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                       "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					            eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip[sta].split('.')
 | 
				
			||||||
 | 
					            if sta_ip_1 == "0.0.0.0":
 | 
				
			||||||
 | 
					                allure.attach("station didn't received ip..")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            print("station ip...", lf_test.station_ip[station_list[sta]])
 | 
				
			||||||
 | 
					            print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					            print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    val = False
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    val = True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(sta_ip[sta]))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[sta])))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            if val:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                print(f"{station_list[sta]} ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					            elif not val:
 | 
				
			||||||
 | 
					                print(f"{station_list[sta]} ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_list[sta]], option="up")
 | 
				
			||||||
 | 
					            time.sleep(5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,110 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Dynamic_Vlan: VLAN Mode
 | 
				
			||||||
 | 
					    pytest -m "dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.dynamic_vlan, pytest.mark.wpa2_enterprise, pytest.mark.vlan,pytest.mark.twog]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2e_2g", "appliedRadios": ["2G"],
 | 
				
			||||||
 | 
					             "security_key": "something",
 | 
				
			||||||
 | 
					             "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA,
 | 
				
			||||||
 | 
					             "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA,
 | 
				
			||||||
 | 
					             "vlan": 100
 | 
				
			||||||
 | 
					             }]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite("regression")
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestDynamicVlan(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.dynamic_precedence_over_ssid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_precedence_over_ssid_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5705")
 | 
				
			||||||
 | 
					    def test_dynamic_precedence_over_ssid_vlan(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs,
 | 
				
			||||||
 | 
					                                                    create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                    station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100,200]
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan[0],
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                               "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_radius_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("vlan ip...", eth_radius_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_upstream_ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("radius configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,648 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Dynamic_Vlan: VLAN Mode
 | 
				
			||||||
 | 
					    pytest -m "dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
 | 
				
			||||||
 | 
					from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.dynamic_vlan, pytest.mark.wpa2_enterprise, pytest.mark.vlan,
 | 
				
			||||||
 | 
					              pytest.mark.twog]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2e_2g", "appliedRadios": ["2G"],
 | 
				
			||||||
 | 
					             "security_key": "something",
 | 
				
			||||||
 | 
					             "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA,
 | 
				
			||||||
 | 
					             "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA,
 | 
				
			||||||
 | 
					             "vlan": 100
 | 
				
			||||||
 | 
					             }]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite("regression")
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestDynamicVlan(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.absence_of_radius_vlan_identifier
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5704")
 | 
				
			||||||
 | 
					    def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                                                create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                                get_configuration,
 | 
				
			||||||
 | 
					                                                                station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan_id = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan_id])
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog",
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        print(sta_ip_1)
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        # eth_ip_1 = eth_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("upstream ip...", eth_ip)
 | 
				
			||||||
 | 
					        print("ssid configured vlan ip", eth_vlan_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            elif i == j:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.invalidradiusvlan
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_invalid_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5706")
 | 
				
			||||||
 | 
					    def test_dynamic_invalid_vlan(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                  create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                  station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "invalidradiusvlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan_id = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan_id])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan_id,
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("ssid vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("upstream ip..", eth_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.periodic_reauthentication
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5707")
 | 
				
			||||||
 | 
					    def test_radius_vlan_info_retained_after_periodic_reauthentication(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                                       get_ap_logs,
 | 
				
			||||||
 | 
					                                                                       create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                                       get_configuration,
 | 
				
			||||||
 | 
					                                                                       station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "periodic_reauthentication and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan[1],
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					        sta_ip = lf_test.station_ip[station_names_twog[0]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        count = 0
 | 
				
			||||||
 | 
					        # print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        # print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        # print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                             "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                            "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_rad_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        sta_ip_1 = sta_ip.split('.')
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("radius configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        print(sta_ip_1)
 | 
				
			||||||
 | 
					        for k in range(0, 2):
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    break
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    if count == 2:
 | 
				
			||||||
 | 
					                        break  # allure.attach(name="station ip",body=str(sta_ip))
 | 
				
			||||||
 | 
					                    continue
 | 
				
			||||||
 | 
					            count = count + 1
 | 
				
			||||||
 | 
					            time.sleep(30)
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_names_twog[0]], option="up")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                       "/" + station_names_twog[0])["interface"]["ip"]
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip.split('.')
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(sta_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_rad_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if count == 2:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					        elif count == 0:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per dynamic vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.absenceofvlanid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5708")
 | 
				
			||||||
 | 
					    def test_ssid_vlan_used_in_absence_of_radius_vlan(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                                      create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                      station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "absenceofvlanid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan,
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("ssid configured vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("upstream ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_vlan_ip[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					        allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per ssid configured vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per ssid configured vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    '''
 | 
				
			||||||
 | 
					    @pytest.mark.unsupported
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_dynamic_unsupported_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5710")
 | 
				
			||||||
 | 
					    def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools,
 | 
				
			||||||
 | 
					                                      create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                      station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "unsupported and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=100,
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					                print("Station ip not assigned as per vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					                allure.attach(name="vlan ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					                print("Station ip assigned as per vlan")
 | 
				
			||||||
 | 
					    '''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.outofboundvlanid
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_outof_bound_vlanid",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5711")
 | 
				
			||||||
 | 
					    def test_out_of_bound_vlanid(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
 | 
				
			||||||
 | 
					                                create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "outofboundvlanid and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan,
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if lf_test.station_ip[station_names_twog[0]] == "0.0.0.0":
 | 
				
			||||||
 | 
					            print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					            allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					            allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="out of bound vlan id..", body=str(7000))
 | 
				
			||||||
 | 
					            print("Test Passsed...Client Connection failed")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.client_association_ap_with_dynamic_vlan
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_client_association_ap_with_dynamic_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5712")
 | 
				
			||||||
 | 
					    def test_client_association_ap_with_dynamic_vlan(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs,
 | 
				
			||||||
 | 
					                                                     create_lanforge_chamberview_dut, lf_test, get_configuration,
 | 
				
			||||||
 | 
					                                                     station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                            mode=mode, band="twog", vlan_id=vlan[0],
 | 
				
			||||||
 | 
					                            station_name=station_names_twog, key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                            pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                            ttls_passwd="passwordB", ieee80211w=0,
 | 
				
			||||||
 | 
					                            wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                             "/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                               "/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
 | 
				
			||||||
 | 
					        eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        print("station ip...", lf_test.station_ip[station_names_twog[0]])
 | 
				
			||||||
 | 
					        print("radius vlan ip...", eth_radius_vlan_ip)
 | 
				
			||||||
 | 
					        print("eth_upstream_ip..", eth_ip)
 | 
				
			||||||
 | 
					        if sta_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("station didnt received any ip")
 | 
				
			||||||
 | 
					            allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					        elif eth_radius_vlan_ip_1[0] == "0":
 | 
				
			||||||
 | 
					            print("ssid configured vlan didnt recieved ip")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for i, j in zip(sta_ip_1[0:2], eth_radius_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					            if i != j:
 | 
				
			||||||
 | 
					                val = False
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                val = True
 | 
				
			||||||
 | 
					        allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
 | 
				
			||||||
 | 
					        allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
 | 
				
			||||||
 | 
					        allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
 | 
				
			||||||
 | 
					        allure.attach(name="Upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					        if val:
 | 
				
			||||||
 | 
					            assert True
 | 
				
			||||||
 | 
					            print("Station ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					        elif not val:
 | 
				
			||||||
 | 
					            print("Station ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.subsequent_user_for_same_user_account
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_subsequent_user_for_same_user_account",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5713")
 | 
				
			||||||
 | 
					    def test_subsequent_user_for_same_user_account(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                        get_ap_logs,
 | 
				
			||||||
 | 
					                                                        create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                        get_configuration,
 | 
				
			||||||
 | 
					                                                        station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        vlan = 100
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=[vlan])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        station_list = []
 | 
				
			||||||
 | 
					        sta_ip = []
 | 
				
			||||||
 | 
					        for i in range(0, 2):
 | 
				
			||||||
 | 
					            station_list.append(lf_tools.twog_prefix + str(i))
 | 
				
			||||||
 | 
					        print(station_list)
 | 
				
			||||||
 | 
					        print([station_list[0]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for m in range(0, len(station_list)):
 | 
				
			||||||
 | 
					            lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                                mode=mode, band="twog", vlan_id=100,
 | 
				
			||||||
 | 
					                                station_name=[station_list[m]], key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                                pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                                ttls_passwd="passwordA", ieee80211w=0,
 | 
				
			||||||
 | 
					                                wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_list[m]], option="up")
 | 
				
			||||||
 | 
					            sta_ip.append(lf_test.station_ip[station_list[m]])
 | 
				
			||||||
 | 
					            if sta_ip[m] == "0.0.0.0":
 | 
				
			||||||
 | 
					                allure.attach("station didnt recieved ip..")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					            time.sleep(30)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                        "/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                   "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					        eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					        for n in range(0, len(station_list)):
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip[n].split('.')
 | 
				
			||||||
 | 
					            print("station ip...", sta_ip[n])
 | 
				
			||||||
 | 
					            print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					            print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    val = False
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    val = True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(sta_ip[n]))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            if val:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                print("Station ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					            elif not val:
 | 
				
			||||||
 | 
					                print("Station ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @pytest.mark.subsequent_user_for_different_user_account
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @allure.testcase(name="test_subsequent_user_for_different_user_account_vlan",
 | 
				
			||||||
 | 
					                     url="https://telecominfraproject.atlassian.net/browse/WIFI-5714")
 | 
				
			||||||
 | 
					    def test_subsequent_user_for_different_user_account(self, get_vif_state, lf_tools, get_lf_logs,
 | 
				
			||||||
 | 
					                                                        get_ap_logs,
 | 
				
			||||||
 | 
					                                                        create_lanforge_chamberview_dut, lf_test,
 | 
				
			||||||
 | 
					                                                        get_configuration,
 | 
				
			||||||
 | 
					                                                        station_names_twog):
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					                pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
 | 
				
			||||||
 | 
					        ssid_2G = profile_data[0]["ssid_name"]
 | 
				
			||||||
 | 
					        mode = "VLAN"
 | 
				
			||||||
 | 
					        val = ""
 | 
				
			||||||
 | 
					        vlan = [100, 200]
 | 
				
			||||||
 | 
					        upstream_port = lf_tools.upstream_port
 | 
				
			||||||
 | 
					        print(upstream_port)
 | 
				
			||||||
 | 
					        port_resources = upstream_port.split(".")
 | 
				
			||||||
 | 
					        print(lf_tools.dut_idx_mapping)
 | 
				
			||||||
 | 
					        lf_tools.reset_scenario()
 | 
				
			||||||
 | 
					        lf_tools.add_vlan(vlan_ids=vlan)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        station_list = []
 | 
				
			||||||
 | 
					        sta_ip = []
 | 
				
			||||||
 | 
					        dynamic_vlan_user = ["userA", "userB"]
 | 
				
			||||||
 | 
					        dynamic_vlan_pass = ["passwordA", "passwordB"]
 | 
				
			||||||
 | 
					        for i in range(0, 2):
 | 
				
			||||||
 | 
					            station_list.append(lf_tools.twog_prefix + str(i))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))):
 | 
				
			||||||
 | 
					            lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
 | 
				
			||||||
 | 
					                                mode=mode, band="twog", vlan_id=vlan[sta],
 | 
				
			||||||
 | 
					                                station_name=[station_list[sta]], key_mgmt="WPA-EAP",
 | 
				
			||||||
 | 
					                                pairwise="NA", group="NA", wpa_psk="DEFAULT",
 | 
				
			||||||
 | 
					                                ttls_passwd=user_pass, ieee80211w=0,
 | 
				
			||||||
 | 
					                                wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            sta_ip.append(lf_test.station_ip[station_list[sta]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                            "/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
 | 
				
			||||||
 | 
					                                       "/" + port_resources[2])["interface"]["ip"]
 | 
				
			||||||
 | 
					            eth_vlan_ip_1 = eth_vlan_ip.split('.')
 | 
				
			||||||
 | 
					            print(sta_ip)
 | 
				
			||||||
 | 
					            sta_ip_1 = sta_ip[sta].split('.')
 | 
				
			||||||
 | 
					            if sta_ip_1 == "0.0.0.0":
 | 
				
			||||||
 | 
					                allure.attach("station didn't received ip..")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            print("station ip...", lf_test.station_ip[station_list[sta]])
 | 
				
			||||||
 | 
					            print("vlan ip...", eth_vlan_ip)
 | 
				
			||||||
 | 
					            print("eth_vlan_ip..", eth_ip)
 | 
				
			||||||
 | 
					            for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
 | 
				
			||||||
 | 
					                if i != j:
 | 
				
			||||||
 | 
					                    val = False
 | 
				
			||||||
 | 
					                else:
 | 
				
			||||||
 | 
					                    val = True
 | 
				
			||||||
 | 
					            allure.attach(name="station ip....", body=str(sta_ip[sta]))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
 | 
				
			||||||
 | 
					            allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream port....", body=str(port_resources[2]))
 | 
				
			||||||
 | 
					            allure.attach(name="upstream ip....", body=str(eth_ip))
 | 
				
			||||||
 | 
					            if val:
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					                print(f"{station_list[sta]} ip assigned as per radius vlan")
 | 
				
			||||||
 | 
					            elif not val:
 | 
				
			||||||
 | 
					                print(f"{station_list[sta]} ip not assigned as per radius vlan")
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					            lf_tools.admin_up_down([station_list[sta]], option="up")
 | 
				
			||||||
 | 
					            time.sleep(5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -275,3 +275,76 @@ class TestNATModeCaptivePortalSuiteOneNAT(object):
 | 
				
			|||||||
            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
            assert False
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5129", name="WIFI-5129")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_Captive_Portal_WPA3_2g_Personal_NAT(self, request, get_vif_state, get_ap_logs,
 | 
				
			||||||
 | 
					                                                    get_APToMobileDevice_data,
 | 
				
			||||||
 | 
					                                                    setup_perfectoMobile_android):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_android[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_android[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5137", name="WIFI-5137")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_Captive_Portal_WPA3_5g_Personal_NAT(self, request, get_vif_state, get_ap_logs,
 | 
				
			||||||
 | 
					                                                    get_APToMobileDevice_data,
 | 
				
			||||||
 | 
					                                                    setup_perfectoMobile_android):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa3_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_android[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_android[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = captive_portal_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            wifi_disconnect_and_forget(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,342 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    verifyUploadDownloadSpeediOS, get_ip_add_eap_ios, get_ip_add_check_ios, wifi_connect_eap, wifi_disconnect_and_forget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect
 | 
				
			||||||
 | 
					              , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleAirplaneMode]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_enterprise = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa3_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop Regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Bridge Mode EAP Client ReConnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.suiteA
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_enterprise],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeBridgeModeEnterpriseTTLSSuiteA(object):
 | 
				
			||||||
 | 
					    """ SuiteA Enterprise Test Cases
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and bridge and enterprise and ttls and interop and suiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6545", name="WIFI-6545")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6546", name="WIFI-6546")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6547", name="WIFI-6547")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa2 enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS,
 | 
				
			||||||
 | 
					                                                 connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6548", name="WIFI-6548")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA3_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6543", name="WIFI-6543")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6544", name="WIFI-6544")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_Eap_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,624 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    verifyUploadDownloadSpeediOS, get_ip_add_ios, get_ip_add_check_ios, wifi_connect, wifi_disconnect_and_forget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
 | 
				
			||||||
 | 
					              pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleAirplaneMode]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					                 "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteA
 | 
				
			||||||
 | 
					@allure.feature("BRIDGE MODE CLIENT RECONNECT")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteOneBridge(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and bridge and InteropsuiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6531", name="WIFI-6531")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data,
 | 
				
			||||||
 | 
					                                          setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6532", name="WIFI-6532")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6533", name="WIFI-6533")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6534", name="WIFI-6534")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6537", name="WIFI-6537")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6538", name="WIFI-6538")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_Open_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general_two = {
 | 
				
			||||||
 | 
					    "mode": "BRIDGE",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa3_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa3_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa_wpa2_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 2
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Bridge Mode Client Reconnect : Suite-B")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteB
 | 
				
			||||||
 | 
					@allure.feature("BRIDGE MODE CLIENT Reconnect")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general_two],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteBridgeTwo(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and bridge and InteropsuiteB"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6535", name="WIFI-6535")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6536", name="WIFI-6536")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6539", name="WIFI-6539")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6540", name="WIFI-6540")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6541", name="WIFI-6541")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6542", name="WIFI-6542")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_BRIDGE(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        # ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,342 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    verifyUploadDownloadSpeediOS, get_ip_add_eap_ios, get_ip_add_check_ios, wifi_connect_eap, wifi_disconnect_and_forget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect
 | 
				
			||||||
 | 
					              ,pytest.mark.ToggleAirplaneMode, pytest.mark.nat, pytest.mark.enterprise]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_enterprise = {
 | 
				
			||||||
 | 
					    "mode": "NAT",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa3_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}]},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Nat Mode EAP Client ReConnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.suiteA
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_enterprise],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeNatModeEnterpriseTTLSSuiteA(object):
 | 
				
			||||||
 | 
					    """ SuiteA Enterprise Test Cases
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and nat and enterprise and ttls and interop and suiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6561", name="WIFI-6561")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6562", name="WIFI-6562")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6563", name="WIFI-6563")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa2 enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS,
 | 
				
			||||||
 | 
					                                                 connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6564", name="WIFI-6564")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA3_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6559", name="WIFI-6559")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6560", name="WIFI-6560")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_Eap_Nat(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,626 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    verifyUploadDownloadSpeediOS, get_ip_add_ios, get_ip_add_check_ios, wifi_connect, wifi_disconnect_and_forget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
 | 
				
			||||||
 | 
					              pytest.mark.client_reconnect, pytest.mark.ToggleAirplaneMode, pytest.mark.nat]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "NAT",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"]},
 | 
				
			||||||
 | 
					                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"]}],
 | 
				
			||||||
 | 
					        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					                 "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Nat Mode Client Reconnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteA
 | 
				
			||||||
 | 
					@allure.feature("NAT MODE CLIENT RECONNECT")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteOneNat(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and nat and InteropsuiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6549", name="WIFI-6549")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data,
 | 
				
			||||||
 | 
					                                          setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6550", name="WIFI-6550")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6553", name="WIFI-6553")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6554", name="WIFI-6554")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6569", name="WIFI-6569")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6570", name="WIFI-6570")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_Open_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general_two = {
 | 
				
			||||||
 | 
					    "mode": "NAT",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa3_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa3_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}],
 | 
				
			||||||
 | 
					        "wpa_wpa2_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something"},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something"}]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="NAT Mode Client Reconnect : Suite-B")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteB
 | 
				
			||||||
 | 
					@allure.feature("NAT MODE CLIENT Reconnect")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general_two],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteNatTwo(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and nat and InteropsuiteB"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6551", name="WIFI-6551")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6552", name="WIFI-6552")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6555", name="WIFI-6555")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6556", name="WIFI-6556")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6557", name="WIFI-6557")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6558", name="WIFI-6558")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_NAT(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        # ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,342 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    verifyUploadDownloadSpeediOS, get_ip_add_eap_ios, get_ip_add_check_ios, wifi_connect_eap, wifi_disconnect_and_forget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect
 | 
				
			||||||
 | 
					              ,pytest.mark.ToggleAirplaneMode, pytest.mark.vlan, pytest.mark.enterprise]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_enterprise = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa2_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa3_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa_enterprise": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": True
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_enterprise['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_enterprise['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_enterprise['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="VLAN Mode EAP Client ReConnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.suiteA
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_enterprise],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeVlanModeEnterpriseTTLSSuiteA(object):
 | 
				
			||||||
 | 
					    """ SuiteA Enterprise Test Cases
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and vlan and enterprise and ttls and interop and suiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6585", name="WIFI-6585")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6586", name="WIFI-6586")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6587", name="WIFI-6587")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa2 enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS,
 | 
				
			||||||
 | 
					                                                 connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6588", name="WIFI-6588")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA3_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6583", name="WIFI-6583")
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					        """ wpa enterprise 5g
 | 
				
			||||||
 | 
					            pytest -m "client_connect and bridge and enterprise and ttls and wpa_enterprise and fiveg"
 | 
				
			||||||
 | 
					        """
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6584", name="WIFI-6584")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_enterprise
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_Eap_VLAN(self, request, get_vif_state, get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					                                       , setup_perfectoMobile_iOS, radius_info, get_ap_logs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = ["BLANK"]
 | 
				
			||||||
 | 
					        # ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        # print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        ttls_passwd = radius_info["password"]
 | 
				
			||||||
 | 
					        identity = radius_info['user']
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_ToggleAirplaneMode_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_eap_ios(request, ssidName, identity, ttls_passwd, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -0,0 +1,623 @@
 | 
				
			|||||||
 | 
					from logging import exception
 | 
				
			||||||
 | 
					import io
 | 
				
			||||||
 | 
					import unittest
 | 
				
			||||||
 | 
					import warnings
 | 
				
			||||||
 | 
					from perfecto.test import TestResultFactory
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					from selenium.webdriver.common.by import By
 | 
				
			||||||
 | 
					from appium import webdriver
 | 
				
			||||||
 | 
					from selenium.common.exceptions import NoSuchElementException
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if 'perfecto_libs' not in sys.path:
 | 
				
			||||||
 | 
					    sys.path.append(f'../libs/perfecto_libs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \
 | 
				
			||||||
 | 
					    Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\
 | 
				
			||||||
 | 
					    get_ip_add_ios, get_ip_add_check_ios
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
 | 
				
			||||||
 | 
					              pytest.mark.client_reconnect, pytest.mark.ToggleAirplaneMode, pytest.mark.vlan]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["2G"], "vlan": 100},
 | 
				
			||||||
 | 
					                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["5G"], "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
 | 
				
			||||||
 | 
					                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					                 "security_key": "something", "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa2_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something", "vlan": 100}]},
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 3
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="Vlan Mode Client Reconnect : Suite-A")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteA
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE CLIENT RECONNECT")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteOneVLAN(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and vlan and InteropsuiteA"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6571", name="WIFI-6571")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data,
 | 
				
			||||||
 | 
					                                          setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6572", name="WIFI-6572")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA2_Personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6575", name="WIFI-6575")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6576", name="WIFI-6576")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_WPA_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6577", name="WIFI-6577")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6578", name="WIFI-6578")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.open
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general["ssid_modes"]["open"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_params_general_two = {
 | 
				
			||||||
 | 
					    "mode": "VLAN",
 | 
				
			||||||
 | 
					    "ssid_modes": {
 | 
				
			||||||
 | 
					        "wpa3_personal": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something", "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa3_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa3_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something", "vlan": 100}],
 | 
				
			||||||
 | 
					        "wpa_wpa2_personal_mixed": [
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
 | 
				
			||||||
 | 
					            {"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["5G"],
 | 
				
			||||||
 | 
					             "security_key": "something", "vlan": 100}]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rf": {},
 | 
				
			||||||
 | 
					    "radius": False
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					for sec_modes in setup_params_general_two['ssid_modes'].keys():
 | 
				
			||||||
 | 
					    for i in range(len(setup_params_general_two['ssid_modes'][sec_modes])):
 | 
				
			||||||
 | 
					        N = 2
 | 
				
			||||||
 | 
					        rand_string = (''.join(random.choices(string.ascii_uppercase +
 | 
				
			||||||
 | 
					                                     string.digits, k=N)))+str(int(time.time_ns())%10000)
 | 
				
			||||||
 | 
					        setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general_two['ssid_modes'][sec_modes][i]['ssid_name'].replace("ssid_","") + "_"+ rand_string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@allure.suite(suite_name="interop regression")
 | 
				
			||||||
 | 
					@allure.sub_suite(sub_suite_name="VLAN Mode Client Reconnect : Suite-B")
 | 
				
			||||||
 | 
					@pytest.mark.InteropsuiteB
 | 
				
			||||||
 | 
					@allure.feature("VLAN MODE CLIENT Reconnect")
 | 
				
			||||||
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
 | 
					    'setup_profiles',
 | 
				
			||||||
 | 
					    [setup_params_general_two],
 | 
				
			||||||
 | 
					    indirect=True,
 | 
				
			||||||
 | 
					    scope="class"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
 | 
					class TestToggleAirplaneModeSuiteVLANTwo(object):
 | 
				
			||||||
 | 
					    """ Client Connectivity SuiteA
 | 
				
			||||||
 | 
					        pytest -m "client_reconnect and vlan and InteropsuiteB"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6573", name="WIFI-6573")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6574", name="WIFI-6574")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6579", name="WIFI-6579")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6580", name="WIFI-6580")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa3_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa3_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6581", name="WIFI-6581")
 | 
				
			||||||
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_5g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6582", name="WIFI-6582")
 | 
				
			||||||
 | 
					    @pytest.mark.twog
 | 
				
			||||||
 | 
					    @pytest.mark.wpa_wpa2_personal_mixed
 | 
				
			||||||
 | 
					    def test_ToggleAirplaneMode_2g_wpa_wpa2_personal_mixed_VLAN(self, request, get_vif_state, get_ap_logs, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
 | 
				
			||||||
 | 
					        ssidName = profile_data["ssid_name"]
 | 
				
			||||||
 | 
					        ssidPassword = profile_data["security_key"]
 | 
				
			||||||
 | 
					        # ssidPassword = "[BLANK]"
 | 
				
			||||||
 | 
					        print ("SSID_NAME: " + ssidName)
 | 
				
			||||||
 | 
					        print ("SSID_PASS: " + ssidPassword)
 | 
				
			||||||
 | 
					        get_vif_state.append(ssidName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ssidName not in get_vif_state:
 | 
				
			||||||
 | 
					            allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
 | 
				
			||||||
 | 
					            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        report = setup_perfectoMobile_iOS[1]
 | 
				
			||||||
 | 
					        driver = setup_perfectoMobile_iOS[0]
 | 
				
			||||||
 | 
					        connData = get_APToMobileDevice_data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set Wifi/AP Mode
 | 
				
			||||||
 | 
					        ip, is_internet = get_ip_add_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        if is_internet:
 | 
				
			||||||
 | 
					            if ip:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet")
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                text_body = ("connected to " + ssidName + "with Internet, couldn't get IP address")
 | 
				
			||||||
 | 
					            print(text_body)
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str(text_body))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # wifi_connect(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
				
			||||||
 | 
					            Toggle_AirplaneMode_iOS(request, setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            ip_check, is_internet_check = get_ip_add_check_ios(request, ssidName, ssidPassword,
 | 
				
			||||||
 | 
					                                                               setup_perfectoMobile_iOS, connData)
 | 
				
			||||||
 | 
					            if (ip_check == ip):
 | 
				
			||||||
 | 
					                assert True
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                assert False
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            allure.attach(name="Connection Status: ", body=str("No Internet access"))
 | 
				
			||||||
 | 
					            assert False
 | 
				
			||||||
@@ -507,7 +507,7 @@ class Fixtures_2x:
 | 
				
			|||||||
                    else:
 | 
					                    else:
 | 
				
			||||||
                        print("no")
 | 
					                        print("no")
 | 
				
			||||||
                        var = False
 | 
					                        var = False
 | 
				
			||||||
 | 
					                for j in profile_data["ssid"][mode]:
 | 
				
			||||||
                    if mode in get_markers.keys() and get_markers[mode]:
 | 
					                    if mode in get_markers.keys() and get_markers[mode]:
 | 
				
			||||||
                        try:
 | 
					                        try:
 | 
				
			||||||
                            if j["appliedRadios"].__contains__("2G"):
 | 
					                            if j["appliedRadios"].__contains__("2G"):
 | 
				
			||||||
@@ -516,6 +516,7 @@ class Fixtures_2x:
 | 
				
			|||||||
                                lf_dut_data.append(j)
 | 
					                                lf_dut_data.append(j)
 | 
				
			||||||
                            j["appliedRadios"] = list(set(j["appliedRadios"]))
 | 
					                            j["appliedRadios"] = list(set(j["appliedRadios"]))
 | 
				
			||||||
                            j['security'] = 'wpa2'
 | 
					                            j['security'] = 'wpa2'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            if var :
 | 
					                            if var :
 | 
				
			||||||
                                RADIUS_SERVER_DATA = j["radius_auth_data"]
 | 
					                                RADIUS_SERVER_DATA = j["radius_auth_data"]
 | 
				
			||||||
                                RADIUS_ACCOUNTING_DATA = j['radius_acc_data']
 | 
					                                RADIUS_ACCOUNTING_DATA = j['radius_acc_data']
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@ import requests
 | 
				
			|||||||
import json
 | 
					import json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pytestmark = [pytest.mark.test_resources, pytest.mark.sanity, pytest.mark.uc_sanity,
 | 
					pytestmark = [pytest.mark.test_resources, pytest.mark.sanity, pytest.mark.uc_sanity,
 | 
				
			||||||
              pytest.mark.sanity_55]
 | 
					              pytest.mark.sanity_55, pytest.mark.interop_uc_sanity, pytest.mark.android, pytest.mark.ios, pytest.mark.client_connect]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@allure.testcase(name="Test Resources", url="")
 | 
					@allure.testcase(name="Test Resources", url="")
 | 
				
			||||||
@@ -18,6 +18,7 @@ class TestResources(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.test_cloud_controller
 | 
					    @pytest.mark.test_cloud_controller
 | 
				
			||||||
    @pytest.mark.uc_sanity
 | 
					    @pytest.mark.uc_sanity
 | 
				
			||||||
 | 
					    @pytest.mark.interop_uc_sanity
 | 
				
			||||||
    @allure.testcase(name="test_controller_connectivity", url="")
 | 
					    @allure.testcase(name="test_controller_connectivity", url="")
 | 
				
			||||||
    def test_controller_connectivity(self, setup_controller, get_configuration):
 | 
					    def test_controller_connectivity(self, setup_controller, get_configuration):
 | 
				
			||||||
        """Test case to verify cloud Controller Connectivity"""
 | 
					        """Test case to verify cloud Controller Connectivity"""
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user