ipfabric_netbox 4.3.2b8__py3-none-any.whl → 4.3.2b10__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.

Files changed (49) hide show
  1. ipfabric_netbox/__init__.py +2 -2
  2. ipfabric_netbox/api/serializers.py +112 -7
  3. ipfabric_netbox/api/urls.py +6 -0
  4. ipfabric_netbox/api/views.py +23 -0
  5. ipfabric_netbox/choices.py +72 -40
  6. ipfabric_netbox/data/endpoint.json +47 -0
  7. ipfabric_netbox/data/filters.json +51 -0
  8. ipfabric_netbox/data/transform_map.json +188 -174
  9. ipfabric_netbox/exceptions.py +7 -5
  10. ipfabric_netbox/filtersets.py +310 -41
  11. ipfabric_netbox/forms.py +324 -79
  12. ipfabric_netbox/graphql/__init__.py +6 -0
  13. ipfabric_netbox/graphql/enums.py +5 -5
  14. ipfabric_netbox/graphql/filters.py +56 -4
  15. ipfabric_netbox/graphql/schema.py +28 -0
  16. ipfabric_netbox/graphql/types.py +61 -1
  17. ipfabric_netbox/jobs.py +18 -1
  18. ipfabric_netbox/migrations/0022_prepare_for_filters.py +182 -0
  19. ipfabric_netbox/migrations/0023_populate_filters_data.py +279 -0
  20. ipfabric_netbox/migrations/0024_finish_filters.py +29 -0
  21. ipfabric_netbox/models.py +384 -12
  22. ipfabric_netbox/navigation.py +98 -24
  23. ipfabric_netbox/tables.py +194 -9
  24. ipfabric_netbox/templates/ipfabric_netbox/htmx_list.html +5 -0
  25. ipfabric_netbox/templates/ipfabric_netbox/inc/combined_expressions.html +59 -0
  26. ipfabric_netbox/templates/ipfabric_netbox/inc/combined_expressions_content.html +39 -0
  27. ipfabric_netbox/templates/ipfabric_netbox/inc/endpoint_filters_with_selector.html +54 -0
  28. ipfabric_netbox/templates/ipfabric_netbox/ipfabricendpoint.html +39 -0
  29. ipfabric_netbox/templates/ipfabric_netbox/ipfabricfilter.html +51 -0
  30. ipfabric_netbox/templates/ipfabric_netbox/ipfabricfilterexpression.html +39 -0
  31. ipfabric_netbox/templates/ipfabric_netbox/ipfabricfilterexpression_edit.html +150 -0
  32. ipfabric_netbox/templates/ipfabric_netbox/ipfabricsync.html +1 -1
  33. ipfabric_netbox/templates/ipfabric_netbox/ipfabrictransformmap.html +16 -2
  34. ipfabric_netbox/templatetags/ipfabric_netbox_helpers.py +65 -0
  35. ipfabric_netbox/tests/api/test_api.py +333 -13
  36. ipfabric_netbox/tests/test_filtersets.py +2592 -0
  37. ipfabric_netbox/tests/test_forms.py +1256 -74
  38. ipfabric_netbox/tests/test_models.py +242 -34
  39. ipfabric_netbox/tests/test_views.py +2030 -25
  40. ipfabric_netbox/urls.py +35 -0
  41. ipfabric_netbox/utilities/endpoint.py +30 -0
  42. ipfabric_netbox/utilities/filters.py +88 -0
  43. ipfabric_netbox/utilities/ipfutils.py +254 -316
  44. ipfabric_netbox/utilities/logging.py +7 -7
  45. ipfabric_netbox/utilities/transform_map.py +126 -0
  46. ipfabric_netbox/views.py +719 -5
  47. {ipfabric_netbox-4.3.2b8.dist-info → ipfabric_netbox-4.3.2b10.dist-info}/METADATA +3 -2
  48. {ipfabric_netbox-4.3.2b8.dist-info → ipfabric_netbox-4.3.2b10.dist-info}/RECORD +49 -33
  49. {ipfabric_netbox-4.3.2b8.dist-info → ipfabric_netbox-4.3.2b10.dist-info}/WHEEL +1 -1
