(self, ssid)
Adds a network payload to the profile.

    If the SSID specified is 'wired' a wired payload will be created.

    NOTE: If you intend to use |AddMachineCertifcate|, |AddAnchorCertifcate| or
    |AddTrustedServer| then you must call them before this method or they won't
    take effect.

    Args:
      ssid: str, the SSID to create a payload for.
Adds a network payload to the profile.
Adds a network payload to the profile .
def AddNetworkPayload(self, ssid):
    """Adds a network payload to the profile.

    If the SSID specified is 'wired' a wired payload will be created.

    NOTE: If you intend to use |AddMachineCertifcate|, |AddAnchorCertifcate| or
    |AddTrustedServer| then you must call them before this method or they won't
    take effect.

    Args:
      ssid: str, the SSID to create a payload for.
    """
    payload = {'AutoJoin': True,
               'SetupModes': ['System', 'User'],
               'PayloadCertificateUUID': self._auth_cert}

    if ssid == 'wired':
      payload[PAYLOADKEYS_DISPLAYNAME] = 'Wired'
      payload[PAYLOADKEYS_IDENTIFIER] = self._GenerateID('wired')
      payload[PAYLOADKEYS_TYPE] = 'com.apple.firstactiveethernet.managed'
      payload['EncryptionType'] = 'Any'
      payload['Interface'] = 'FirstActiveEthernet'
    else:
      payload[PAYLOADKEYS_DISPLAYNAME] = ssid
      payload[PAYLOADKEYS_IDENTIFIER] = self._GenerateID('ssid.%s' % ssid)
      payload[PAYLOADKEYS_TYPE] = 'com.apple.wifi.managed'
      payload['EncryptionType'] = 'WPA'
      payload['Interface'] = 'BuiltInWireless'
      payload['SSID_STR'] = ssid

    eap_client_config = {}
    eap_client_config['AcceptEAPTypes'] = [13,]
    eap_client_config['PayloadCertificateAnchorUUID'] = self._anchor_certs
    eap_client_config['TLSTrustedServerNames'] = self._trusted_servers
    eap_client_config['TLSAllowTrustExceptions'] = False
    payload['EAPClientConfiguration'] = eap_client_config

    self.AddPayload(payload)
def AddNetworkPayload ( self , ssid ) : payload = { 'AutoJoin' : True , 'SetupModes' : [ 'System' , 'User' ] , 'PayloadCertificateUUID' : self . _auth_cert } if ssid == 'wired' : payload [ PAYLOADKEYS_DISPLAYNAME ] = 'Wired' payload [ PAYLOADKEYS_IDENTIFIER ] = self . _GenerateID ( 'wired' ) payload [ PAYLOADKEYS_TYPE ] = 'com.apple.firstactiveethernet.managed' payload [ 'EncryptionType' ] = 'Any' payload [ 'Interface' ] = 'FirstActiveEthernet' else : payload [ PAYLOADKEYS_DISPLAYNAME ] = ssid payload [ PAYLOADKEYS_IDENTIFIER ] = self . _GenerateID ( 'ssid.%s' % ssid ) payload [ PAYLOADKEYS_TYPE ] = 'com.apple.wifi.managed' payload [ 'EncryptionType' ] = 'WPA' payload [ 'Interface' ] = 'BuiltInWireless' payload [ 'SSID_STR' ] = ssid eap_client_config = { } eap_client_config [ 'AcceptEAPTypes' ] = [ 13 , ] eap_client_config [ 'PayloadCertificateAnchorUUID' ] = self . _anchor_certs eap_client_config [ 'TLSTrustedServerNames' ] = self . _trusted_servers eap_client_config [ 'TLSAllowTrustExceptions' ] = False payload [ 'EAPClientConfiguration' ] = eap_client_config self . AddPayload ( payload )