original_docstring: Apply non-secgroup security to a port
  
          This is an idempotent function to set up the port security
          (antispoof and allowed-address-pair) that can be determined
          solely from the data on the port itself.
  
          
docstring: Apply non-secgroup security to a port
  This is an idempotent function to set up the port security
  (antispoof and allowed-address-pair) that can be determined
  solely from the data on the port itself.
docstring_tokens: Apply non - secgroup security to a port This is an idempotent function to set up the port security ( antispoof and allowed - address - pair ) that can be determined solely from the data on the port itself .
code: def apply_spoof_macip(self, iface_idx, security_data, props):
          """Apply non-secgroup security to a port
  
          This is an idempotent function to set up the port security
          (antispoof and allowed-address-pair) that can be determined
          solely from the data on the port itself.
  
          """
  
          # TODO(ijw): this is a convenience for spotting L3 and DHCP
          # ports, but it's not the right way
          is_secured_port = props['bind_type'] == 'vhostuser'
  
          port_security_enabled = security_data.get('port_security_enabled',
                                                    True)
  
          # If (security-groups and port_security)
          # are enabled and it's a vhostuser port
          # proceed to set L3/L2 ACLs, else skip security
          if (self.secgroup_enabled and
                  port_security_enabled and
                  is_secured_port):
  
              # Set Allowed address pairs and mac-spoof filter
              aa_pairs = security_data.get('allowed_address_pairs', [])
              self.set_mac_ip_acl_on_port(
                  security_data['mac_address'],
                  security_data.get('fixed_ips'),
                  aa_pairs,
                  iface_idx)
          else:
              self.vppf.remove_mac_ip_acl_on_port(iface_idx)
code_tokens: def apply_spoof_macip ( self , iface_idx , security_data , props ) : is_secured_port = props [ 'bind_type' ] == 'vhostuser' port_security_enabled = security_data . get ( 'port_security_enabled' , True ) if ( self . secgroup_enabled and port_security_enabled and is_secured_port ) : aa_pairs = security_data . get ( 'allowed_address_pairs' , [ ] ) self . set_mac_ip_acl_on_port ( security_data [ 'mac_address' ] , security_data . get ( 'fixed_ips' ) , aa_pairs , iface_idx ) else : self . vppf . remove_mac_ip_acl_on_port ( iface_idx )
short_docstring: Apply non-secgroup security to a port
  This is an idempotent function to set up the port security
  (antispoof and allowed-address-pair) that can be determined
  solely from the data on the port itself.
short_docstring_tokens: Apply non - secgroup security to a port This is an idempotent function to set up the port security ( antispoof and allowed - address - pair ) that can be determined solely from the data on the port itself .
comment: """Apply non-secgroup security to a port
  
          This is an idempotent function to set up the port security
          (antispoof and allowed-address-pair) that can be determined
          solely from the data on the port itself.
  
          """$SEP$# TODO(ijw): this is a convenience for spotting L3 and DHCP$SEP$# ports, but it's not the right way$SEP$# If (security-groups and port_security)$SEP$# are enabled and it's a vhostuser port$SEP$# proceed to set L3/L2 ACLs, else skip security$SEP$# Set Allowed address pairs and mac-spoof filter