@@ -6,9 +6,9 @@ class NetboxIPFabricConfig(PluginConfig):
6
6
  name = "ipfabric_netbox"
7
7
  verbose_name = "NetBox IP Fabric SoT Plugin"
8
8
  description = "Sync IP Fabric into NetBox"
9
- version = "4.3.2b8"
9
+ version = "4.3.2b10"
10
10
  base_url = "ipfabric"
11
- min_version = "4.4.0"
11
+ min_version = "4.4.9"
12
12
 
13
13
  def ready(self):
14
14
  super().ready()
@@ -8,6 +8,9 @@ from rest_framework import serializers
8
8
 
9
9
  from ipfabric_netbox.choices import IPFabricSourceStatusChoices
10
10
  from ipfabric_netbox.choices import IPFabricSyncStatusChoices
11
+ from ipfabric_netbox.models import IPFabricEndpoint
12
+ from ipfabric_netbox.models import IPFabricFilter
13
+ from ipfabric_netbox.models import IPFabricFilterExpression
11
14
  from ipfabric_netbox.models import IPFabricIngestion
12
15
  from ipfabric_netbox.models import IPFabricIngestionIssue
13
16
  from ipfabric_netbox.models import IPFabricRelationshipField
@@ -21,18 +24,41 @@ from ipfabric_netbox.models import IPFabricTransformMap
21
24
  from ipfabric_netbox.models import IPFabricTransformMapGroup
22
25
 
23
26
  __all__ = (
24
- "IPFabricSyncSerializer",
25
- "IPFabricSnapshotSerializer",
27
+ "IPFabricEndpointSerializer",
28
+ "IPFabricFilterSerializer",
29
+ "IPFabricFilterExpressionSerializer",
30
+ "IPFabricIngestionSerializer",
31
+ "IPFabricIngestionIssueSerializer",
26
32
  "IPFabricRelationshipFieldSerializer",
33
+ "IPFabricSnapshotSerializer",
34
+ "IPFabricSourceSerializer",
35
+ "IPFabricSyncSerializer",
27
36
  "IPFabricTransformFieldSerializer",
28
37
  "IPFabricTransformMapSerializer",
29
38
  "IPFabricTransformMapGroupSerializer",
30
- "IPFabricIngestionSerializer",
31
- "IPFabricIngestionIssueSerializer",
32
- "IPFabricSourceSerializer",
33
39
  )
34
40
 
35
41
 
42
+ class IPFabricEndpointSerializer(NestedGroupModelSerializer):
43
+ class Meta:
44
+ model = IPFabricEndpoint
45
+ fields = (
46
+ "id",
47
+ "name",
48
+ "display",
49
+ "description",
50
+ "endpoint",
51
+ "created",
52
+ "last_updated",
53
+ )
54
+ brief_fields = (
55
+ "id",
56
+ "name",
57
+ "display",
58
+ "endpoint",
59
+ )
60
+
61
+
36
62
  class IPFabricTransformMapGroupSerializer(NestedGroupModelSerializer):
37
63
  transform_maps_count = RelatedObjectCountField("transform_maps")
38
64
 
