original_docstring: Compute a vector of input/output ACLs and set it on the VPP port.
  
          Arguments:
          secgroup_ids - OpenStack Security Group IDs
          sw_if_index - VPP software interface index on which the ACLs will
          be set
  
          This method checks the global secgroups to acl mapping to
          figure out the ACL indexes associated with the secgroup.  It
          then composes the acl vector and programs the port using vppf.
  
          If the secgroup cannot be found or if the ACL index is invalid
          i.e. 0xffffffff it will return False. This happens mostly in
          agent restart situations when the secgroups mapping is still
          being populated by the secgroup watcher thread, but since the
          port and secgroup threads are independent it can happen at any
          moment.
  
          
docstring: Compute a vector of input/output ACLs and set it on the VPP port.
  Arguments:
  secgroup_ids - OpenStack Security Group IDs
  sw_if_index - VPP software interface index on which the ACLs will
  be set
  
  This method checks the global secgroups to acl mapping to
  figure out the ACL indexes associated with the secgroup.  It
  then composes the acl vector and programs the port using vppf.
  
  If the secgroup cannot be found or if the ACL index is invalid
  i.e. 0xffffffff it will return False. This happens mostly in
  agent restart situations when the secgroups mapping is still
  being populated by the secgroup watcher thread, but since the
  port and secgroup threads are independent it can happen at any
  moment.
docstring_tokens: Compute a vector of input / output ACLs and set it on the VPP port . Arguments : secgroup_ids - OpenStack Security Group IDs sw_if_index - VPP software interface index on which the ACLs will be set This method checks the global secgroups to acl mapping to figure out the ACL indexes associated with the secgroup . It then composes the acl vector and programs the port using vppf . If the secgroup cannot be found or if the ACL index is invalid i . e . 0xffffffff it will return False . This happens mostly in agent restart situations when the secgroups mapping is still being populated by the secgroup watcher thread but since the port and secgroup threads are independent it can happen at any moment .
code: def maybe_set_acls_on_port(self, secgroup_ids, sw_if_index):
          """Compute a vector of input/output ACLs and set it on the VPP port.
  
          Arguments:
          secgroup_ids - OpenStack Security Group IDs
          sw_if_index - VPP software interface index on which the ACLs will
          be set
  
          This method checks the global secgroups to acl mapping to
          figure out the ACL indexes associated with the secgroup.  It
          then composes the acl vector and programs the port using vppf.
  
          If the secgroup cannot be found or if the ACL index is invalid
          i.e. 0xffffffff it will return False. This happens mostly in
          agent restart situations when the secgroups mapping is still
          being populated by the secgroup watcher thread, but since the
          port and secgroup threads are independent it can happen at any
          moment.
  
          """
  
          # A list of VppAcl namedtuples to be set on the port
          vpp_acls = []
          for secgroup_id in secgroup_ids:
              acl = self.secgroups.get(secgroup_id)
              # If any one or both indices are invalid wait for a valid acl
              if (not acl or
                      acl.in_idx == 0xFFFFFFFF or
                      acl.out_idx == 0xFFFFFFFF):
                  LOG.debug("Still waiting for a valid vpp acl "
                            "corresponding to secgroup %s" % secgroup_id)
                  return False
              else:
                  vpp_acls.append(acl)
  
          self._set_acls_on_vpp_port(vpp_acls, sw_if_index)
          return True
code_tokens: def maybe_set_acls_on_port ( self , secgroup_ids , sw_if_index ) : vpp_acls = [ ] for secgroup_id in secgroup_ids : acl = self . secgroups . get ( secgroup_id ) if ( not acl or acl . in_idx == 0xFFFFFFFF or acl . out_idx == 0xFFFFFFFF ) : LOG . debug ( "Still waiting for a valid vpp acl " "corresponding to secgroup %s" % secgroup_id ) return False else : vpp_acls . append ( acl ) self . _set_acls_on_vpp_port ( vpp_acls , sw_if_index ) return True
short_docstring: Compute a vector of input/output ACLs and set it on the VPP port.
short_docstring_tokens: Compute a vector of input / output ACLs and set it on the VPP port .
comment: """Compute a vector of input/output ACLs and set it on the VPP port.
  
          Arguments:
          secgroup_ids - OpenStack Security Group IDs
          sw_if_index - VPP software interface index on which the ACLs will
          be set
  
          This method checks the global secgroups to acl mapping to
          figure out the ACL indexes associated with the secgroup.  It
          then composes the acl vector and programs the port using vppf.
  
          If the secgroup cannot be found or if the ACL index is invalid
          i.e. 0xffffffff it will return False. This happens mostly in
          agent restart situations when the secgroups mapping is still
          being populated by the secgroup watcher thread, but since the
          port and secgroup threads are independent it can happen at any
          moment.
  
          """$SEP$# A list of VppAcl namedtuples to be set on the port$SEP$# If any one or both indices are invalid wait for a valid acl