Code Monkey home page Code Monkey logo

Comments (10)

itdependsnetworks avatar itdependsnetworks commented on September 25, 2024

Are you saying your use case is not handled or that it is not handled sufficiently simple enough? If the latter then I think to be expected, GraphQl is simply based on the relationships in models

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on September 25, 2024

A little bit of both. Currently I can only retrieve policies assigned directly to devices, not those assigned through dynamic groups. I talked about this with the Nautobot core team and they didn't have an immediate solution in mind, but in general thought that the extension of GraphQL models by plugins might be a use case worthwhile exploring.

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on September 25, 2024

So the first is Nautobot Core issue, and the second I would not expect any update on, as it is based on the GraphQL implementation.

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on September 25, 2024

I understand the sentiment, but taking away the thoughts about the implementation and just thinking of the actual feature for now, don't you think it would be useful to have this feature in, especially in regards to how we're using GraphQL with golden config? Otherwise I have to piece together which policies apply to my device.

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on September 25, 2024

Ok, fair enough. Imho the GitHub issue should focus more on the problem/use case and less about the solution you may specifically be looking for.

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on September 25, 2024

Related to #70

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on September 25, 2024

@Kircheneer still not clear to me what the request is, my recommendation is to still look at the use case/problem. While yes I agree it would be better to have GraphQL have a more simplified view in this case I do not think it plausible/reasonable to have another implementation of GraphQL just for this use case. So if we remove from the suggested solution, what is the problem? I have added to_json and policy_details methods on 2 of the models, for what I guess is the same underlying problem.

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on September 25, 2024

Alright let me try to lay out again why I think I need this. My use case, which I think is fairly standard, is that I want to retrieve all Policy objects that apply to a given Device object so I have the entire firewall policy that should apply to that device. Now currently (with GraphQL/REST and assuming no ORM access, which is reasonable for a SoT IMO) I have to do the following things to get there:

  1. Somehow get all dynamic groups a device is part of (this is an issue on the Nautobot core side)
  2. Get all Policy objects that apply to those given dynamic groups
  3. Get all Policy objects that apply directly to that given device
  4. Get all PolicyRule objects for each of those Policy objects
  5. Done

To me this just sounds like a lot of work and a very complex GraphQL query / a lot of individual REST API queries for what I think will be a fairly common use case. I can however understand if you don't think this is a battery worth including, I just wanted to highlight my though process here.

from nautobot-app-firewall-models.

itdependsnetworks avatar itdependsnetworks commented on September 25, 2024

As mentioned in my prior comment, for 1-5 I still don't understand how the to_json and policy_details are not solving the problem, other than not being the preferred graphql. Can you speak directly to that point on to_json & policy_details?

from nautobot-app-firewall-models.

Kircheneer avatar Kircheneer commented on September 25, 2024

Well I need ORM access to use those, don't I? So that rules out both the preferred GraphQL as well as the REST API in their current state. Also unless I am misunderstanding something, even if we had these methods exposed on say the REST API then I would still need to know all the relevant Policy objects (steps 1+2) before I can make calls to their respective to_json or policy_details endpoints.

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.