-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from Onemind-Services-LLC/dev
Release v0.2.0
- Loading branch information
Showing
38 changed files
with
168 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include README.md | ||
recursive-include netbox_cloud_pilot/templates * | ||
recursive-include netbox_paas/templates * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Generated by Django 4.2.8 on 2024-05-10 05:43 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
def migrate_models(apps, schema_editor): | ||
try: | ||
OldModel1 = apps.get_model('netbox_cloud_pilot', 'NetBoxConfiguration') | ||
OldModel2 = apps.get_model('netbox_cloud_pilot', 'NetBoxDBBackup') | ||
except LookupError: | ||
# Skip if the old models don't exist | ||
return | ||
|
||
NewModel1 = apps.get_model('netbox_paas', 'NetBoxConfiguration') | ||
NewModel2 = apps.get_model('netbox_paas', 'NetBoxDBBackup') | ||
|
||
# Migrate data from old models to new models | ||
for old_instance in OldModel1.objects.all(): | ||
new_instance = NewModel1( | ||
id=old_instance.id, | ||
key=old_instance.key, | ||
env_name_storage=old_instance.env_name_storage, | ||
license=old_instance.license, | ||
description=old_instance.description, | ||
created=old_instance.created, | ||
last_updated=old_instance.last_updated, | ||
custom_field_data=old_instance.custom_field_data, | ||
comments=old_instance.comments, | ||
) | ||
new_instance.save() | ||
|
||
for old_instance in OldModel2.objects.all(): | ||
new_instance = NewModel2( | ||
id=old_instance.id, | ||
created=old_instance.created, | ||
last_updated=old_instance.last_updated, | ||
crontab=old_instance.crontab, | ||
keep_backups=old_instance.keep_backups, | ||
netbox_env_id=old_instance.netbox_env.id, | ||
) | ||
new_instance.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('netbox_paas', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(migrate_models), | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from extras.plugins import PluginMenu | ||
from extras.plugins import PluginMenuItem | ||
|
||
menu = PluginMenu( | ||
label="Netbox PAAS", | ||
icon_class="mdi mdi-cloud", | ||
groups=( | ||
( | ||
"", | ||
( | ||
PluginMenuItem( | ||
link_text="Manage", | ||
link="plugins:netbox_paas:netboxconfiguration_list", | ||
permissions=["netbox_paas.view_netboxconfiguration"], | ||
), | ||
PluginMenuItem( | ||
link_text="DB Backups", | ||
link="plugins:netbox_paas:netboxdbbackup_list", | ||
permissions=["netbox_paas.change_netboxconfiguration"], | ||
), | ||
PluginMenuItem( | ||
link_text="Plugins Store", | ||
link="plugins:netbox_paas:netboxplugin_list", | ||
permissions=["netbox_paas.view_netboxconfiguration"], | ||
), | ||
), | ||
), | ||
), | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.