;
| Using the realm.py library we will write a script that will allow us to automate the creation of VAPs. Requires LANforge 5.4.2 | |
vap_profile.vap_name = "TestNet"
vap_profile.use_security(security_type, ssid, passwd) is the preferred method to use when setting the security type, ssid, and password variables. Available security types are wpa, wpa2, wpa3, wep, and open.vap_profile.use_security(type="wpa2", ssid="testNet", passwd="testPass")
vap_profile.mode = 1
vap_profile.create(resource=1, radio="wiphy0", channel=36, up_=True)
key_mgmt="WPA-EAP"We can then use these variables to call the set_wifi_extra() method
eap="TTLS"
identity="testuser"
passwd="testpasswd"
realm="localhost.localdomain"
domain="localhost.localdomain"
hessid="00:00:00:00:00:01"
vap_profile.set_wifi_extra(key_mgmt, eap, identity, passwd, realm, domain, hessid)