def _buckets(): if not ofgroup.is_bucket_needed(dpath, cmd): return [] next_gid = fibcapi.mpls_interface_group_id(entry.ne_id) actions = [ ofaction.push_mpls(fibcapi.ETHTYPE_MPLS), ofaction.set_field("mpls_label", entry.new_label), ofaction.set_mpls_ttl(64), ofaction.group(next_gid), ] return [dict(actions=actions)]
def _buckets(): if not ofgroup.is_bucket_needed(dpath, cmd): return [] next_gid = get_next_gid(entry) actions = [ ofaction.push_mpls(fibcapi.ETHTYPE_MPLS), ofaction.set_field("mpls_label", entry.new_label), ] if mpls_bos: actions.append(ofaction.set_field("mpls_bos", 1)) actions.append(ofaction.set_mpls_ttl(64)) actions.append(ofaction.group(next_gid)) return [dict(actions=actions)]