mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-03 04:18:15 +00:00 
			
		
		
		
	Merge branch 'master' into WIFI-3507
This commit is contained in:
		@@ -19,11 +19,11 @@ env:
 | 
			
		||||
  testbeds: '[
 | 
			
		||||
    {
 | 
			
		||||
      "number": "01",
 | 
			
		||||
      "version": "1.2.0-rc2"
 | 
			
		||||
      "version": "1.2.0"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "number": "02",
 | 
			
		||||
      "version": "1.2.0-rc2"
 | 
			
		||||
      "version": "1.2.0"
 | 
			
		||||
    }
 | 
			
		||||
  ]'
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										107
									
								
								config/ratelimit_2.4_noteffect_otherSSID.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								config/ratelimit_2.4_noteffect_otherSSID.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,107 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		
 | 
			
		||||
		{
 | 
			
		||||
			"band": "2G",
 | 
			
		||||
			"channel": 6,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 20,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				{
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"2G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 30,
 | 
			
		||||
						"egress-rate": 30
 | 
			
		||||
					}
 | 
			
		||||
				},
 | 
			
		||||
                {
 | 
			
		||||
					"name": "SSID2",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"2G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 0,
 | 
			
		||||
						"egress-rate": 0
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								config/ratelimit_2.4disabled_case.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/ratelimit_2.4disabled_case.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		
 | 
			
		||||
		{
 | 
			
		||||
			"band": "2G",
 | 
			
		||||
			"channel": 11,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 20,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				{
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"2G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 0,
 | 
			
		||||
						"egress-rate": 0
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								config/ratelimit_2.4enable_cases.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/ratelimit_2.4enable_cases.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		
 | 
			
		||||
		{
 | 
			
		||||
			"band": "2G",
 | 
			
		||||
			"channel": 11,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 20,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				{
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"2G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 50,
 | 
			
		||||
						"egress-rate": 50
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										106
									
								
								config/ratelimit_5_noteffect_otherSSID.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								config/ratelimit_5_noteffect_otherSSID.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,106 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		{
 | 
			
		||||
			"band": "5G",
 | 
			
		||||
			"channel": 149,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 80,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				 {
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"5G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 20,
 | 
			
		||||
						"egress-rate": 20
 | 
			
		||||
					}
 | 
			
		||||
				},
 | 
			
		||||
                {
 | 
			
		||||
					"name": "SSID2",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"5G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 0,
 | 
			
		||||
						"egress-rate": 0
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								config/ratelimit_5disable_cases.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/ratelimit_5disable_cases.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		{
 | 
			
		||||
			"band": "5G",
 | 
			
		||||
			"channel": 149,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 80,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				
 | 
			
		||||
                {
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"5G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 0,
 | 
			
		||||
						"egress-rate": 0
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								config/ratelimit_5enable_cases.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/ratelimit_5enable_cases.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
	"uuid": 2,
 | 
			
		||||
	"radios": [
 | 
			
		||||
		{
 | 
			
		||||
			"band": "5G",
 | 
			
		||||
			"channel": 149,
 | 
			
		||||
			"channel-mode": "HE",
 | 
			
		||||
			"channel-width": 80,
 | 
			
		||||
			"country": "CA"
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
 | 
			
		||||
	"interfaces": [
 | 
			
		||||
		{
 | 
			
		||||
			"name": "WAN",
 | 
			
		||||
			"role": "upstream",
 | 
			
		||||
			"services": [ "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"WAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "dynamic"
 | 
			
		||||
			},
 | 
			
		||||
			"ssids": [
 | 
			
		||||
				
 | 
			
		||||
                {
 | 
			
		||||
					"name": "SSID1",
 | 
			
		||||
					"wifi-bands": [
 | 
			
		||||
						"5G"
 | 
			
		||||
					],
 | 
			
		||||
					"bss-mode": "ap",
 | 
			
		||||
					"encryption": {
 | 
			
		||||
						"proto": "psk2",
 | 
			
		||||
						"key": "OpenWifi",
 | 
			
		||||
						"ieee80211w": "optional"
 | 
			
		||||
					},
 | 
			
		||||
					"rate-limit": {
 | 
			
		||||
						"ingress-rate": 50,
 | 
			
		||||
						"egress-rate": 50
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"name": "LAN",
 | 
			
		||||
			"role": "downstream",
 | 
			
		||||
			"services": [ "ssh", "lldp" ],
 | 
			
		||||
			"ethernet": [
 | 
			
		||||
				{
 | 
			
		||||
					"select-ports": [
 | 
			
		||||
						"LAN*"
 | 
			
		||||
					]
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			"ipv4": {
 | 
			
		||||
				"addressing": "static",
 | 
			
		||||
				"subnet": "192.168.1.1/24",
 | 
			
		||||
				"dhcp": {
 | 
			
		||||
					"lease-first": 10,
 | 
			
		||||
					"lease-count": 100,
 | 
			
		||||
					"lease-time": "6h"
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"metrics": {
 | 
			
		||||
		"statistics": {
 | 
			
		||||
			"interval": 120,
 | 
			
		||||
			"types": [ "ssids", "lldp", "clients" ]
 | 
			
		||||
		},
 | 
			
		||||
		"health": {
 | 
			
		||||
			"interval": 120
 | 
			
		||||
		},
 | 
			
		||||
		"wifi-frames": {
 | 
			
		||||
			"filters": [ "probe", "auth" ]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"services": {
 | 
			
		||||
		"lldp": {
 | 
			
		||||
			"describe": "uCentral",
 | 
			
		||||
			"location": "universe"
 | 
			
		||||
		},
 | 
			
		||||
		"ssh": {
 | 
			
		||||
			"port": 22
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 Submodule lanforge/lanforge-scripts updated: 16276e080c...82a756834b
									
								
							@@ -34,7 +34,7 @@ class ConfigureController:
 | 
			
		||||
        self.access_token = ""
 | 
			
		||||
        # self.session = requests.Session()
 | 
			
		||||
        self.login_resp = self.login()
 | 
			
		||||
        self.gw_host = self.get_endpoint()
 | 
			
		||||
        self.gw_host = self.get_gw_endpoint()
 | 
			
		||||
 | 
			
		||||
    def build_uri_sec(self, path):
 | 
			
		||||
        new_uri = 'https://%s:%d/api/v1/%s' % (self.host.hostname, self.host.port, path)
 | 
			
		||||
@@ -47,6 +47,31 @@ class ConfigureController:
 | 
			
		||||
        print(new_uri)
 | 
			
		||||
        return new_uri
 | 
			
		||||
 | 
			
		||||
    def request(self, service, command, method, params, payload):
 | 
			
		||||
        if service == "sec":
 | 
			
		||||
            uri = self.build_uri_sec(command)
 | 
			
		||||
        elif service == "gw":
 | 
			
		||||
            uri = self.build_uri(command)
 | 
			
		||||
        elif service == "fms":
 | 
			
		||||
            uri = self.build_url_fms(command)
 | 
			
		||||
        else:
 | 
			
		||||
            raise NameError("Invalid service code for request.")
 | 
			
		||||
 | 
			
		||||
        print(uri)
 | 
			
		||||
        params = params
 | 
			
		||||
        if method == "GET":
 | 
			
		||||
            resp = requests.get(uri, headers=self.make_headers(), params=params, verify=False, timeout=100)
 | 
			
		||||
        elif method == "POST":
 | 
			
		||||
            resp = requests.post(uri, data=payload, verify=False, timeout=100)
 | 
			
		||||
        elif method == "PUT":
 | 
			
		||||
            resp = requests.put(uri, data=payload, verify=False, timeout=100)
 | 
			
		||||
        elif method == "DELETE":
 | 
			
		||||
            resp = requests.delete(uri, headers=self.make_headers(), params=params, verify=False, timeout=100)
 | 
			
		||||
 | 
			
		||||
        self.check_response(method, resp, self.make_headers(), payload, uri)
 | 
			
		||||
        print (resp)
 | 
			
		||||
        return resp
 | 
			
		||||
 | 
			
		||||
    def login(self):
 | 
			
		||||
        uri = self.build_uri_sec("oauth2")
 | 
			
		||||
        # self.session.mount(uri, HTTPAdapter(max_retries=15))
 | 
			
		||||
@@ -60,17 +85,18 @@ class ConfigureController:
 | 
			
		||||
        # self.session.headers.update({'Authorization': self.access_token})
 | 
			
		||||
        return resp
 | 
			
		||||
 | 
			
		||||
    def get_endpoint(self):
 | 
			
		||||
    def get_gw_endpoint(self):
 | 
			
		||||
        uri = self.build_uri_sec("systemEndpoints")
 | 
			
		||||
        print(uri)
 | 
			
		||||
        resp = requests.get(uri, headers=self.make_headers(), verify=False, timeout=100)
 | 
			
		||||
        print(resp)
 | 
			
		||||
        self.check_response("GET", resp, self.make_headers(), "", uri)
 | 
			
		||||
        devices = resp.json()
 | 
			
		||||
        print(devices["endpoints"][0]["uri"])
 | 
			
		||||
        gw_host = urlparse(devices["endpoints"][0]["uri"])
 | 
			
		||||
        services = resp.json()
 | 
			
		||||
        print(services["endpoints"][0]["uri"])
 | 
			
		||||
        gw_host = urlparse(services["endpoints"][0]["uri"])
 | 
			
		||||
        return gw_host
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def logout(self):
 | 
			
		||||
        uri = self.build_uri_sec('oauth2/%s' % self.access_token)
 | 
			
		||||
        resp = requests.delete(uri, headers=self.make_headers(), verify=False, timeout=100)
 | 
			
		||||
 
 | 
			
		||||
@@ -126,10 +126,10 @@ CONFIGURATION = {
 | 
			
		||||
                'mode': 'wifi5',
 | 
			
		||||
                'serial': '001122090801',
 | 
			
		||||
                'jumphost': True,
 | 
			
		||||
                'ip': "10.28.3.100",
 | 
			
		||||
                'ip': "127.0.0.1",
 | 
			
		||||
                'username': "lanforge",
 | 
			
		||||
                'password': "pumpkin77",
 | 
			
		||||
                'port': 22,
 | 
			
		||||
                '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"
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,29 +0,0 @@
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
    UCI Rest API Tests: Test Login, Logout API's
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
import pytest
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class TestUCIAUTHDEAUTH(object):
 | 
			
		||||
    """
 | 
			
		||||
        pytest -m "uci_login or uci_logout" --ucentral
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.uci_login
 | 
			
		||||
    def test_uci_auth(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            pytest -m "uci_login" --ucentral
 | 
			
		||||
        """
 | 
			
		||||
        print(setup_controller.login_resp)
 | 
			
		||||
        assert setup_controller.login_resp.status_code == 200
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.uci_logout
 | 
			
		||||
    def test_uci_deauth(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            pytest -m "uci_logout" --ucentral
 | 
			
		||||
        """
 | 
			
		||||
        resp = setup_controller.logout()
 | 
			
		||||
        print(resp)
 | 
			
		||||
        assert resp.status_code == 200
 | 
			
		||||
							
								
								
									
										141
									
								
								tests/controller_tests/ucentral_gateway/test_gatewayservice.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								tests/controller_tests/ucentral_gateway/test_gatewayservice.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,141 @@
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
    UCentral Gateway Services Rest API Tests
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
import pytest
 | 
			
		||||
import json
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@allure.feature("SDK REST API")
 | 
			
		||||
 | 
			
		||||
class TestUcentralGatewayService(object):
 | 
			
		||||
    """
 | 
			
		||||
    """
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_gwservice_listdevices(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the list devices endpoint
 | 
			
		||||
            WIFI-3452
 | 
			
		||||
        """
 | 
			
		||||
        resp = setup_controller.request("gw", "devices", "GET", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw list devices", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        devices = json.loads(resp.text)
 | 
			
		||||
        print (devices)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_gwservice_createdevice(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the create device endpoint
 | 
			
		||||
            WIFI-3453
 | 
			
		||||
        """
 | 
			
		||||
        configuration = {'uuid': '1'}
 | 
			
		||||
        payload = {'serialNumber': 'DEADBEEF0011',
 | 
			
		||||
                   'UUID': '123456',
 | 
			
		||||
                   'configuration': configuration,
 | 
			
		||||
                   'deviceType': 'AP',
 | 
			
		||||
                   'location': '',
 | 
			
		||||
                   'macAddress': 'DE:AD:BE:EF:00:11',
 | 
			
		||||
                   'manufacturer': 'Testing',
 | 
			
		||||
                   'owner': ''}
 | 
			
		||||
        print(json.dumps(payload))
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "POST", None, json.dumps(payload))
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw create devices", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        devices = json.loads(resp.text)
 | 
			
		||||
        print (devices)
 | 
			
		||||
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "GET", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw create device verify", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "DELETE", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw create device delete", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_gwservice_updatedevice(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the update device endpoint
 | 
			
		||||
            WIFI-3454
 | 
			
		||||
        """
 | 
			
		||||
        configuration = {'uuid': '1'}
 | 
			
		||||
        payload = {'serialNumber': 'DEADBEEF0011',
 | 
			
		||||
                   'UUID': '123456',
 | 
			
		||||
                   'configuration': configuration,
 | 
			
		||||
                   'deviceType': 'AP',
 | 
			
		||||
                   'location': '',
 | 
			
		||||
                   'macAddress': 'DE:AD:BE:EF:00:11',
 | 
			
		||||
                   'manufacturer': 'Testing',
 | 
			
		||||
                   'owner': ''}
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "POST", None, json.dumps(payload))
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw create devices", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        devices = json.loads(resp.text)
 | 
			
		||||
        print (devices)
 | 
			
		||||
 | 
			
		||||
        payload = {'serialNumber': 'DEADBEEF0011',
 | 
			
		||||
                   'owner': 'pytest'}
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "PUT", None, json.dumps(payload))
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw get device", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "GET", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw create device verify", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        device = json.loads(resp.text)
 | 
			
		||||
        print (device)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        resp = setup_controller.request("gw", "device/DEADBEEF0011", "DELETE", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="gw get device", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        @pytest.mark.sdk_restapi
 | 
			
		||||
        def test_gwservice_deletedevice(self, setup_controller):
 | 
			
		||||
            """
 | 
			
		||||
                Test the delete device endpoint
 | 
			
		||||
                WIFI-3455
 | 
			
		||||
            """
 | 
			
		||||
            configuration = {'uuid': '1'}
 | 
			
		||||
            payload = {'serialNumber': 'DEADBEEF0011',
 | 
			
		||||
                       'UUID': '123456',
 | 
			
		||||
                       'configuration': configuration,
 | 
			
		||||
                       'deviceType': 'AP',
 | 
			
		||||
                       'location': '',
 | 
			
		||||
                       'macAddress': 'DE:AD:BE:EF:00:11',
 | 
			
		||||
                       'manufacturer': 'Testing',
 | 
			
		||||
                       'owner': ''}
 | 
			
		||||
            resp = setup_controller.request("gw", "device/DEADBEEF0011", "POST", None, json.dumps(payload))
 | 
			
		||||
            body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
            allure.attach(name="gw create devices", body=body)
 | 
			
		||||
            if resp.status_code != 200:
 | 
			
		||||
                assert False
 | 
			
		||||
            devices = json.loads(resp.text)
 | 
			
		||||
            print (devices)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            resp = setup_controller.request("gw", "device/DEADBEEF0011", "DELETE", None, None)
 | 
			
		||||
            body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
            allure.attach(name="gw get device", body=body)
 | 
			
		||||
            if resp.status_code != 200:
 | 
			
		||||
                assert False
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										129
									
								
								tests/controller_tests/ucentral_gateway/test_securityservice.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								tests/controller_tests/ucentral_gateway/test_securityservice.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,129 @@
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
    UCentral Security Services Rest API Tests: Test Login, Logout API's
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
import pytest
 | 
			
		||||
import json
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
@allure.feature("SDK REST API")
 | 
			
		||||
 | 
			
		||||
class TestUcentralSecService(object):
 | 
			
		||||
    """
 | 
			
		||||
        Test the oauth endpoint
 | 
			
		||||
        WIFI-3447
 | 
			
		||||
    """
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_secservice_oauth(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            pytest -m "uci_login"
 | 
			
		||||
        """
 | 
			
		||||
        resp = setup_controller.login_resp
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="login", body=body)
 | 
			
		||||
        assert setup_controller.login_resp.status_code == 200
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_secservice_oauth_revoke(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the oauth revoke endpoint
 | 
			
		||||
            WIFI-3448
 | 
			
		||||
        """
 | 
			
		||||
        resp = setup_controller.logout()
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="oauth revoke", body=body)
 | 
			
		||||
        assert resp.status_code == 204
 | 
			
		||||
        setup_controller.login()
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_secservice_system_endpoints(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the system endpoints to verify list of services present
 | 
			
		||||
            WIFI-3449
 | 
			
		||||
        """
 | 
			
		||||
        resp = setup_controller.request("sec", "systemEndpoints", "GET", None, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="security systemEndpoints", body=body)
 | 
			
		||||
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        services = json.loads(resp.text)
 | 
			
		||||
        print (services)
 | 
			
		||||
 | 
			
		||||
        if 'endpoints' not in services:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        num_services = 0
 | 
			
		||||
        uri_present = 0
 | 
			
		||||
        authtype_present = 0
 | 
			
		||||
        for item in services['endpoints']:
 | 
			
		||||
            if item['type'] == 'ucentralgw':
 | 
			
		||||
                num_services += 1
 | 
			
		||||
                if item['uri'] is not None:
 | 
			
		||||
                    uri_present += 1
 | 
			
		||||
                if item['authenticationType'] is not None:
 | 
			
		||||
                    authtype_present += 1
 | 
			
		||||
            elif item['type'] == 'ucentralfms':
 | 
			
		||||
                num_services += 1
 | 
			
		||||
                if item['uri'] is not None:
 | 
			
		||||
                    uri_present += 1
 | 
			
		||||
                if item['authenticationType'] is not None:
 | 
			
		||||
                    authtype_present += 1
 | 
			
		||||
 | 
			
		||||
        assert (num_services == 2) and (uri_present == 2) and (authtype_present == 2)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_secservice_get_version(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the system endpoint to verify the version of the service
 | 
			
		||||
            WIFI-3450
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        params = {'command': 'version'}
 | 
			
		||||
        resp = setup_controller.request("sec", "system", "GET", params, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="security get version result", body=body)
 | 
			
		||||
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        system = json.loads(resp.text)
 | 
			
		||||
        print (system)
 | 
			
		||||
        if 'tag' not in system:
 | 
			
		||||
            assert False
 | 
			
		||||
        if system['tag'] != 'version':
 | 
			
		||||
            assert False
 | 
			
		||||
        if not system['value']:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.sdk_restapi
 | 
			
		||||
    def test_secservice_get_uptime(self, setup_controller):
 | 
			
		||||
        """
 | 
			
		||||
            Test the system endpoint to verify the uptime of the service
 | 
			
		||||
            WIFI-3451
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        params = {'command': 'times'}
 | 
			
		||||
        resp = setup_controller.request("sec", "system", "GET", params, None)
 | 
			
		||||
        body = resp.url + "," + str(resp.status_code) + ',' + resp.text
 | 
			
		||||
        allure.attach(name="security get uptime", body=body)
 | 
			
		||||
        if resp.status_code != 200:
 | 
			
		||||
            assert False
 | 
			
		||||
        system = json.loads(resp.text)
 | 
			
		||||
        print (system)
 | 
			
		||||
        if 'times' not in system:
 | 
			
		||||
            assert False
 | 
			
		||||
 | 
			
		||||
        valid_entities = 0
 | 
			
		||||
        for item in system['times']:
 | 
			
		||||
            if item['tag'] == 'uptime':
 | 
			
		||||
                valid_entities += 1
 | 
			
		||||
            if item['tag'] == 'start':
 | 
			
		||||
                valid_entities += 1
 | 
			
		||||
            if item['value'] is not None:
 | 
			
		||||
                valid_entities += 1
 | 
			
		||||
 | 
			
		||||
        assert (valid_entities == 4)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -45,10 +45,13 @@ class TestRateLimitingBridge(object):
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.up
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
    def test_wpa2_personal_ssid_up_batch_size_125_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and up and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
@@ -63,8 +66,360 @@ class TestRateLimitingBridge(object):
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1,5",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000")
 | 
			
		||||
                                        download_rate="0Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.dw
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_dw_batch_size_125_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and dw and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.up_dw
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_dw and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.up
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_batch_size_125_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.dw
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_dw_batch_size_125_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and dw and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.up_dw
 | 
			
		||||
    @pytest.mark.batch_size_125
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_dw_batch_size_125_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_dw and batch_size_125"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=5, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1,2,5",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.up
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_batch_size_1_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and up and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.dw
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_dw_batch_size_1_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and dw and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.up_dw
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_dw_batch_size_1_2g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and twog and up_dw and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="2G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.up
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_batch_size_1_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="0Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.dw
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_dw_batch_size_1_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and dw and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="0Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
        lf_tools.attach_report_graphs(report_name=report_name)
 | 
			
		||||
        print("Test Completed... Cleaning up Stations")
 | 
			
		||||
        assert True
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.up_dw
 | 
			
		||||
    @pytest.mark.batch_size_1
 | 
			
		||||
    @allure.story('Rate Limiting Open SSID 2.4 GHZ Band')
 | 
			
		||||
    def test_wpa2_personal_ssid_up_dw_batch_size_1_5g(self, lf_test, get_vif_state, lf_tools):
 | 
			
		||||
        """
 | 
			
		||||
            Test Rate Limiting Scenario
 | 
			
		||||
            pytest -m "rate_limiting and bridge and wpa2_personal and fiveg and up_dw and batch_size_1"
 | 
			
		||||
        """
 | 
			
		||||
        # run wifi capacity test here
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
			
		||||
        ssid_name = profile_data["ssid_name"]
 | 
			
		||||
        mode = "BRIDGE"
 | 
			
		||||
        vlan = 1
 | 
			
		||||
        allure.attach(name="ssid-rates", body=str(profile_data["rate-limit"]))
 | 
			
		||||
        get_vif_state.append(ssid_name)
 | 
			
		||||
        if ssid_name 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")
 | 
			
		||||
        lf_tools.add_stations(band="5G", num_stations=1, dut=lf_tools.dut_name, ssid_name=ssid_name)
 | 
			
		||||
        lf_tools.Chamber_View()
 | 
			
		||||
        wct_obj = lf_test.wifi_capacity(instance_name="test_client_wpa2_BRIDGE_tcp_dl", mode=mode, vlan_id=vlan,
 | 
			
		||||
                                        download_rate="1Gbps", batch_size="1",
 | 
			
		||||
                                        upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000")
 | 
			
		||||
 | 
			
		||||
        report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,221 @@
 | 
			
		||||
from logging import exception
 | 
			
		||||
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 sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, pytest.mark.AccessPointConnection]
 | 
			
		||||
 | 
			
		||||
if 'perfecto_libs' not in sys.path:
 | 
			
		||||
    sys.path.append(f'../libs/perfecto_libs')
 | 
			
		||||
 | 
			
		||||
from android_lib import closeApp, verifyUploadDownloadSpeed_android, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp
 | 
			
		||||
 | 
			
		||||
setup_params_general = {
 | 
			
		||||
    "mode": "BRIDGE",
 | 
			
		||||
    "ssid_modes": {
 | 
			
		||||
        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
 | 
			
		||||
        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
 | 
			
		||||
                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
 | 
			
		||||
        "wpa2_personal": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestAcessPointConnectionBridge(object):
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_AccessPointConnection_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_AccessPointConnection_2g_WPA2_Personal_Bridge(self,request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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_ToggleAirplaneMode_data
 | 
			
		||||
 | 
			
		||||
         #Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_AccessPointConnection_5g_WPA_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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_ToggleAirplaneMode_data
 | 
			
		||||
 | 
			
		||||
         #Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_AccessPointConnection_2g_WPA_Bridge(self, request, get_vif_state, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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_ToggleAirplaneMode_data
 | 
			
		||||
 | 
			
		||||
         #Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android):
 | 
			
		||||
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["open"][0]
 | 
			
		||||
        ssidName = profile_data["ssid_name"]
 | 
			
		||||
        ssidPassword = "[BLANK]"
 | 
			
		||||
        print("SSID_NAME: " + ssidName)
 | 
			
		||||
        print("SSID_PASS: " + ssidPassword)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data, setup_perfectoMobile_android):
 | 
			
		||||
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["open"][1]
 | 
			
		||||
        ssidName = profile_data["ssid_name"]
 | 
			
		||||
        ssidPassword = "[BLANK]"
 | 
			
		||||
        print("SSID_NAME: " + ssidName)
 | 
			
		||||
        print("SSID_PASS: " + ssidPassword)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
							
								
								
									
										214
									
								
								tests/e2e/interOp/android/client_connectivity/test_BridgeMode.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										214
									
								
								tests/e2e/interOp/android/client_connectivity/test_BridgeMode.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,214 @@
 | 
			
		||||
from logging import exception
 | 
			
		||||
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 sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
if 'perfecto_libs' not in sys.path:
 | 
			
		||||
    sys.path.append(f'../libs/perfecto_libs')
 | 
			
		||||
 | 
			
		||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and,
 | 
			
		||||
              pytest.mark.ClientConnectivity]
 | 
			
		||||
 | 
			
		||||
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, \
 | 
			
		||||
    Toggle_AirplaneMode_android, ForgetWifiConnection, openApp
 | 
			
		||||
 | 
			
		||||
setup_params_general = {
 | 
			
		||||
    "mode": "BRIDGE",
 | 
			
		||||
    "ssid_modes": {
 | 
			
		||||
        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
                 "security_key": "something"}],
 | 
			
		||||
        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
 | 
			
		||||
                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
 | 
			
		||||
        "wpa2_personal": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
             "security_key": "something"}]},
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestBridgeMode(object):
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                                 setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        assert verifyUploadDownloadSpeed_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                                 setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_ClientConnectivity_2g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                       setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_ClientConnectivity_5g_WPA_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                       setup_perfectoMobile_android):
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_ClientConnectivity_2g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                        setup_perfectoMobile_android):
 | 
			
		||||
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["open"][0]
 | 
			
		||||
        ssidName = profile_data["ssid_name"]
 | 
			
		||||
        ssidPassword = "[BLANK]"
 | 
			
		||||
        print("SSID_NAME: " + ssidName)
 | 
			
		||||
        print("SSID_PASS: " + ssidPassword)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_ClientConnectivity_5g_OPEN_Bridge(self, request, get_vif_state, get_APToMobileDevice_data,
 | 
			
		||||
                                        setup_perfectoMobile_android):
 | 
			
		||||
 | 
			
		||||
        profile_data = setup_params_general["ssid_modes"]["open"][1]
 | 
			
		||||
        ssidName = profile_data["ssid_name"]
 | 
			
		||||
        ssidPassword = "[BLANK]"
 | 
			
		||||
        print("SSID_NAME: " + ssidName)
 | 
			
		||||
        print("SSID_PASS: " + ssidPassword)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # Toggle AirplaneMode
 | 
			
		||||
        assert Toggle_AirplaneMode_android(request, setup_perfectoMobile_android, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
@@ -26,6 +26,8 @@ setup_params_general = {
 | 
			
		||||
    "ssid_modes": {
 | 
			
		||||
        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
 | 
			
		||||
        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
 | 
			
		||||
                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
 | 
			
		||||
        "wpa2_personal": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
 | 
			
		||||
@@ -106,7 +108,6 @@ class TestAccessPointConnectivety(object):
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_AccessPointConnection_5g_WPA(self, request, get_vif_state, get_AccessPointConn_data, setup_perfectoMobile_iOS):
 | 
			
		||||
@@ -169,3 +170,68 @@ class TestAccessPointConnectivety(object):
 | 
			
		||||
 | 
			
		||||
        #ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_5g_OPEN(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_2g_OPEN(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
@@ -0,0 +1,245 @@
 | 
			
		||||
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 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
 | 
			
		||||
 | 
			
		||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios,
 | 
			
		||||
              pytest.mark.AccessPointConnection]
 | 
			
		||||
 | 
			
		||||
setup_params_general = {
 | 
			
		||||
    "mode": "BRIDGE",
 | 
			
		||||
    "ssid_modes": {
 | 
			
		||||
        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
                 "security_key": "something"}],
 | 
			
		||||
        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
 | 
			
		||||
                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
 | 
			
		||||
        "wpa2_personal": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
             "security_key": "something"}]},
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestAccessPointConnectivetyBridge(object):
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_AccessPointConnection_5g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_AccessPointConnection_2g_WPA2_Personal_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_AccessPointConnection_5g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_AccessPointConnection_2g_WPA_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_5g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_AccessPointConnection_2g_OPEN_Bridge(self, request, get_vif_state, get_AccessPointConn_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)
 | 
			
		||||
 | 
			
		||||
        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_AccessPointConn_data
 | 
			
		||||
 | 
			
		||||
        # Set Wifi/AP Mode
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Need An ip To ping
 | 
			
		||||
        wifi_ip = get_WifiIPAddress_iOS(request, setup_perfectoMobile_iOS, connData, ssidName)
 | 
			
		||||
 | 
			
		||||
        # Open Ping Application
 | 
			
		||||
        openApp(connData["bundleId-iOS-Ping"], setup_perfectoMobile_iOS)
 | 
			
		||||
 | 
			
		||||
        ping_deftapps_iOS(setup_perfectoMobile_iOS, wifi_ip)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
							
								
								
									
										212
									
								
								tests/e2e/interOp/iOS/client_connectivity/test_BridgeMode.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								tests/e2e/interOp/iOS/client_connectivity/test_BridgeMode.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,212 @@
 | 
			
		||||
from logging import exception
 | 
			
		||||
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 sys
 | 
			
		||||
import allure
 | 
			
		||||
 | 
			
		||||
if 'perfecto_libs' not in sys.path:
 | 
			
		||||
    sys.path.append(f'../libs/perfecto_libs')
 | 
			
		||||
 | 
			
		||||
pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_ios, pytest.mark.ClientConnectivity]
 | 
			
		||||
 | 
			
		||||
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, \
 | 
			
		||||
    set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
 | 
			
		||||
 | 
			
		||||
setup_params_general = {
 | 
			
		||||
    "mode": "BRIDGE",
 | 
			
		||||
    "ssid_modes": {
 | 
			
		||||
        "wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
                {"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
                 "security_key": "something"}],
 | 
			
		||||
        "open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
 | 
			
		||||
                 {"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
 | 
			
		||||
        "wpa2_personal": [
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
			
		||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
			
		||||
             "security_key": "something"}]},
 | 
			
		||||
    "rf": {},
 | 
			
		||||
    "radius": False
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
			
		||||
@pytest.mark.parametrize(
 | 
			
		||||
    'setup_profiles',
 | 
			
		||||
    [setup_params_general],
 | 
			
		||||
    indirect=True,
 | 
			
		||||
    scope="class"
 | 
			
		||||
)
 | 
			
		||||
@pytest.mark.usefixtures("setup_profiles")
 | 
			
		||||
class TestBridgeMode(object):
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_ClientConnectivity_5g_WPA2_Personal_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa2_personal
 | 
			
		||||
    def test_ClientConnectivity_2g_WPA2_Personal_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_ClientConnectivity_2g_WPA_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.wpa
 | 
			
		||||
    def test_ClientConnectivity_5g_WPA_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.twog
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_ClientConnectivity_2g_OPEN_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
 | 
			
		||||
    @pytest.mark.fiveg
 | 
			
		||||
    @pytest.mark.open
 | 
			
		||||
    def test_ClientConnectivity_5g_OPEN_Bridge(self, request, get_vif_state, 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)
 | 
			
		||||
        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
 | 
			
		||||
        set_APconnMobileDevice_iOS(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # Verify Upload download Speed from device Selection
 | 
			
		||||
        verifyUploadDownloadSpeediOS(request, setup_perfectoMobile_iOS, connData)
 | 
			
		||||
 | 
			
		||||
        # ForgetWifi
 | 
			
		||||
        ForgetWifiConnection(request, setup_perfectoMobile_iOS, ssidName, connData)
 | 
			
		||||
		Reference in New Issue
	
	Block a user