Giter Club home page Giter Club logo

Comments (4)

edgar-costa avatar edgar-costa commented on July 24, 2024

What do you want to add if there are no keys? You can only have a default action no? Or can you explain a bit more what are you trying to do?

from p4-utils.

yhx-coder avatar yhx-coder commented on July 24, 2024

This is my definition of table.
table swid { actions = { set_swid; NoAction; } default_action=NoAction(); }
the action set_swid tries to set switch id for each device. And I want to down the switch id.

from p4-utils.

edgar-costa avatar edgar-costa commented on July 24, 2024

But if you have no keys, the only way to make that action to be "executed" is by setting it as default. Thus, table_add can not be used with keyless tables, you need to match to something.

from p4-utils.

yhx-coder avatar yhx-coder commented on July 24, 2024

Thanks for your reply.
I made some fixes in my thrift_API.SwitchInfo.load_json_str to make it work for this case. I think it is reasonable. Because even if I set it as default, I need the control plane to add parameters. But at this time, the key is redundant. This behavior is supported in CLI. So if the official will support this kind of table in the future?
By the way, I think you are right. I do need to modify my definition of table.

from p4-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.