Merge branch 'master' into WIFI-3891

This commit is contained in:
Shivam Thakur
2021-09-16 13:55:39 +05:30
committed by GitHub
14 changed files with 1090 additions and 130 deletions

View File

@@ -63,6 +63,83 @@ jobs:
- name: push docker image
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
deploy-controller:
name: deploy uCentral controller
runs-on: ubuntu-latest
outputs:
gateway_url: ${{ steps.gateway_url.outputs.value }}
sec_url: ${{ steps.sec_url.outputs.value }}
namespace: ${{ steps.namespace.outputs.value }}
steps:
- name: Checkout repo with Helm values
uses: actions/checkout@v2
with:
path: wlan-testing
- name: Prepare certificates from secrets
working-directory: wlan-testing/helm/ucentral
run: |
echo "${{ secrets.DIGICERT_CERT }}" | base64 -d > cert.pem
echo "${{ secrets.DIGICERT_KEY }}" | base64 -d > key.pem
- name: Fetch kubeconfig
run: |
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
- name: Set namespace output
id: namespace
run: echo "::set-output name=value::ucentral-${{ github.run_id }}"
- name: Set gateway URL output
id: gateway_url
run: echo "::set-output name=value::gw-ucentral-${{ github.run_id }}.cicd.lab.wlan.tip.build"
- name: Set sec service URL output
id: sec_url
run: echo "::set-output name=value::sec-ucentral-${{ github.run_id }}.cicd.lab.wlan.tip.build"
- name: Deploy uCentralGW
working-directory: wlan-testing/helm/ucentral
run: |
export NAMESPACE=${{ github.run_id }}
export DEPLOY_METHOD=git
export CHART_VERSION=main
export UCENTRALGW_VERSION=master
export UCENTRALGWUI_VERSION=main
export UCENTRALSEC_VERSION=main
export UCENTRALFMS_VERSION=main
export VALUES_FILE_LOCATION=values.ucentral-qa.yaml
export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }}
export UCENTRALGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }}
export UCENTRALGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }}
export UCENTRALFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }}
export UCENTRALFMS_S3_KEY=${{ secrets.UCENTRALFMS_S3_KEY }}
export CERT_LOCATION=cert.pem
export KEY_LOCATION=key.pem
./deploy.sh
- name: Show resource state on deployment failure
if: failure()
run: |
kubectl get pods --namespace ucentral-${{ matrix.namespace }}
kubectl get services --namespace ucentral-${{ matrix.namespace }}
kubectl get persistentvolumeclaims --namespace ucentral-${{ matrix.namespace }}
- name: Describe pods on deployment failure
if: failure()
run: |
kubectl describe pods --namespace ucentral-${{ matrix.namespace }}
- name: Describe services on deployment failure
if: failure()
run: |
kubectl describe services --namespace ucentral-${{ matrix.namespace }}
- name: Describe persistentvolumeclaims on deployment failure
if: failure()
run: |
kubectl describe persistentvolumeclaims --namespace ucentral-${{ matrix.namespace }}
- name: wait for DNS to propagate
run: sleep 300
generate-matrix:
name: generate testbed matrix
runs-on: ubuntu-latest
@@ -76,9 +153,71 @@ jobs:
TESTBEDS=$(echo $TESTBEDS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')
TESTBEDS=$(echo "$TESTBEDS" | jq -c 'map({"testbed":.})')
echo "::set-output name=matrix::{\"include\":${TESTBEDS}}"
set-redirector-url:
needs: [ deploy-controller, generate-matrix ]
strategy:
fail-fast: false
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
runs-on: self-hosted
steps:
- name: checkout testing repo
uses: actions/checkout@v2
with:
repository: Telecominfraproject/wlan-testing
path: wlan-testing
ref: WIFI-3620
- name: checkout pki cert scripts repo
uses: actions/checkout@v2
with:
repository: Telecominfraproject/wlan-pki-cert-scripts
path: wlan-pki-cert-scripts
- name: install dependencies
run: |
sudo apt-get install -y python3-pip
pip install paramiko scp allure-pytest
- name: create configuration.py file
run: |
cat << EOF > configuration.py
${{ secrets.LAB_CONFIGURATION }}
EOF
- name: set redirector URL
env:
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
run: |
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
do
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id "${{ needs.deploy-controller.outputs.gateway_url }}"
done
- name: factory reset APs
run: |
set -x
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
for index in $(seq 0 $AP_LEN)
do
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
cd wlan-testing/tools
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
cd ../..
done
- name: wait for APs to come up again
run: sleep 60
test:
runs-on: ubuntu-latest
needs: [ build, generate-matrix ]
needs: [ build, generate-matrix, deploy-controller, set-redirector-url ]
strategy:
fail-fast: false
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
@@ -106,6 +245,8 @@ jobs:
cat << EOF > configuration.py
${{ secrets.LAB_CONFIGURATION }}
EOF
sed -i -r "s/'url': ('|\").*('|\")/'url': 'https:\/\/${{ needs.deploy-controller.outputs.sec_url }}:16001'/" configuration.py
cat configuration.py
kubectl create secret generic configuration --from-file=configuration=./configuration.py
- name: run sanity tests
run: |
@@ -178,6 +319,7 @@ jobs:
if: always()
run: |
kubectl delete ns "${{ steps.namespace.outputs.name }}" --wait=true
report:
runs-on: ubuntu-latest
needs: [ test, generate-matrix ]
@@ -191,6 +333,7 @@ jobs:
run: |
wget https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${{ env.ALLURE_CLI_VERSION }}/allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
tar -xzf allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz
- uses: actions/download-artifact@v2
with:
name: allure-results-${{ matrix.testbed }}
@@ -213,6 +356,7 @@ jobs:
if [ -e "reports/sanity/${{ matrix.testbed }}/latest" ] ; then
cp -r reports/sanity/${{ matrix.testbed }}/latest/history/ allure-results/history
fi
- name: add report metadata
run: |
cat << EOF >> allure-results/environment.properties
@@ -222,6 +366,7 @@ jobs:
CiRun.Number=${{ github.run_number }}
CiRun.Url=https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
EOF
- name: generate Allure report
run: allure-${{ env.ALLURE_CLI_VERSION }}/bin/allure generate
@@ -240,6 +385,7 @@ jobs:
run: |
mkdir -p reports/sanity/${{ matrix.testbed }}
cp -Tr allure-report reports/sanity/${{ matrix.testbed }}/${{ github.run_number }}
- name: update latest symlink
if: ${{ (github.event.inputs.marker_expression || 'uc_sanity') == 'uc_sanity' }}
working-directory: reports/sanity/${{ matrix.testbed }}
@@ -255,6 +401,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated deployment: $(date -u)"
- name: push
if: github.ref == 'refs/heads/master'
uses: ad-m/github-push-action@v0.6.0
@@ -263,10 +410,84 @@ jobs:
branch: gh-pages
directory: reports
cleanup:
delete-docker-image:
needs: [ test ]
runs-on: ubuntu-latest
if: always()
steps:
- name: cleanup Docker image
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"
destroy-controller:
needs: [ test ]
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout repo with Helm values
uses: actions/checkout@v2
with:
path: wlan-testing
- name: Fetch kubeconfig
run: |
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
- name: Delete namespace
run: kubectl delete ns --ignore-not-found=true "ucentral-${{ github.run_id }}"
reset-redirector-url:
needs: [ test, generate-matrix ]
if: always()
strategy:
fail-fast: false
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
runs-on: self-hosted
steps:
- name: checkout testing repo
uses: actions/checkout@v2
with:
repository: Telecominfraproject/wlan-testing
path: wlan-testing
ref: WIFI-3620
- name: checkout pki cert scripts repo
uses: actions/checkout@v2
with:
repository: Telecominfraproject/wlan-pki-cert-scripts
path: wlan-pki-cert-scripts
- name: install dependencies
run: |
pip install paramiko scp allure-pytest
- name: create configuration.py file
run: |
cat << EOF > configuration.py
${{ secrets.LAB_CONFIGURATION }}
EOF
- name: reset redirector URL
env:
DIGICERT_API_KEY: ${{ secrets.DIGICERT_API_KEY }}
run: |
for id in $(echo -e 'from configuration import CONFIGURATION\nfor ap in CONFIGURATION["${{ matrix.testbed }}"]["access_point"]: print(ap["serial"])' | python3)
do
./wlan-pki-cert-scripts/digicert-change-ap-redirector.sh $id gw-ucentral-qa01.cicd.lab.wlan.tip.build
done
- name: factory reset APs
run: |
AP_LEN=$(echo -e "from configuration import CONFIGURATION\nprint(len(CONFIGURATION['${{ matrix.testbed }}']['access_point']) - 1)" | python3)
for index in $(seq 0 $AP_LEN)
do
HOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['ip'])" | python3)
JUMPHOST=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost'])" | python3)
TTY=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['jumphost_tty'])" | python3)
PORT=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['port'])" | python3)
USERNAME=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['username'])" | python3)
PASSWORD=$(echo -e "from configuration import CONFIGURATION\nprint(CONFIGURATION['${{ matrix.testbed }}']['access_point'][$index]['password'])" | python3)
cd wlan-testing/tools
python3 ap_tools.py --host $HOST --jumphost $JUMPHOST --tty $TTY --port $PORT --username $USERNAME --password $PASSWORD --cmd "jffs2reset -y -r"
cd ../..
done

