correct circuit model startup scripts
This commit is contained in:
parent
6ab38472be
commit
31f52041f8
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
# - cid: Circuit_ID-1
|
||||
# provider: Provider1
|
||||
# type: Internet
|
||||
# - name: Circuit_ID-2
|
||||
# - cid: Circuit_ID-2
|
||||
# provider: Provider2
|
||||
# type: MPLS
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user