Skip to content

Commit 7e33f53

Browse files
committed
Fix linting
1 parent 5815558 commit 7e33f53

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

src/netbox_initializers/initializers/cables.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def get_termination_object(params: dict, side: str):
5656
term_side = circuit_params.pop("term_side").upper()
5757

5858
if scope := circuit_params.pop("scope", None):
59-
circuit_params["termination_type"], circuit_params["termination_id"] = get_scope_details(scope, CIRCUIT_TERMINATION_TERMINATION_TYPES)
59+
scope_type, scope_id = get_scope_details(scope, CIRCUIT_TERMINATION_TERMINATION_TYPES)
60+
circuit_params["termination_type"] = scope_type
61+
circuit_params["termination_id"] = scope_id
6062
else:
6163
raise ValueError(
6264
f"⚠️ Missing required parameter: 'scope'"

src/netbox_initializers/initializers/prefixes.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
from dcim.constants import LOCATION_SCOPE_TYPES
12
from ipam.models import VLAN, VRF, Prefix, Role
23
from netaddr import IPNetwork
34
from tenancy.models import Tenant, TenantGroup
4-
from dcim.constants import LOCATION_SCOPE_TYPES
5-
from django.contrib.contenttypes.models import ContentType
65

76
from netbox_initializers.initializers.base import BaseInitializer, register_initializer
87
from netbox_initializers.initializers.utils import get_scope_details

src/netbox_initializers/initializers/yaml/cables.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
# termination_b_circuit:
5454
# term_side: A
5555
# cid: Circuit_ID-1
56-
# scope:
56+
# scope:
5757
# type: site
5858
# name: AMS 1
5959
# type: cat6

src/netbox_initializers/initializers/yaml/prefixes.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
# - description: prefix1
1717
# prefix: 10.1.1.0/24
18-
# scope:
18+
# scope:
1919
# type: site
2020
# name: AMS 1
2121
# status: active
2222
# tenant: tenant1
2323
# vlan: vlan1
2424
# - description: prefix2
2525
# prefix: 10.1.2.0/24
26-
# scope:
26+
# scope:
2727
# type: site
2828
# name: AMS 2
2929
# status: active
@@ -34,7 +34,7 @@
3434
# - description: ipv6 prefix1
3535
# prefix: 2001:db8:a000:1::/64
3636
# scope:
37-
# type: site
37+
# type: site
3838
# name: AMS 2
3939
# status: active
4040
# tenant: tenant2
@@ -46,4 +46,4 @@
4646
# name: cage 101
4747
# status: active
4848
# tenant: tenant2
49-
# vlan: vlan1
49+
# vlan: vlan1

src/netbox_initializers/initializers/yaml/virtualization_interfaces.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# virtual_machine: virtual machine 1
77
# - description: Network Interface 2
88
# enabled: true
9-
# mac_addresses:
9+
# mac_addresses:
1010
# - 00:01:22:22:22:22
1111
# - 00:01:33:33:33:33
1212
# primary_mac_address: 00:01:33:33:33:33
@@ -20,9 +20,9 @@
2020
# virtual_machine: virtual machine 2
2121
# - description: Network Interface 4
2222
# enabled: true
23-
# mac_addresses:
23+
# mac_addresses:
2424
# - 00:02:44:44:44:44
2525
# - 00:02:55:55:55:55
2626
# mtu: 1500
2727
# name: Network Interface 4
28-
# virtual_machine: virtual machine 2
28+
# virtual_machine: virtual machine 2

0 commit comments

Comments
 (0)