View File

@@ -10,11 +10,13 @@ Currently Having Methods:
"""
import json
import string
import time
import random
import paramiko
from scp import SCPClient
import os
import allure
class APNOS:
@@ -51,7 +53,7 @@ class APNOS:
client = self.ssh_cli_connect()
cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"'
stdin, stdout, stderr = client.exec_command(cmd)
output = str(stdout.read())
output = str(stdout.read())
print(output)
if output.__contains__("False"):
cmd = 'mkdir ~/cicd-git/'
@@ -137,7 +139,6 @@ class APNOS:
output = stdout.read()
client.close()
return output
# Method to get the vif_state of AP using AP-CLI/ JUMPHOST-CLI
@@ -305,15 +306,12 @@ class APNOS:
f"cmd --value \"{cmd}\" "
stdin, stdout, stderr = client.exec_command(cmd)
output = stdout.read()
print(output, stderr.read())
status = output.decode('utf-8').splitlines()
error = stderr
stdin = stdin
client.close()
except Exception as e:
print(e)
stdin, status, error = "Error", "Error", "Error"
return stdin, status, error
status = "Error"
return status
def get_ucentral_status(self):
try:
@@ -452,7 +450,7 @@ class APNOS:
band = "2G"
else:
band = "5G"
iwinfo_bssid_data[o[i - 1]] = [o[i+1].replace('"', ''), o[i + 4], band]
iwinfo_bssid_data[o[i - 1]] = [o[i + 1].replace('"', ''), o[i + 4], band]
client.close()
except Exception as e:
iwinfo_bssid_data = False
@@ -492,6 +490,20 @@ class APNOS:
name.pop(-1)
return tx_power, name
def get_logread(self, start_ref="", stop_ref=""):
data = self.logread()
log_data = []
data = data.split("\n")
flag = 0
for logs in data:
if logs.__contains__(start_ref):
flag = 1
if flag == 1:
log_data.append(logs)
if logs.__contains__(stop_ref):
flag = 0
ap_logs = "\n".join(log_data)
return ap_logs
def logread(self):
try:
@@ -561,19 +573,25 @@ class APNOS:
if __name__ == '__main__':
obj = {
'model': 'ecw5211',
'mode': 'wifi5',
'serial': '001122090801',
'jumphost': True,
'ip': "10.28.3.100",
'username': "lanforge",
'password': "pumpkin77",
'port': 22,
'jumphost_tty': '/dev/ttyAP3',
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
}
'model': 'wf188n',
'mode': 'wifi6',
'serial': '0000c1018812',
'jumphost': True,
'ip': "10.28.3.103",
'username': "lanforge",
'password': "pumpkin77",
'port': 22,
'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"
}
var = APNOS(credentials=obj, sdk="2.x")
tx_power, name = var.iwinfo()
allure.attach(name="interface name: ", body=str(name))
allure.attach(name="tx power: ", body=str(tx_power))
print(tx_power, name)
a = var.get_wifi_status()
# S = 9
# instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
# var.run_generic_command(cmd="logger start testcase: " + instance_name)
# time.sleep(60)
# var.run_generic_command(cmd="logger stop testcase: " + instance_name)
# var.get_logread(start_ref="start testcase: " + instance_name,
# stop_ref="stop testcase: " + instance_name)

View File

@@ -34,13 +34,26 @@ class ConfigureController:
self.access_token = ""
# self.session = requests.Session()
self.login_resp = self.login()
self.gw_host = self.get_gw_endpoint()
self.gw_host, self.fms_host = self.get_gw_endpoint()
if self.gw_host == "" or self.fms_host == "":
time.sleep(60)
self.gw_host, self.fms_host = self.get_gw_endpoint()
if self.gw_host == "" or self.fms_host == "":
self.logout()
print(self.gw_host, self.fms_host)
pytest.exit("All Endpoints not available in Controller Service")
sys.exit()
def build_uri_sec(self, path):
new_uri = 'https://%s:%d/api/v1/%s' % (self.host.hostname, self.host.port, path)
print(new_uri)
return new_uri
def build_url_fms(self, path):
new_uri = 'https://%s:%d/api/v1/%s' % (self.fms_host.hostname, self.fms_host.port, path)
print(new_uri)
return new_uri
def build_uri(self, path):
new_uri = 'https://%s:%d/api/v1/%s' % (self.gw_host.hostname, self.gw_host.port, path)
@@ -92,9 +105,15 @@ class ConfigureController:
print(resp)
self.check_response("GET", resp, self.make_headers(), "", uri)
services = resp.json()
print(services["endpoints"][0]["uri"])
gw_host = urlparse(services["endpoints"][0]["uri"])
return gw_host
print(services)
gw_host = ""
fms_host = ""
for service in services['endpoints']:
if service['type'] == "ucentralgw":
gw_host = urlparse(service["uri"])
if service['type'] == "ucentralfms":
fms_host = urlparse(service["uri"])
return gw_host, fms_host
def logout(self):
uri = self.build_uri_sec('oauth2/%s' % self.access_token)
@@ -155,6 +174,73 @@ class Controller(ConfigureController):
return device_info["UUID"]
class FMSUtils:
def __init__(self, sdk_client=None, controller_data=None):
if sdk_client is None:
self.sdk_client = Controller(controller_data=controller_data)
self.sdk_client = sdk_client
def upgrade_firmware(self, serial="", url=""):
response = self.sdk_client.request(service="gw", command="device/" + serial + "upgrade/",
method="POST", params="revisionSet=true",
payload="{ \"serialNumber\" : " + serial + " , \"uri\" : " + url + " }")
print(response)
pass
def ap_model_lookup(self, model=""):
devices = self.get_device_set()
model_name = ""
for device in devices['deviceTypes']:
if str(device).__contains__(model):
model_name = device
return model_name
def get_revisions(self):
response = self.sdk_client.request(service="fms", command="firmwares/", method="GET", params="revisionSet=true",
payload="")
if response.status_code == 200:
return response.json()
else:
return {}
def get_latest_fw(self, model=""):
device_type = self.ap_model_lookup(model=model)
response = self.sdk_client.request(service="fms", command="firmwares/", method="GET",
params="latestOnly=true&deviceType=" + device_type,
payload="")
if response.status_code == 200:
return response.json()
else:
return {}
def get_device_set(self):
response = self.sdk_client.request(service="fms", command="firmwares/", method="GET", params="deviceSet=true",
payload="")
if response.status_code == 200:
return response.json()
else:
return {}
def get_firmwares(self, limit="", deviceType="", latestonly=""):
params = "limit=" + limit + "&deviceType=" + deviceType + "&latestonly=" + latestonly
response = self.sdk_client.request(service="fms", command="firmwares/", method="GET", params=params, payload="")
print(response)
if response.status_code == 200:
data = response.json()
print(data)
# resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
# self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
# devices = resp.json()
# # resp.close()()
return "devices"
class UProfileUtility:
def __init__(self, sdk_client=None, controller_data=None):
@@ -344,7 +430,7 @@ class UProfileUtility:
for options in ssid_data:
if options == "multi-psk":
ssid_info[options] = ssid_data[options]
print("hi",ssid_info)
print("hi", ssid_info)
if options == "rate-limit":
ssid_info[options] = ssid_data[options]
for i in ssid_data["appliedRadios"]:
@@ -435,13 +521,17 @@ if __name__ == '__main__':
'password': 'openwifi',
}
obj = Controller(controller_data=controller)
profile = UProfileUtility(sdk_client=obj)
profile.set_mode(mode="BRIDGE")
profile.set_radio_config()
ssid = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G", "5G"], "security": "psk", "security_key": "something",
"vlan": 100}
profile.add_ssid(ssid_data=ssid, radius=False)
profile.push_config(serial_number="903cb39d6918")
print(profile.get_ssid_info())
# print(obj.get_devices())
fms = FMSUtils(sdk_client=obj)
# fms.get_device_set()
# model = fms.get_latest_fw(model="eap102")
# print(model)
# profile = UProfileUtility(sdk_client=obj)
# profile.set_mode(mode="BRIDGE")
# profile.set_radio_config()
# ssid = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G", "5G"], "security": "psk", "security_key": "something",
# "vlan": 100}
# profile.add_ssid(ssid_data=ssid, radius=False)
# profile.push_config(serial_number="903cb39d6918")
# print(profile.get_ssid_info())
# # print(obj.get_devices())
obj.logout()

View File

@@ -2,6 +2,8 @@
Pytest fixtures: High level Resource Management and base setup fixtures
"""
import datetime
import random
import string
import sys
import os
import time
@@ -257,7 +259,7 @@ def instantiate_access_point(testbed, get_apnos, get_configuration):
pass
else:
get_apnos(access_point_info, pwd="../libs/apnos/")
# Write a code to verify Access Point Connectivity
# Write a code to verify Access Point Connectivity
yield True
@@ -642,7 +644,7 @@ def add_env_properties(get_configuration, get_apnos, fixtures_ver, add_allure_en
add_allure_environment_property('Access-Point-Firmware-Version',
fixtures_ver.get_ap_version(get_apnos, get_configuration)[0].split("\n")[1])
add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"])
add_allure_environment_property('AP-Serial-Number', get_configuration["access_point"][0]["serial"])
add_allure_environment_property('AP-Serial-Number', get_configuration["access_point"][0]["serial"] + "\n")
@pytest.fixture(scope="session")
@@ -654,3 +656,27 @@ def fixtures_ver(request, get_configuration):
print("1.x")
obj = Fixtures_1x(configuration=get_configuration)
yield obj
"""
Logs related Fixtures
"""
@pytest.fixture(scope="function")
def get_ap_logs(request, get_apnos, get_configuration):
S = 9
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
for ap in get_configuration['access_point']:
ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x")
ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name)
def collect_logs():
for ap in get_configuration['access_point']:
ap_ssh = get_apnos(ap, pwd="../libs/apnos/", sdk="2.x")
ap_ssh.run_generic_command(cmd="logger stop testcase: " + instance_name)
ap_logs = ap_ssh.get_logread(start_ref="start testcase: " + instance_name,
stop_ref="stop testcase: " + instance_name)
allure.attach(name='logread', body=str(ap_logs))
pass
request.addfinalizer(collect_logs)

