Fixed aesthetics.
This commit is contained in:
parent
4cb5b9f20d
commit
0b5214d247
@ -1,2 +1,4 @@
|
|||||||
#- prefix: 10.0.0.0/16
|
#- prefix: 10.0.0.0/16
|
||||||
# rir: RFC1918
|
# rir: RFC1918
|
||||||
|
#- prefix: fd00:ccdd::/32
|
||||||
|
# rir: RFC4193 ULA
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#- name: cluster1
|
#- name: cluster1
|
||||||
# type: Hyper-V
|
# type: Hyper-V
|
||||||
|
#- name: cluster2
|
||||||
|
# type: Hyper-V
|
||||||
|
# site: SING 1
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#- device: router1
|
#- device: server01
|
||||||
# enabled: true
|
# enabled: true
|
||||||
# form_factor: 0
|
# form_factor: 0
|
||||||
# name: router2
|
# name: to-server02
|
||||||
#- device: 9901-2.bwi-stf.lab
|
#- device: server02
|
||||||
# enabled: true
|
# enabled: true
|
||||||
# form_factor: 0
|
# form_factor: 0
|
||||||
# name: Loopback0
|
# name: to-server01
|
||||||
#- device: switch1
|
|
||||||
# enabled: true
|
|
||||||
# form_factor: 0
|
|
||||||
# name: Vlan5
|
|
||||||
|
@ -1,18 +1,13 @@
|
|||||||
|
|
||||||
#- address: 10.1.1.1/24
|
#- address: 10.1.1.1/24
|
||||||
# device: router1
|
# device: server01
|
||||||
# family: 4
|
|
||||||
# interface: Loopback0
|
# interface: Loopback0
|
||||||
# status: 1
|
# status: 1
|
||||||
# vrf: vrf1
|
# vrf: vrf1
|
||||||
#- address: 10.1.1.2/24
|
#- address: 10.1.1.2/24
|
||||||
# device: switch1
|
# device: server02
|
||||||
# family: 4
|
|
||||||
# interface: Vlan5
|
# interface: Vlan5
|
||||||
# status: 1
|
# status: 1
|
||||||
#- address: 10.1.1.10/24
|
#- address: 10.1.1.10/24
|
||||||
# description: reserved IP
|
# description: reserved IP
|
||||||
# family: 4
|
|
||||||
# status: 2
|
# status: 2
|
||||||
# tenant: tenant1
|
# tenant: tenant1
|
||||||
|
|
||||||
|
2
initializers/prefix_vlan_roles.yml
Normal file
2
initializers/prefix_vlan_roles.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#- name: Main Management
|
||||||
|
# slug: main-management
|
@ -10,3 +10,12 @@
|
|||||||
# status: 1
|
# status: 1
|
||||||
# tenant: tenant2
|
# tenant: tenant2
|
||||||
# vlan: vlan2
|
# vlan: vlan2
|
||||||
|
# is_pool: true
|
||||||
|
# vrf: vrf2
|
||||||
|
# tenant: tenant2
|
||||||
|
#- description: ipv6 prefix1
|
||||||
|
# prefix: fd00:ccdd:a000:1::/64
|
||||||
|
# site: AMS 2
|
||||||
|
# status: 1
|
||||||
|
# tenant: tenant2
|
||||||
|
# vlan: vlan2
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
#- is_private: true
|
#- is_private: true
|
||||||
# name: RFC1918
|
# name: RFC1918
|
||||||
# slug: rfc1918
|
# slug: rfc1918
|
||||||
|
#- is_private: true
|
||||||
|
# name: RFC4193 ULA
|
||||||
|
# slug: rfc4193-ula
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
# slug: tenant1
|
# slug: tenant1
|
||||||
#- name: tenant2
|
#- name: tenant2
|
||||||
# slug: tenant2
|
# slug: tenant2
|
||||||
|
# group: Tenant Group 2
|
||||||
|
4
initializers/tenants_groups.yml
Normal file
4
initializers/tenants_groups.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#- name: Tenant Group 1
|
||||||
|
# slug: tenant-group-1
|
||||||
|
#- name: Tenant Group 2
|
||||||
|
# slug: tenant-group-2
|
@ -7,3 +7,12 @@
|
|||||||
# status: 1
|
# status: 1
|
||||||
# tenant: tenant1
|
# tenant: tenant1
|
||||||
# vcpus: 8
|
# vcpus: 8
|
||||||
|
#- cluster: cluster1
|
||||||
|
# comments: VM2
|
||||||
|
# disk: 100
|
||||||
|
# memory: 2048
|
||||||
|
# name: virtual machine 2
|
||||||
|
# platform: Platform 2
|
||||||
|
# status: 1
|
||||||
|
# tenant: tenant1
|
||||||
|
# vcpus: 8
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
#- description: Network Interface 1
|
#- description: Network Interface 1
|
||||||
# enabled: true
|
# enabled: true
|
||||||
# form_factor: 0
|
|
||||||
# mac_address: 00:77:77:77:77:77
|
# mac_address: 00:77:77:77:77:77
|
||||||
# mtu: 1500
|
# mtu: 1500
|
||||||
# name: Network Interface 1
|
# name: Network Interface 1
|
||||||
# virtual_machine: virtual_machine1
|
# virtual_machine: virtual_machine1
|
||||||
#- description: Network Interface 2
|
#- description: Network Interface 2
|
||||||
# enabled: true
|
# enabled: true
|
||||||
# form_factor: 0
|
|
||||||
# mac_address: 00:55:55:55:55:55
|
# mac_address: 00:55:55:55:55:55
|
||||||
# mtu: 1500
|
# mtu: 1500
|
||||||
# name: Network Interface 2
|
# name: Network Interface 2
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
# site: AMS 1
|
# site: AMS 1
|
||||||
# status: 1
|
# status: 1
|
||||||
# vid: 5
|
# vid: 5
|
||||||
|
# role: Main Management
|
||||||
|
# description: VLAN 5 for MGMT
|
||||||
#- group: VLAN group 2
|
#- group: VLAN group 2
|
||||||
# name: vlan2
|
# name: vlan2
|
||||||
# site: AMS 1
|
# site: AMS 1
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#- enforce_unique: true
|
#- enforce_unique: true
|
||||||
# name: vrf1
|
# name: vrf1
|
||||||
# tenant: tenant1
|
# tenant: tenant1
|
||||||
|
# description: main VRF
|
||||||
#- enforce_unique: true
|
#- enforce_unique: true
|
||||||
# name: vrf2
|
# name: vrf2
|
||||||
|
# rd: "6500:6500"
|
||||||
|
# tenant: tenant2
|
||||||
|
# tenant_group: Tenant Group 2
|
||||||
|
@ -16,4 +16,4 @@ with file.open('r') as stream:
|
|||||||
tenant_group, created = TenantGroup.objects.get_or_create(**params)
|
tenant_group, created = TenantGroup.objects.get_or_create(**params)
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
print("Created Tenant Group", tenant_group.name)
|
print("🔳 Created Tenant Group", tenant_group.name)
|
@ -42,4 +42,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
tenant.custom_field_values.add(custom_field_value)
|
tenant.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created Tenant", tenant.name)
|
print("👩💻 Created Tenant", tenant.name)
|
@ -16,4 +16,4 @@ with file.open('r') as stream:
|
|||||||
cluster_type, created = ClusterType.objects.get_or_create(**params)
|
cluster_type, created = ClusterType.objects.get_or_create(**params)
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
print("Created Cluster Type", cluster_type.name)
|
print("🧰 Created Cluster Type", cluster_type.name)
|
@ -16,4 +16,4 @@ with file.open('r') as stream:
|
|||||||
rir, created = RIR.objects.get_or_create(**params)
|
rir, created = RIR.objects.get_or_create(**params)
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
print("Created RIR", rir.name)
|
print("🗺️ Created RIR", rir.name)
|
@ -43,5 +43,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
aggregate.custom_field_values.add(custom_field_value)
|
aggregate.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created Aggregate", aggregate.prefix)
|
print("🗞️ Created Aggregate", aggregate.prefix)
|
||||||
|
|
@ -54,4 +54,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
cluster.custom_field_values.add(custom_field_value)
|
cluster.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created cluster", cluster.name)
|
print("🗄️ Created cluster", cluster.name)
|
@ -43,5 +43,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
vrf.custom_field_values.add(custom_field_value)
|
vrf.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created VRF", vrf.name)
|
print("📦 Created VRF", vrf.name)
|
||||||
|
|
@ -16,4 +16,4 @@ with file.open('r') as stream:
|
|||||||
role, created = Role.objects.get_or_create(**params)
|
role, created = Role.objects.get_or_create(**params)
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
print("Created Prefix/VLAN Role", role.name)
|
print("⛹️ Created Prefix/VLAN Role", role.name)
|
@ -43,4 +43,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
vlan_group.custom_field_values.add(custom_field_value)
|
vlan_group.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created VLAN Group", vlan_group.name)
|
print("🏘️ Created VLAN Group", vlan_group.name)
|
@ -1,6 +1,6 @@
|
|||||||
from dcim.models import Site
|
from dcim.models import Site
|
||||||
from ipam.models import VLAN, VLANGroup, Role
|
from ipam.models import VLAN, VLANGroup, Role
|
||||||
from tenancy.models import Tenant
|
from tenancy.models import Tenant, TenantGroup
|
||||||
from extras.models import CustomField, CustomFieldValue
|
from extras.models import CustomField, CustomFieldValue
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ with file.open('r') as stream:
|
|||||||
optional_assocs = {
|
optional_assocs = {
|
||||||
'site': (Site, 'name'),
|
'site': (Site, 'name'),
|
||||||
'tenant': (Tenant, 'name'),
|
'tenant': (Tenant, 'name'),
|
||||||
|
'tenant_group': (TenantGroup, 'name'),
|
||||||
'group': (VLANGroup, 'name'),
|
'group': (VLANGroup, 'name'),
|
||||||
'role': (Role, 'name')
|
'role': (Role, 'name')
|
||||||
}
|
}
|
||||||
@ -47,4 +48,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
vlan.custom_field_values.add(custom_field_value)
|
vlan.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created VLAN", vlan.name)
|
print("🏠 Created VLAN", vlan.name)
|
@ -1,6 +1,6 @@
|
|||||||
from dcim.models import Site
|
from dcim.models import Site
|
||||||
from ipam.models import Prefix, VLAN, Role, VRF
|
from ipam.models import Prefix, VLAN, Role, VRF
|
||||||
from tenancy.models import Tenant
|
from tenancy.models import Tenant, TenantGroup
|
||||||
from extras.models import CustomField, CustomFieldValue
|
from extras.models import CustomField, CustomFieldValue
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ with file.open('r') as stream:
|
|||||||
optional_assocs = {
|
optional_assocs = {
|
||||||
'site': (Site, 'name'),
|
'site': (Site, 'name'),
|
||||||
'tenant': (Tenant, 'name'),
|
'tenant': (Tenant, 'name'),
|
||||||
|
'tenant_group': (TenantGroup, 'name'),
|
||||||
'vlan': (VLAN, 'name'),
|
'vlan': (VLAN, 'name'),
|
||||||
'role': (Role, 'name'),
|
'role': (Role, 'name'),
|
||||||
'vrf': (VRF, 'name')
|
'vrf': (VRF, 'name')
|
||||||
@ -50,4 +51,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
prefix.custom_field_values.add(custom_field_value)
|
prefix.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created Prefix", prefix.prefix)
|
print("📌 Created Prefix", prefix.prefix)
|
@ -56,4 +56,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
virtual_machine.custom_field_values.add(custom_field_value)
|
virtual_machine.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created virtual machine", virtual_machine.name)
|
print("🖥️ Created virtual machine", virtual_machine.name)
|
@ -43,5 +43,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
interface.custom_field_values.add(custom_field_value)
|
interface.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created interface", interface.name, interface.virtual_machine.name)
|
print("🧷 Created interface", interface.name, interface.virtual_machine.name)
|
||||||
|
|
@ -42,5 +42,5 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
interface.custom_field_values.add(custom_field_value)
|
interface.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created interface", interface.name, interface.device.name)
|
print("🧷 Created interface", interface.name, interface.device.name)
|
||||||
|
|
@ -58,4 +58,4 @@ with file.open('r') as stream:
|
|||||||
|
|
||||||
ip_address.custom_field_values.add(custom_field_value)
|
ip_address.custom_field_values.add(custom_field_value)
|
||||||
|
|
||||||
print("Created IP Address", ip_address.address)
|
print("🧬 Created IP Address", ip_address.address)
|
Loading…
Reference in New Issue
Block a user