infrastructure-manager-sync 0.3.0__tar.gz
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.
- infrastructure_manager_sync-0.3.0/MANIFEST.in +6 -0
- infrastructure_manager_sync-0.3.0/PKG-INFO +13 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/__init__.py +13 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/api/__init__.py +0 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/api/serializers.py +87 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/api/urls.py +12 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/api/views.py +26 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/filtersets.py +39 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/forms.py +112 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0001_initial.py +123 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0002_infrastructuremanagersyncvminfo_ims.py +23 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0003_alter_infrastructuremanagersyncvminfo_ims.py +23 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0004_infrastructuremanagersynchostinfo.py +61 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0005_infrastructuremanagersynchostinfo_ims.py +23 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0006_alter_infrastructuremanagersynchostinfo_options_and_more.py +21 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0007_infrastructuremanagersync_version.py +20 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0008_rename_physical_cpu_cores_infrastructuremanagersynchostinfo_cpu_type_and_more.py +22 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0009_infrastructuremanagersynchostinfo_core_per_cpu.py +20 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0010_infrastructuremanagersync_last_successful_sync.py +20 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0011_infrastructuremanagersync_update_prio.py +20 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0012_alter_infrastructuremanagersyncvminfo_financial_info_and_more.py +23 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0013_alter_infrastructuremanagersyncvminfo_financial_info_and_more.py +26 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0014_infrastructuremanagersyncvminfo_backup_status_and_more.py +41 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0015_alter_infrastructuremanagersyncvminfo_last_backup.py +21 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0016_alter_infrastructuremanagersyncvminfo_financial_info_and_more.py +26 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/0017_infrastructuremanagersync_assign_by_default_to_cluster_tenant.py +21 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/migrations/__init__.py +0 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/models.py +251 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/navigation.py +53 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/search.py +30 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/tables.py +112 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/template_content.py +44 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/templates/infrastructure_manager_sync/inc/host_info.html +79 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/templates/infrastructure_manager_sync/inc/vm_info.html +159 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/templates/infrastructure_manager_sync/infrastructuremanagersync.html +72 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/templates/infrastructure_manager_sync/infrastructuremanagersynchostinfo.html +92 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/templates/infrastructure_manager_sync/infrastructuremanagersyncvminfo.html +173 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/urls.py +101 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync/views.py +90 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync.egg-info/PKG-INFO +13 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync.egg-info/SOURCES.txt +43 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync.egg-info/dependency_links.txt +1 -0
- infrastructure_manager_sync-0.3.0/infrastructure_manager_sync.egg-info/top_level.txt +1 -0
- infrastructure_manager_sync-0.3.0/pyproject.toml +24 -0
- infrastructure_manager_sync-0.3.0/setup.cfg +4 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
recursive-include infrastructure_manager_sync/static *
|
|
2
|
+
recursive-include infrastructure_manager_sync/templates *
|
|
3
|
+
recursive-include infrastructure_manager_sync/api *
|
|
4
|
+
|
|
5
|
+
prune infrastructure_manager_sync/api/__pycache__
|
|
6
|
+
prune infrastructure_manager_sync/__pycache__
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: infrastructure_manager_sync
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Netbox ims plugin
|
|
5
|
+
Author-email: Mattijs Vanhaverbeke <author@example.com>
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Natural Language :: English
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Python: >=3.10.0
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from netbox.plugins import PluginConfig
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class InfrastructureManagerSync(PluginConfig):
|
|
5
|
+
name = "infrastructure_manager_sync"
|
|
6
|
+
verbose_name = "Infrastructure Manager Sync"
|
|
7
|
+
description = "Plugin that configures the vcenter import for VM, clusters & hosts"
|
|
8
|
+
version = "0.1"
|
|
9
|
+
base_url = "infrastructure-manager-sync"
|
|
10
|
+
min_version = "3.4.0"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
config = InfrastructureManagerSync
|
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from rest_framework import serializers
|
|
2
|
+
|
|
3
|
+
from netbox.api.serializers import NetBoxModelSerializer
|
|
4
|
+
from ..models import (
|
|
5
|
+
InfrastructureManagerSync,
|
|
6
|
+
InfrastructureManagerSyncVMInfo,
|
|
7
|
+
InfrastructureManagerSyncHostInfo,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# Regular serializers
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class InfrastructureManagerSyncSerializer(NetBoxModelSerializer):
|
|
17
|
+
url = serializers.HyperlinkedIdentityField(
|
|
18
|
+
view_name="plugins-api:infrastructure_manager_sync-api:infrastructuremanagersync-detail"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
class Meta:
|
|
22
|
+
model = InfrastructureManagerSync
|
|
23
|
+
fields = (
|
|
24
|
+
"id",
|
|
25
|
+
"fqdn",
|
|
26
|
+
"name",
|
|
27
|
+
"username",
|
|
28
|
+
"password",
|
|
29
|
+
"cluster_tenant",
|
|
30
|
+
"entry_type",
|
|
31
|
+
"url",
|
|
32
|
+
"primary_site",
|
|
33
|
+
"enabled",
|
|
34
|
+
"build_number",
|
|
35
|
+
"version",
|
|
36
|
+
"last_successful_sync",
|
|
37
|
+
"update_prio",
|
|
38
|
+
"assign_by_default_to_cluster_tenant",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class InfrastructureManagerSyncVMInfoSerializer(NetBoxModelSerializer):
|
|
43
|
+
url = serializers.HyperlinkedIdentityField(
|
|
44
|
+
view_name="plugins-api:infrastructure_manager_sync-api:infrastructuremanagersyncvminfo-detail"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
class Meta:
|
|
48
|
+
model = InfrastructureManagerSyncVMInfo
|
|
49
|
+
fields = (
|
|
50
|
+
"id",
|
|
51
|
+
"vm",
|
|
52
|
+
"backup_plan",
|
|
53
|
+
"backup_type",
|
|
54
|
+
"criticality",
|
|
55
|
+
"environment",
|
|
56
|
+
"financial_info",
|
|
57
|
+
"licensing",
|
|
58
|
+
"owner",
|
|
59
|
+
"service_info",
|
|
60
|
+
"url",
|
|
61
|
+
"ims",
|
|
62
|
+
"backup_status",
|
|
63
|
+
"last_backup",
|
|
64
|
+
"deployed_on",
|
|
65
|
+
"deployed_by",
|
|
66
|
+
"billing_reference",
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class InfrastructureManagerSyncHostInfoSerializer(NetBoxModelSerializer):
|
|
71
|
+
url = serializers.HyperlinkedIdentityField(
|
|
72
|
+
view_name="plugins-api:infrastructure_manager_sync-api:infrastructuremanagersynchostinfo-detail"
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
class Meta:
|
|
76
|
+
model = InfrastructureManagerSyncHostInfo
|
|
77
|
+
fields = (
|
|
78
|
+
"id",
|
|
79
|
+
"host",
|
|
80
|
+
"url",
|
|
81
|
+
"ims",
|
|
82
|
+
"physical_cpu_count",
|
|
83
|
+
"core_per_cpu",
|
|
84
|
+
"cpu_type",
|
|
85
|
+
"build_number",
|
|
86
|
+
"memory",
|
|
87
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from netbox.api.routers import NetBoxRouter
|
|
2
|
+
from . import views
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
app_name = "infrastructure_manager_sync"
|
|
6
|
+
|
|
7
|
+
router = NetBoxRouter()
|
|
8
|
+
router.register("infrastructuremanagersync", views.InfrastructureManagerSyncViewSet)
|
|
9
|
+
router.register("infrastructuremanagersyncvminfo", views.InfrastructureManagerSyncVMInfoViewSet)
|
|
10
|
+
router.register("infrastructuremanagersynchostinfo", views.InfrastructureManagerSyncHostInfoViewSet)
|
|
11
|
+
|
|
12
|
+
urlpatterns = router.urls
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from netbox.api.viewsets import NetBoxModelViewSet
|
|
2
|
+
|
|
3
|
+
from .. import filtersets, models
|
|
4
|
+
from .serializers import (
|
|
5
|
+
InfrastructureManagerSyncSerializer,
|
|
6
|
+
InfrastructureManagerSyncVMInfoSerializer,
|
|
7
|
+
InfrastructureManagerSyncHostInfoSerializer,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InfrastructureManagerSyncViewSet(NetBoxModelViewSet):
|
|
12
|
+
# permission_required = 'netbox_vcenter_tag_sync.view_vcenters' #TODO
|
|
13
|
+
queryset = models.InfrastructureManagerSync.objects.all()
|
|
14
|
+
serializer_class = InfrastructureManagerSyncSerializer
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class InfrastructureManagerSyncVMInfoViewSet(NetBoxModelViewSet):
|
|
18
|
+
# permission_required = 'netbox_vcenter_tag_sync.view_vcenters' #TODO
|
|
19
|
+
queryset = models.InfrastructureManagerSyncVMInfo.objects.all()
|
|
20
|
+
serializer_class = InfrastructureManagerSyncVMInfoSerializer
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class InfrastructureManagerSyncHostInfoViewSet(NetBoxModelViewSet):
|
|
24
|
+
# permission_required = 'netbox_vcenter_tag_sync.view_vcenters' #TODO
|
|
25
|
+
queryset = models.InfrastructureManagerSyncHostInfo.objects.all()
|
|
26
|
+
serializer_class = InfrastructureManagerSyncHostInfoSerializer
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import django_filters
|
|
2
|
+
from netbox.filtersets import NetBoxModelFilterSet
|
|
3
|
+
from .models import (
|
|
4
|
+
InfrastructureManagerSync,
|
|
5
|
+
InfrastructureManagerSyncVMInfo,
|
|
6
|
+
InfrastructureManagerSyncHostInfo,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InfrastructureManagerSyncFilterSet(NetBoxModelFilterSet):
|
|
11
|
+
class Meta:
|
|
12
|
+
model = InfrastructureManagerSync
|
|
13
|
+
fields = ("name", "fqdn", "username", "primary_site", "build_number", "version", "enabled", "update_prio")
|
|
14
|
+
|
|
15
|
+
assign_by_default_to_cluster_tenant = django_filters.BooleanFilter(
|
|
16
|
+
label="Assigned tenant by default",
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class InfrastructureManagerSyncVMInfoFilterSet(NetBoxModelFilterSet):
|
|
21
|
+
class Meta:
|
|
22
|
+
model = InfrastructureManagerSyncVMInfo
|
|
23
|
+
fields = (
|
|
24
|
+
"environment",
|
|
25
|
+
"criticality",
|
|
26
|
+
"financial_info",
|
|
27
|
+
"licensing",
|
|
28
|
+
"owner",
|
|
29
|
+
"backup_status",
|
|
30
|
+
"deployed_by",
|
|
31
|
+
"billing_reference",
|
|
32
|
+
"ims"
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class InfrastructureManagerSyncHostInfoFilterSet(NetBoxModelFilterSet):
|
|
37
|
+
class Meta:
|
|
38
|
+
model = InfrastructureManagerSyncHostInfo
|
|
39
|
+
fields = ("memory", "build_number")
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
from django import forms
|
|
2
|
+
|
|
3
|
+
from netbox.forms import NetBoxModelForm, NetBoxModelFilterSetForm
|
|
4
|
+
from utilities.forms.fields import CommentField, TagFilterField
|
|
5
|
+
from .models import (
|
|
6
|
+
CriticalityChoise,
|
|
7
|
+
EnvironmentChoise,
|
|
8
|
+
FinancialInfoChoise,
|
|
9
|
+
InfrastructureManagerSync,
|
|
10
|
+
InfrastructureManagerSyncVMInfo,
|
|
11
|
+
LicensingChoise,
|
|
12
|
+
SyncType,
|
|
13
|
+
UpdatePrioChoise,
|
|
14
|
+
InfrastructureManagerSyncHostInfo,
|
|
15
|
+
)
|
|
16
|
+
from utilities.forms.widgets import DatePicker, DateTimePicker
|
|
17
|
+
from utilities.forms import BOOLEAN_WITH_BLANK_CHOICES, add_blank_choice
|
|
18
|
+
from django.utils.translation import gettext as _
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InfrastructureManagerSyncForm(NetBoxModelForm):
|
|
22
|
+
comments = CommentField()
|
|
23
|
+
|
|
24
|
+
assign_by_default_to_cluster_tenant = forms.BooleanField(
|
|
25
|
+
label=("Assign untagged vms to cluster tenant"),
|
|
26
|
+
required=False,
|
|
27
|
+
initial=False,
|
|
28
|
+
help_text=_("Assign VMs without tenant tag automatically to the Cluster tenant"),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
class Meta:
|
|
32
|
+
model = InfrastructureManagerSync
|
|
33
|
+
fields = (
|
|
34
|
+
"name",
|
|
35
|
+
"fqdn",
|
|
36
|
+
"username",
|
|
37
|
+
"password",
|
|
38
|
+
"cluster_tenant",
|
|
39
|
+
"entry_type",
|
|
40
|
+
"primary_site",
|
|
41
|
+
"enabled",
|
|
42
|
+
"update_prio",
|
|
43
|
+
"assign_by_default_to_cluster_tenant",
|
|
44
|
+
"comments",
|
|
45
|
+
"tags",
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class InfrastructureManagerSyncFilterForm(NetBoxModelFilterSetForm):
|
|
50
|
+
model = InfrastructureManagerSync
|
|
51
|
+
|
|
52
|
+
entry_type = forms.MultipleChoiceField(choices=SyncType, required=False)
|
|
53
|
+
update_prio = forms.MultipleChoiceField(choices=UpdatePrioChoise, required=False)
|
|
54
|
+
|
|
55
|
+
assign_by_default_to_cluster_tenant = forms.NullBooleanField(
|
|
56
|
+
required=False, label=_("Assign default tenant"), widget=forms.Select(choices=BOOLEAN_WITH_BLANK_CHOICES)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
tag = TagFilterField(model)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class InfrastructureManagerSyncVMInfoSyncForm(NetBoxModelForm):
|
|
63
|
+
class Meta:
|
|
64
|
+
model = InfrastructureManagerSyncVMInfo
|
|
65
|
+
fields = (
|
|
66
|
+
"vm",
|
|
67
|
+
"backup_plan",
|
|
68
|
+
"backup_type",
|
|
69
|
+
"criticality",
|
|
70
|
+
"environment",
|
|
71
|
+
"financial_info",
|
|
72
|
+
"licensing",
|
|
73
|
+
"owner",
|
|
74
|
+
"service_info",
|
|
75
|
+
"backup_status",
|
|
76
|
+
"last_backup",
|
|
77
|
+
"deployed_on",
|
|
78
|
+
"deployed_by",
|
|
79
|
+
"billing_reference",
|
|
80
|
+
"ims"
|
|
81
|
+
)
|
|
82
|
+
widgets = {
|
|
83
|
+
"deployed_on": DatePicker(),
|
|
84
|
+
"last_backup": DateTimePicker(),
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class InfrastructureManagerSyncVMInfoFilterForm(NetBoxModelFilterSetForm):
|
|
89
|
+
model = InfrastructureManagerSyncVMInfo
|
|
90
|
+
|
|
91
|
+
environment = forms.MultipleChoiceField(choices=EnvironmentChoise, required=False)
|
|
92
|
+
criticality = forms.MultipleChoiceField(choices=CriticalityChoise, required=False)
|
|
93
|
+
financial_info = forms.MultipleChoiceField(choices=FinancialInfoChoise, required=False)
|
|
94
|
+
licensing = forms.MultipleChoiceField(choices=LicensingChoise, required=False)
|
|
95
|
+
|
|
96
|
+
ims = forms.ModelChoiceField(
|
|
97
|
+
queryset=InfrastructureManagerSync.objects.all(),
|
|
98
|
+
required=False,
|
|
99
|
+
label=_('ims'),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
owner = forms.CharField(max_length=100, required=False)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class InfrastructureManagerSyncHostInfoSyncForm(NetBoxModelForm):
|
|
106
|
+
class Meta:
|
|
107
|
+
model = InfrastructureManagerSyncHostInfo
|
|
108
|
+
fields = ("host", "build_number")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class InfrastructureManagerSyncHostInfoFilterForm(NetBoxModelFilterSetForm):
|
|
112
|
+
model = InfrastructureManagerSyncHostInfo
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-05-12 13:20
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
import taggit.managers
|
|
6
|
+
import utilities.json
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Migration(migrations.Migration):
|
|
10
|
+
initial = True
|
|
11
|
+
|
|
12
|
+
dependencies = [
|
|
13
|
+
("virtualization", "0034_standardize_description_comments"),
|
|
14
|
+
("extras", "0092_delete_jobresult"),
|
|
15
|
+
("tenancy", "0010_tenant_relax_uniqueness"),
|
|
16
|
+
("dcim", "0171_cabletermination_change_logging"),
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
operations = [
|
|
20
|
+
migrations.CreateModel(
|
|
21
|
+
name="InfrastructureManagerSyncVMInfo",
|
|
22
|
+
fields=[
|
|
23
|
+
(
|
|
24
|
+
"id",
|
|
25
|
+
models.BigAutoField(
|
|
26
|
+
auto_created=True, primary_key=True, serialize=False
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
("created", models.DateTimeField(auto_now_add=True, null=True)),
|
|
30
|
+
("last_updated", models.DateTimeField(auto_now=True, null=True)),
|
|
31
|
+
(
|
|
32
|
+
"custom_field_data",
|
|
33
|
+
models.JSONField(
|
|
34
|
+
blank=True,
|
|
35
|
+
default=dict,
|
|
36
|
+
encoder=utilities.json.CustomFieldJSONEncoder,
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
("backup_plan", models.CharField(blank=True, max_length=100)),
|
|
40
|
+
("backup_type", models.CharField(blank=True, max_length=100)),
|
|
41
|
+
("criticality", models.CharField(blank=True, max_length=30)),
|
|
42
|
+
("environment", models.CharField(blank=True, max_length=30)),
|
|
43
|
+
("financial_info", models.CharField(blank=True, max_length=30)),
|
|
44
|
+
("licensing", models.CharField(blank=True, max_length=30)),
|
|
45
|
+
("owner", models.CharField(blank=True, max_length=100)),
|
|
46
|
+
("service_info", models.CharField(blank=True, max_length=30)),
|
|
47
|
+
(
|
|
48
|
+
"tags",
|
|
49
|
+
taggit.managers.TaggableManager(
|
|
50
|
+
through="extras.TaggedItem", to="extras.Tag"
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
(
|
|
54
|
+
"vm",
|
|
55
|
+
models.OneToOneField(
|
|
56
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
57
|
+
related_name="InfrastructureManagerSyncVMInfo",
|
|
58
|
+
to="virtualization.virtualmachine",
|
|
59
|
+
),
|
|
60
|
+
),
|
|
61
|
+
],
|
|
62
|
+
options={
|
|
63
|
+
"ordering": ("pk",),
|
|
64
|
+
},
|
|
65
|
+
),
|
|
66
|
+
migrations.CreateModel(
|
|
67
|
+
name="InfrastructureManagerSync",
|
|
68
|
+
fields=[
|
|
69
|
+
(
|
|
70
|
+
"id",
|
|
71
|
+
models.BigAutoField(
|
|
72
|
+
auto_created=True, primary_key=True, serialize=False
|
|
73
|
+
),
|
|
74
|
+
),
|
|
75
|
+
("created", models.DateTimeField(auto_now_add=True, null=True)),
|
|
76
|
+
("last_updated", models.DateTimeField(auto_now=True, null=True)),
|
|
77
|
+
(
|
|
78
|
+
"custom_field_data",
|
|
79
|
+
models.JSONField(
|
|
80
|
+
blank=True,
|
|
81
|
+
default=dict,
|
|
82
|
+
encoder=utilities.json.CustomFieldJSONEncoder,
|
|
83
|
+
),
|
|
84
|
+
),
|
|
85
|
+
("name", models.CharField(max_length=100)),
|
|
86
|
+
("fqdn", models.CharField(max_length=100)),
|
|
87
|
+
("username", models.CharField(max_length=100)),
|
|
88
|
+
("password", models.CharField(default="ChangeMe", max_length=100)),
|
|
89
|
+
("entry_type", models.CharField(blank=True, max_length=30)),
|
|
90
|
+
("enabled", models.BooleanField(default=True)),
|
|
91
|
+
("comments", models.TextField(blank=True)),
|
|
92
|
+
(
|
|
93
|
+
"cluster_tenant",
|
|
94
|
+
models.ForeignKey(
|
|
95
|
+
blank=True,
|
|
96
|
+
null=True,
|
|
97
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
98
|
+
related_name="infrastructuremanagersync",
|
|
99
|
+
to="tenancy.tenant",
|
|
100
|
+
),
|
|
101
|
+
),
|
|
102
|
+
(
|
|
103
|
+
"primary_site",
|
|
104
|
+
models.ForeignKey(
|
|
105
|
+
blank=True,
|
|
106
|
+
null=True,
|
|
107
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
108
|
+
related_name="infrastructuremanagersync_sync",
|
|
109
|
+
to="dcim.site",
|
|
110
|
+
),
|
|
111
|
+
),
|
|
112
|
+
(
|
|
113
|
+
"tags",
|
|
114
|
+
taggit.managers.TaggableManager(
|
|
115
|
+
through="extras.TaggedItem", to="extras.Tag"
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
],
|
|
119
|
+
options={
|
|
120
|
+
"ordering": ("name",),
|
|
121
|
+
},
|
|
122
|
+
),
|
|
123
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-19 08:39
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("infrastructure_manager_sync", "0001_initial"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name="infrastructuremanagersyncvminfo",
|
|
15
|
+
name="ims",
|
|
16
|
+
field=models.OneToOneField(
|
|
17
|
+
null=True,
|
|
18
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
19
|
+
related_name="InfrastructureManagerSync",
|
|
20
|
+
to="infrastructure_manager_sync.infrastructuremanagersync",
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-19 09:27
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("infrastructure_manager_sync", "0002_infrastructuremanagersyncvminfo_ims"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="infrastructuremanagersyncvminfo",
|
|
15
|
+
name="ims",
|
|
16
|
+
field=models.ForeignKey(
|
|
17
|
+
null=True,
|
|
18
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
19
|
+
related_name="InfrastructureManagerSync",
|
|
20
|
+
to="infrastructure_manager_sync.infrastructuremanagersync",
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 07:29
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
import taggit.managers
|
|
6
|
+
import utilities.json
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Migration(migrations.Migration):
|
|
10
|
+
dependencies = [
|
|
11
|
+
("dcim", "0172_larger_power_draw_values"),
|
|
12
|
+
("extras", "0092_delete_jobresult"),
|
|
13
|
+
(
|
|
14
|
+
"infrastructure_manager_sync",
|
|
15
|
+
"0003_alter_infrastructuremanagersyncvminfo_ims",
|
|
16
|
+
),
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
operations = [
|
|
20
|
+
migrations.CreateModel(
|
|
21
|
+
name="InfrastructureManagerSyncHostInfo",
|
|
22
|
+
fields=[
|
|
23
|
+
(
|
|
24
|
+
"id",
|
|
25
|
+
models.BigAutoField(
|
|
26
|
+
auto_created=True, primary_key=True, serialize=False
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
("created", models.DateTimeField(auto_now_add=True, null=True)),
|
|
30
|
+
("last_updated", models.DateTimeField(auto_now=True, null=True)),
|
|
31
|
+
(
|
|
32
|
+
"custom_field_data",
|
|
33
|
+
models.JSONField(
|
|
34
|
+
blank=True,
|
|
35
|
+
default=dict,
|
|
36
|
+
encoder=utilities.json.CustomFieldJSONEncoder,
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
("physical_cpu_cores", models.CharField(blank=True, max_length=100)),
|
|
40
|
+
("build_number", models.CharField(blank=True, max_length=100)),
|
|
41
|
+
("memory", models.PositiveIntegerField(blank=True, null=True)),
|
|
42
|
+
(
|
|
43
|
+
"host",
|
|
44
|
+
models.OneToOneField(
|
|
45
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
46
|
+
related_name="InfrastructureManagerSyncHostInfo",
|
|
47
|
+
to="dcim.device",
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
(
|
|
51
|
+
"tags",
|
|
52
|
+
taggit.managers.TaggableManager(
|
|
53
|
+
through="extras.TaggedItem", to="extras.Tag"
|
|
54
|
+
),
|
|
55
|
+
),
|
|
56
|
+
],
|
|
57
|
+
options={
|
|
58
|
+
"abstract": False,
|
|
59
|
+
},
|
|
60
|
+
),
|
|
61
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 07:34
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("infrastructure_manager_sync", "0004_infrastructuremanagersynchostinfo"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name="infrastructuremanagersynchostinfo",
|
|
15
|
+
name="ims",
|
|
16
|
+
field=models.ForeignKey(
|
|
17
|
+
null=True,
|
|
18
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
19
|
+
related_name="InfrastructureManagerSyncHost",
|
|
20
|
+
to="infrastructure_manager_sync.infrastructuremanagersync",
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 08:37
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
dependencies = [
|
|
8
|
+
("infrastructure_manager_sync", "0005_infrastructuremanagersynchostinfo_ims"),
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
operations = [
|
|
12
|
+
migrations.AlterModelOptions(
|
|
13
|
+
name="infrastructuremanagersynchostinfo",
|
|
14
|
+
options={"ordering": ("pk",)},
|
|
15
|
+
),
|
|
16
|
+
migrations.AddField(
|
|
17
|
+
model_name="infrastructuremanagersync",
|
|
18
|
+
name="build_number",
|
|
19
|
+
field=models.CharField(blank=True, max_length=100),
|
|
20
|
+
),
|
|
21
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 08:45
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
dependencies = [
|
|
8
|
+
(
|
|
9
|
+
"infrastructure_manager_sync",
|
|
10
|
+
"0006_alter_infrastructuremanagersynchostinfo_options_and_more",
|
|
11
|
+
),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
operations = [
|
|
15
|
+
migrations.AddField(
|
|
16
|
+
model_name="infrastructuremanagersync",
|
|
17
|
+
name="version",
|
|
18
|
+
field=models.CharField(blank=True, max_length=100),
|
|
19
|
+
),
|
|
20
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 09:45
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
dependencies = [
|
|
8
|
+
("infrastructure_manager_sync", "0007_infrastructuremanagersync_version"),
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
operations = [
|
|
12
|
+
migrations.RenameField(
|
|
13
|
+
model_name="infrastructuremanagersynchostinfo",
|
|
14
|
+
old_name="physical_cpu_cores",
|
|
15
|
+
new_name="cpu_type",
|
|
16
|
+
),
|
|
17
|
+
migrations.AddField(
|
|
18
|
+
model_name="infrastructuremanagersynchostinfo",
|
|
19
|
+
name="physical_cpu_count",
|
|
20
|
+
field=models.PositiveIntegerField(blank=True, null=True),
|
|
21
|
+
),
|
|
22
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Generated by Django 4.1.8 on 2023-06-23 10:02
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
dependencies = [
|
|
8
|
+
(
|
|
9
|
+
"infrastructure_manager_sync",
|
|
10
|
+
"0008_rename_physical_cpu_cores_infrastructuremanagersynchostinfo_cpu_type_and_more",
|
|
11
|
+
),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
operations = [
|
|
15
|
+
migrations.AddField(
|
|
16
|
+
model_name="infrastructuremanagersynchostinfo",
|
|
17
|
+
name="core_per_cpu",
|
|
18
|
+
field=models.PositiveIntegerField(blank=True, null=True),
|
|
19
|
+
),
|
|
20
|
+
]
|