netbox-toolkit-plugin 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netbox_toolkit_plugin/__init__.py +32 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/serializers.py +71 -35
- {netbox_toolkit → netbox_toolkit_plugin}/api/urls.py +3 -3
- {netbox_toolkit → netbox_toolkit_plugin}/config.py +80 -73
- {netbox_toolkit → netbox_toolkit_plugin}/connectors/factory.py +170 -111
- {netbox_toolkit → netbox_toolkit_plugin}/connectors/netmiko_connector.py +242 -179
- {netbox_toolkit → netbox_toolkit_plugin}/connectors/scrapli_connector.py +256 -172
- netbox_toolkit_plugin/migrations/0001_initial.py +108 -0
- netbox_toolkit_plugin/migrations/0002_alter_command_options_alter_command_unique_together_and_more.py +70 -0
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/0003_permission_system_update.py +26 -12
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/0004_remove_django_permissions.py +27 -29
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/0005_alter_command_options_and_more.py +7 -8
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/0006_commandlog_parsed_data_commandlog_parsing_success_and_more.py +7 -8
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/0007_alter_commandlog_parsing_template.py +6 -4
- {netbox_toolkit → netbox_toolkit_plugin}/models.py +31 -32
- {netbox_toolkit → netbox_toolkit_plugin}/navigation.py +6 -6
- {netbox_toolkit → netbox_toolkit_plugin}/services/command_service.py +188 -128
- {netbox_toolkit → netbox_toolkit_plugin}/services/rate_limiting_service.py +104 -97
- netbox_toolkit_plugin/tables.py +51 -0
- netbox_toolkit_plugin/templates/netbox_toolkit/command.html +108 -0
- netbox_toolkit_plugin/templates/netbox_toolkit/command_list.html +12 -0
- netbox_toolkit_plugin/templates/netbox_toolkit/commandlog.html +170 -0
- netbox_toolkit_plugin/templates/netbox_toolkit/device_toolkit.html +557 -0
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/command.html +5 -5
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/command_list.html +2 -2
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/commandlog.html +2 -2
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/device_toolkit.html +6 -6
- netbox_toolkit_plugin/urls.py +38 -0
- {netbox_toolkit → netbox_toolkit_plugin}/utils/logging.py +20 -19
- {netbox_toolkit → netbox_toolkit_plugin}/views.py +251 -169
- {netbox_toolkit_plugin-0.1.0.dist-info → netbox_toolkit_plugin-0.1.1.dist-info}/METADATA +2 -2
- netbox_toolkit_plugin-0.1.1.dist-info/RECORD +60 -0
- netbox_toolkit_plugin-0.1.1.dist-info/entry_points.txt +2 -0
- netbox_toolkit_plugin-0.1.1.dist-info/top_level.txt +1 -0
- netbox_toolkit/__init__.py +0 -30
- netbox_toolkit/migrations/0001_initial.py +0 -54
- netbox_toolkit/migrations/0002_alter_command_options_alter_command_unique_together_and_more.py +0 -66
- netbox_toolkit/tables.py +0 -37
- netbox_toolkit/urls.py +0 -22
- netbox_toolkit_plugin-0.1.0.dist-info/RECORD +0 -56
- netbox_toolkit_plugin-0.1.0.dist-info/entry_points.txt +0 -2
- netbox_toolkit_plugin-0.1.0.dist-info/top_level.txt +0 -1
- {netbox_toolkit → netbox_toolkit_plugin}/admin.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/mixins.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/schemas.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/views/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/views/command_logs.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/api/views/commands.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/connectors/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/connectors/base.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/exceptions.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/filtersets.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/forms.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/migrations/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/search.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/services/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/services/device_service.py +0 -0
- {netbox_toolkit/static/netbox_toolkit → netbox_toolkit_plugin/static/netbox_toolkit_plugin}/css/toolkit.css +0 -0
- {netbox_toolkit/static/netbox_toolkit → netbox_toolkit_plugin/static/netbox_toolkit_plugin}/js/toolkit.js +0 -0
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/command_edit.html +0 -0
- {netbox_toolkit/templates/netbox_toolkit → netbox_toolkit_plugin/templates/netbox_toolkit_plugin}/commandlog_list.html +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/utils/__init__.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/utils/connection.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/utils/error_parser.py +0 -0
- {netbox_toolkit → netbox_toolkit_plugin}/utils/network.py +0 -0
- {netbox_toolkit_plugin-0.1.0.dist-info → netbox_toolkit_plugin-0.1.1.dist-info}/WHEEL +0 -0
- {netbox_toolkit_plugin-0.1.0.dist-info → netbox_toolkit_plugin-0.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
netbox_toolkit_plugin/__init__.py,sha256=pfAgtNX_fMjsJ_XrZC_-SbndIlqNBZnwhjtzdPXBurk,848
|
2
|
+
netbox_toolkit_plugin/admin.py,sha256=j0O2hke80XbGCfU3lkxl8__tRmBArNLoQtLyA39hepI,690
|
3
|
+
netbox_toolkit_plugin/config.py,sha256=jaiEm75PT043X4v6lvkEd4ku9fBgjNZs6B_lHxaazu0,5489
|
4
|
+
netbox_toolkit_plugin/exceptions.py,sha256=qh7SxXLTqwsduxUMiTA_pXQ67VHSpxRuQgdlfXMl6Bk,785
|
5
|
+
netbox_toolkit_plugin/filtersets.py,sha256=ppmnfQ8IUHm60BiJR9_cdn1ygvuFlMfj6YIFLJ-XeMc,2722
|
6
|
+
netbox_toolkit_plugin/forms.py,sha256=6aUaXuJtx3ZL2iEbIq2zXuiXCu2bAHDUMI2EJJBPsWg,1037
|
7
|
+
netbox_toolkit_plugin/models.py,sha256=-TyH0xJrHxqfM1XC5pAFesQF38oec6JcAJs81Ay6arE,2761
|
8
|
+
netbox_toolkit_plugin/navigation.py,sha256=SvJRHkvlFgG42sLwxCTG6-6X976IgXTKhiRCPe8ZG6U,965
|
9
|
+
netbox_toolkit_plugin/search.py,sha256=v8HPgp_0Nq-s_IoV7n4Kfi63_u535jVAoT-31ntdZlA,564
|
10
|
+
netbox_toolkit_plugin/tables.py,sha256=kR90aUXuJxKiSNz7Mm62ZanodDBtExDj7AgROkh1rJw,1417
|
11
|
+
netbox_toolkit_plugin/urls.py,sha256=CbwZvFreUifZUFZUQrC-KyqVte_INKzMhnSIgzAFUVY,1215
|
12
|
+
netbox_toolkit_plugin/views.py,sha256=mmcxl70hgZ-W1R9gozXneeczcyP33InldLZRW1_p-yA,18782
|
13
|
+
netbox_toolkit_plugin/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
+
netbox_toolkit_plugin/api/mixins.py,sha256=Yxog3LQQqmzIiXjxZ5VxSbwV3er-Pxs2GpPEJUipvfY,2241
|
15
|
+
netbox_toolkit_plugin/api/schemas.py,sha256=Xza5-H2ZqBPCEPyMzDkbmSofY9nE73epu0PKvCB1_Ys,7334
|
16
|
+
netbox_toolkit_plugin/api/serializers.py,sha256=lPQLWffuRScwrmiMS24ejmwnaXqBCzlUNG92KW3dBB8,6123
|
17
|
+
netbox_toolkit_plugin/api/urls.py,sha256=_shol27G-7MlflSfLmfznLuw4xhZtrc0VBFQLxda-vE,280
|
18
|
+
netbox_toolkit_plugin/api/views/__init__.py,sha256=CksHVk9Jj81kImVlr_JnP9VGwFCAhtrnRzqw7H7pjcI,189
|
19
|
+
netbox_toolkit_plugin/api/views/command_logs.py,sha256=4PdUQPvle9R9pJcJalYS4MCKYhmG_5EbAUowbjVetgw,6255
|
20
|
+
netbox_toolkit_plugin/api/views/commands.py,sha256=dv6sjN3L0FTyAWmM4u7zZBPOug6H_WcIR6egd3XE3A4,10939
|
21
|
+
netbox_toolkit_plugin/connectors/__init__.py,sha256=lL1WCo-rlcjNGVwmwSN1PT592xr5LEPT8k5zEVZlltE,419
|
22
|
+
netbox_toolkit_plugin/connectors/base.py,sha256=Z88tVG87H8IXdub55t-_uu1ptdhKo0uaz9l9iO-Xi0I,2829
|
23
|
+
netbox_toolkit_plugin/connectors/factory.py,sha256=kWVwVE2SFibcUxl9sFAWoAWl0ehh4vd7uxMmZQU3C7o,13720
|
24
|
+
netbox_toolkit_plugin/connectors/netmiko_connector.py,sha256=6gOO3xlUDghRWjKzB__TTPQESN11djqaBZaESd2BWYY,18963
|
25
|
+
netbox_toolkit_plugin/connectors/scrapli_connector.py,sha256=FjMIFmWt-B7W3W9fdO6gauVLxH7JnLt-s99kPGvvOzg,23367
|
26
|
+
netbox_toolkit_plugin/migrations/0001_initial.py,sha256=4fycU83wXx-sN73YTxAZekRDx9uVxzHg38Dl-G6EqxY,3729
|
27
|
+
netbox_toolkit_plugin/migrations/0002_alter_command_options_alter_command_unique_together_and_more.py,sha256=FrGCbl5BnnWzqjLsMZtykgnAjzpI0j6A-6SQxKwGiAM,2174
|
28
|
+
netbox_toolkit_plugin/migrations/0003_permission_system_update.py,sha256=BUBDkAnn04Snqj-EZdi0vfCIXjbakUMlmnCawUPwpbI,1965
|
29
|
+
netbox_toolkit_plugin/migrations/0004_remove_django_permissions.py,sha256=hj6UrpfmEk4gnEVziGJHFCPvvZfDlUFH1GvxQ4Aw-h8,2545
|
30
|
+
netbox_toolkit_plugin/migrations/0005_alter_command_options_and_more.py,sha256=TOiyo2QKporoA089Vjri5rSFQX3BH1IxY1hj1voN7Rs,609
|
31
|
+
netbox_toolkit_plugin/migrations/0006_commandlog_parsed_data_commandlog_parsing_success_and_more.py,sha256=cMIeOi0j3gXfwUYO3hQ4Kr5Uok6cslyUCEurtgKN2hQ,771
|
32
|
+
netbox_toolkit_plugin/migrations/0007_alter_commandlog_parsing_template.py,sha256=VedbEIA-54JL_2I-MC1YPqppKS8WdpedB1nbFIkBcLU,512
|
33
|
+
netbox_toolkit_plugin/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
+
netbox_toolkit_plugin/services/__init__.py,sha256=nzdv0yOAyoAgm3ReKn-zLCbxkzEZfDpfnVDy9UExtyg,273
|
35
|
+
netbox_toolkit_plugin/services/command_service.py,sha256=MCxIasZkdt6xfry2dDGCr1O28LmXxfz4A-vDwNL2uV4,15989
|
36
|
+
netbox_toolkit_plugin/services/device_service.py,sha256=SWqWw7c5cBhbXE_jCJwfgc3KvxchQq_6NeS2hlb3NDA,2945
|
37
|
+
netbox_toolkit_plugin/services/rate_limiting_service.py,sha256=prru5A8TZ9kVGsapNoxYxFyPONaHp2zmaVn1clFXBCU,8574
|
38
|
+
netbox_toolkit_plugin/static/netbox_toolkit_plugin/css/toolkit.css,sha256=VmyM2_rBJhiP43whtMFaYYP4EW4MUGHPPr84mOo_0Qg,4236
|
39
|
+
netbox_toolkit_plugin/static/netbox_toolkit_plugin/js/toolkit.js,sha256=0oF2p8g1Yu28hKQswj1-2Kctt_09YtT__Xeo39LfQ-I,25721
|
40
|
+
netbox_toolkit_plugin/templates/netbox_toolkit/command.html,sha256=Aol4n0LVRO_yuHf0iUnxkQlPSMOW-V_dT_rd89rZTDE,3191
|
41
|
+
netbox_toolkit_plugin/templates/netbox_toolkit/command_list.html,sha256=hFnVL58CNDce06ICITBjdEY8w_lNYxjb9_B24PRSTc0,365
|
42
|
+
netbox_toolkit_plugin/templates/netbox_toolkit/commandlog.html,sha256=u_vNBBWmYT4ln2Qz6DylkDSLNm9h4n2j1dYhFWgOk8I,5196
|
43
|
+
netbox_toolkit_plugin/templates/netbox_toolkit/device_toolkit.html,sha256=4muIExwJ6DU3IcmDexjpOxZ8hNnIQzfiTd-17rXa9A0,30731
|
44
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/command.html,sha256=WmRepyhomJZeFAuAGQ8x0K1EFmR8vh7htQBcw7FPv8I,3422
|
45
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/command_edit.html,sha256=Dx3QVrtLegViZl9_VWeVayZ1DIgtzWDnrmgS5_TfOCg,175
|
46
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/command_list.html,sha256=zPxg_c1cfNgF54u0nj03DeglXS8N6mSJIx11OXO8fGs,382
|
47
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/commandlog.html,sha256=3oXOw27_q8kC1d9PqPvzbnDUGQyHhCfKLyYtcV5AWDs,5672
|
48
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/commandlog_list.html,sha256=ggZDtjUOx4kyyD0zAybImF4_gGqe7eTx6JOx_CxjnQ0,105
|
49
|
+
netbox_toolkit_plugin/templates/netbox_toolkit_plugin/device_toolkit.html,sha256=WzoQwG9w1-vnpAfbPJ-m6-LyT8qJas9c2CfMkf2EanU,32356
|
50
|
+
netbox_toolkit_plugin/utils/__init__.py,sha256=YPk8W2lP8BYeYpZFzemTS4V4BK9s5DqXrAjyQrMAAeg,43
|
51
|
+
netbox_toolkit_plugin/utils/connection.py,sha256=XWUNOaJ9TBIO6XuESTPi3RSwe8bKlyZ0MLV4_b-ZJiY,4349
|
52
|
+
netbox_toolkit_plugin/utils/error_parser.py,sha256=tl6QrFW_0bugZKXHl5V_UPY3VDKdp6jDskLtM5oaYAI,16811
|
53
|
+
netbox_toolkit_plugin/utils/logging.py,sha256=AfIPUNUUKYyVqGqTiS7xi96KBNs5BYZjEK8_61SPnOk,1916
|
54
|
+
netbox_toolkit_plugin/utils/network.py,sha256=__Xz3pYhd7FtMYAsnFZGbW2akQ8uRY2tjs4axIoZMhA,6100
|
55
|
+
netbox_toolkit_plugin-0.1.1.dist-info/licenses/LICENSE,sha256=oxRw-SpalZWfCdc8ZALEDboD9OV22cBRrLIpXz2f7a8,11273
|
56
|
+
netbox_toolkit_plugin-0.1.1.dist-info/METADATA,sha256=6wdLBUUcGI4wxXIimULs9thtBz90eWKpfWIkqC7_W80,3157
|
57
|
+
netbox_toolkit_plugin-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
58
|
+
netbox_toolkit_plugin-0.1.1.dist-info/entry_points.txt,sha256=CwLAZ6veCye0uzfADprW9FSnOkWEPj2NGiO8usdW_oE,62
|
59
|
+
netbox_toolkit_plugin-0.1.1.dist-info/top_level.txt,sha256=XScXYui_2rj4aEFemGc-r5CqKgcmq_dwHgQy-SodK0Q,22
|
60
|
+
netbox_toolkit_plugin-0.1.1.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
netbox_toolkit_plugin
|
netbox_toolkit/__init__.py
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
from netbox.plugins import PluginConfig
|
2
|
-
|
3
|
-
class ToolkitConfig(PluginConfig):
|
4
|
-
name = 'netbox_toolkit_plugin'
|
5
|
-
verbose_name = 'Netbox Command Toolkit Plugin'
|
6
|
-
description = 'NetBox plugin for running pre-defined commands on network devices'
|
7
|
-
version = '0.1.0'
|
8
|
-
author = 'Andy Norwood'
|
9
|
-
base_url = 'toolkit'
|
10
|
-
|
11
|
-
# Database migrations
|
12
|
-
required_settings = []
|
13
|
-
|
14
|
-
# Default plugin settings
|
15
|
-
default_settings = {
|
16
|
-
'rate_limiting_enabled': True,
|
17
|
-
'device_command_limit': 10,
|
18
|
-
'time_window_minutes': 5,
|
19
|
-
'bypass_users': [],
|
20
|
-
'bypass_groups': [],
|
21
|
-
'debug_logging': False, # Enable debug logging for this plugin
|
22
|
-
}
|
23
|
-
|
24
|
-
# Middleware
|
25
|
-
middleware = []
|
26
|
-
|
27
|
-
# Django apps to load when plugin is activated
|
28
|
-
django_apps = []
|
29
|
-
|
30
|
-
config = ToolkitConfig
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# Generated by Django 5.1.4 on 2025-05-23 14:41
|
2
|
-
|
3
|
-
import django.db.models.deletion
|
4
|
-
import taggit.managers
|
5
|
-
import utilities.json
|
6
|
-
from django.db import migrations, models
|
7
|
-
|
8
|
-
|
9
|
-
class Migration(migrations.Migration):
|
10
|
-
|
11
|
-
initial = True
|
12
|
-
|
13
|
-
dependencies = [
|
14
|
-
('dcim', '0200_populate_mac_addresses'),
|
15
|
-
('extras', '0122_charfield_null_choices'),
|
16
|
-
]
|
17
|
-
|
18
|
-
operations = [
|
19
|
-
migrations.CreateModel(
|
20
|
-
name='Command',
|
21
|
-
fields=[
|
22
|
-
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
23
|
-
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
24
|
-
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
25
|
-
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
26
|
-
('name', models.CharField(max_length=100)),
|
27
|
-
('command', models.TextField()),
|
28
|
-
('description', models.TextField(blank=True)),
|
29
|
-
('device_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='toolkit_commands', to='dcim.devicetype')),
|
30
|
-
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
31
|
-
],
|
32
|
-
options={
|
33
|
-
'abstract': False,
|
34
|
-
},
|
35
|
-
),
|
36
|
-
migrations.CreateModel(
|
37
|
-
name='CommandLog',
|
38
|
-
fields=[
|
39
|
-
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
40
|
-
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
41
|
-
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
42
|
-
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
43
|
-
('output', models.TextField()),
|
44
|
-
('username', models.CharField(max_length=100)),
|
45
|
-
('execution_time', models.DateTimeField(auto_now_add=True)),
|
46
|
-
('command', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='netbox_toolkit.command')),
|
47
|
-
('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='command_logs', to='dcim.device')),
|
48
|
-
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
49
|
-
],
|
50
|
-
options={
|
51
|
-
'abstract': False,
|
52
|
-
},
|
53
|
-
),
|
54
|
-
]
|
netbox_toolkit/migrations/0002_alter_command_options_alter_command_unique_together_and_more.py
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# Generated by Django 5.1.4 on 2025-05-26 12:11
|
2
|
-
|
3
|
-
import django.db.models.deletion
|
4
|
-
from django.db import migrations, models
|
5
|
-
|
6
|
-
|
7
|
-
class Migration(migrations.Migration):
|
8
|
-
|
9
|
-
dependencies = [
|
10
|
-
('dcim', '0200_populate_mac_addresses'),
|
11
|
-
('netbox_toolkit', '0001_initial'),
|
12
|
-
]
|
13
|
-
|
14
|
-
operations = [
|
15
|
-
# First remove the old field
|
16
|
-
migrations.RemoveField(
|
17
|
-
model_name='command',
|
18
|
-
name='device_type',
|
19
|
-
),
|
20
|
-
# Add all new fields
|
21
|
-
migrations.AddField(
|
22
|
-
model_name='command',
|
23
|
-
name='platform',
|
24
|
-
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='toolkit_commands', to='dcim.platform'),
|
25
|
-
preserve_default=False,
|
26
|
-
),
|
27
|
-
migrations.AddField(
|
28
|
-
model_name='command',
|
29
|
-
name='command_type',
|
30
|
-
field=models.CharField(default='show', max_length=50),
|
31
|
-
),
|
32
|
-
migrations.AddField(
|
33
|
-
model_name='command',
|
34
|
-
name='requires_config_mode',
|
35
|
-
field=models.BooleanField(default=False),
|
36
|
-
),
|
37
|
-
migrations.AddField(
|
38
|
-
model_name='command',
|
39
|
-
name='requires_enable',
|
40
|
-
field=models.BooleanField(default=False),
|
41
|
-
),
|
42
|
-
migrations.AddField(
|
43
|
-
model_name='commandlog',
|
44
|
-
name='error_message',
|
45
|
-
field=models.TextField(blank=True),
|
46
|
-
),
|
47
|
-
migrations.AddField(
|
48
|
-
model_name='commandlog',
|
49
|
-
name='execution_duration',
|
50
|
-
field=models.FloatField(blank=True, null=True),
|
51
|
-
),
|
52
|
-
migrations.AddField(
|
53
|
-
model_name='commandlog',
|
54
|
-
name='success',
|
55
|
-
field=models.BooleanField(default=True),
|
56
|
-
),
|
57
|
-
# Then alter model options after fields exist
|
58
|
-
migrations.AlterModelOptions(
|
59
|
-
name='command',
|
60
|
-
options={'ordering': ['platform', 'name']},
|
61
|
-
),
|
62
|
-
migrations.AlterUniqueTogether(
|
63
|
-
name='command',
|
64
|
-
unique_together={('platform', 'name')},
|
65
|
-
),
|
66
|
-
]
|
netbox_toolkit/tables.py
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
import django_tables2 as tables
|
2
|
-
from netbox.tables import NetBoxTable, columns
|
3
|
-
from .models import Command, CommandLog
|
4
|
-
|
5
|
-
class CommandTable(NetBoxTable):
|
6
|
-
name = tables.Column(
|
7
|
-
linkify=('plugins:netbox_toolkit:command_detail', [tables.A('pk')])
|
8
|
-
)
|
9
|
-
platform = tables.Column(
|
10
|
-
linkify=True
|
11
|
-
)
|
12
|
-
command_type = tables.Column()
|
13
|
-
|
14
|
-
class Meta(NetBoxTable.Meta):
|
15
|
-
model = Command
|
16
|
-
fields = ('pk', 'id', 'name', 'platform', 'command_type', 'description')
|
17
|
-
default_columns = ('pk', 'name', 'platform', 'command_type', 'description')
|
18
|
-
|
19
|
-
class CommandLogTable(NetBoxTable):
|
20
|
-
command = tables.Column(
|
21
|
-
linkify=('plugins:netbox_toolkit:command_detail', [tables.A('command.pk')])
|
22
|
-
)
|
23
|
-
device = tables.Column(
|
24
|
-
linkify=True
|
25
|
-
)
|
26
|
-
success = tables.BooleanColumn(
|
27
|
-
verbose_name='Status',
|
28
|
-
yesno=('Success', 'Failed')
|
29
|
-
)
|
30
|
-
|
31
|
-
# Remove actions column entirely
|
32
|
-
actions = False
|
33
|
-
|
34
|
-
class Meta(NetBoxTable.Meta):
|
35
|
-
model = CommandLog
|
36
|
-
fields = ('pk', 'id', 'command', 'device', 'username', 'execution_time', 'success', 'execution_duration')
|
37
|
-
default_columns = ('pk', 'command', 'device', 'username', 'execution_time', 'success')
|
netbox_toolkit/urls.py
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
from django.urls import path
|
2
|
-
from . import views
|
3
|
-
|
4
|
-
app_name = 'netbox_toolkit'
|
5
|
-
|
6
|
-
urlpatterns = [
|
7
|
-
# Command views
|
8
|
-
path('commands/', views.CommandListView.as_view(), name='command_list'),
|
9
|
-
path('commands/add/', views.CommandEditView.as_view(), name='command_add'),
|
10
|
-
path('commands/<int:pk>/', views.CommandView.as_view(), name='command_detail'),
|
11
|
-
path('commands/<int:pk>/edit/', views.CommandEditView.as_view(), name='command_edit'),
|
12
|
-
path('commands/<int:pk>/delete/', views.CommandDeleteView.as_view(), name='command_delete'),
|
13
|
-
path('commands/<int:pk>/changelog/', views.CommandChangeLogView.as_view(), name='command_changelog'),
|
14
|
-
|
15
|
-
# Command Log views
|
16
|
-
path('logs/', views.CommandLogListView.as_view(), name='commandlog_list'),
|
17
|
-
path('logs/<int:pk>/', views.CommandLogView.as_view(), name='commandlog_view'),
|
18
|
-
path('logs/<int:pk>/changelog/', views.CommandLogChangeLogView.as_view(), name='commandlog_changelog'),
|
19
|
-
|
20
|
-
# Device toolkit view
|
21
|
-
path('devices/<int:pk>/toolkit/', views.DeviceToolkitView.as_view(), name='device_toolkit'),
|
22
|
-
]
|
@@ -1,56 +0,0 @@
|
|
1
|
-
netbox_toolkit/__init__.py,sha256=eRGsuq2UwhZmpxPq-G6JJoW66E4UpATmI1bhY1ztoVw,823
|
2
|
-
netbox_toolkit/admin.py,sha256=j0O2hke80XbGCfU3lkxl8__tRmBArNLoQtLyA39hepI,690
|
3
|
-
netbox_toolkit/config.py,sha256=IKDDR1CMzTNCL3DQPXVKZ7WCw6kl53PD9D4jrBs6fpc,5481
|
4
|
-
netbox_toolkit/exceptions.py,sha256=qh7SxXLTqwsduxUMiTA_pXQ67VHSpxRuQgdlfXMl6Bk,785
|
5
|
-
netbox_toolkit/filtersets.py,sha256=ppmnfQ8IUHm60BiJR9_cdn1ygvuFlMfj6YIFLJ-XeMc,2722
|
6
|
-
netbox_toolkit/forms.py,sha256=6aUaXuJtx3ZL2iEbIq2zXuiXCu2bAHDUMI2EJJBPsWg,1037
|
7
|
-
netbox_toolkit/models.py,sha256=G08tjm6N2Ob8yf3503VvzOy249iWDYlDIpyYwht75JM,2791
|
8
|
-
netbox_toolkit/navigation.py,sha256=Ew0rx2vcLqArvEcSb9WLImz0PUBWXNOMCMbPCUMV_Bk,941
|
9
|
-
netbox_toolkit/search.py,sha256=v8HPgp_0Nq-s_IoV7n4Kfi63_u535jVAoT-31ntdZlA,564
|
10
|
-
netbox_toolkit/tables.py,sha256=qiP2Mub4saH_EhaZd43zf7wOfjgBBlMXA5Rj6iorDQ0,1238
|
11
|
-
netbox_toolkit/urls.py,sha256=Kr9xkrK_CXHGjCOTlNRE-8siqFH6nhqi74Um14LHcvA,1079
|
12
|
-
netbox_toolkit/views.py,sha256=K-LNcJoSYbAXDstxqA_hRemhR5wIf9-xk8bvqbSt428,17730
|
13
|
-
netbox_toolkit/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
-
netbox_toolkit/api/mixins.py,sha256=Yxog3LQQqmzIiXjxZ5VxSbwV3er-Pxs2GpPEJUipvfY,2241
|
15
|
-
netbox_toolkit/api/schemas.py,sha256=Xza5-H2ZqBPCEPyMzDkbmSofY9nE73epu0PKvCB1_Ys,7334
|
16
|
-
netbox_toolkit/api/serializers.py,sha256=ZSfBmICUwLEQoMvxPK5348mG7j5v3I5A4Yvu2fLui_Y,5791
|
17
|
-
netbox_toolkit/api/urls.py,sha256=sllNjhMFm6pjTXtVphAJg2FU9Am_v0AQy0xtRwrZbQA,273
|
18
|
-
netbox_toolkit/api/views/__init__.py,sha256=CksHVk9Jj81kImVlr_JnP9VGwFCAhtrnRzqw7H7pjcI,189
|
19
|
-
netbox_toolkit/api/views/command_logs.py,sha256=4PdUQPvle9R9pJcJalYS4MCKYhmG_5EbAUowbjVetgw,6255
|
20
|
-
netbox_toolkit/api/views/commands.py,sha256=dv6sjN3L0FTyAWmM4u7zZBPOug6H_WcIR6egd3XE3A4,10939
|
21
|
-
netbox_toolkit/connectors/__init__.py,sha256=lL1WCo-rlcjNGVwmwSN1PT592xr5LEPT8k5zEVZlltE,419
|
22
|
-
netbox_toolkit/connectors/base.py,sha256=Z88tVG87H8IXdub55t-_uu1ptdhKo0uaz9l9iO-Xi0I,2829
|
23
|
-
netbox_toolkit/connectors/factory.py,sha256=XeyIooBu1CwZpvtE9giFaFc5kKODck3fMQwY0OVWALU,13296
|
24
|
-
netbox_toolkit/connectors/netmiko_connector.py,sha256=4DZFpvatSQgjG6wp0reYYCwpwjGzVDILvh98QkYsM8o,18793
|
25
|
-
netbox_toolkit/connectors/scrapli_connector.py,sha256=ojQgXkUZVQ9vFAdtKEM4aA5HUX7JDO8mLPe4r_YTd7c,22859
|
26
|
-
netbox_toolkit/migrations/0001_initial.py,sha256=O8DWY0jMBfRLgxaCETgjOVxbcE0Ngr7nVXVg_zJCJwA,2533
|
27
|
-
netbox_toolkit/migrations/0002_alter_command_options_alter_command_unique_together_and_more.py,sha256=8DaaDfzzkVQB4ZEGhoWjyjncvUPjCwNDrKaToFtfmsY,2089
|
28
|
-
netbox_toolkit/migrations/0003_permission_system_update.py,sha256=KDhXY9UGiBpXLfL_4yPEQfzm5F_bGXmjy10upuykQ_c,1783
|
29
|
-
netbox_toolkit/migrations/0004_remove_django_permissions.py,sha256=o_-5dWkSL1JtASkLpGPFg3bDi_Vx63USMX9sw6zNv_4,2638
|
30
|
-
netbox_toolkit/migrations/0005_alter_command_options_and_more.py,sha256=O7VQ0Nq4xpyheX8BmsoOL-Y7fyEvXyPTx503WSce0Is,603
|
31
|
-
netbox_toolkit/migrations/0006_commandlog_parsed_data_commandlog_parsing_success_and_more.py,sha256=1NyrQuBdnFEU7oTE_SIOHPLeFzNuOAP51Q5n8y_Sifc,765
|
32
|
-
netbox_toolkit/migrations/0007_alter_commandlog_parsing_template.py,sha256=SqVl4LafwmGm2sTKhsAvvrJkjm4cD5Oa3EwTaqZXaeU,471
|
33
|
-
netbox_toolkit/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
-
netbox_toolkit/services/__init__.py,sha256=nzdv0yOAyoAgm3ReKn-zLCbxkzEZfDpfnVDy9UExtyg,273
|
35
|
-
netbox_toolkit/services/command_service.py,sha256=3dDrTNmdh1I25ZfzjXFa5-rP4K7sWo9HuimP28LrGMg,15159
|
36
|
-
netbox_toolkit/services/device_service.py,sha256=SWqWw7c5cBhbXE_jCJwfgc3KvxchQq_6NeS2hlb3NDA,2945
|
37
|
-
netbox_toolkit/services/rate_limiting_service.py,sha256=63plMX25qJkiEztRt8NnJMDRQlp7QVtI6TNSfk8IPTc,8750
|
38
|
-
netbox_toolkit/static/netbox_toolkit/css/toolkit.css,sha256=VmyM2_rBJhiP43whtMFaYYP4EW4MUGHPPr84mOo_0Qg,4236
|
39
|
-
netbox_toolkit/static/netbox_toolkit/js/toolkit.js,sha256=0oF2p8g1Yu28hKQswj1-2Kctt_09YtT__Xeo39LfQ-I,25721
|
40
|
-
netbox_toolkit/templates/netbox_toolkit/command.html,sha256=lTLe4TJmXtiOx1lSbowegwklLY1te7vfieXM3gVtZYs,3387
|
41
|
-
netbox_toolkit/templates/netbox_toolkit/command_edit.html,sha256=Dx3QVrtLegViZl9_VWeVayZ1DIgtzWDnrmgS5_TfOCg,175
|
42
|
-
netbox_toolkit/templates/netbox_toolkit/command_list.html,sha256=SVgov1SbpBj_hgmnmgpajAT5_ur-lxzK8PinXp5eEIY,368
|
43
|
-
netbox_toolkit/templates/netbox_toolkit/commandlog.html,sha256=8qix7GG937QPRxquUEj-GUGDQOxdjX0ERKveQ6OyuMo,5658
|
44
|
-
netbox_toolkit/templates/netbox_toolkit/commandlog_list.html,sha256=ggZDtjUOx4kyyD0zAybImF4_gGqe7eTx6JOx_CxjnQ0,105
|
45
|
-
netbox_toolkit/templates/netbox_toolkit/device_toolkit.html,sha256=f-hGEXqQhf3FWHQNCUNw1vlA6jJfDWm3AdPgggtuoW0,32314
|
46
|
-
netbox_toolkit/utils/__init__.py,sha256=YPk8W2lP8BYeYpZFzemTS4V4BK9s5DqXrAjyQrMAAeg,43
|
47
|
-
netbox_toolkit/utils/connection.py,sha256=XWUNOaJ9TBIO6XuESTPi3RSwe8bKlyZ0MLV4_b-ZJiY,4349
|
48
|
-
netbox_toolkit/utils/error_parser.py,sha256=tl6QrFW_0bugZKXHl5V_UPY3VDKdp6jDskLtM5oaYAI,16811
|
49
|
-
netbox_toolkit/utils/logging.py,sha256=zxLy4c5FXaSR-ndVvY8OnKEn6hyvEDJRMKSDKc8ukjo,1933
|
50
|
-
netbox_toolkit/utils/network.py,sha256=__Xz3pYhd7FtMYAsnFZGbW2akQ8uRY2tjs4axIoZMhA,6100
|
51
|
-
netbox_toolkit_plugin-0.1.0.dist-info/licenses/LICENSE,sha256=oxRw-SpalZWfCdc8ZALEDboD9OV22cBRrLIpXz2f7a8,11273
|
52
|
-
netbox_toolkit_plugin-0.1.0.dist-info/METADATA,sha256=OIKy1epeypZpwW_GTHKySD2GnA0BqgJidd4yNehJ1MI,3157
|
53
|
-
netbox_toolkit_plugin-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
54
|
-
netbox_toolkit_plugin-0.1.0.dist-info/entry_points.txt,sha256=QG7lS9AhTN2AdEwFbO-DIyXVW4Q1avIC0Ha-CdNT4VA,69
|
55
|
-
netbox_toolkit_plugin-0.1.0.dist-info/top_level.txt,sha256=uPBIiwEx-X6sCRLNFfFtd7LN7zq2zJWIkP-hReJrKfY,15
|
56
|
-
netbox_toolkit_plugin-0.1.0.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
netbox_toolkit
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{netbox_toolkit_plugin-0.1.0.dist-info → netbox_toolkit_plugin-0.1.1.dist-info}/licenses/LICENSE
RENAMED
File without changes
|