Comments (10)
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.
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.
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.
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.
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.
Related to #70
from nautobot-app-firewall-models.
@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.
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:
- Somehow get all dynamic groups a device is part of (this is an issue on the Nautobot core side)
- Get all
Policy
objects that apply to those given dynamic groups - Get all
Policy
objects that apply directly to that given device - Get all
PolicyRule
objects for each of thosePolicy
objects - 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.
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.
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)
- More flexibly link zones to addresses/subnet/prefixes
- Server Error on policy when assigned to dynamic group
- Migrate zero fails when data is currently loaded in the app
- Ability to model virtual contexts HOT 1
- Creating Policy Rule Without Name Makes Object Directly Uneditable in UI
- Replace Capirca dependency with Aerleon
- Tags missing from Object model via API HOT 1
- Enable Config Contexts
- NatPolicy View fails to load
- Policy Rule list view clone rule
- Error deleting device with nautobot-app-firewall-models policy assigned
- Policy rules with same index value can be assigned to same policy
- Delete policy rule from list view error
- Refine Policy and PolicyRule Objects to Allow Duplicates with Variations
- Support for ICMP Types Missing
- Support for IP Fragments Missing HOT 1
- Add Support for Time Ranges
- Unable to Specify "Any" for Protocol
- MySQL testing is disabled in CI
- 'RestrictedQuerySet' object has no attribute 'net_in' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nautobot-app-firewall-models.