How to use the openweave.WeaveDeviceMgr.ParseSecurityType function in openweave

To help you get started, we’ve selected a few openweave examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openweave / openweave-core / src / device-manager / python / weave-device-mgr.py View on Github external
wpa2-enterprise
              wpa2-mixed-enterprise
        """

        args = shlex.split(line)

        if (len(args) == 0):
            print "Usage:"
            self.do_help('add-wifi-network')
            return

        if (len(args) < 2):
            print "Please specify WiFI security type"
            return

        securityType = WeaveDeviceMgr.ParseSecurityType(args[1])
        if (securityType == None):
            print "Unrecognized security type: " + args[1]
            return

        networkInfo = WeaveDeviceMgr.NetworkInfo(
            networkType = WeaveDeviceMgr.NetworkType_WiFi,
            wifiSSID = args[0],
            wifiMode = WeaveDeviceMgr.WiFiMode_Managed,
            wifiRole = WeaveDeviceMgr.WiFiRole_Station,
            wifiSecurityType = securityType)

        if (securityType != WeaveDeviceMgr.WiFiSecurityType_None):
            if (len(args) < 3):
                print "Must supply WiFi key"
                return
            if (len(args) > 3):