Fixed aesthetics.

This commit is contained in:
Alvaro Arriola 2019-10-10 16:52:29 +02:00
parent 4cb5b9f20d
commit 0b5214d247
29 changed files with 67 additions and 40 deletions

View File

@ -1,2 +1,4 @@
#- prefix: 10.0.0.0/16
# rir: RFC1918
#- prefix: fd00:ccdd::/32
# rir: RFC4193 ULA

View File

@ -1,2 +1,5 @@
#- name: cluster1
# type: Hyper-V
#- name: cluster2
# type: Hyper-V
# site: SING 1

View File

@ -1,12 +1,8 @@
#- device: router1
#- device: server01
# enabled: true
# form_factor: 0
# name: router2
#- device: 9901-2.bwi-stf.lab
# name: to-server02
#- device: server02
# enabled: true
# form_factor: 0
# name: Loopback0
#- device: switch1
# enabled: true
# form_factor: 0
# name: Vlan5
# name: to-server01

View File

@ -1,18 +1,13 @@
#- address: 10.1.1.1/24
# device: router1
# family: 4
# device: server01
# interface: Loopback0
# status: 1
# vrf: vrf1
#- address: 10.1.1.2/24
# device: switch1
# family: 4
# device: server02
# interface: Vlan5
# status: 1
#- address: 10.1.1.10/24
# description: reserved IP
# family: 4
# status: 2
# tenant: tenant1

View File

@ -0,0 +1,2 @@
#- name: Main Management
# slug: main-management

View File

@ -10,3 +10,12 @@
# status: 1
# tenant: tenant2
# 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

View File

@ -1,3 +1,6 @@
#- is_private: true
# name: RFC1918
# slug: rfc1918
#- is_private: true
# name: RFC4193 ULA
# slug: rfc4193-ula

View File

@ -2,3 +2,4 @@
# slug: tenant1
#- name: tenant2
# slug: tenant2
# group: Tenant Group 2

View File

@ -0,0 +1,4 @@
#- name: Tenant Group 1
# slug: tenant-group-1
#- name: Tenant Group 2
# slug: tenant-group-2

View File

@ -7,3 +7,12 @@
# status: 1
# tenant: tenant1
# vcpus: 8
#- cluster: cluster1
# comments: VM2
# disk: 100
# memory: 2048
# name: virtual machine 2
# platform: Platform 2
# status: 1
# tenant: tenant1
# vcpus: 8

View File

@ -1,13 +1,11 @@
#- description: Network Interface 1
# enabled: true
# form_factor: 0
# mac_address: 00:77:77:77:77:77
# mtu: 1500
# name: Network Interface 1
# virtual_machine: virtual_machine1
#- description: Network Interface 2
# enabled: true
# form_factor: 0
# mac_address: 00:55:55:55:55:55
# mtu: 1500
# name: Network Interface 2

View File

@ -2,6 +2,8 @@
# site: AMS 1
# status: 1
# vid: 5
# role: Main Management
# description: VLAN 5 for MGMT
#- group: VLAN group 2
# name: vlan2
# site: AMS 1

View File

@ -1,5 +1,9 @@
#- enforce_unique: true
# name: vrf1
# tenant: tenant1
# description: main VRF
#- enforce_unique: true
# name: vrf2
# rd: "6500:6500"
# tenant: tenant2
# tenant_group: Tenant Group 2

View File

@ -16,4 +16,4 @@ with file.open('r') as stream:
tenant_group, created = TenantGroup.objects.get_or_create(**params)
if created:
print("Created Tenant Group", tenant_group.name)
print("🔳 Created Tenant Group", tenant_group.name)

View File

@ -42,4 +42,4 @@ with file.open('r') as stream:
tenant.custom_field_values.add(custom_field_value)
print("Created Tenant", tenant.name)
print("👩‍💻 Created Tenant", tenant.name)

View File

@ -16,4 +16,4 @@ with file.open('r') as stream:
cluster_type, created = ClusterType.objects.get_or_create(**params)
if created:
print("Created Cluster Type", cluster_type.name)
print("🧰 Created Cluster Type", cluster_type.name)

View File

@ -16,4 +16,4 @@ with file.open('r') as stream:
rir, created = RIR.objects.get_or_create(**params)
if created:
print("Created RIR", rir.name)
print("🗺️ Created RIR", rir.name)

View File

@ -43,5 +43,4 @@ with file.open('r') as stream:
aggregate.custom_field_values.add(custom_field_value)
print("Created Aggregate", aggregate.prefix)
print("🗞️ Created Aggregate", aggregate.prefix)

View File

@ -54,4 +54,4 @@ with file.open('r') as stream:
cluster.custom_field_values.add(custom_field_value)
print("Created cluster", cluster.name)
print("🗄️ Created cluster", cluster.name)

View File

@ -43,5 +43,4 @@ with file.open('r') as stream:
vrf.custom_field_values.add(custom_field_value)
print("Created VRF", vrf.name)
print("📦 Created VRF", vrf.name)

View File

@ -16,4 +16,4 @@ with file.open('r') as stream:
role, created = Role.objects.get_or_create(**params)
if created:
print("Created Prefix/VLAN Role", role.name)
print("⛹️‍ Created Prefix/VLAN Role", role.name)

View File

@ -43,4 +43,4 @@ with file.open('r') as stream:
vlan_group.custom_field_values.add(custom_field_value)
print("Created VLAN Group", vlan_group.name)
print("🏘️ Created VLAN Group", vlan_group.name)

View File

@ -1,6 +1,6 @@
from dcim.models import Site
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 ruamel.yaml import YAML
@ -18,6 +18,7 @@ with file.open('r') as stream:
optional_assocs = {
'site': (Site, 'name'),
'tenant': (Tenant, 'name'),
'tenant_group': (TenantGroup, 'name'),
'group': (VLANGroup, 'name'),
'role': (Role, 'name')
}
@ -47,4 +48,4 @@ with file.open('r') as stream:
vlan.custom_field_values.add(custom_field_value)
print("Created VLAN", vlan.name)
print("🏠 Created VLAN", vlan.name)

View File

@ -1,6 +1,6 @@
from dcim.models import Site
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 ruamel.yaml import YAML
@ -19,6 +19,7 @@ with file.open('r') as stream:
optional_assocs = {
'site': (Site, 'name'),
'tenant': (Tenant, 'name'),
'tenant_group': (TenantGroup, 'name'),
'vlan': (VLAN, 'name'),
'role': (Role, 'name'),
'vrf': (VRF, 'name')
@ -50,4 +51,4 @@ with file.open('r') as stream:
prefix.custom_field_values.add(custom_field_value)
print("Created Prefix", prefix.prefix)
print("📌 Created Prefix", prefix.prefix)

View File

@ -56,4 +56,4 @@ with file.open('r') as stream:
virtual_machine.custom_field_values.add(custom_field_value)
print("Created virtual machine", virtual_machine.name)
print("🖥️ Created virtual machine", virtual_machine.name)

View File

@ -43,5 +43,4 @@ with file.open('r') as stream:
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)

View File

@ -42,5 +42,5 @@ with file.open('r') as stream:
interface.custom_field_values.add(custom_field_value)
print("Created interface", interface.name, interface.device.name)
print("🧷 Created interface", interface.name, interface.device.name)

View File

@ -58,4 +58,4 @@ with file.open('r') as stream:
ip_address.custom_field_values.add(custom_field_value)
print("Created IP Address", ip_address.address)
print("🧬 Created IP Address", ip_address.address)