ipfabric_netbox 4.2.0b4__py3-none-any.whl → 4.2.0b5__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.
Potentially problematic release.
This version of ipfabric_netbox might be problematic. Click here for more details.
- ipfabric_netbox/__init__.py +1 -1
- ipfabric_netbox/api/__init__.py +0 -1
- ipfabric_netbox/api/serializers.py +148 -90
- ipfabric_netbox/api/urls.py +4 -4
- ipfabric_netbox/api/views.py +20 -19
- ipfabric_netbox/filtersets.py +66 -0
- ipfabric_netbox/graphql/__init__.py +23 -0
- ipfabric_netbox/graphql/enums.py +38 -0
- ipfabric_netbox/graphql/filters.py +266 -0
- ipfabric_netbox/graphql/schema.py +101 -0
- ipfabric_netbox/graphql/types.py +195 -0
- ipfabric_netbox/migrations/0016_tags_and_changelog_for_snapshots.py +31 -0
- ipfabric_netbox/models.py +5 -4
- ipfabric_netbox/tests/api/__init__.py +0 -0
- ipfabric_netbox/tests/api/test_api.py +891 -0
- {ipfabric_netbox-4.2.0b4.dist-info → ipfabric_netbox-4.2.0b5.dist-info}/METADATA +1 -1
- {ipfabric_netbox-4.2.0b4.dist-info → ipfabric_netbox-4.2.0b5.dist-info}/RECORD +18 -11
- ipfabric_netbox/api/nested_serializers.py +0 -78
- {ipfabric_netbox-4.2.0b4.dist-info → ipfabric_netbox-4.2.0b5.dist-info}/WHEEL +0 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
ipfabric_netbox/__init__.py,sha256=
|
|
2
|
-
ipfabric_netbox/api/__init__.py,sha256=
|
|
3
|
-
ipfabric_netbox/api/
|
|
4
|
-
ipfabric_netbox/api/
|
|
5
|
-
ipfabric_netbox/api/
|
|
6
|
-
ipfabric_netbox/api/views.py,sha256=j-5-t22519p-4iJxx6PwUNaJumdweIHCdUkYKijiTyI,5041
|
|
1
|
+
ipfabric_netbox/__init__.py,sha256=OFgZPAmWWR0o_36-A9EqYoMQpPdN9rgXRP8PVW7VAPA,674
|
|
2
|
+
ipfabric_netbox/api/__init__.py,sha256=XRclTGWVR0ZhAAwgYul5Wm_loug5_hUjEumbLQEwKYM,47
|
|
3
|
+
ipfabric_netbox/api/serializers.py,sha256=RV1tmkbRF_Est3x1w_bfk63qwgEQc97Bm4mk89tv2FU,6502
|
|
4
|
+
ipfabric_netbox/api/urls.py,sha256=1fXXVTxNY5E64Nfz6b7zXD9bZI3FcefuxAWKMe0w_QU,1240
|
|
5
|
+
ipfabric_netbox/api/views.py,sha256=mTwX9iUWzqLUIt2D80402VkPX39PyjFqs5HD3f79RCg,5137
|
|
7
6
|
ipfabric_netbox/choices.py,sha256=tQ5RHwmuArQ7dCLcE3A_Bnw2ctGHgw67z--AawyyPPg,5261
|
|
8
7
|
ipfabric_netbox/data/transform_map.json,sha256=4PsucgMHcLW3SPoKEptQCd0gA5tCF4hjrR4bGQFCWy8,21744
|
|
9
8
|
ipfabric_netbox/exceptions.py,sha256=DT4dpbakvqoROtBR_F0LzvQCMNWpGhufFcUbZTx0OLY,2655
|
|
10
|
-
ipfabric_netbox/filtersets.py,sha256=
|
|
9
|
+
ipfabric_netbox/filtersets.py,sha256=FrlHkLWf_mNMTaT_Zm2wl1wYkHXMX7hXxMLYAkC6_Gg,7922
|
|
11
10
|
ipfabric_netbox/forms.py,sha256=07p_vngzsnHG0aev83JqBhb8fSBts0w-MTKu4BuoNLw,44494
|
|
11
|
+
ipfabric_netbox/graphql/__init__.py,sha256=-a5w_VY7pc-RVt8MvThkTzeAqCC3xCan4Ue6iMefmjI,754
|
|
12
|
+
ipfabric_netbox/graphql/enums.py,sha256=4jtB2gKsmPXu9is5jd38hUbfrt1V5Wm1Ff-2JCDI3EU,1518
|
|
13
|
+
ipfabric_netbox/graphql/filters.py,sha256=NGIxHIQhmya-aEsgzQgkRjwMxV1jaGOPxLzRzlrJPPg,12587
|
|
14
|
+
ipfabric_netbox/graphql/schema.py,sha256=5UVHA1hHRvho5eLuuS-HLXTVTbxpUUx68ovG03gumGE,3209
|
|
15
|
+
ipfabric_netbox/graphql/types.py,sha256=La_UjdZg3SLGwpusQRFas-7oIQyxHgq1cluSVp7mn2g,5731
|
|
12
16
|
ipfabric_netbox/jobs.py,sha256=KrTUeCuFUIU7vKCUS3RiBYCBG7g7GzhGagM_qFMGQJ4,3089
|
|
13
17
|
ipfabric_netbox/migrations/0001_initial.py,sha256=VphxkWL6QzWq2tcrdXlog718xQtiEGizKwS830z_fOs,13824
|
|
14
18
|
ipfabric_netbox/migrations/0001_initial_squashed_0013_switch_to_branching_plugin.py,sha256=xDj5QJfTmG7ZgUSTRiJRndjSOv25dORtzzs-LySbr-c,20874
|
|
@@ -26,8 +30,9 @@ ipfabric_netbox/migrations/0012_remove_status_field.py,sha256=UZTY2BOBuV4Y_7zuPR
|
|
|
26
30
|
ipfabric_netbox/migrations/0013_switch_to_branching_plugin.py,sha256=JfdTNerjuFyjW3pDm4vueOp2lrDh2xt6lL1Et5i4crg,10754
|
|
27
31
|
ipfabric_netbox/migrations/0014_ipfabrictransformmapgroup_ipfabrictransformmap_group.py,sha256=RCfgKyqQhTkfSPhf0IukI3fjeAEBUs5pKWIpsLxgzp0,2272
|
|
28
32
|
ipfabric_netbox/migrations/0015_ipfabricingestionissue.py,sha256=AjAkyboa4BSXsN53BqzO1k_U6QHu4rlA2IhzhubocJw,1732
|
|
33
|
+
ipfabric_netbox/migrations/0016_tags_and_changelog_for_snapshots.py,sha256=XqftTQ4GFnoCoGSHPa2WL_bjSVCGxdP2MFXCUa6LN1k,929
|
|
29
34
|
ipfabric_netbox/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
ipfabric_netbox/models.py,sha256=
|
|
35
|
+
ipfabric_netbox/models.py,sha256=qvpeoufUHznDe8M4Zf-VDtqQlFPOFYtl3EFAKjRrclI,36107
|
|
31
36
|
ipfabric_netbox/navigation.py,sha256=2dEJ_wKHb52Tl0FOV1TH3JbxRe8YZ56ewrTsBFGKpCg,2210
|
|
32
37
|
ipfabric_netbox/signals.py,sha256=cGa5PVD2i24pGXiVNfbu6ruIDqPVdwKQHTSWe9Ura84,1838
|
|
33
38
|
ipfabric_netbox/tables.py,sha256=pHKv6Bosjnc-7aApak3nLhzxqBiA30olPdaMO8F1PQg,8262
|
|
@@ -63,6 +68,8 @@ ipfabric_netbox/templates/static/ipfabric_netbox/css/rack.css,sha256=z1H-RmmsqF2
|
|
|
63
68
|
ipfabric_netbox/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
69
|
ipfabric_netbox/templatetags/ipfabric_netbox_helpers.py,sha256=STw4pAd2qG7hgf-O6UNTwsO5VqEa_gxf5wLv50BWL4Q,417
|
|
65
70
|
ipfabric_netbox/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
|
+
ipfabric_netbox/tests/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
+
ipfabric_netbox/tests/api/test_api.py,sha256=DVMnhtleWJdpmVHafqCh9fgN6PZhWMEBXBL_rfm3ly8,30615
|
|
66
73
|
ipfabric_netbox/tests/test_models.py,sha256=4SGMX0LZ_fThkc-F1AMZIQbpmJvQNVFnS6QYZpIZkNA,14998
|
|
67
74
|
ipfabric_netbox/urls.py,sha256=ok66LP09rYi01qJmwdGGlBzV9wrGWVwVAIngPcreJxg,5449
|
|
68
75
|
ipfabric_netbox/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -71,6 +78,6 @@ ipfabric_netbox/utilities/logging.py,sha256=GYknjocMN6LQ2873_az3y0RKm29TCXaWviUI
|
|
|
71
78
|
ipfabric_netbox/utilities/nbutils.py,sha256=kFBEiJOGvr_49hJWCS2duXojx2-A9kVk0Xp_vj0ohfs,2641
|
|
72
79
|
ipfabric_netbox/utilities/transform_map.py,sha256=QotbGc2TksINJrb62STgAigpC5Nsgi5umYHu_0rZd8k,2204
|
|
73
80
|
ipfabric_netbox/views.py,sha256=nGWO-PlTyKviBzGEdmE3C_1I-xFjZMldqOWGx12wdbg,36855
|
|
74
|
-
ipfabric_netbox-4.2.
|
|
75
|
-
ipfabric_netbox-4.2.
|
|
76
|
-
ipfabric_netbox-4.2.
|
|
81
|
+
ipfabric_netbox-4.2.0b5.dist-info/METADATA,sha256=A8aUgRhs6Z7yZtjdw8l83gbxistnKYeqTrIXkiejA-E,4638
|
|
82
|
+
ipfabric_netbox-4.2.0b5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
83
|
+
ipfabric_netbox-4.2.0b5.dist-info/RECORD,,
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
from drf_spectacular.types import OpenApiTypes
|
|
2
|
-
from drf_spectacular.utils import extend_schema_field
|
|
3
|
-
from netbox.api.fields import ContentTypeField
|
|
4
|
-
from netbox.api.serializers import NetBoxModelSerializer
|
|
5
|
-
from netbox.api.serializers import WritableNestedSerializer
|
|
6
|
-
from rest_framework import serializers
|
|
7
|
-
|
|
8
|
-
from ipfabric_netbox.models import IPFabricSnapshot
|
|
9
|
-
from ipfabric_netbox.models import IPFabricSource
|
|
10
|
-
from ipfabric_netbox.models import IPFabricSync
|
|
11
|
-
from ipfabric_netbox.models import IPFabricTransformMap
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
__all__ = (
|
|
15
|
-
"NestedIPFabricSourceSerializer",
|
|
16
|
-
"NestedIPFabricSnapshotSerializer",
|
|
17
|
-
"NestedIPFabricTransformMapSerializer",
|
|
18
|
-
"NestedIPFabricSyncSerializer",
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class NestedIPFabricSourceSerializer(WritableNestedSerializer):
|
|
23
|
-
url = serializers.URLField()
|
|
24
|
-
|
|
25
|
-
class Meta:
|
|
26
|
-
model = IPFabricSource
|
|
27
|
-
fields = ["id", "url", "display", "name", "type"]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class NestedIPFabricSnapshotSerializer(NetBoxModelSerializer):
|
|
31
|
-
source = NestedIPFabricSourceSerializer(read_only=True)
|
|
32
|
-
display = serializers.SerializerMethodField(read_only=True)
|
|
33
|
-
|
|
34
|
-
class Meta:
|
|
35
|
-
model = IPFabricSnapshot
|
|
36
|
-
fields = [
|
|
37
|
-
"id",
|
|
38
|
-
"name",
|
|
39
|
-
"source",
|
|
40
|
-
"snapshot_id",
|
|
41
|
-
"status",
|
|
42
|
-
"date",
|
|
43
|
-
"display",
|
|
44
|
-
"sites",
|
|
45
|
-
]
|
|
46
|
-
|
|
47
|
-
@extend_schema_field(OpenApiTypes.STR)
|
|
48
|
-
def get_display(self, obj):
|
|
49
|
-
return f"{obj.name} ({obj.snapshot_id})"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class NestedIPFabricSyncSerializer(NetBoxModelSerializer):
|
|
53
|
-
snapshot_data = NestedIPFabricSnapshotSerializer(read_only=True)
|
|
54
|
-
|
|
55
|
-
class Meta:
|
|
56
|
-
model = IPFabricSync
|
|
57
|
-
fields = [
|
|
58
|
-
"id",
|
|
59
|
-
"name",
|
|
60
|
-
"display",
|
|
61
|
-
"snapshot_data",
|
|
62
|
-
"type",
|
|
63
|
-
"status",
|
|
64
|
-
"parameters",
|
|
65
|
-
"last_synced",
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class NestedIPFabricTransformMapSerializer(NetBoxModelSerializer):
|
|
70
|
-
target_model = ContentTypeField(read_only=True)
|
|
71
|
-
|
|
72
|
-
class Meta:
|
|
73
|
-
model = IPFabricTransformMap
|
|
74
|
-
fields = [
|
|
75
|
-
"id",
|
|
76
|
-
"source_model",
|
|
77
|
-
"target_model",
|
|
78
|
-
]
|
|
File without changes
|