View File

@@ -45,7 +45,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, get_vif_state,
def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -72,7 +72,8 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa_enterprise_5g(self, station_names_fiveg, get_ap_logs,
setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 5g
pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_enterprise and fiveg"
@@ -97,7 +98,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, get_vif_state,
def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -126,7 +127,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, get_vif_state,
def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -155,7 +156,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.uc_sanity
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
def test_wpa3_enterprise_2g(self, get_vif_state,
def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -183,7 +184,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
@pytest.mark.uc_sanity
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
def test_wpa3_enterprise_5g(self, get_vif_state,
def test_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -241,7 +242,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, get_vif_state,
def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -269,7 +270,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, get_vif_state,
def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report, test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -297,7 +298,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, get_vif_state,
def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report, test_cases, radius_info, exit_on_fail):
""" wpa enterprise 2g
@@ -324,7 +325,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, get_vif_state,
def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report, exit_on_fail,
test_cases, radius_info):

View File

@@ -49,7 +49,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.twog
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK")
def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_open_ssid_2g(self, get_vif_state, get_ap_logs, setup_profiles, get_lanforge_data, lf_test, update_report,
station_names_twog,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -75,7 +75,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.fiveg
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK")
def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg,
def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lanforge_data, lf_test, test_cases, station_names_fiveg,
update_report):
"""Client Connectivity open ssid 5G
pytest -m "client_connectivity and bridge and general and open and fiveg"
@@ -102,7 +102,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.twog
@allure.story('wpa 2.4 GHZ Band')
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK")
def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report,
def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report,
lf_test, test_cases, station_names_twog):
"""Client Connectivity wpa ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa and twog"
@@ -128,7 +128,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.wpa
@pytest.mark.fiveg
@allure.story('wpa 5 GHZ Band')
def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg,
def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, update_report, test_cases, station_names_fiveg,
get_lanforge_data):
"""Client Connectivity wpa ssid 5G
pytest -m "client_connectivity and bridge and general and wpa and fiveg"
@@ -154,7 +154,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
@allure.story('wpa2_personal 2.4 GHZ Band')
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases,
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog):
"""Client Connectivity wpa2_personal ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa2_personal and twog"
@@ -180,7 +180,7 @@ class TestBridgeModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@allure.story('wpa2_personal 5 GHZ Band')
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases,
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report, test_cases,
station_names_fiveg,
lf_test):
"""Client Connectivity wpa2_personal ssid 5G
@@ -244,7 +244,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -270,7 +270,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa3_personal and fiveg"
@@ -295,7 +295,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -322,7 +322,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test,
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test,
test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
@@ -348,7 +348,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.twog
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -376,7 +376,7 @@ class TestBridgeModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.fiveg
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and fiveg"

