correct circuit model startup scripts

This commit is contained in:
ryanmerolle 2020-12-29 18:27:41 -05:00
parent 6ab38472be
commit 31f52041f8
6 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
# - name: VPLS
# slug: vpls
# - name: MPLS
# slug: mpls
# - name: Internet
# slug: internet
- name: VPLS
slug: vpls
- name: MPLS
slug: mpls
- name: Internet
slug: internet

View File

@ -1,6 +1,6 @@
# - cid: Circuit_ID-1
# provider: Provider1
# type: Internet
# - name: Circuit_ID-2
# - cid: Circuit_ID-2
# provider: Provider2
# type: MPLS

View File

@ -1,6 +1,6 @@
# - name: Provider1
# slug: provider1
# asn: 121
# - name: Provider2
# slug: provider2
# asn: 122
- name: Provider1
slug: provider1
asn: 121
- name: Provider2
slug: provider2
asn: 122

View File

@ -13,6 +13,6 @@ for params in providers:
provider, created = Provider.objects.get_or_create(**params)
if created:
set_custom_fields_values(name, custom_field_data)
set_custom_fields_values(provider, custom_field_data)
print("📡 Created provider", provider.name)

View File

@ -13,6 +13,6 @@ for params in circuit_types:
circuit_type, created = CircuitType.objects.get_or_create(**params)
if created:
set_custom_fields_values(name, custom_field_data)
set_custom_fields_values(circuit_type, custom_field_data)
print("⚡ Created Circuit Type", circuit_type.name)

View File

@ -9,7 +9,7 @@ if circuits is None:
required_assocs = {
'provider': (Provider, 'name'),
'circuit_type': (CircuitType, 'name')
'type': (CircuitType, 'name')
}
for params in circuits:
@ -24,6 +24,6 @@ for params in circuits:
circuit, created = Circuit.objects.get_or_create(**params)
if created:
set_custom_fields_values(cid, custom_field_data)
set_custom_fields_values(circuit, custom_field_data)
print("⚡ Created Circuit", circuit.cid)