Coder Social home page Coder Social logo

Comments (4)

pcarver avatar pcarver commented on July 17, 2024

Is there a strong reason to use the implicit logic of "first element in the array is special" vs having an explicit field to define the default MAC in addition to an array of equally non-special additional MACs?

from vfd.

ScottDaniels avatar ScottDaniels commented on July 17, 2024

One less field to document, one less field for someone to forget to change. If you feel strongly about having a specific default field, then I'd suggest this change to the overall json (quotes omitted for simplicity):

macs: {
default: 04:30:86:11:04:17,
whilte_list [ m1, m2, ... mn ]
}

We'd have to support the old style for a while for backward compatibility.

from vfd.

pcarver avatar pcarver commented on July 17, 2024

I would say that the "specialness" of the first element in the array ought to be documented, so doesn't save much documentation to document a separate field. The JSON you proposed looks exactly how I think it ought to look. I would suggest that a default or sample config file should include comment lines that indicate that if default MAC is missing it will be generated randomly (if you still want to support the random MAC generation you mentioned) and that if white_list is present that it will cause "set mac-vlan" callbacks to be ignored.

from vfd.

ScottDaniels avatar ScottDaniels commented on July 17, 2024

Agree; the use of the first address as the default is already documented and is the current behaviour, as is the generation of the random address if the array is missing. Regardless doc changes are needed.

from vfd.

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.