@@ -41,6 +67,7 @@ class IPFabricTransformMapGroupSerializer(NestedGroupModelSerializer):
41
67
  fields = (
42
68
  "id",
43
69
  "name",
70
+ "display",
44
71
  "description",
45
72
  "transform_maps_count",
46
73
  "created",
@@ -49,6 +76,7 @@ class IPFabricTransformMapGroupSerializer(NestedGroupModelSerializer):
49
76
  brief_fields = (
50
77
  "id",
51
78
  "name",
79
+ "display",
52
80
  "description",
53
81
  )
54
82
 
@@ -57,17 +85,26 @@ class IPFabricTransformMapSerializer(NestedGroupModelSerializer):
57
85
  group = IPFabricTransformMapGroupSerializer(
58
86
  nested=True, required=False, allow_null=True
59
87
  )
88
+ source_endpoint = IPFabricEndpointSerializer(nested=True, required=True)
60
89
  target_model = ContentTypeField(
61
90
  queryset=ContentType.objects.filter(IPFabricSupportedSyncModels)
62
91
  )
92
+ parents = serializers.PrimaryKeyRelatedField(
93
+ queryset=IPFabricTransformMap.objects.all(),
94
+ many=True,
95
+ required=False,
96
+ allow_null=True,
97
+ )
63
98
 
64
99
  class Meta:
65
100
  model = IPFabricTransformMap
66
101
  fields = (
67
102
  "id",
68
103
  "name",
104
+ "display",
69
105
  "group",
70
- "source_model",
106
+ "parents",
107
+ "source_endpoint",
71
108
  "target_model",
72
109
  "created",
73
110
  "last_updated",
@@ -75,8 +112,9 @@ class IPFabricTransformMapSerializer(NestedGroupModelSerializer):
75
112
  brief_fields = (
76
113
  "id",
77
114
  "name",
115
+ "display",
78
116
  "group",
79
- "source_model",
117
+ "source_endpoint",
80
118
  "target_model",
81
119
  )
82
120
 
@@ -89,6 +127,7 @@ class IPFabricTransformFieldSerializer(NestedGroupModelSerializer):
89
127
  fields = (
90
128
  "id",
91
129
  "transform_map",
130
+ "display",
92
131
  "source_field",
93
132
  "target_field",
94
133
  "coalesce",
@@ -107,6 +146,7 @@ class IPFabricRelationshipFieldSerializer(NestedGroupModelSerializer):
107
146
  fields = (
108
147
  "id",
109
148
  "transform_map",
149
+ "display",
110
150
  "source_model",
111
151
  "target_field",
112
152
  "coalesce",
@@ -185,6 +225,7 @@ class IPFabricSyncSerializer(NestedGroupModelSerializer):
185
225
  fields = (
186
226
  "id",
187
227
  "name",
228
+ "display",
188
229
  "snapshot_data",
189
230
  "status",
190
231
  "parameters",
@@ -193,17 +234,77 @@ class IPFabricSyncSerializer(NestedGroupModelSerializer):
193
234
  "scheduled",
194
235
  "interval",
195
236
  "user",
237
+ "filters",
196
238
  )
197
239
  brief_fields = (
198
240
  "auto_merge",
199
241
  "id",
200
242
  "last_synced",
201
243
  "name",
244
+ "display",
202
245
  "parameters",
203
246
  "status",
204
247
  )
205
248
 
206
249
 
250
+ class IPFabricFilterSerializer(NestedGroupModelSerializer):
251
+ expressions = serializers.SerializerMethodField(read_only=True)
252
+
253
+ def get_expressions(self, obj):
254
+ """Return the related expressions for this filter."""
255
+ return [{"id": expr.id, "name": expr.name} for expr in obj.expressions.all()]
256
+
257
+ class Meta:
258
+ model = IPFabricFilter
259
+ fields = (
260
+ "id",
261
+ "name",
262
+ "display",
263
+ "description",
264
+ "endpoints",
265
+ "filter_type",
266
+ "syncs",
267
+ "expressions",
268
+ "created",
269
+ "last_updated",
270
+ "tags",
271
+ )
272
+ brief_fields = (
273
+ "id",
274
+ "name",
275
+ "display",
276
+ "endpoints",
277
+ "filter_type",
278
+ "syncs",
279
+ "expressions",
280
+ )
281
+
282
+
283
+ class IPFabricFilterExpressionSerializer(NestedGroupModelSerializer):
284
+ expression = serializers.JSONField()
285
+
286
+ class Meta:
287
+ model = IPFabricFilterExpression
288
+ fields = (
289
+ "id",
290
+ "name",
291
+ "display",
292
+ "description",
293
+ "filters",
294
+ "expression",
295
+ "created",
296
+ "last_updated",
297
+ "tags",
298
+ )
299
+ brief_fields = (
300
+ "id",
301
+ "name",
302
+ "display",
303
+ "filters",
304
+ "expression",
305
+ )
306
+
307
+
207
308
  class IPFabricIngestionSerializer(NestedGroupModelSerializer):
208
309
  branch = BranchSerializer(read_only=True)
209
310
  sync = IPFabricSyncSerializer(nested=True)
@@ -213,12 +314,14 @@ class IPFabricIngestionSerializer(NestedGroupModelSerializer):
213
314
  fields = (
214
315
  "id",
215
316
  "name",
317
+ "display",
216
318
  "branch",
217
319
  "sync",
218
320
  )
219
321
  brief_fields = (
220
322
  "id",
221
323
  "name",
324
+ "display",
222
325
  "branch",
223
326
  "sync",
224
327
  )
@@ -232,6 +335,7 @@ class IPFabricIngestionIssueSerializer(NestedGroupModelSerializer):
232
335
  fields = (
233
336
  "id",
234
337
  "ingestion",
338
+ "display",
235
339
  "timestamp",
236
340
  "model",
237
341
  "message",
@@ -244,6 +348,7 @@ class IPFabricIngestionIssueSerializer(NestedGroupModelSerializer):
244
348
  "exception",
245
349
  "id",
246
350
  "ingestion",
351
+ "display",
247
352
  "message",
248
353
  "model",
249
354
  )
@@ -1,6 +1,9 @@
1
1
  # api/urls.py
2
2
  from netbox.api.routers import NetBoxRouter
3
3
 
4
+ from ipfabric_netbox.api.views import IPFabricEndpointViewSet
5
+ from ipfabric_netbox.api.views import IPFabricFilterExpressionViewSet
6
+ from ipfabric_netbox.api.views import IPFabricFilterViewSet
4
7
  from ipfabric_netbox.api.views import IPFabricIngestionIssueViewSet
5
8
  from ipfabric_netbox.api.views import IPFabricIngestionViewSet
6
9
  from ipfabric_netbox.api.views import IPFabricRelationshipFieldViewSet
@@ -15,9 +18,12 @@ from ipfabric_netbox.api.views import IPFabricTransformMapViewSet
15
18
  router = NetBoxRouter()
16
19
  router.register("source", IPFabricSourceViewSet)
17
20
  router.register("snapshot", IPFabricSnapshotViewSet)
21
+ router.register("endpoint", IPFabricEndpointViewSet)
18
22
  router.register("transform-map-group", IPFabricTransformMapGroupViewSet)
19
23
  router.register("transform-map", IPFabricTransformMapViewSet)
20
24
  router.register("sync", IPFabricSyncViewSet)
25
+ router.register("filter", IPFabricFilterViewSet)
26
+ router.register("filter-expression", IPFabricFilterExpressionViewSet)
21
27
  router.register("ingestion", IPFabricIngestionViewSet)
22
28
  router.register("ingestion-issues", IPFabricIngestionIssueViewSet)
23
29
  router.register("transform-field", IPFabricTransformFieldViewSet)
@@ -10,6 +10,9 @@ from rest_framework.response import Response
10
10
  from utilities.query import count_related
11
11
 
12
12
  from .serializers import EmptySerializer
13
+ from .serializers import IPFabricEndpointSerializer
14
+ from .serializers import IPFabricFilterExpressionSerializer
15
+ from .serializers import IPFabricFilterSerializer
13
16
  from .serializers import IPFabricIngestionIssueSerializer
14
17
  from .serializers import IPFabricIngestionSerializer
15
18
  from .serializers import IPFabricRelationshipFieldSerializer
@@ -23,7 +26,11 @@ from ipfabric_netbox.filtersets import IPFabricRelationshipFieldFilterSet
23
26
  from ipfabric_netbox.filtersets import IPFabricSnapshotFilterSet
24
27
  from ipfabric_netbox.filtersets import IPFabricSourceFilterSet
25
28
  from ipfabric_netbox.filtersets import IPFabricTransformFieldFilterSet
29
+ from ipfabric_netbox.filtersets import IPFabricTransformMapFilterSet
26
30
  from ipfabric_netbox.models import IPFabricData
31
+ from ipfabric_netbox.models import IPFabricEndpoint
32
+ from ipfabric_netbox.models import IPFabricFilter
33
+ from ipfabric_netbox.models import IPFabricFilterExpression
27
34
  from ipfabric_netbox.models import IPFabricIngestion
28
35
  from ipfabric_netbox.models import IPFabricIngestionIssue
29
36
  from ipfabric_netbox.models import IPFabricRelationshipField
@@ -35,6 +42,11 @@ from ipfabric_netbox.models import IPFabricTransformMap
35
42
  from ipfabric_netbox.models import IPFabricTransformMapGroup
36
43
 
37
44
 
45
+ class IPFabricEndpointViewSet(NetBoxReadOnlyModelViewSet):
46
+ queryset = IPFabricEndpoint.objects.all()
47
+ serializer_class = IPFabricEndpointSerializer
48
+
49
+
38
50
  class IPFabricTransformMapGroupViewSet(NetBoxModelViewSet):
39
51
  queryset = IPFabricTransformMapGroup.objects.all()
40
52
  serializer_class = IPFabricTransformMapGroupSerializer
@@ -43,6 +55,7 @@ class IPFabricTransformMapGroupViewSet(NetBoxModelViewSet):
43
55
  class IPFabricTransformMapViewSet(NetBoxModelViewSet):
44
56
  queryset = IPFabricTransformMap.objects.all()
45
57
  serializer_class = IPFabricTransformMapSerializer
58
+ filterset_class = IPFabricTransformMapFilterSet
46
59
 
47
60
 
48
61
  class IPFabricTransformFieldViewSet(NetBoxModelViewSet):
@@ -83,6 +96,16 @@ class IPFabricSyncViewSet(NetBoxModelViewSet):
83
96
  )
84
97
 
85
98
 
99
+ class IPFabricFilterViewSet(NetBoxModelViewSet):
100
+ queryset = IPFabricFilter.objects.all()
101
+ serializer_class = IPFabricFilterSerializer
102
+
103
+
104
+ class IPFabricFilterExpressionViewSet(NetBoxModelViewSet):
105
+ queryset = IPFabricFilterExpression.objects.all()
106
+ serializer_class = IPFabricFilterExpressionSerializer
107
+
108
+
86
109
  class IPFabricIngestionViewSet(NetBoxReadOnlyModelViewSet):
87
110
  queryset = IPFabricIngestion.objects.all()
88
111
  serializer_class = IPFabricIngestionSerializer
@@ -2,7 +2,7 @@ from django.utils.translation import gettext_lazy as _
2
2
  from utilities.choices import ChoiceSet
3
3
 
4
4
  transform_field_source_columns = {
5
- "site": [
5
+ "/inventory/sites/overview": [
6
6
  "id",
7
7
  "siteName",
8
8
  "devicesCount",
@@ -14,7 +14,7 @@ transform_field_source_columns = {
14
14
  "routersCount",
15
15
  "networksCount",
16
16
  ],
17
- "device": [
17
+ "/inventory/devices": [
18
18
  "id",
19
19
  "sn",
20
20
  "hostname",
@@ -45,7 +45,7 @@ transform_field_source_columns = {
45
45
  "domain",
46
46
  "fqdn",
47
47
  ],
48
- "inventory": [
48
+ "/inventory/part-numbers": [
49
49
  "id",
50
50
  "deviceSn",
51
51
  "hostname",
@@ -60,7 +60,7 @@ transform_field_source_columns = {
60
60
  "platform",
61
61
  "model",
62
62
  ],
63
- "interface": [
63
+ "/inventory/interfaces": [
64
64
  "id",
65
65
  "dscr",
66
66
  "duplex",
@@ -88,25 +88,34 @@ transform_field_source_columns = {
88
88
  "transceiverSn",
89
89
  "transceiverType",
90
90
  ],
91
- "part_number": [
91
+ "/technology/vlans/site-summary": [
92
92
  "id",
93
- "deviceSn",
94
- "hostname",
95
93
  "siteName",
96
- "deviceId",
97
- "name",
94
+ "vlanId",
95
+ "vlanName",
98
96
  "dscr",
99
- "pid",
97
+ "devCount",
98
+ ],
99
+ "/technology/routing/vrf/detail": [
100
+ "id",
100
101
  "sn",
101
- "vid",
102
- "vendor",
103
- "platform",
104
- "model",
102
+ "hostname",
103
+ "siteName",
104
+ "vrf",
105
+ "rd",
106
+ "intCount",
107
+ ],
108
+ "/technology/networks/managed-networks": [
109
+ "id",
110
+ "siteName",
111
+ "net",
112
+ "hosts",
113
+ "gw",
114
+ "gwV",
115
+ "vrf",
116
+ "vlanId",
105
117
  ],
106
- "vlan": ["id", "siteName", "vlanId", "vlanName", "dscr", "devCount"],
107
- "vrf": ["id", "sn", "hostname", "siteName", "vrf", "rd", "intCount"],
108
- "prefix": ["id", "siteName", "net", "hosts", "gw", "gwV", "vrf", "vlanId"],
109
- "virtualchassis": [
118
+ "/technology/platforms/stack/members": [
110
119
  "id",
111
120
  "sn",
112
121
  "master",
@@ -123,7 +132,7 @@ transform_field_source_columns = {
123
132
  "image",
124
133
  "hwVer",
125
134
  ],
126
- "ipaddress": [
135
+ "/technology/addressing/managed-ip/ipv4": [
127
136
  "hostname",
128
137
  "sn",
129
138
  "intName",
@@ -160,29 +169,37 @@ required_transform_map_contenttypes = [
160
169
  ]
161
170
 
162
171
 
163
- class IPFabricTransformMapSourceModelChoices(ChoiceSet):
164
- SITE = "site"
165
- INVENTORY = "inventory"
166
- DEVICE = "device"
167
- VIRTUALCHASSIS = "virtualchassis"
168
- INTERFACE = "interface"
169
- VLAN = "vlan"
170
- VRF = "vrf"
171
- PREFIX = "prefix"
172
- IPADDRESS = "ipaddress"
173
- PARTNUMBERS = "part_number"
172
+ class IPFabricEndpointChoices(ChoiceSet):
173
+ SITES = "/inventory/sites/overview"
174
+ DEVICES = "/inventory/devices"
175
+ VIRTUALCHASSIS = "/technology/platforms/stack/members"
176
+ INTERFACES = "/inventory/interfaces"
177
+ PARTNUMBERS = "/inventory/part-numbers"
178
+ VLANS = "/technology/vlans/site-summary"
179
+ VRFS = "/technology/routing/vrf/detail"
180
+ PREFIXES = "/technology/networks/managed-networks"
181
+ IPADDRESSES = "/technology/addressing/managed-ip/ipv4"
174
182
 
175
183
  CHOICES = (
176
- (SITE, _("Site"), "cyan"),
177
- (INVENTORY, _("Inventory"), "gray"),
178
- (DEVICE, _("Device"), "gray"),
179
- (VIRTUALCHASSIS, _("Virtual Chassis"), "grey"),
180
- (INTERFACE, _("Interface"), "gray"),
181
- (VLAN, _("VLAN"), "gray"),
182
- (VRF, _("VRF"), "gray"),
183
- (PREFIX, _("Prefix"), "gray"),
184
- (IPADDRESS, _("IP Address"), "gray"),
185
- (PARTNUMBERS, _("Part Number"), "gray"),
184
+ (SITES, SITES, "cyan"),
185
+ (DEVICES, DEVICES, "gray"),
186
+ (VIRTUALCHASSIS, VIRTUALCHASSIS, "grey"),
187
+ (INTERFACES, INTERFACES, "gray"),
188
+ (PARTNUMBERS, PARTNUMBERS, "gray"),
189
+ (VLANS, VLANS, "gray"),
190
+ (VRFS, VRFS, "gray"),
191
+ (PREFIXES, PREFIXES, "gray"),
192
+ (IPADDRESSES, IPADDRESSES, "gray"),
193
+ )
194
+
195
+
196
+ class IPFabricFilterTypeChoices(ChoiceSet):
197
+ AND = "and"
198
+ OR = "or"
199
+
200
+ CHOICES = (
201
+ (AND, _("AND"), "blue"),
202
+ (OR, _("OR"), "orange"),
186
203
  )
187
204
 
188
205
 
@@ -208,6 +225,21 @@ class IPFabricSourceTypeChoices(ChoiceSet):
208
225
  )
209
226
 
210
227
 
228
+ class IPFabricSyncParameterChoices(ChoiceSet):
229
+ SITE = "dcim.site"
230
+ DEVICE = "dcim.device"
231
+ INTERFACE = "dcim.interface"
232
+ VLAN = "ipam.vlan"
233
+ VRF = "ipam.vrf"
234
+ PREFIX = "ipam.prefix"
235
+ IPADDRESS = "ipam.ipaddress"
236
+ INVENTORYITEM = "dcim.inventoryitem"
237
+ VIRTUALCHASSIS = "dcim.virtualchassis"
238
+ PARTNUMBER = "dcim.partnumber"
239
+
240
+ CHOICES = ()
241
+
242
+
211
243
  class IPFabricRawDataTypeChoices(ChoiceSet):
212
244
  DEVICE = "device"
213
245
  VLAN = "vlan"
@@ -0,0 +1,47 @@
1
+ [
2
+ {
3
+ "name": "Default Sites Endpoint",
4
+ "description": "",
5
+ "endpoint": "/inventory/sites/overview"
6
+ },
7
+ {
8
+ "name": "Default Devices Endpoint",
9
+ "description": "",
10
+ "endpoint": "/inventory/devices"
11
+ },
12
+ {
13
+ "name": "Default Stack Members Endpoint",
14
+ "description": "",
15
+ "endpoint": "/technology/platforms/stack/members"
16
+ },
17
+ {
18
+ "name": "Default Interfaces Endpoint",
19
+ "description": "",
20
+ "endpoint": "/inventory/interfaces"
21
+ },
22
+ {
23
+ "name": "Default Part Numbers Endpoint",
24
+ "description": "",
25
+ "endpoint": "/inventory/part-numbers"
26
+ },
27
+ {
28
+ "name": "Default VLANs Endpoint",
29
+ "description": "",
30
+ "endpoint": "/technology/vlans/site-summary"
31
+ },
32
+ {
33
+ "name": "Default VRFs Endpoint",
34
+ "description": "",
35
+ "endpoint": "/technology/routing/vrf/detail"
36
+ },
37
+ {
38
+ "name": "Default Networks Endpoint",
39
+ "description": "",
40
+ "endpoint": "/technology/networks/managed-networks"
41
+ },
42
+ {
43
+ "name": "Default Managed IPv4 Endpoint",
44
+ "description": "",
45
+ "endpoint": "/technology/addressing/managed-ip/ipv4"
46
+ }
47
+ ]
@@ -0,0 +1,51 @@
1
+ {
2
+ "expressions": [
3
+ {
4
+ "name": "Default Devices Filter Expression",
5
+ "expression": [{"vendor":["neq","aws"]},{"vendor":["neq","azure"]}]
6
+ },
7
+ {
8
+ "name": "Default Device Child Filter Expression",
9
+ "expression": [{"device.vendor":["neq","aws"]},{"device.vendor":["neq","azure"]}]
10
+ },
11
+ {
12
+ "name": "Default Part Numbers Filter Expression",
13
+ "expression": [{"sn":["empty", false]},{"name":["empty", false]}]
14
+ },
15
+ {
16
+ "name": "Default VLANs Filter Expression",
17
+ "expression": [{"vlanId":["neq",0]}]
18
+ },
19
+ {
20
+ "name": "Default Networks Filter Expression",
21
+ "expression": [{"net":["empty",false]}]
22
+ }
23
+ ],
24
+ "filters": [
25
+ {
26
+ "name": "Default Devices Filter",
27
+ "endpoints": ["/inventory/devices"],
28
+ "expressions": ["Default Devices Filter Expression"]
29
+ },
30
+ {
31
+ "name": "Default Child Devices Filter",
32
+ "endpoints": ["/technology/platforms/stack/members", "/inventory/interfaces", "/technology/routing/vrf/detail", "/technology/addressing/managed-ip/ipv4"],
33
+ "expressions": ["Default Device Child Filter Expression"]
34
+ },
35
+ {
36
+ "name": "Default Part Numbers Filter",
37
+ "endpoints": ["/inventory/part-numbers"],
38
+ "expressions": ["Default Device Child Filter Expression", "Default Part Numbers Filter Expression"]
39
+ },
40
+ {
41
+ "name": "Default VLANs Filter",
42
+ "endpoints": ["/technology/vlans/site-summary"],
43
+ "expressions": ["Default VLANs Filter Expression"]
44
+ },
45
+ {
46
+ "name": "Default Prefix Filter",
47
+ "endpoints": ["/technology/networks/managed-networks"],
48
+ "expressions": ["Default Device Child Filter Expression", "Default Networks Filter Expression"]
49
+ }
50
+ ]
51
+ }