Code Monkey home page Code Monkey logo

Comments (7)

whitej6 avatar whitej6 commented on June 27, 2024 1

I meant index moving to PolicyRule, right now it is in the M2M releationship.

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on June 27, 2024

Adding in a couple of discussion bullet points:

  • Easier creation of the mapping between Policy and PolicyRule - currently you have to know the name of the PolicyRule you want to assign to a given Policy, if it were a foreign key then this mental overhead could be saved
  • With #53 the cases where you do in fact need the same PolicyRule twice (or even more often) can be addressed with a simple cloning of that PolicyRule. I see that this is duplicating data in the database which should normally be avoided, but it also allows these two instances of that PolicyRule to potentially diverge from each other

from nautobot-app-firewall-models.

whitej6 avatar whitej6 commented on June 27, 2024
  • Should the FK be a required field? (create policy first)
  • The weight would switch to being on the PR model not the through model
  • Clone to make up for the loss of reuse of PRs?

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on June 27, 2024

1/3 yes
2 first weight or index? For weight I would have thought on the policy model, but I suspect you have thought of that and it doesnโ€™t work out.

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on June 27, 2024

How about having the following:

  • weight on the Policy model to express in which order they should be applied (if there are multiple policies with overlapping zones for the same device, such as a general, default one and a device-specific)
  • index on the PolicyRule model to express their order inside of the Policy

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on June 27, 2024

yea, index to PolicyRule

from nautobot-app-firewall-models.

whitej6 avatar whitej6 commented on June 27, 2024

Resolved by #80

from nautobot-app-firewall-models.

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.