View File

@@ -33,7 +33,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
ssid_name = profile_data["ssid_name"]
@@ -57,7 +58,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
ssid_name = profile_data["ssid_name"]
@@ -83,7 +85,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
ssid_name = profile_data["ssid_name"]
@@ -109,7 +112,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
ssid_name = profile_data["ssid_name"]
@@ -134,7 +138,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
@pytest.mark.uc_sanity
def test_wpa3_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
ssid_name = profile_data["ssid_name"]
@@ -158,7 +163,8 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
@pytest.mark.uc_sanity
def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, get_ap_logs,
setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
ssid_name = profile_data["ssid_name"]
@@ -207,7 +213,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test, update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
@@ -231,7 +238,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report, test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
ssid_name = profile_data["ssid_name"]
@@ -255,7 +263,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, get_vif_state,station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report, test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
ssid_name = profile_data["ssid_name"]
@@ -278,7 +287,8 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, get_vif_state,station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report, exit_on_fail,
test_cases, radius_info):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][1]

View File

@@ -48,7 +48,8 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_open_ssid_2g(self, get_vif_state, get_ap_logs,
setup_profiles, get_lanforge_data, lf_test, update_report,
station_names_twog,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -76,7 +77,8 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg,
def test_open_ssid_5g(self, get_vif_state, get_ap_logs,
get_lanforge_data, lf_test, test_cases, station_names_fiveg,
update_report):
"""Client Connectivity open ssid 5G
pytest -m "client_connectivity and NAT and general and open and fiveg"
@@ -102,7 +104,7 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.wpa
@pytest.mark.twog
@allure.story('wpa 2.4 GHZ Band')
def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report,
def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, get_lanforge_data, update_report,
lf_test, test_cases, station_names_twog):
"""Client Connectivity wpa ssid 2.4G
pytest -m "client_connectivity and NAT and general and wpa and twog"
@@ -127,7 +129,8 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.wpa
@pytest.mark.fiveg
@allure.story('wpa 5 GHZ Band')
def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg,
def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs,
lf_test, update_report, test_cases, station_names_fiveg,
get_lanforge_data):
"""Client Connectivity wpa ssid 5G
pytest -m "client_connectivity and NAT and general and wpa and fiveg"
@@ -153,7 +156,8 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
@allure.story('wpa2_personal 2.4 GHZ Band')
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases,
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs,
get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog):
"""Client Connectivity wpa2_personal ssid 2.4G
pytest -m "client_connectivity and NAT and general and wpa2_personal and twog"
@@ -179,7 +183,8 @@ class TestNATModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@allure.story('wpa2_personal 5 GHZ Band')
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases,
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs,
get_lanforge_data, update_report, test_cases,
station_names_fiveg,
lf_test):
"""Client Connectivity wpa2_personal ssid 5G
@@ -241,7 +246,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -267,7 +273,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and NAT and general and wpa3_personal and fiveg"
@@ -292,7 +299,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -319,7 +327,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test,
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test,
test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
@@ -345,7 +354,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.twog
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -373,7 +383,8 @@ class TestNATModeConnectivitySuiteB(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.fiveg
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and fiveg"

View File

@@ -33,7 +33,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.twog
def test_wpa_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][0]
@@ -58,7 +59,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa_enterprise
@pytest.mark.fiveg
def test_wpa_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
def test_wpa_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
@@ -85,7 +87,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.twog
def test_wpa2_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][0]
@@ -112,7 +115,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.sanity_light
@pytest.mark.wpa2_enterprise
@pytest.mark.fiveg
def test_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
def test_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa2_enterprise"][1]
@@ -138,7 +142,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa3_enterprise
@pytest.mark.twog
@pytest.mark.uc_sanity
def test_wpa3_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0]
@@ -163,7 +168,8 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
@pytest.mark.wpa3_enterprise
@pytest.mark.fiveg
@pytest.mark.uc_sanity
def test_wpa3_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1]
@@ -213,7 +219,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.twog
def test_wpa_wpa2_enterprise_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0]
@@ -238,7 +245,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa_wpa2_enterprise_mixed
@pytest.mark.fiveg
def test_wpa_wpa2_enterprise_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data,
def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data,
lf_test,
update_report, test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1]
@@ -263,7 +271,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.twog
def test_wpa3_enterprise_mixed_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report, test_cases, radius_info, exit_on_fail):
profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0]
@@ -287,7 +296,8 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object):
@pytest.mark.wpa3_enterprise_mixed
@pytest.mark.fiveg
def test_wpa3_enterprise_mixed_5g(self, get_vif_state, station_names_fiveg, setup_profiles, get_lanforge_data,
def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, setup_profiles, get_lanforge_data,
lf_test,
update_report, exit_on_fail,
test_cases, radius_info):

View File

@@ -46,7 +46,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_open_ssid_2g(self, get_vif_state, setup_profiles, get_lanforge_data, lf_test, update_report,
def test_open_ssid_2g(self, get_vif_state, get_ap_logs,
setup_profiles, get_lanforge_data, lf_test, update_report,
station_names_twog,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -71,7 +72,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.open
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg,
def test_open_ssid_5g(self, get_vif_state, get_ap_logs,
get_lanforge_data, lf_test, test_cases, station_names_fiveg,
update_report):
"""Client Connectivity open ssid 5G
pytest -m "client_connectivity and vlan and general and open and fiveg"
@@ -97,7 +99,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.wpa
@pytest.mark.twog
@allure.story('wpa 2.4 GHZ Band')
def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report,
def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs,
get_lanforge_data, update_report,
lf_test, test_cases, station_names_twog):
"""Client Connectivity wpa ssid 2.4G
pytest -m "client_connectivity and vlan and general and wpa and twog"
@@ -123,7 +126,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.wpa
@pytest.mark.fiveg
@allure.story('wpa 5 GHZ Band')
def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg,
def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs,
lf_test, update_report, test_cases, station_names_fiveg,
get_lanforge_data):
"""Client Connectivity wpa ssid 5G
pytest -m "client_connectivity and vlan and general and wpa and fiveg"
@@ -149,7 +153,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.twog
@allure.story('wpa2_personal 2.4 GHZ Band')
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases,
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs,
get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog):
"""Client Connectivity wpa2_personal ssid 2.4G
pytest -m "client_connectivity and vlan and general and wpa2_personal and twog"
@@ -175,7 +180,8 @@ class TestvlanModeConnectivitySuiteA(object):
@pytest.mark.wpa2_personal
@pytest.mark.fiveg
@allure.story('wpa2_personal 5 GHZ Band')
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_lanforge_data, update_report, test_cases,
def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs,
get_lanforge_data, update_report, test_cases,
station_names_fiveg,
lf_test):
"""Client Connectivity wpa2_personal ssid 5G
@@ -238,7 +244,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data, lf_test,
def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data, lf_test,
update_report,
test_cases):
"""Client Connectivity open ssid 2.4G
@@ -265,7 +272,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and vlan and general and wpa3_personal and fiveg"
@@ -290,7 +298,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.twog
@allure.story('open 2.4 GHZ Band')
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -317,7 +326,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa3_personal_mixed
@pytest.mark.fiveg
@allure.story('open 5 GHZ Band')
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test,
def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test,
test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
@@ -343,7 +353,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.twog
@allure.story('wpa wpa2 personal mixed 2.4 GHZ Band')
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, station_names_twog, setup_profiles, get_lanforge_data,
def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs,
station_names_twog, setup_profiles, get_lanforge_data,
lf_test,
update_report,
test_cases):
@@ -371,7 +382,8 @@ class TestvlanModeConnectivitySuiteTwo(object):
@pytest.mark.wpa_wpa2_personal_mixed
@pytest.mark.fiveg
@allure.story('wpa wpa2 personal mixed 5 GHZ Band')
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs,
station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report):
"""Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and vlan and general and wpa_wpa2_personal_mixed and fiveg"

