-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assign ressources to applications #25
Comments
Solution 1 is more or less what I did with the ObjectAlias and their ObjectAliasTarget linking to IPAddress, Prefix or IPRange objects. The ObjectAliasTarget is needed because it is (was?) not possible to have ManyToMany GenericForeignKey relationships (i.e.: one IPAddress being used in several ObjectAlias/Application). I agree that is not ideal and not easy to maintain with future evolutions of NetBox. Solution 2 seems like it would distort the meaning of the Tenant object, which could also be hard to maintain if the NetBox model evolves (e.g.: feature request netbox-community/netbox#16125). But I see two additional limitations:
Do you have example of other plugins using tenant in that way? |
I see two other potential solutions:
|
To my knowledge there is no other plugin that uses the My fear about using a separate form to map the relationships is that this extra task might be too much of a hassle for users and they won't want to use this feature. Using a custom field might be a solution and I think there's also netbox-community/netbox#14732 to allow plugins to inject additional form fields. If this feature is implemented, we could add a new field like |
An application can have multiple resources, such as devices, virtual machines, or IP addresses. Especially in emergencies, it's important to identify not only the affected data flows, but also all components involved. Also, having an inventory of all application resources could allow future features of this plugin to show data flows between resources of different application resources.
Scenario:.
For example, during a DDoS attack against service Foo, it's useful to know that hardware servers A and B are affected. Then, NOC personnel can easily identify high CPU or interface usage as being related to this service incident.
Proposed solutions:
One can add a special mapping between an application and resources using a
GenericForeignKey
relationship. However, this introduces a lot of code and forms to manage relationships. Also, future extensions to the NetBox core model will need to be implemented.(Preferred) NetBox already includes the Tenancy feature for grouping all resources of a specific organizational unit, and other groups can be implemented as well. For each application, a
Tenant
object could be automatically created and bound via aOneToOne
relationship. This allows to use the standard NetBox features of assigning resources to the application's virtualTenant
object in all current NetBox forms, even those of plugins using tenancy. The resources could then be visible on the application page like the tenant details, listing all related objects of the virtual tenant.If accepted, I could work on a PR for this feature.
The text was updated successfully, but these errors were encountered: