diff --git a/initializers/circuit_types.yml b/initializers/circuit_types.yml index 0e9c356..95dee30 100644 --- a/initializers/circuit_types.yml +++ b/initializers/circuit_types.yml @@ -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 diff --git a/initializers/circuits.yml b/initializers/circuits.yml index 44e0a3a..93b4659 100644 --- a/initializers/circuits.yml +++ b/initializers/circuits.yml @@ -1,6 +1,6 @@ # - cid: Circuit_ID-1 # provider: Provider1 # type: Internet -# - name: Circuit_ID-2 +# - cid: Circuit_ID-2 # provider: Provider2 # type: MPLS diff --git a/initializers/providers.yml b/initializers/providers.yml index ca2ca1a..4d0e5b0 100644 --- a/initializers/providers.yml +++ b/initializers/providers.yml @@ -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 diff --git a/startup_scripts/280_providers.py b/startup_scripts/280_providers.py index 393d5ed..e927dda 100644 --- a/startup_scripts/280_providers.py +++ b/startup_scripts/280_providers.py @@ -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) diff --git a/startup_scripts/290_circuit_types.py b/startup_scripts/290_circuit_types.py index b6dca6c..441f059 100644 --- a/startup_scripts/290_circuit_types.py +++ b/startup_scripts/290_circuit_types.py @@ -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) diff --git a/startup_scripts/300_circuits.py b/startup_scripts/300_circuits.py index 3d2bf24..456c792 100644 --- a/startup_scripts/300_circuits.py +++ b/startup_scripts/300_circuits.py @@ -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)