View File

@@ -1,4 +1,7 @@
""" Python Inbuilt Libraries """
import random
import string
import allure
import pytest
import sys
@@ -67,11 +70,9 @@ class Fixtures_2x:
get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info):
instantiate_profile_obj = instantiate_profile(sdk_client=setup_controller)
print("garbage")
print(1, instantiate_profile_obj.sdk_client)
vlan_id, mode = 0, 0
parameter = dict(param)
print("hola", parameter)
test_cases = {}
profile_data = {}
@@ -240,6 +241,9 @@ class Fixtures_2x:
ap_logs = ap_ssh.logread()
allure.attach(body=ap_logs, name="FAILURE: AP LOgs: ")
pytest.fail("AP is disconnected from UC Gateway")
S = 9
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
ap_ssh.run_generic_command(cmd="logger start testcase: " + instance_name)
instantiate_profile_obj.push_config(serial_number=get_equipment_id[0])
time_1 = time.time()
config = json.loads(str(instantiate_profile_obj.base_profile_config).replace(" ", "").replace("'", '"'))
@@ -316,11 +320,13 @@ class Fixtures_2x:
# allure.attach(name="tx power: ", body=str(tx_power))
except:
pass
ap_logs = ap_ssh.logread()
allure.attach(body=ap_logs, name="AP Logs: ")
ap_ssh.run_generic_command(cmd="logger stop testcase: " + instance_name)
ap_logs = ap_ssh.get_logread(start_ref="start testcase: " + instance_name,
stop_ref="stop testcase: " + instance_name)
allure.attach(body=ap_logs, name="AP Log: ")
wifi_status = ap_ssh.get_wifi_status()
allure.attach(name="wifi status", body=str(wifi_status))
try:
ssid_info_sdk = instantiate_profile_obj.get_ssid_info()
ap_wifi_data = ap_ssh.get_iwinfo()
@@ -356,15 +362,8 @@ class Fixtures_2x:
pass
def teardown_session():
iwinfo = ap_ssh.iwinfo()
allure.attach(name="iwinfo: ", body=str(iwinfo))
# tx_power, name = ap_ssh.gettxpower()
# allure.attach(name="interface name: ", body=str(name))
# allure.attach(name="tx power: ", body=str(tx_power))
ap_logs = ap_ssh.logread()
allure.attach(body=ap_logs, name="AP Logs after test completion")
wifi_status = ap_ssh.get_wifi_status()
allure.attach(name="wifi status", body=str(wifi_status))
print("\nTeardown")
request.addfinalizer(teardown_session)

