Coverage for virtualization/object_actions.py: 91%
11 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 18:35 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 18:35 +0000
1from django.utils.translation import gettext_lazy as _
3from netbox.object_actions import ObjectAction
5__all__ = (
6 'BulkAddComponents',
7)
10class BulkAddComponents(ObjectAction):
11 """
12 Add components to the selected virtual machines.
13 """
14 label = _('Add Components')
15 multi = True
16 permissions_required = {'change'}
17 template_name = 'virtualization/buttons/bulk_add_components.html'
19 @classmethod
20 def get_context(cls, context, obj):
21 return {
22 'formaction': context.get('formaction'),
23 }