View File

@@ -13,7 +13,6 @@ if "libs" not in sys.path:
sys.path.append("../libs/apnos/")
import argparse
import paramiko
from apnos import APNOS

View File

@@ -1,14 +1,473 @@
{
"basic-01":
"basic-01-testing":
{
"host": "192.168.200.49",
"username": "admin",
"password": "Lanforge12345!"
},
"basic-02":
{
"host": "192.168.200.49",
"username": "admin",
"password": "Lanforge12345!"
"basic-01": {
"controller": {
"url": "https://wlan-portal-svc-nola-02.cicd.lab.wlan.tip.build",
"username": "support@example.com",
"password": "support",
"version": "1.1.0-SNAPSHOT",
"commit_date": "2021-06-01"
},
"access_point": [
{
"model": "ecw5410",
"mode": "wifi5",
"serial": "3c2c99f44e77",
"jumphost": "True",
"ip": "10.28.3.100",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP1",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/trunk/ecw5410-1.2.0-rc2.tar.gz"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.6",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"1.1.wiphy4"
],
"5G-Radio": [
"1.1.wiphy5"
],
"AX-Radio": [
"1.1.wiphy0",
"1.1.wiphy1",
"1.1.wiphy2",
"1.1.wiphy3"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan1",
"AX-Station-Name": "ax"
}
}
},
"basic-02": {
"controller": {
"url": "https://wlan-portal-svc-nola-02.cicd.lab.wlan.tip.build",
"username": "support@example.com",
"password": "support",
"version": "1.1.0-SNAPSHOT",
"commit_date": "2021-06-01"
},
"access_point": [
{
"model": "eap101",
"mode": "wifi6",
"serial": "34efb6af48db",
"jumphost": "True",
"ip": "10.28.3.100",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP2",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.2.0-rc2.tar.gz"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.8",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"1.1.wiphy4"
],
"5G-Radio": [
"1.1.wiphy5"
],
"AX-Radio": [
"1.1.wiphy0",
"1.1.wiphy1",
"1.1.wiphy2",
"1.1.wiphy3"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"AX-Station-Name": "ax"
}
}
},
"basic-03": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "ec420",
"mode": "wifi5",
"serial": "001122090801",
"jumphost": "True",
"ip": "127.0.0.1",
"username": "lanforge",
"password": "pumpkin77",
"port": 8833,
"jumphost_tty": "/dev/ttyAP3",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/tplink_ec420/20210728-tplink_ec420-uCentral-trunk-12ad0d5-upgrade.bin"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.10",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"1.1.wiphy4"
],
"5G-Radio": [
"1.1.wiphy5"
],
"AX-Radio": [
"1.1.wiphy0",
"1.1.wiphy1",
"1.1.wiphy2",
"1.1.wiphy3"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "sta00",
"5G-Station-Name": "sta10",
"AX-Station-Name": "ax"
}
}
},
"basic-04": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "ecw5211",
"mode": "wifi5",
"serial": "68215fda456d",
"jumphost": "True",
"ip": "10.28.3.100",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP5",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.12",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"1.1.wiphy4"
],
"5G-Radio": [
"1.1.wiphy5"
],
"AX-Radio": [
"1.1.wiphy0",
"1.1.wiphy1",
"1.1.wiphy2",
"1.1.wiphy3"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"AX-Station-Name": "ax"
}
}
},
"basic-05": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "wf188n",
"mode": "wifi6",
"serial": "0000c1018812",
"jumphost": "True",
"ip": "10.28.3.103",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"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"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.28",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"1.1.wiphy2"
],
"5G-Radio": [
"1.1.wiphy3"
],
"AX-Radio": [
"1.1.wiphy0",
"1.1.wiphy1",
"1.1.wiphy2",
"1.1.wiphy3"
],
"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"
}
}
},
"basic-06": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "eap102",
"mode": "wifi6",
"serial": "903cb39d6918",
"jumphost": "True",
"ip": "10.28.3.103",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP2",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.30",
"port": 8080,
"ssh_port": 22,
"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.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"AX-Station-Name": "ax"
}
}
},
"basic-07": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "eap101",
"mode": "wifi6",
"serial": "903cb36ae223",
"jumphost": "True",
"ip": "10.28.3.103",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP3",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap101/20210729-edgecore_eap101-v2.0.0-rc2-02244b8-upgrade.bin"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.32",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"wiphy4"
],
"5G-Radio": [
"wiphy5"
],
"AX-Radio": [
"wiphy0",
"wiphy1",
"wiphy2",
"wiphy3"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "sta10",
"5G-Station-Name": "sta00",
"AX-Station-Name": "ax"
}
}
},
"basic-08": {
"controller": {
"url": "https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001",
"username": "tip@ucentral.com",
"password": "openwifi"
},
"access_point": [
{
"model": "wf194c",
"mode": "wifi6",
"serial": "089b4bb2f10c",
"jumphost": "True",
"ip": "10.28.3.103",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP5",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/cig_wf194c/20210729-cig_wf194c-v2.0.0-rc2-02244b8-upgrade.bin"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.34",
"port": 8080,
"ssh_port": 22,
"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.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"AX-Station-Name": "ax"
}
}
},
"mesh": {
"controller": {
"url": "http://wlan-portal-svc-digicert.cicd.lab.wlan.tip.build",
"username": "support@example.com",
"password": "support",
"version": "1.1.0-SNAPSHOT",
"commit_date": "2021-06-01"
},
"access_point": [
{
"model": "eap101",
"mode": "wifi6",
"serial": "34efb6af4a7a",
"jumphost": "True",
"ip": "10.28.3.101",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP2",
"version": "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.1.0.tar.gz"
}
],
"traffic_generator": {
"name": "lanforge",
"details": {
"ip": "10.28.3.14",
"port": 8080,
"ssh_port": 22,
"2.4G-Radio": [
"wiphy0",
"wiphy2"
],
"5G-Radio": [
"wiphy1",
"wiphy3"
],
"AX-Radio": [
"wiphy4",
"wiphy5",
"wiphy6",
"wiphy7"
],
"upstream": "1.1.eth2",
"upstream_subnet": "10.28.2.1/24",
"uplink": "1.1.eth3",
"2.4G-Station-Name": "wlan0",
"5G-Station-Name": "wlan0",
"AX-Station-Name": "ax"
}
}
},
"interop": {
"controller": {
"url": "https://wlan-portal-svc-nola-02.cicd.lab.wlan.tip.build",
"username": "support@example.com",
"password": "support",
"version": "19.07-SNAPSHOT",
"commit_date": "2021-06-01"
},
"access_point": [
{
"model": "ecw5410",
"mode": "wifi5",
"serial": "68215fd2f78c",
"jumphost": "True",
"ip": "10.28.3.102",
"username": "lanforge",
"password": "pumpkin77",
"port": 22,
"jumphost_tty": "/dev/ttyAP1",
"version": "https://tip-tip-wlan-cloud-docker-repo.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/dev/ecw5410-2021-07-28-pending-0ec23e8.tar.gz"
}
],
"traffic_generator": {
"name": "Perfecto",
"details": {
"securityToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw",
"perfectoURL": "tip"
}
}
}
}

104
tools/pdu_v3.py Normal file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env python3
"""
Date: 15-09-2021
By: Amrit Raj @ Candela Technologies Pvt. ltd.
Note: Please ensure that PDU is powered on
Command line to be used as
python pdu_automation.py --host 192.168.200.49 --user admin --password pass1234 --action on/off/cycle --port all/specific_port_number
Eg 1: python pdu_v3.py --host 192.168.200.49 --user admin --password pass1234 --action off --port 1
Eg 2: python pdu_v3.py --host 192.168.200.49 --user admin --password pass1234 --action off --port 1,2,3,4
Eg 3: python pdu_v3.py --host 192.168.200.49 --user admin --password pass1234 --action cycle --port all
"""
import os
import json
import time
import argparse
from typing import Sequence
from typing import Optional
try:
import dlipower
except:
print('Please wait we are installing DLI Power')
os.system('pip install dlipower')
class setup:
try:
def __init__(self, hostname, user, password):
self.hostname = hostname
self.user = user
self.password = password
self.power_switch = dlipower.PowerSwitch(hostname=self.hostname, userid=self.user, password=self.password)
except:
print('PDU device is Off')
class switch_on(setup):
def __init__(self, hostname, user, password, port=None):
super().__init__(hostname, user, password)
self.port = port
if self.port != 'all':
try:
port = str(self.port).split(",")
for i in port:
self.power_switch[int(i)-1].state = "ON"
except:
self.power_switch[int(self.port)-1].state = "ON"
else:
for outlet in self.power_switch:
outlet.state = 'ON'
class switch_off(setup):
def __init__(self, hostname, user, password, port=None):
super().__init__(hostname, user, password)
self.port = port
if self.port != 'all':
try:
port = str(self.port).split(",")
for i in port:
self.power_switch[int(i) - 1].state = "OFF"
except:
self.power_switch[int(self.port) - 1].state = "OFF"
else:
for outlet in self.power_switch:
outlet.state = 'ON'
class print_status(setup):
def __init__(self, hostname, user, password):
super().__init__(hostname, user, password)
print(self.power_switch)
def main(argv: Optional[Sequence[str]] = None):
parser = argparse.ArgumentParser()
parser.add_argument('--host', help='Please provide host name eg: 192.168.200.65')
parser.add_argument('--username', help='Please provide username eg: admin')
parser.add_argument('--password', help='Please provide password eg: 1234')
parser.add_argument('--action', help='Switches all Outlets in ON Mode eg: --on or --off\n')
parser.add_argument('--port', help='Please provide port name eg: --port lanforge')
args = parser.parse_args(argv)
dic = vars(args)
# if user enter ports as 1,6,7
# port = [1,6,7]
# print(dic)
if dic['action'] == 'on':
set = setup(dic['host'], dic['username'], dic['password'])
on = switch_on(dic['host'], dic['username'], dic['password'], dic['port'])
elif dic['action'] == 'off':
set = setup(dic['host'], dic['username'], dic['password'])
# for single in port
off = switch_off(dic['host'], dic['username'], dic['password'], dic['port'])
# off = switch_on(dic['action'])
elif dic['action'] == 'cycle':
set = setup(dic['host'], dic['username'], dic['password'])
on = switch_off(dic['host'], dic['username'], dic['password'], dic['port'])
off = switch_on(dic['host'], dic['username'], dic['password'], dic['port'])
else:
print('Command not found')
if __name__ == '__main__':
main()