From 20fea1accd324cb7fd0c113bcbb31c2db56b5e90 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Fri, 19 Jun 2026 13:00:22 +0200 Subject: [PATCH 01/30] feat: draft for schema library v2 --- version2/aggregate.yml | 62 +++++ version2/cable.yml | 226 +++++++++++++++++ version2/circuit.yml | 181 +++++++++++++ version2/circuit_contract.yml | 71 ++++++ version2/cluster.yml | 71 ++++++ version2/compute.yml | 102 ++++++++ version2/dcim.yml | 461 ++++++++++++++++++++++++++++++++++ version2/hosting_cluster.yml | 68 +++++ version2/ipam.yml | 159 ++++++++++++ version2/lag.yml | 95 +++++++ version2/location.yml | 52 ++++ version2/location_minimal.yml | 73 ++++++ version2/menu.yml | 197 +++++++++++++++ version2/organization.yml | 64 +++++ version2/qinq.yml | 38 +++ version2/rack.yml | 77 ++++++ version2/vlan.yml | 157 ++++++++++++ 17 files changed, 2154 insertions(+) create mode 100644 version2/aggregate.yml create mode 100644 version2/cable.yml create mode 100644 version2/circuit.yml create mode 100644 version2/circuit_contract.yml create mode 100644 version2/cluster.yml create mode 100644 version2/compute.yml create mode 100644 version2/dcim.yml create mode 100644 version2/hosting_cluster.yml create mode 100644 version2/ipam.yml create mode 100644 version2/lag.yml create mode 100644 version2/location.yml create mode 100644 version2/location_minimal.yml create mode 100644 version2/menu.yml create mode 100644 version2/organization.yml create mode 100644 version2/qinq.yml create mode 100644 version2/rack.yml create mode 100644 version2/vlan.yml diff --git a/version2/aggregate.yml b/version2/aggregate.yml new file mode 100644 index 0000000..a0eb034 --- /dev/null +++ b/version2/aggregate.yml @@ -0,0 +1,62 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +nodes: + - name: Aggregate + namespace: Ipam + description: An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. + label: Aggregate + icon: mdi:ip-network + menu_placement: OrganizationRIR + include_in_menu: true + order_by: + - prefix__value + display_label: prefix__value + human_friendly_id: + - prefix__value + inherit_from: + - BuiltinIPPrefix + attributes: + - name: description + kind: Text + optional: true + order_weight: 1100 + - name: date_added + label: Date Added + kind: DateTime + optional: true + order_weight: 1200 + relationships: + - name: rir + label: RIR + peer: OrganizationRIR + identifier: aggregate__rir + optional: false + cardinality: one + kind: Attribute + order_weight: 1000 + + - name: RIR + namespace: Organization + description: A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or a private entity managing private address space. + label: RIR + icon: mdi:certificate + include_in_menu: true + inherit_from: + - OrganizationGeneric + attributes: + - name: is_private + label: Private + description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. + kind: Boolean + default_value: false + order_weight: 1300 + relationships: + - name: aggregates + peer: IpamAggregate + identifier: aggregate__rir + optional: true + cardinality: many + kind: Generic + order_weight: 1400 diff --git a/version2/cable.yml b/version2/cable.yml new file mode 100644 index 0000000..b5d2050 --- /dev/null +++ b/version2/cable.yml @@ -0,0 +1,226 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +nodes: + - name: Cable + namespace: Dcim + description: Physical cable connecting two endpoints + label: Cable + icon: mdi:cable-data + display_label: label__value + menu_placement: DcimDevice + order_by: + - label__value + inherit_from: + - DcimConnector + attributes: + - name: status + kind: Dropdown + optional: false + default_value: connected + order_weight: 1000 + choices: + - name: connected + label: Connected + description: Fully operational and currently in connected + color: "#00d25b" + - name: planned + label: Planned + description: In the process of being set up + color: "#2196f3" + - name: cable_type + kind: Dropdown + optional: true + order_weight: 1100 + choices: + # Copper Cables + - name: cat3 + label: CAT3 + description: "Category 3 twisted pair cable." + color: "#99ccff" # Light Blue + - name: cat5 + label: CAT5 + description: "Category 5 twisted pair cable." + color: "#99ccff" # Light Blue + - name: cat5e + label: CAT5e + description: "Enhanced Category 5 cable." + color: "#99ccff" # Light Blue + - name: cat6 + label: CAT6 + description: "Category 6 twisted pair cable." + color: "#99ccff" # Light Blue + - name: cat6a + label: CAT6A + description: "Augmented Category 6 cable." + color: "#99ccff" # Light Blue + - name: cat7 + label: CAT7 + description: "Category 7 twisted pair cable." + color: "#99ccff" # Light Blue + - name: cat7a + label: CAT7A + description: "Augmented Category 7 cable." + color: "#99ccff" # Light Blue + - name: cat8 + label: CAT8 + description: "Category 8 twisted pair cable." + color: "#99ccff" # Light Blue + + # Fiber Cables (Multi-mode) + - name: mmf-om1 + label: Multimode Fiber OM1 + description: "Multimode fiber (62.5/125 µm)." + color: "#ff9933" # Dark Orange + - name: mmf-om2 + label: Multimode Fiber OM2 + description: "Multimode fiber (50/125 µm)." + color: "#ff9933" # Dark Orange + - name: mmf-om3 + label: Multimode Fiber OM3 + description: "Optimized multimode fiber (50/125 µm)." + color: "#ff9933" # Dark Orange + - name: mmf-om4 + label: Multimode Fiber OM4 + description: "Enhanced multimode fiber (50/125 µm)." + color: "#ff9933" # Dark Orange + - name: mmf-om5 + label: Multimode Fiber OM5 + description: "Wideband multimode fiber (50/125 µm)." + color: "#ff9933" # Dark Orange + + # Fiber Cables (Single-mode) + - name: smf-os1 + label: Singlemode Fiber OS1 + description: "Standard singlemode fiber." + color: "#ffcc00" # Yellow + - name: smf-os2 + label: Singlemode Fiber OS2 + description: "Improved singlemode fiber." + color: "#ffcc00" # Yellow + + # Direct Attach and Active Optical Cables + - name: dac-passive + label: Passive DAC + description: "Direct Attach Copper (Passive)." + color: "#a0a0a0" # Grey + - name: dac-active + label: Active DAC + description: "Direct Attach Copper (Active)." + color: "#a0a0a0" # Grey + - name: aoc + label: Active Optical Cable + description: "Active Optical Cable." + color: "#a0a0a0" # Grey + + # Special Cables + - name: coaxial + label: Coaxial + description: "Coaxial cable for broadband." + color: "#000000" # Black + - name: mrj21-trunk + label: MRJ21 Trunk + description: "High-density copper cable." + color: "#000000" # Black + - name: power + label: Power + description: "Power cables for electrical connections." + color: "#000000" # Black + - name: usb + label: USB + description: "Universal Serial Bus cable." + color: "#000000" # Black + - name: color + kind: Dropdown + optional: true + order_weight: 1300 + choices: + - name: dark-red + label: Dark Red + color: "#aa1409" + - name: red + label: Red + color: "#f44336" + - name: pink + label: Pink + color: "#e91e63" + - name: rose + label: Rose + color: "#ffe4e1" + - name: fuchsia + label: Fuchsia + color: "#ff66ff" + - name: purple + label: Purple + color: "#9c27b0" + - name: dark-purple + label: Dark Purple + color: "#673ab7" + - name: indigo + label: Indigo + color: "#3f51b5" + - name: blue + label: Blue + color: "#2196f3" + - name: light-blue + label: Light Blue + color: "#03a9f4" + - name: cyan + label: Cyan + color: "#00bcd4" + - name: teal + label: Teal + color: "#009688" + - name: aqua + label: Aqua + color: "#00ffff" + - name: dark-green + label: Dark Green + color: "#2f6a31" + - name: green + label: Green + color: "#4caf50" + - name: light-green + label: Light Green + color: "#8bc34a" + - name: lime + label: Lime + color: "#cddc39" + - name: yellow + label: Yellow + color: "#ffeb3b" + - name: amber + label: Amber + color: "#ffc107" + - name: orange + label: Orange + color: "#ff9800" + - name: dark-orange + label: Dark Orange + color: "#ff5722" + - name: brown + label: Brown + color: "#795548" + - name: light-grey + label: Light Grey + color: "#c0c0c0" + - name: grey + label: Grey + color: "#9e9e9e" + - name: dark-grey + label: Dark Grey + color: "#607d8b" + - name: black + label: Black + color: "#111111" + - name: label + kind: Text + optional: true + order_weight: 1200 + # As we can't put float in Number "forcing" length in cm + - name: length + label: Length (in cm) + kind: Number + optional: true + order_weight: 1350 diff --git a/version2/circuit.yml b/version2/circuit.yml new file mode 100644 index 0000000..6613a8c --- /dev/null +++ b/version2/circuit.yml @@ -0,0 +1,181 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +nodes: + # TODO: Maybe create a generic, we would have colored circuits, cross co, for instance + - name: Circuit + namespace: Dcim + description: A Circuit represent service operated by a provider. + label: Circuit + icon: mdi:cable-data + human_friendly_id: + - circuit_id__value + order_by: + - circuit_id__value + display_label: circuit_id__value + attributes: + - name: circuit_id + kind: Text + unique: true + - name: description + kind: Text + optional: true + - name: commit_rate + label: Commit Rate (Kbps) + kind: Number + optional: true + order_weight: 1100 + - name: circuit_type + kind: Dropdown + description: Specifies the type of circuit. + choices: + - name: internet_access + label: Internet Access + description: Broadband or dedicated internet access circuit. + color: "#1e90ff" + - name: point_to_point + label: Point to Point + description: Dedicated layer 2 or layer 3 link between two sites. + color: "#a0c878" + - name: peering + label: Peering + description: Connection to another network for exchange of traffic. + color: "#20b2aa" + - name: dark_fiber + label: Dark Fiber + description: Leased, unlit fiber managed and operated by the customer. + color: "#555555" + - name: mpls + label: MPLS + description: Multi-Protocol Label Switching circuit for QoS-based routing. + color: "#7f00ff" + - name: status + kind: Dropdown + optional: false + default_value: active + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: "#00d25b" + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: "#f0ad4e" + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: "#ff9800" + - name: drained + label: Drained + description: Temporarily taken out of service. + color: "#9e9e9e" + relationships: + - name: provider + peer: OrganizationProvider + optional: false + cardinality: one + kind: Attribute + identifier: circuit__provider + - name: endpoints + peer: DcimCircuitEndpoint + optional: true + cardinality: many + kind: Component + identifier: circuit__endpoint + + - name: CircuitEndpoint + namespace: Dcim + description: A circuit endpoint, could be a position in a MMR... + label: Circuit Endpoint + inherit_from: + - DcimEndpoint + icon: mdi:ethernet + menu_placement: DcimCircuit + human_friendly_id: + - circuit__circuit_id__value + - name__value + uniqueness_constraints: + - [circuit, side__value] + order_by: + - name__value + display_label: name__value + attributes: + - name: side + label: Side + kind: Dropdown + optional: false + order_weight: 950 + choices: + - name: a + label: A + description: A-side of the circuit. + - name: z + label: Z + description: Z-side of the circuit. + - name: name + kind: Text + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ circuit__circuit_id__value }}_{{ side__value | upper }}" + read_only: true + optional: false + order_weight: 1000 + - name: status + kind: Dropdown + optional: false + default_value: active + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: "#00d25b" + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: "#f0ad4e" + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: "#ff9800" + - name: drained + label: Drained + description: Temporarily taken out of service. + color: "#9e9e9e" + - name: description + kind: Text + optional: true + relationships: + - name: circuit + peer: DcimCircuit + order_weight: 900 + optional: false + cardinality: one + kind: Parent + identifier: circuit__endpoint + - name: location + label: Location + peer: LocationHosting + optional: false + cardinality: one + kind: Attribute + order_weight: 1500 + identifier: circuit_endpoint__location + +extensions: + nodes: + - kind: OrganizationProvider + relationships: + - name: circuits + peer: DcimCircuit + cardinality: many + optional: true + identifier: circuit__provider + - kind: LocationHosting + relationships: + - name: circuit_endpoints + peer: DcimCircuitEndpoint + cardinality: many + optional: true + identifier: circuit_endpoint__location diff --git a/version2/circuit_contract.yml b/version2/circuit_contract.yml new file mode 100644 index 0000000..18d64d0 --- /dev/null +++ b/version2/circuit_contract.yml @@ -0,0 +1,71 @@ +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +--- +version: "1.0" +nodes: + - name: CircuitContract + namespace: Dcim + inherit_from: + - CoreFileObject + description: A contract document associated with a circuit service, including terms, costs, and validity period. + label: Circuit Contract + icon: mdi:file-sign + menu_placement: DcimCircuit + human_friendly_id: + - name__value + order_by: + - contract_end__value + display_label: "Contract (Circuit `{{ circuit__circuit_id__value }}`)" + attributes: + - name: name + kind: Text + computed_attribute: + kind: Jinja2 + jinja2_template: "contract_{{ circuit__circuit_id__value }}" + read_only: true # You must set the attribute to read-only as the value will be handled by the system + optional: false # As it's a Jinja2 kind of attribute you can make it mandatory + - name: contract_start + kind: DateTime + optional: false + - name: contract_end + kind: DateTime + optional: false + - name: monthly_cost + kind: Number + optional: true + - name: currency + kind: Dropdown + optional: true + choices: + - name: usd + label: USD + description: United States Dollar + - name: eur + label: EUR + description: Euro + - name: gbp + label: GBP + description: British Pound Sterling + relationships: + # Example of a relationship to capture the account that signed the contract + # - name: signed_by + # peer: CoreAccount + # kind: Attribute + # cardinality: one + # optional: true + - name: circuit + peer: DcimCircuit + kind: Attribute + cardinality: one + optional: false + order_weight: 950 + identifier: circuit__contract + +extensions: + nodes: + - kind: DcimCircuit + relationships: + - name: contract + peer: DcimCircuitContract + cardinality: one + optional: true + identifier: circuit__contract diff --git a/version2/cluster.yml b/version2/cluster.yml new file mode 100644 index 0000000..8ae6f8d --- /dev/null +++ b/version2/cluster.yml @@ -0,0 +1,71 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +generics: + - name: Generic + namespace: Cluster + description: A cluster of machines hosting services or other machines. + icon: mdi:dots-hexagon + include_in_menu: false + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + attributes: + - name: name + kind: Text + description: Name of the cluster. + unique: true + order_weight: 1000 + - name: description + kind: Text + optional: true + relationships: + - name: location + label: Location + peer: LocationGeneric + optional: false + cardinality: many + kind: Attribute + order_weight: 1400 + - name: tags + peer: BuiltinTag + optional: true + cardinality: many + kind: Attribute + order_weight: 2000 + + - name: GenericComputeUnitNodes + namespace: Cluster + description: A generic to apply on clusters that can be built out of generic compute units. + include_in_menu: false + relationships: + - name: nodes + label: Nodes + identifier: worker_in_cluster + cardinality: many + peer: ComputeGenericUnit + kind: Component + +extensions: + nodes: + - kind: ComputeGenericUnit + relationships: + - name: worker_in_cluster + identifier: worker_in_cluster + label: Worker in cluster + peer: ClusterGenericComputeUnitNodes + cardinality: one + description: This device is a worker node of the specified cluster. + optional: true + - kind: LocationGeneric + relationships: + - name: clusters + label: Clusters + peer: ClusterGeneric + cardinality: many + kind: Component + description: All clusters available on that location. + optional: true diff --git a/version2/compute.yml b/version2/compute.yml new file mode 100644 index 0000000..7093b98 --- /dev/null +++ b/version2/compute.yml @@ -0,0 +1,102 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +generics: + - name: GenericUnit + namespace: Compute + description: A generic unit that can compute (e.g. server, vm ...). + include_in_menu: false + + - name: HostVirtualMachine + namespace: Virtualization + description: A generic unit that can host VM + include_in_menu: false + relationships: + - name: virtual_machines + cardinality: many + peer: VirtualizationVirtualMachine + kind: Component + optional: true + identifier: host__virtual_machine + +nodes: + - name: PhysicalServer + namespace: Compute + description: A physical server with fixed resources and specific hardware characteristics. + label: Physical Server + icon: mdi:server + menu_placement: DcimDevice + inherit_from: + - ComputeGenericUnit + - DcimGenericDevice + - DcimPhysicalDevice + # If you don't want to have VM running directly on your physical server you can comment out the following line + - VirtualizationHostVirtualMachine + attributes: + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1100 + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: "#00d25b" + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: "#f0ad4e" + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: "#ff9800" + - name: drained + label: Drained + description: Temporarily taken out of service. + color: "#9e9e9e" + + - name: VirtualMachine + namespace: Virtualization + description: A virtual machine hosted on a server or a cluster. + label: Virtual Machine + icon: carbon:virtual-machine + include_in_menu: true + inherit_from: + - ComputeGenericUnit + - DcimGenericDevice + attributes: + - name: role + kind: Dropdown + optional: true + description: Role of the virtual machine. + order_weight: 1400 + choices: + - name: application + color: "#7f7fff" + - name: storage + color: "#bf7fbf" + - name: vcpu + kind: Number + optional: true + order_weight: 1900 + description: Number of CPU cores assigned to the VM. + - name: memory + kind: Number + optional: true + order_weight: 1900 + description: Amount of memory (in GB) assigned to the VM. + - name: disk + kind: Number + optional: true + order_weight: 1900 + description: Disk space (in GB) assigned to the VM. + relationships: + - name: host + peer: VirtualizationHostVirtualMachine + optional: false + cardinality: one + kind: Attribute + order_weight: 1500 + identifier: host__virtual_machine diff --git a/version2/dcim.yml b/version2/dcim.yml new file mode 100644 index 0000000..4b939a1 --- /dev/null +++ b/version2/dcim.yml @@ -0,0 +1,461 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +generics: + - name: GenericDevice + namespace: Dcim + description: Generic Device object. + label: Device + icon: mdi:server + include_in_menu: false + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + attributes: + - name: name + kind: Text + unique: true + order_weight: 1000 + - name: description + kind: Text + optional: true + order_weight: 2000 + relationships: + - name: interfaces + peer: DcimInterface + optional: true + cardinality: many + identifier: device__interface + kind: Component + - name: tags + peer: BuiltinTag + optional: true + cardinality: many + kind: Attribute + order_weight: 2000 + - name: primary_address + peer: IpamIPAddress + label: Primary IP Address + identifier: device__primary_address + optional: true + cardinality: one + kind: Attribute + order_weight: 1700 + - name: platform + peer: DcimPlatform + optional: true + cardinality: one + kind: Attribute + order_weight: 1250 + identifier: device__platform + + - name: PhysicalDevice + namespace: Dcim + description: Generic holding attributes and relationships relevant for physical device. + include_in_menu: false + attributes: + - name: position + label: Position (U) + description: Lowest unit. + kind: Number + optional: true + order_weight: 1500 + - name: serial + kind: Text + optional: true + order_weight: 1500 + - name: rack_face + label: Rack Face + description: On which face of the rack the device is mounted. + kind: Dropdown + optional: false + default_value: front + order_weight: 1515 + choices: + - name: front + label: Front + description: Device mounted on the front face of the rack. + - name: rear + label: Rear + description: Device mounted on the rear face of the rack. + relationships: + - name: device_type + peer: DcimDeviceType + optional: true + cardinality: one + kind: Attribute + order_weight: 1200 + - name: location + label: Location + peer: LocationHosting + optional: false + cardinality: one + kind: Attribute + order_weight: 1500 + identifier: physical_device__location + + - name: Endpoint + namespace: Dcim + description: Generic Endpoint to receive a connector. + include_in_menu: false + relationships: + - name: connector + peer: DcimConnector + optional: true + cardinality: one + order_weight: 1500 + kind: Attribute + identifier: connector__endpoint + + - name: Connector + namespace: Dcim + description: Generic Connector to link two endpoints together. + include_in_menu: false + relationships: + - name: connected_endpoints + peer: DcimEndpoint + optional: true + cardinality: many + order_weight: 1500 + kind: Attribute + identifier: connector__endpoint + + - name: Interface + namespace: Dcim + description: Generic Network Interface + label: Interface + icon: mdi:ethernet + include_in_menu: true + menu_placement: DcimDevice + display_label: name__value + order_by: + - device__name__value + - name__value + uniqueness_constraints: + - [device, name__value] + human_friendly_id: + - device__name__value + - name__value + attributes: + - name: name + kind: Text + description: "Name of the interface" + order_weight: 1000 + - name: description + kind: Text + optional: true + description: "A brief description of the interface" + order_weight: 1100 + - name: status + kind: Dropdown + description: "The status of the interface" + optional: false + default_value: "active" + choices: + - name: provisioning + label: Provisioning + description: "Interface is being provisioned." + color: "#f0ad4e" + - name: free + label: Free + description: "Interface is unused." + color: "#c8e6c9" + - name: active + label: Active + description: "Interface is active and operational." + color: "#00d25b" + - name: maintenance + label: Maintenance + description: "Interface is under maintenance." + color: "#ff9800" + - name: disabled + label: Disabled + description: "Interface has been disabled." + color: "#6c757d" + order_weight: 1200 + - name: role + kind: Dropdown + optional: true + description: "The role of the interface in the network" + choices: + - name: core + label: Core Interface + description: "Central part of the network." + color: "#A9CCE3" + - name: customer + label: Customer Interface + description: "Interface dedicated to customer connections." + color: "#D2B4DE" + - name: access + label: Access Interfaces + description: "Interface connecting endpoint devices." + color: "#B4E0DC" + - name: management + label: Management Interface + description: "Interface dedicated to device management." + color: "#E3DAC9" + - name: peering + label: Peering Interface + description: "Interface dedicated to peering with other networks." + color: "#C4B7E6" + - name: upstream + label: Upstream Interface + description: "Interface dedicated to upstream traffic between networks." + color: "#B2D4E6" + order_weight: 1250 + relationships: + - name: device + peer: DcimGenericDevice + identifier: device__interface + optional: false + cardinality: one + kind: Parent + order_weight: 1025 + + - name: Layer2 + namespace: Interface + include_in_menu: false + description: "Layer 2 specific attributes for network interfaces" + label: "Layer 2 Interface" + attributes: + - name: mac_address + label: MAC Address + kind: MacAddress + optional: true + order_weight: 1400 + - name: l2_mode + label: Layer2 Mode + kind: Dropdown + optional: true + choices: + - name: access + label: Access + description: "Access mode" + - name: trunk + label: Trunk + description: "Trunk mode" + - name: trunk_all + label: Trunk (All) + description: "Trunk all mode" + description: "Layer 2 mode of the interface" + order_weight: 1500 + + - name: Layer3 + namespace: Interface + include_in_menu: false + description: "Layer 3 specific attributes for network interfaces" + label: "Layer 3 Interface" + relationships: + - name: ip_addresses + label: IP Addresses + peer: IpamIPAddress + cardinality: many + kind: Attribute + optional: true + description: "List of IP addresses associated with the interface" + order_weight: 1150 + + - name: HasSubInterface + namespace: Interface + description: A generic interface that can have sub-interfaces + include_in_menu: false + relationships: + - name: sub_interfaces + label: "Sub-interface(s)" + peer: InterfaceVirtual + identifier: "sub__interface" + optional: true + cardinality: many + kind: Attribute + description: "Sub-interfaces of this interface" + order_weight: 1750 + +nodes: + - name: DeviceType + namespace: Dcim + description: A model of device + label: Device Type + icon: mdi:poll + menu_placement: DcimDevice + human_friendly_id: + - name__value + display_label: name__value + order_by: + - manufacturer__name__value + - name__value + attributes: + - name: name + kind: Text + unique: true + order_weight: 1000 + - name: description + kind: Text + optional: true + order_weight: 1100 + - name: part_number + label: Part Number + optional: true + kind: Text + order_weight: 1200 + - name: height + label: Height (U) + optional: false + default_value: 1 + kind: Number + order_weight: 1400 + - name: full_depth + label: Full Depth + default_value: true + kind: Boolean + order_weight: 1500 + - name: weight + label: Weight (kg) + optional: true + kind: Number + order_weight: 1600 + relationships: + - name: manufacturer + peer: OrganizationManufacturer + cardinality: one + kind: Attribute + order_weight: 1250 + optional: false + identifier: manufacturer__device_type + + - name: Platform + namespace: Dcim + description: A Platform represent the type of software running on a device. + label: Platform + icon: mdi:application-cog-outline + menu_placement: DcimDevice + human_friendly_id: + - name__value + display_label: name__value + order_by: + - manufacturer__name__value + - name__value + attributes: + - name: name + kind: Text + unique: true + order_weight: 1000 + - name: description + kind: Text + optional: true + order_weight: 1200 + relationships: + - name: devices + peer: DcimGenericDevice + optional: true + cardinality: many + kind: Generic + order_weight: 1350 + identifier: device__platform + - name: manufacturer + peer: OrganizationManufacturer + cardinality: one + kind: Attribute + order_weight: 1300 + identifier: manufacturer__platform + + - name: Device + label: Network Device + description: A configurable network device including routers, switches... + icon: clarity:network-switch-solid + generate_template: true + namespace: Dcim + inherit_from: + - CoreArtifactTarget + - DcimGenericDevice + - DcimPhysicalDevice + attributes: + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1100 + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: "#00d25b" + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: "#f0ad4e" + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: "#ff9800" + - name: drained + label: Drained + description: Temporarily taken out of service. + color: "#9e9e9e" + - name: role + kind: Dropdown + optional: true + order_weight: 1400 + choices: + - name: core + label: Core Router + description: Central part of the network. + color: "#7f7fff" + - name: edge + label: Edge Router + description: Network boundary with external networks. + color: "#bf7fbf" + - name: cpe + label: Customer Premise Equipment + description: Devices located at the customer's premises. + color: "#bf7f7f" + - name: spine + label: Spine Router + description: Aggregation router part of a Fabric. + color: "#aeeeee" + - name: leaf + label: Leaf Switch + description: Top of Rack part of a Fabric. + color: "#e6e6fa" + - name: tor + label: Tor Switch + description: Tor switch part of a Fabric. + color: "#e8e7fd" + + - name: Physical + namespace: Interface + label: Physical Interface + description: "Physical network port on a device" + inherit_from: + - DcimInterface + - InterfaceLayer2 + - InterfaceLayer3 + - DcimEndpoint + - InterfaceHasSubInterface + include_in_menu: false + attributes: + - name: mtu + label: MTU + kind: Number + default_value: 1500 + order_weight: 1300 + + - name: Virtual + namespace: Interface + label: Virtual Interface + description: "Virtual interface like VLAN or Loopback" + inherit_from: + - DcimInterface + - InterfaceLayer2 + - InterfaceLayer3 + # - InterfaceHasSubInterface # Depending if you want your virtual interfaces to have sub interface + include_in_menu: false + relationships: + - name: parent_interface + peer: InterfaceHasSubInterface + cardinality: one + kind: Attribute + identifier: "sub__interface" + description: "Parent interface to which this sub-interface belongs" diff --git a/version2/hosting_cluster.yml b/version2/hosting_cluster.yml new file mode 100644 index 0000000..350dcf9 --- /dev/null +++ b/version2/hosting_cluster.yml @@ -0,0 +1,68 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +nodes: + - name: Hosting + namespace: Cluster + label: Hosting Cluster + description: A cluster hosting virtual machines. + icon: mdi:dots-hexagon + menu_placement: VirtualizationVirtualMachine + inherit_from: + - ClusterGeneric + - VirtualizationHostVirtualMachine # Means we can get VM running on this one + - ClusterGenericComputeUnitNodes # Means it's built out of regular compute unit (e.g. server) + attributes: + - name: technology + label: Technology + kind: Dropdown + order_weight: 1200 + description: Underlying virtualisation or clustering technology. + choices: + - name: vmware + label: VMware vSphere + color: "#3d8600" + - name: kvm + label: KVM / QEMU + color: "#0082e2" + - name: hyper_v + label: Hyper-V + color: "#00adef" + - name: xen + label: Xen / XenServer + color: "#f5821f" + - name: nutanix + label: Nutanix AHV + color: "#024da1" + - name: openstack + label: OpenStack + color: "#ed1944" + - name: kubernetes + label: Kubernetes + color: "#326ce5" + - name: public_cloud + label: Public Cloud + color: "#888888" + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1300 + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: "#00d25b" + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: "#f0ad4e" + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: "#ff9800" + - name: drained + label: Drained + description: Temporarily taken out of service. + color: "#9e9e9e" diff --git a/version2/ipam.yml b/version2/ipam.yml new file mode 100644 index 0000000..c0ea867 --- /dev/null +++ b/version2/ipam.yml @@ -0,0 +1,159 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +generics: + - name: PrefixScope + namespace: Ipam + description: Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). + include_in_menu: false + relationships: + - name: prefixes + peer: IpamPrefix + identifier: prefix__prefix_scope + cardinality: many + optional: true + kind: Generic + +nodes: + - name: Prefix + namespace: Ipam + description: IPv4 or IPv6 network (with mask) + include_in_menu: false + icon: mdi:ip-network + label: Prefix + order_by: + - prefix__value + display_label: prefix__value + inherit_from: + - BuiltinIPPrefix + uniqueness_constraints: + - [prefix__value, ip_namespace] + human_friendly_id: + - ip_namespace__name__value + - prefix__value + attributes: + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1100 + choices: + - name: active + label: Active + color: "#00d25b" + - name: deprecated + label: Deprecated + color: "#e04040" + - name: reserved + label: Reserved + color: "#4d90fe" + - name: description + kind: Text + optional: true + order_weight: 1150 + - name: role + kind: Dropdown + optional: true + order_weight: 1200 + choices: + - name: management + label: Management + description: Out-of-band management network. + color: "#AEC6CF" + - name: link + label: Link + description: Point-to-point links between devices. + color: "#FDFD96" + - name: customer + label: Customer + description: Prefixes assigned to customers. + color: "#77DD77" + - name: supernet + label: Supernet + description: Aggregate covering multiple sub-prefixes. + color: "#CDB4DB" + - name: backbone + label: Backbone + description: Core network infrastructure prefixes. + color: "#AEC6CF" + relationships: + - name: scope + peer: IpamPrefixScope + optional: true + identifier: prefix__prefix_scope + cardinality: one + kind: Attribute + order_weight: 1300 + + - name: IPAddress + namespace: Ipam + description: IP Address + include_in_menu: false + label: IP Address + icon: mdi:ip + order_by: + - address__value + display_label: address__value + inherit_from: + - BuiltinIPAddress + uniqueness_constraints: + - [address__value, ip_namespace] + human_friendly_id: + - ip_namespace__name__value + - address__value + attributes: + - name: description + kind: Text + optional: true + order_weight: 1050 + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1100 + choices: + - name: active + label: Active + color: "#00d25b" + - name: reserved + label: Reserved + color: "#4d90fe" + - name: deprecated + label: Deprecated + color: "#e04040" + - name: role + kind: Dropdown + optional: true + order_weight: 1150 + choices: + - name: loopback + label: Loopback + color: "#B0A8B9" + - name: secondary + label: Secondary + color: "#AEC6CF" + - name: anycast + label: Anycast + color: "#FDFD96" + - name: fqdn + label: FQDN + kind: Text + optional: true + order_weight: 1200 + # https://stackoverflow.com/questions/11809631/fully-qualified-domain-name-validation + regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Date: Mon, 22 Jun 2026 18:47:18 +0200 Subject: [PATCH 02/30] feat: consolidate version 2 in base/extensions --- .metadata.yml | 17 ++ base/dcim.yml | 146 +++++-------- base/ipam.yml | 172 +++++++++------ base/location.yml | 23 +- base/organization.yml | 4 + extensions/aggregate/aggregate.yml | 62 ++++++ extensions/cable/cable.yml | 11 +- extensions/circuit/circuit.yml | 83 +++++--- .../circuit_contract/circuit_contract.yml | 2 + extensions/cluster/cluster.yml | 2 +- extensions/compute/compute.yml | 14 +- .../hosting_cluster/hosting_cluster.yml | 48 +++-- .../location_minimal/location_minimal.yml | 93 ++++----- extensions/qinq/qinq.yaml | 66 +++--- extensions/rack/rack.yml | 77 +++++++ extensions/vlan/vlan.yml | 86 +++++--- extensions/vrf/vrf.yml | 19 +- version2/menu.yml | 197 ------------------ 18 files changed, 578 insertions(+), 544 deletions(-) create mode 100644 extensions/aggregate/aggregate.yml create mode 100644 extensions/rack/rack.yml delete mode 100644 version2/menu.yml diff --git a/.metadata.yml b/.metadata.yml index 8b6cae7..a95a74a 100644 --- a/.metadata.yml +++ b/.metadata.yml @@ -109,6 +109,14 @@ experimental/vlan-translation: This schema extension is based on Juniper VLAN MAP, and not yet test out for other vendors. name: VLAN Translation +extensions/aggregate: + dependencies: + - base + description: + This schema extension contains models to capture IP aggregates assigned by + a Regional Internet Registry (RIR). It introduces an Aggregate node (top-level IPv4/IPv6 + prefix) and an RIR node (registry or private entity managing address space). + name: Aggregate extensions/cable: dependencies: - base @@ -253,6 +261,15 @@ extensions/physical_disk: NOTE: This extension is compatible with all sort of device. You can apply the generic "DeviceWithPhysicalDisks" to particular model to enable disks tracking. You might also link that schema to location for instance to capture spares. name: Physical Disk +extensions/rack: + dependencies: + - base + - extensions/location_minimal + description: + This schema extension introduces a Rack model representing a physical equipment + rack installed at a site. Racks can be placed at a LocationSite and can host devices + and other equipment. + name: Rack extensions/qinq: dependencies: - base diff --git a/base/dcim.yml b/base/dcim.yml index a35d6a9..4b939a1 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -23,10 +23,6 @@ generics: kind: Text optional: true order_weight: 2000 - - name: os_version - kind: Text - optional: true - order_weight: 2200 relationships: - name: interfaces peer: DcimInterface @@ -43,6 +39,7 @@ generics: - name: primary_address peer: IpamIPAddress label: Primary IP Address + identifier: device__primary_address optional: true cardinality: one kind: Attribute @@ -53,6 +50,7 @@ generics: cardinality: one kind: Attribute order_weight: 1250 + identifier: device__platform - name: PhysicalDevice namespace: Dcim @@ -97,6 +95,7 @@ generics: cardinality: one kind: Attribute order_weight: 1500 + identifier: physical_device__location - name: Endpoint namespace: Dcim @@ -109,6 +108,7 @@ generics: cardinality: one order_weight: 1500 kind: Attribute + identifier: connector__endpoint - name: Connector namespace: Dcim @@ -120,14 +120,16 @@ generics: optional: true cardinality: many order_weight: 1500 - kind: Generic + kind: Attribute + identifier: connector__endpoint - # Interfaces - name: Interface namespace: Dcim - description: "Generic Network Interface" + description: Generic Network Interface label: Interface - include_in_menu: false + icon: mdi:ethernet + include_in_menu: true + menu_placement: DcimDevice display_label: name__value order_by: - device__name__value @@ -147,78 +149,62 @@ generics: optional: true description: "A brief description of the interface" order_weight: 1100 - - name: mtu - label: MTU - kind: Number - default_value: 1514 - order_weight: 1300 - name: status kind: Dropdown description: "The status of the interface" + optional: false + default_value: "active" choices: - name: provisioning label: Provisioning description: "Interface is being provisioned." - color: "#A9DFBF" # light pastel green + color: "#f0ad4e" - name: free label: Free description: "Interface is unused." - color: "#CDEACC" # slightly darker pastel green + color: "#c8e6c9" - name: active label: Active description: "Interface is active and operational." - color: "#A9CCE3" # pastel blue + color: "#00d25b" - name: maintenance label: Maintenance description: "Interface is under maintenance." - color: "#FFF2CC" # pastel yellow + color: "#ff9800" - name: disabled label: Disabled description: "Interface has been disabled." - color: "#D3D3D3" # light grey - - name: deleted - label: Deleted - description: "Interface has been deleted." - color: "#FAD7A0" # pastel orange - - name: outage - label: Outage - description: "Interface is currently experiencing an outage." - color: "#F4CCCC" # pastel red - default_value: "active" + color: "#6c757d" order_weight: 1200 - name: role kind: Dropdown optional: true description: "The role of the interface in the network" choices: - - name: lag - label: Lag - description: "Interface LAG." - color: "#A9DFBF" # light pastel green - name: core label: Core Interface description: "Central part of the network." - color: "#A9CCE3" # pastel blue - - name: cust + color: "#A9CCE3" + - name: customer label: Customer Interface description: "Interface dedicated to customer connections." - color: "#D2B4DE" # pastel purple + color: "#D2B4DE" - name: access label: Access Interfaces description: "Interface connecting endpoint devices." - color: "#B4E0DC" # pastel teal + color: "#B4E0DC" - name: management label: Management Interface description: "Interface dedicated to device management." - color: "#E3DAC9" # pastel cream + color: "#E3DAC9" - name: peering label: Peering Interface description: "Interface dedicated to peering with other networks." - color: "#C4B7E6" # pastel purple + color: "#C4B7E6" - name: upstream label: Upstream Interface description: "Interface dedicated to upstream traffic between networks." - color: "#B2D4E6" # pastel sky blue + color: "#B2D4E6" order_weight: 1250 relationships: - name: device @@ -228,12 +214,6 @@ generics: cardinality: one kind: Parent order_weight: 1025 - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 3000 - name: Layer2 namespace: Interface @@ -241,6 +221,11 @@ generics: description: "Layer 2 specific attributes for network interfaces" label: "Layer 2 Interface" attributes: + - name: mac_address + label: MAC Address + kind: MacAddress + optional: true + order_weight: 1400 - name: l2_mode label: Layer2 Mode kind: Dropdown @@ -263,18 +248,6 @@ generics: include_in_menu: false description: "Layer 3 specific attributes for network interfaces" label: "Layer 3 Interface" - attributes: - - name: dot1q_id - label: VLAN ID (dot1q) - kind: Number - description: "Dot1Q VLAN ID" - order_weight: 1600 - optional: true - - name: mac_address - label: Mac Address - kind: Text - optional: true - order_weight: 1550 relationships: - name: ip_addresses label: IP Addresses @@ -301,20 +274,18 @@ generics: order_weight: 1750 nodes: - # -------------------- Device (Types, Platforms, Device, Interfaces ) -------------------- - name: DeviceType namespace: Dcim description: A model of device label: Device Type icon: mdi:poll + menu_placement: DcimDevice human_friendly_id: - name__value display_label: name__value order_by: - manufacturer__name__value - name__value - uniqueness_constraints: - - [manufacturer, name__value] attributes: - name: name kind: Text @@ -346,37 +317,26 @@ nodes: kind: Number order_weight: 1600 relationships: - - name: platform - peer: DcimPlatform - cardinality: one - kind: Attribute - order_weight: 1300 - name: manufacturer peer: OrganizationManufacturer cardinality: one kind: Attribute order_weight: 1250 optional: false - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 2000 + identifier: manufacturer__device_type - name: Platform namespace: Dcim description: A Platform represent the type of software running on a device. label: Platform icon: mdi:application-cog-outline + menu_placement: DcimDevice human_friendly_id: - name__value display_label: name__value order_by: - manufacturer__name__value - name__value - uniqueness_constraints: - - [name__value] attributes: - name: name kind: Text @@ -386,43 +346,26 @@ nodes: kind: Text optional: true order_weight: 1200 - - name: nornir_platform - kind: Text - optional: true - order_weight: 1500 - - name: napalm_driver - kind: Text - optional: true - order_weight: 1600 - - name: netmiko_device_type - kind: Text - optional: true - order_weight: 1700 - - name: ansible_network_os - kind: Text - optional: true - order_weight: 1800 - - name: containerlab_os - kind: Text - optional: true - order_weight: 1900 relationships: - name: devices peer: DcimGenericDevice optional: true cardinality: many + kind: Generic order_weight: 1350 + identifier: device__platform - name: manufacturer peer: OrganizationManufacturer cardinality: one kind: Attribute order_weight: 1300 + identifier: manufacturer__platform - name: Device label: Network Device - description: A configurable network device for managing and directing data traffic, including routers, switches... + description: A configurable network device including routers, switches... icon: clarity:network-switch-solid - # generate_template: true + generate_template: true namespace: Dcim inherit_from: - CoreArtifactTarget @@ -432,24 +375,25 @@ nodes: - name: status kind: Dropdown optional: false + default_value: active order_weight: 1100 choices: - name: active label: Active description: Fully operational and currently in service. - color: "#7fbf7f" + color: "#00d25b" - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: "#ffff7f" + color: "#f0ad4e" - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: "#ffd27f" + color: "#ff9800" - name: drained label: Drained description: Temporarily taken out of service. - color: "#bfbfbf" + color: "#9e9e9e" - name: role kind: Dropdown optional: true @@ -491,6 +435,12 @@ nodes: - DcimEndpoint - InterfaceHasSubInterface include_in_menu: false + attributes: + - name: mtu + label: MTU + kind: Number + default_value: 1500 + order_weight: 1300 - name: Virtual namespace: Interface diff --git a/base/ipam.yml b/base/ipam.yml index 0b3ef6e..6d21405 100644 --- a/base/ipam.yml +++ b/base/ipam.yml @@ -2,42 +2,32 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json version: "1.0" -nodes: - # -------------------- IPAM (Prefix, IP Address) -------------------- - - name: IPAddress +generics: + # Placeholder generics defined here so that inheritance can be declared in the base schema. + # Extensions cannot add inheritance to existing nodes, so these stubs let extensions override + # them without requiring users to modify their schema manually. + - name: VLANGroupScope namespace: Ipam - description: IP Address - label: IP Address - icon: mdi:ip include_in_menu: false - order_by: - - address__value - display_label: address__value - inherit_from: - - BuiltinIPAddress - uniqueness_constraints: - - [address__value, ip_namespace] - human_friendly_id: - - address__value - - ip_namespace__name__value - attributes: - - name: fqdn - label: FQDN - kind: Text - optional: true - # https://stackoverflow.com/questions/11809631/fully-qualified-domain-name-validation - regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Date: Mon, 22 Jun 2026 18:50:18 +0200 Subject: [PATCH 03/30] chore: remove temp folder --- version2/aggregate.yml | 62 ----- version2/cable.yml | 226 ----------------- version2/circuit.yml | 181 ------------- version2/circuit_contract.yml | 71 ------ version2/cluster.yml | 71 ------ version2/compute.yml | 102 -------- version2/dcim.yml | 461 ---------------------------------- version2/hosting_cluster.yml | 68 ----- version2/ipam.yml | 159 ------------ version2/lag.yml | 95 ------- version2/location.yml | 52 ---- version2/location_minimal.yml | 73 ------ version2/organization.yml | 64 ----- version2/qinq.yml | 38 --- version2/rack.yml | 77 ------ version2/vlan.yml | 157 ------------ 16 files changed, 1957 deletions(-) delete mode 100644 version2/aggregate.yml delete mode 100644 version2/cable.yml delete mode 100644 version2/circuit.yml delete mode 100644 version2/circuit_contract.yml delete mode 100644 version2/cluster.yml delete mode 100644 version2/compute.yml delete mode 100644 version2/dcim.yml delete mode 100644 version2/hosting_cluster.yml delete mode 100644 version2/ipam.yml delete mode 100644 version2/lag.yml delete mode 100644 version2/location.yml delete mode 100644 version2/location_minimal.yml delete mode 100644 version2/organization.yml delete mode 100644 version2/qinq.yml delete mode 100644 version2/rack.yml delete mode 100644 version2/vlan.yml diff --git a/version2/aggregate.yml b/version2/aggregate.yml deleted file mode 100644 index a0eb034..0000000 --- a/version2/aggregate.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -nodes: - - name: Aggregate - namespace: Ipam - description: An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. - label: Aggregate - icon: mdi:ip-network - menu_placement: OrganizationRIR - include_in_menu: true - order_by: - - prefix__value - display_label: prefix__value - human_friendly_id: - - prefix__value - inherit_from: - - BuiltinIPPrefix - attributes: - - name: description - kind: Text - optional: true - order_weight: 1100 - - name: date_added - label: Date Added - kind: DateTime - optional: true - order_weight: 1200 - relationships: - - name: rir - label: RIR - peer: OrganizationRIR - identifier: aggregate__rir - optional: false - cardinality: one - kind: Attribute - order_weight: 1000 - - - name: RIR - namespace: Organization - description: A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or a private entity managing private address space. - label: RIR - icon: mdi:certificate - include_in_menu: true - inherit_from: - - OrganizationGeneric - attributes: - - name: is_private - label: Private - description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. - kind: Boolean - default_value: false - order_weight: 1300 - relationships: - - name: aggregates - peer: IpamAggregate - identifier: aggregate__rir - optional: true - cardinality: many - kind: Generic - order_weight: 1400 diff --git a/version2/cable.yml b/version2/cable.yml deleted file mode 100644 index b5d2050..0000000 --- a/version2/cable.yml +++ /dev/null @@ -1,226 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -nodes: - - name: Cable - namespace: Dcim - description: Physical cable connecting two endpoints - label: Cable - icon: mdi:cable-data - display_label: label__value - menu_placement: DcimDevice - order_by: - - label__value - inherit_from: - - DcimConnector - attributes: - - name: status - kind: Dropdown - optional: false - default_value: connected - order_weight: 1000 - choices: - - name: connected - label: Connected - description: Fully operational and currently in connected - color: "#00d25b" - - name: planned - label: Planned - description: In the process of being set up - color: "#2196f3" - - name: cable_type - kind: Dropdown - optional: true - order_weight: 1100 - choices: - # Copper Cables - - name: cat3 - label: CAT3 - description: "Category 3 twisted pair cable." - color: "#99ccff" # Light Blue - - name: cat5 - label: CAT5 - description: "Category 5 twisted pair cable." - color: "#99ccff" # Light Blue - - name: cat5e - label: CAT5e - description: "Enhanced Category 5 cable." - color: "#99ccff" # Light Blue - - name: cat6 - label: CAT6 - description: "Category 6 twisted pair cable." - color: "#99ccff" # Light Blue - - name: cat6a - label: CAT6A - description: "Augmented Category 6 cable." - color: "#99ccff" # Light Blue - - name: cat7 - label: CAT7 - description: "Category 7 twisted pair cable." - color: "#99ccff" # Light Blue - - name: cat7a - label: CAT7A - description: "Augmented Category 7 cable." - color: "#99ccff" # Light Blue - - name: cat8 - label: CAT8 - description: "Category 8 twisted pair cable." - color: "#99ccff" # Light Blue - - # Fiber Cables (Multi-mode) - - name: mmf-om1 - label: Multimode Fiber OM1 - description: "Multimode fiber (62.5/125 µm)." - color: "#ff9933" # Dark Orange - - name: mmf-om2 - label: Multimode Fiber OM2 - description: "Multimode fiber (50/125 µm)." - color: "#ff9933" # Dark Orange - - name: mmf-om3 - label: Multimode Fiber OM3 - description: "Optimized multimode fiber (50/125 µm)." - color: "#ff9933" # Dark Orange - - name: mmf-om4 - label: Multimode Fiber OM4 - description: "Enhanced multimode fiber (50/125 µm)." - color: "#ff9933" # Dark Orange - - name: mmf-om5 - label: Multimode Fiber OM5 - description: "Wideband multimode fiber (50/125 µm)." - color: "#ff9933" # Dark Orange - - # Fiber Cables (Single-mode) - - name: smf-os1 - label: Singlemode Fiber OS1 - description: "Standard singlemode fiber." - color: "#ffcc00" # Yellow - - name: smf-os2 - label: Singlemode Fiber OS2 - description: "Improved singlemode fiber." - color: "#ffcc00" # Yellow - - # Direct Attach and Active Optical Cables - - name: dac-passive - label: Passive DAC - description: "Direct Attach Copper (Passive)." - color: "#a0a0a0" # Grey - - name: dac-active - label: Active DAC - description: "Direct Attach Copper (Active)." - color: "#a0a0a0" # Grey - - name: aoc - label: Active Optical Cable - description: "Active Optical Cable." - color: "#a0a0a0" # Grey - - # Special Cables - - name: coaxial - label: Coaxial - description: "Coaxial cable for broadband." - color: "#000000" # Black - - name: mrj21-trunk - label: MRJ21 Trunk - description: "High-density copper cable." - color: "#000000" # Black - - name: power - label: Power - description: "Power cables for electrical connections." - color: "#000000" # Black - - name: usb - label: USB - description: "Universal Serial Bus cable." - color: "#000000" # Black - - name: color - kind: Dropdown - optional: true - order_weight: 1300 - choices: - - name: dark-red - label: Dark Red - color: "#aa1409" - - name: red - label: Red - color: "#f44336" - - name: pink - label: Pink - color: "#e91e63" - - name: rose - label: Rose - color: "#ffe4e1" - - name: fuchsia - label: Fuchsia - color: "#ff66ff" - - name: purple - label: Purple - color: "#9c27b0" - - name: dark-purple - label: Dark Purple - color: "#673ab7" - - name: indigo - label: Indigo - color: "#3f51b5" - - name: blue - label: Blue - color: "#2196f3" - - name: light-blue - label: Light Blue - color: "#03a9f4" - - name: cyan - label: Cyan - color: "#00bcd4" - - name: teal - label: Teal - color: "#009688" - - name: aqua - label: Aqua - color: "#00ffff" - - name: dark-green - label: Dark Green - color: "#2f6a31" - - name: green - label: Green - color: "#4caf50" - - name: light-green - label: Light Green - color: "#8bc34a" - - name: lime - label: Lime - color: "#cddc39" - - name: yellow - label: Yellow - color: "#ffeb3b" - - name: amber - label: Amber - color: "#ffc107" - - name: orange - label: Orange - color: "#ff9800" - - name: dark-orange - label: Dark Orange - color: "#ff5722" - - name: brown - label: Brown - color: "#795548" - - name: light-grey - label: Light Grey - color: "#c0c0c0" - - name: grey - label: Grey - color: "#9e9e9e" - - name: dark-grey - label: Dark Grey - color: "#607d8b" - - name: black - label: Black - color: "#111111" - - name: label - kind: Text - optional: true - order_weight: 1200 - # As we can't put float in Number "forcing" length in cm - - name: length - label: Length (in cm) - kind: Number - optional: true - order_weight: 1350 diff --git a/version2/circuit.yml b/version2/circuit.yml deleted file mode 100644 index 6613a8c..0000000 --- a/version2/circuit.yml +++ /dev/null @@ -1,181 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -nodes: - # TODO: Maybe create a generic, we would have colored circuits, cross co, for instance - - name: Circuit - namespace: Dcim - description: A Circuit represent service operated by a provider. - label: Circuit - icon: mdi:cable-data - human_friendly_id: - - circuit_id__value - order_by: - - circuit_id__value - display_label: circuit_id__value - attributes: - - name: circuit_id - kind: Text - unique: true - - name: description - kind: Text - optional: true - - name: commit_rate - label: Commit Rate (Kbps) - kind: Number - optional: true - order_weight: 1100 - - name: circuit_type - kind: Dropdown - description: Specifies the type of circuit. - choices: - - name: internet_access - label: Internet Access - description: Broadband or dedicated internet access circuit. - color: "#1e90ff" - - name: point_to_point - label: Point to Point - description: Dedicated layer 2 or layer 3 link between two sites. - color: "#a0c878" - - name: peering - label: Peering - description: Connection to another network for exchange of traffic. - color: "#20b2aa" - - name: dark_fiber - label: Dark Fiber - description: Leased, unlit fiber managed and operated by the customer. - color: "#555555" - - name: mpls - label: MPLS - description: Multi-Protocol Label Switching circuit for QoS-based routing. - color: "#7f00ff" - - name: status - kind: Dropdown - optional: false - default_value: active - choices: - - name: active - label: Active - description: Fully operational and currently in service. - color: "#00d25b" - - name: provisioning - label: Provisioning - description: In the process of being set up and configured. - color: "#f0ad4e" - - name: maintenance - label: Maintenance - description: Undergoing routine maintenance or repairs. - color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" - relationships: - - name: provider - peer: OrganizationProvider - optional: false - cardinality: one - kind: Attribute - identifier: circuit__provider - - name: endpoints - peer: DcimCircuitEndpoint - optional: true - cardinality: many - kind: Component - identifier: circuit__endpoint - - - name: CircuitEndpoint - namespace: Dcim - description: A circuit endpoint, could be a position in a MMR... - label: Circuit Endpoint - inherit_from: - - DcimEndpoint - icon: mdi:ethernet - menu_placement: DcimCircuit - human_friendly_id: - - circuit__circuit_id__value - - name__value - uniqueness_constraints: - - [circuit, side__value] - order_by: - - name__value - display_label: name__value - attributes: - - name: side - label: Side - kind: Dropdown - optional: false - order_weight: 950 - choices: - - name: a - label: A - description: A-side of the circuit. - - name: z - label: Z - description: Z-side of the circuit. - - name: name - kind: Text - computed_attribute: - kind: Jinja2 - jinja2_template: "{{ circuit__circuit_id__value }}_{{ side__value | upper }}" - read_only: true - optional: false - order_weight: 1000 - - name: status - kind: Dropdown - optional: false - default_value: active - choices: - - name: active - label: Active - description: Fully operational and currently in service. - color: "#00d25b" - - name: provisioning - label: Provisioning - description: In the process of being set up and configured. - color: "#f0ad4e" - - name: maintenance - label: Maintenance - description: Undergoing routine maintenance or repairs. - color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" - - name: description - kind: Text - optional: true - relationships: - - name: circuit - peer: DcimCircuit - order_weight: 900 - optional: false - cardinality: one - kind: Parent - identifier: circuit__endpoint - - name: location - label: Location - peer: LocationHosting - optional: false - cardinality: one - kind: Attribute - order_weight: 1500 - identifier: circuit_endpoint__location - -extensions: - nodes: - - kind: OrganizationProvider - relationships: - - name: circuits - peer: DcimCircuit - cardinality: many - optional: true - identifier: circuit__provider - - kind: LocationHosting - relationships: - - name: circuit_endpoints - peer: DcimCircuitEndpoint - cardinality: many - optional: true - identifier: circuit_endpoint__location diff --git a/version2/circuit_contract.yml b/version2/circuit_contract.yml deleted file mode 100644 index 18d64d0..0000000 --- a/version2/circuit_contract.yml +++ /dev/null @@ -1,71 +0,0 @@ -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json ---- -version: "1.0" -nodes: - - name: CircuitContract - namespace: Dcim - inherit_from: - - CoreFileObject - description: A contract document associated with a circuit service, including terms, costs, and validity period. - label: Circuit Contract - icon: mdi:file-sign - menu_placement: DcimCircuit - human_friendly_id: - - name__value - order_by: - - contract_end__value - display_label: "Contract (Circuit `{{ circuit__circuit_id__value }}`)" - attributes: - - name: name - kind: Text - computed_attribute: - kind: Jinja2 - jinja2_template: "contract_{{ circuit__circuit_id__value }}" - read_only: true # You must set the attribute to read-only as the value will be handled by the system - optional: false # As it's a Jinja2 kind of attribute you can make it mandatory - - name: contract_start - kind: DateTime - optional: false - - name: contract_end - kind: DateTime - optional: false - - name: monthly_cost - kind: Number - optional: true - - name: currency - kind: Dropdown - optional: true - choices: - - name: usd - label: USD - description: United States Dollar - - name: eur - label: EUR - description: Euro - - name: gbp - label: GBP - description: British Pound Sterling - relationships: - # Example of a relationship to capture the account that signed the contract - # - name: signed_by - # peer: CoreAccount - # kind: Attribute - # cardinality: one - # optional: true - - name: circuit - peer: DcimCircuit - kind: Attribute - cardinality: one - optional: false - order_weight: 950 - identifier: circuit__contract - -extensions: - nodes: - - kind: DcimCircuit - relationships: - - name: contract - peer: DcimCircuitContract - cardinality: one - optional: true - identifier: circuit__contract diff --git a/version2/cluster.yml b/version2/cluster.yml deleted file mode 100644 index 8ae6f8d..0000000 --- a/version2/cluster.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -generics: - - name: Generic - namespace: Cluster - description: A cluster of machines hosting services or other machines. - icon: mdi:dots-hexagon - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: name__value - attributes: - - name: name - kind: Text - description: Name of the cluster. - unique: true - order_weight: 1000 - - name: description - kind: Text - optional: true - relationships: - - name: location - label: Location - peer: LocationGeneric - optional: false - cardinality: many - kind: Attribute - order_weight: 1400 - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 2000 - - - name: GenericComputeUnitNodes - namespace: Cluster - description: A generic to apply on clusters that can be built out of generic compute units. - include_in_menu: false - relationships: - - name: nodes - label: Nodes - identifier: worker_in_cluster - cardinality: many - peer: ComputeGenericUnit - kind: Component - -extensions: - nodes: - - kind: ComputeGenericUnit - relationships: - - name: worker_in_cluster - identifier: worker_in_cluster - label: Worker in cluster - peer: ClusterGenericComputeUnitNodes - cardinality: one - description: This device is a worker node of the specified cluster. - optional: true - - kind: LocationGeneric - relationships: - - name: clusters - label: Clusters - peer: ClusterGeneric - cardinality: many - kind: Component - description: All clusters available on that location. - optional: true diff --git a/version2/compute.yml b/version2/compute.yml deleted file mode 100644 index 7093b98..0000000 --- a/version2/compute.yml +++ /dev/null @@ -1,102 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -generics: - - name: GenericUnit - namespace: Compute - description: A generic unit that can compute (e.g. server, vm ...). - include_in_menu: false - - - name: HostVirtualMachine - namespace: Virtualization - description: A generic unit that can host VM - include_in_menu: false - relationships: - - name: virtual_machines - cardinality: many - peer: VirtualizationVirtualMachine - kind: Component - optional: true - identifier: host__virtual_machine - -nodes: - - name: PhysicalServer - namespace: Compute - description: A physical server with fixed resources and specific hardware characteristics. - label: Physical Server - icon: mdi:server - menu_placement: DcimDevice - inherit_from: - - ComputeGenericUnit - - DcimGenericDevice - - DcimPhysicalDevice - # If you don't want to have VM running directly on your physical server you can comment out the following line - - VirtualizationHostVirtualMachine - attributes: - - name: status - kind: Dropdown - optional: false - default_value: active - order_weight: 1100 - choices: - - name: active - label: Active - description: Fully operational and currently in service. - color: "#00d25b" - - name: provisioning - label: Provisioning - description: In the process of being set up and configured. - color: "#f0ad4e" - - name: maintenance - label: Maintenance - description: Undergoing routine maintenance or repairs. - color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" - - - name: VirtualMachine - namespace: Virtualization - description: A virtual machine hosted on a server or a cluster. - label: Virtual Machine - icon: carbon:virtual-machine - include_in_menu: true - inherit_from: - - ComputeGenericUnit - - DcimGenericDevice - attributes: - - name: role - kind: Dropdown - optional: true - description: Role of the virtual machine. - order_weight: 1400 - choices: - - name: application - color: "#7f7fff" - - name: storage - color: "#bf7fbf" - - name: vcpu - kind: Number - optional: true - order_weight: 1900 - description: Number of CPU cores assigned to the VM. - - name: memory - kind: Number - optional: true - order_weight: 1900 - description: Amount of memory (in GB) assigned to the VM. - - name: disk - kind: Number - optional: true - order_weight: 1900 - description: Disk space (in GB) assigned to the VM. - relationships: - - name: host - peer: VirtualizationHostVirtualMachine - optional: false - cardinality: one - kind: Attribute - order_weight: 1500 - identifier: host__virtual_machine diff --git a/version2/dcim.yml b/version2/dcim.yml deleted file mode 100644 index 4b939a1..0000000 --- a/version2/dcim.yml +++ /dev/null @@ -1,461 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -generics: - - name: GenericDevice - namespace: Dcim - description: Generic Device object. - label: Device - icon: mdi:server - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: name__value - attributes: - - name: name - kind: Text - unique: true - order_weight: 1000 - - name: description - kind: Text - optional: true - order_weight: 2000 - relationships: - - name: interfaces - peer: DcimInterface - optional: true - cardinality: many - identifier: device__interface - kind: Component - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 2000 - - name: primary_address - peer: IpamIPAddress - label: Primary IP Address - identifier: device__primary_address - optional: true - cardinality: one - kind: Attribute - order_weight: 1700 - - name: platform - peer: DcimPlatform - optional: true - cardinality: one - kind: Attribute - order_weight: 1250 - identifier: device__platform - - - name: PhysicalDevice - namespace: Dcim - description: Generic holding attributes and relationships relevant for physical device. - include_in_menu: false - attributes: - - name: position - label: Position (U) - description: Lowest unit. - kind: Number - optional: true - order_weight: 1500 - - name: serial - kind: Text - optional: true - order_weight: 1500 - - name: rack_face - label: Rack Face - description: On which face of the rack the device is mounted. - kind: Dropdown - optional: false - default_value: front - order_weight: 1515 - choices: - - name: front - label: Front - description: Device mounted on the front face of the rack. - - name: rear - label: Rear - description: Device mounted on the rear face of the rack. - relationships: - - name: device_type - peer: DcimDeviceType - optional: true - cardinality: one - kind: Attribute - order_weight: 1200 - - name: location - label: Location - peer: LocationHosting - optional: false - cardinality: one - kind: Attribute - order_weight: 1500 - identifier: physical_device__location - - - name: Endpoint - namespace: Dcim - description: Generic Endpoint to receive a connector. - include_in_menu: false - relationships: - - name: connector - peer: DcimConnector - optional: true - cardinality: one - order_weight: 1500 - kind: Attribute - identifier: connector__endpoint - - - name: Connector - namespace: Dcim - description: Generic Connector to link two endpoints together. - include_in_menu: false - relationships: - - name: connected_endpoints - peer: DcimEndpoint - optional: true - cardinality: many - order_weight: 1500 - kind: Attribute - identifier: connector__endpoint - - - name: Interface - namespace: Dcim - description: Generic Network Interface - label: Interface - icon: mdi:ethernet - include_in_menu: true - menu_placement: DcimDevice - display_label: name__value - order_by: - - device__name__value - - name__value - uniqueness_constraints: - - [device, name__value] - human_friendly_id: - - device__name__value - - name__value - attributes: - - name: name - kind: Text - description: "Name of the interface" - order_weight: 1000 - - name: description - kind: Text - optional: true - description: "A brief description of the interface" - order_weight: 1100 - - name: status - kind: Dropdown - description: "The status of the interface" - optional: false - default_value: "active" - choices: - - name: provisioning - label: Provisioning - description: "Interface is being provisioned." - color: "#f0ad4e" - - name: free - label: Free - description: "Interface is unused." - color: "#c8e6c9" - - name: active - label: Active - description: "Interface is active and operational." - color: "#00d25b" - - name: maintenance - label: Maintenance - description: "Interface is under maintenance." - color: "#ff9800" - - name: disabled - label: Disabled - description: "Interface has been disabled." - color: "#6c757d" - order_weight: 1200 - - name: role - kind: Dropdown - optional: true - description: "The role of the interface in the network" - choices: - - name: core - label: Core Interface - description: "Central part of the network." - color: "#A9CCE3" - - name: customer - label: Customer Interface - description: "Interface dedicated to customer connections." - color: "#D2B4DE" - - name: access - label: Access Interfaces - description: "Interface connecting endpoint devices." - color: "#B4E0DC" - - name: management - label: Management Interface - description: "Interface dedicated to device management." - color: "#E3DAC9" - - name: peering - label: Peering Interface - description: "Interface dedicated to peering with other networks." - color: "#C4B7E6" - - name: upstream - label: Upstream Interface - description: "Interface dedicated to upstream traffic between networks." - color: "#B2D4E6" - order_weight: 1250 - relationships: - - name: device - peer: DcimGenericDevice - identifier: device__interface - optional: false - cardinality: one - kind: Parent - order_weight: 1025 - - - name: Layer2 - namespace: Interface - include_in_menu: false - description: "Layer 2 specific attributes for network interfaces" - label: "Layer 2 Interface" - attributes: - - name: mac_address - label: MAC Address - kind: MacAddress - optional: true - order_weight: 1400 - - name: l2_mode - label: Layer2 Mode - kind: Dropdown - optional: true - choices: - - name: access - label: Access - description: "Access mode" - - name: trunk - label: Trunk - description: "Trunk mode" - - name: trunk_all - label: Trunk (All) - description: "Trunk all mode" - description: "Layer 2 mode of the interface" - order_weight: 1500 - - - name: Layer3 - namespace: Interface - include_in_menu: false - description: "Layer 3 specific attributes for network interfaces" - label: "Layer 3 Interface" - relationships: - - name: ip_addresses - label: IP Addresses - peer: IpamIPAddress - cardinality: many - kind: Attribute - optional: true - description: "List of IP addresses associated with the interface" - order_weight: 1150 - - - name: HasSubInterface - namespace: Interface - description: A generic interface that can have sub-interfaces - include_in_menu: false - relationships: - - name: sub_interfaces - label: "Sub-interface(s)" - peer: InterfaceVirtual - identifier: "sub__interface" - optional: true - cardinality: many - kind: Attribute - description: "Sub-interfaces of this interface" - order_weight: 1750 - -nodes: - - name: DeviceType - namespace: Dcim - description: A model of device - label: Device Type - icon: mdi:poll - menu_placement: DcimDevice - human_friendly_id: - - name__value - display_label: name__value - order_by: - - manufacturer__name__value - - name__value - attributes: - - name: name - kind: Text - unique: true - order_weight: 1000 - - name: description - kind: Text - optional: true - order_weight: 1100 - - name: part_number - label: Part Number - optional: true - kind: Text - order_weight: 1200 - - name: height - label: Height (U) - optional: false - default_value: 1 - kind: Number - order_weight: 1400 - - name: full_depth - label: Full Depth - default_value: true - kind: Boolean - order_weight: 1500 - - name: weight - label: Weight (kg) - optional: true - kind: Number - order_weight: 1600 - relationships: - - name: manufacturer - peer: OrganizationManufacturer - cardinality: one - kind: Attribute - order_weight: 1250 - optional: false - identifier: manufacturer__device_type - - - name: Platform - namespace: Dcim - description: A Platform represent the type of software running on a device. - label: Platform - icon: mdi:application-cog-outline - menu_placement: DcimDevice - human_friendly_id: - - name__value - display_label: name__value - order_by: - - manufacturer__name__value - - name__value - attributes: - - name: name - kind: Text - unique: true - order_weight: 1000 - - name: description - kind: Text - optional: true - order_weight: 1200 - relationships: - - name: devices - peer: DcimGenericDevice - optional: true - cardinality: many - kind: Generic - order_weight: 1350 - identifier: device__platform - - name: manufacturer - peer: OrganizationManufacturer - cardinality: one - kind: Attribute - order_weight: 1300 - identifier: manufacturer__platform - - - name: Device - label: Network Device - description: A configurable network device including routers, switches... - icon: clarity:network-switch-solid - generate_template: true - namespace: Dcim - inherit_from: - - CoreArtifactTarget - - DcimGenericDevice - - DcimPhysicalDevice - attributes: - - name: status - kind: Dropdown - optional: false - default_value: active - order_weight: 1100 - choices: - - name: active - label: Active - description: Fully operational and currently in service. - color: "#00d25b" - - name: provisioning - label: Provisioning - description: In the process of being set up and configured. - color: "#f0ad4e" - - name: maintenance - label: Maintenance - description: Undergoing routine maintenance or repairs. - color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" - - name: role - kind: Dropdown - optional: true - order_weight: 1400 - choices: - - name: core - label: Core Router - description: Central part of the network. - color: "#7f7fff" - - name: edge - label: Edge Router - description: Network boundary with external networks. - color: "#bf7fbf" - - name: cpe - label: Customer Premise Equipment - description: Devices located at the customer's premises. - color: "#bf7f7f" - - name: spine - label: Spine Router - description: Aggregation router part of a Fabric. - color: "#aeeeee" - - name: leaf - label: Leaf Switch - description: Top of Rack part of a Fabric. - color: "#e6e6fa" - - name: tor - label: Tor Switch - description: Tor switch part of a Fabric. - color: "#e8e7fd" - - - name: Physical - namespace: Interface - label: Physical Interface - description: "Physical network port on a device" - inherit_from: - - DcimInterface - - InterfaceLayer2 - - InterfaceLayer3 - - DcimEndpoint - - InterfaceHasSubInterface - include_in_menu: false - attributes: - - name: mtu - label: MTU - kind: Number - default_value: 1500 - order_weight: 1300 - - - name: Virtual - namespace: Interface - label: Virtual Interface - description: "Virtual interface like VLAN or Loopback" - inherit_from: - - DcimInterface - - InterfaceLayer2 - - InterfaceLayer3 - # - InterfaceHasSubInterface # Depending if you want your virtual interfaces to have sub interface - include_in_menu: false - relationships: - - name: parent_interface - peer: InterfaceHasSubInterface - cardinality: one - kind: Attribute - identifier: "sub__interface" - description: "Parent interface to which this sub-interface belongs" diff --git a/version2/hosting_cluster.yml b/version2/hosting_cluster.yml deleted file mode 100644 index 350dcf9..0000000 --- a/version2/hosting_cluster.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -nodes: - - name: Hosting - namespace: Cluster - label: Hosting Cluster - description: A cluster hosting virtual machines. - icon: mdi:dots-hexagon - menu_placement: VirtualizationVirtualMachine - inherit_from: - - ClusterGeneric - - VirtualizationHostVirtualMachine # Means we can get VM running on this one - - ClusterGenericComputeUnitNodes # Means it's built out of regular compute unit (e.g. server) - attributes: - - name: technology - label: Technology - kind: Dropdown - order_weight: 1200 - description: Underlying virtualisation or clustering technology. - choices: - - name: vmware - label: VMware vSphere - color: "#3d8600" - - name: kvm - label: KVM / QEMU - color: "#0082e2" - - name: hyper_v - label: Hyper-V - color: "#00adef" - - name: xen - label: Xen / XenServer - color: "#f5821f" - - name: nutanix - label: Nutanix AHV - color: "#024da1" - - name: openstack - label: OpenStack - color: "#ed1944" - - name: kubernetes - label: Kubernetes - color: "#326ce5" - - name: public_cloud - label: Public Cloud - color: "#888888" - - name: status - kind: Dropdown - optional: false - default_value: active - order_weight: 1300 - choices: - - name: active - label: Active - description: Fully operational and currently in service. - color: "#00d25b" - - name: provisioning - label: Provisioning - description: In the process of being set up and configured. - color: "#f0ad4e" - - name: maintenance - label: Maintenance - description: Undergoing routine maintenance or repairs. - color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" diff --git a/version2/ipam.yml b/version2/ipam.yml deleted file mode 100644 index c0ea867..0000000 --- a/version2/ipam.yml +++ /dev/null @@ -1,159 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -version: "1.0" - -generics: - - name: PrefixScope - namespace: Ipam - description: Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). - include_in_menu: false - relationships: - - name: prefixes - peer: IpamPrefix - identifier: prefix__prefix_scope - cardinality: many - optional: true - kind: Generic - -nodes: - - name: Prefix - namespace: Ipam - description: IPv4 or IPv6 network (with mask) - include_in_menu: false - icon: mdi:ip-network - label: Prefix - order_by: - - prefix__value - display_label: prefix__value - inherit_from: - - BuiltinIPPrefix - uniqueness_constraints: - - [prefix__value, ip_namespace] - human_friendly_id: - - ip_namespace__name__value - - prefix__value - attributes: - - name: status - kind: Dropdown - optional: false - default_value: active - order_weight: 1100 - choices: - - name: active - label: Active - color: "#00d25b" - - name: deprecated - label: Deprecated - color: "#e04040" - - name: reserved - label: Reserved - color: "#4d90fe" - - name: description - kind: Text - optional: true - order_weight: 1150 - - name: role - kind: Dropdown - optional: true - order_weight: 1200 - choices: - - name: management - label: Management - description: Out-of-band management network. - color: "#AEC6CF" - - name: link - label: Link - description: Point-to-point links between devices. - color: "#FDFD96" - - name: customer - label: Customer - description: Prefixes assigned to customers. - color: "#77DD77" - - name: supernet - label: Supernet - description: Aggregate covering multiple sub-prefixes. - color: "#CDB4DB" - - name: backbone - label: Backbone - description: Core network infrastructure prefixes. - color: "#AEC6CF" - relationships: - - name: scope - peer: IpamPrefixScope - optional: true - identifier: prefix__prefix_scope - cardinality: one - kind: Attribute - order_weight: 1300 - - - name: IPAddress - namespace: Ipam - description: IP Address - include_in_menu: false - label: IP Address - icon: mdi:ip - order_by: - - address__value - display_label: address__value - inherit_from: - - BuiltinIPAddress - uniqueness_constraints: - - [address__value, ip_namespace] - human_friendly_id: - - ip_namespace__name__value - - address__value - attributes: - - name: description - kind: Text - optional: true - order_weight: 1050 - - name: status - kind: Dropdown - optional: false - default_value: active - order_weight: 1100 - choices: - - name: active - label: Active - color: "#00d25b" - - name: reserved - label: Reserved - color: "#4d90fe" - - name: deprecated - label: Deprecated - color: "#e04040" - - name: role - kind: Dropdown - optional: true - order_weight: 1150 - choices: - - name: loopback - label: Loopback - color: "#B0A8B9" - - name: secondary - label: Secondary - color: "#AEC6CF" - - name: anycast - label: Anycast - color: "#FDFD96" - - name: fqdn - label: FQDN - kind: Text - optional: true - order_weight: 1200 - # https://stackoverflow.com/questions/11809631/fully-qualified-domain-name-validation - regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Date: Mon, 22 Jun 2026 18:50:40 +0200 Subject: [PATCH 04/30] feat: add temp invoke command --- tasks/schemas.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tasks/schemas.py b/tasks/schemas.py index 9388234..7685071 100644 --- a/tasks/schemas.py +++ b/tasks/schemas.py @@ -95,3 +95,25 @@ def load_all_schemas(context: Context) -> None: _load_extension(context, Path(extension)) print("All good! ✨") + + +# TEMPORARY DEMO TASK - load IPAM + DCIM +@task +def load_demo_ipam_dcim(context: Context) -> None: + """[DEMO] Load IPAM + DCIM base schemas and a handful of common extensions.""" + schemas_to_load = [ + "base", + "extensions/aggregate", + "extensions/cable", + "extensions/circuit", + "extensions/compute", + "extensions/cluster", + "extensions/hosting_cluster", + "extensions/lag", + "extensions/location_minimal", + "extensions/vlan", + "extensions/qinq", + "extensions/rack", + ] + for path in schemas_to_load: + _load_extension(context, Path(path)) From 1be54f2fef2868fab52fd18cf3e88a51eb512aa1 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 22 Jun 2026 19:04:28 +0200 Subject: [PATCH 05/30] fix: remove IP range reference --- extensions/vrf/vrf.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index fd6801a..ccf40d0 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -98,12 +98,3 @@ extensions: cardinality: one kind: Attribute order_weight: 1150 - - kind: IpamIPRange - relationships: - - name: vrf - label: VRF - peer: IpamVRF - optional: true - cardinality: one - kind: Attribute - order_weight: 1150 From 009d0dd6c5f3d431d6da3e68fef7a69cd42e82fe Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 22 Jun 2026 19:12:31 +0200 Subject: [PATCH 06/30] fix: yaml lint error --- extensions/aggregate/aggregate.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/aggregate/aggregate.yml b/extensions/aggregate/aggregate.yml index a0eb034..ddff7c0 100644 --- a/extensions/aggregate/aggregate.yml +++ b/extensions/aggregate/aggregate.yml @@ -39,7 +39,9 @@ nodes: - name: RIR namespace: Organization - description: A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or a private entity managing private address space. + description: >- + A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or a private + entity managing private address space. label: RIR icon: mdi:certificate include_in_menu: true From fd308951d7ae1076ea3eacc6520957ff6aa69a65 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 23 Jun 2026 16:15:36 +0200 Subject: [PATCH 07/30] fix: cleanup relationship and comment namespace --- extensions/vrf/vrf.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index ccf40d0..7b90763 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -33,11 +33,14 @@ nodes: optional: true order_weight: 1200 relationships: - - name: namespace - peer: BuiltinIPNamespace - optional: false - cardinality: one - kind: Attribute + # TODO: Perhaps add namespace here at some point? + # Perhaps would make sense to have multiple flavors of namespace? + # - name: namespace + # peer: BuiltinIPNamespace + # identifier: vrf__namespace + # optional: true + # cardinality: one + # kind: Attribute - name: import_rt identifier: vrf__import label: Import Targets @@ -75,6 +78,7 @@ nodes: relationships: - name: vrf peer: IpamVRF + identifier: vrf__route_target optional: true cardinality: many @@ -85,6 +89,7 @@ extensions: - name: vrf label: VRF peer: IpamVRF + identifier: prefix__vrf optional: true cardinality: one kind: Attribute @@ -94,6 +99,7 @@ extensions: - name: vrf label: VRF peer: IpamVRF + identifier: ip_address__vrf optional: true cardinality: one kind: Attribute From a7517110c622027dd49596d355d441d36fcfe3a1 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 23 Jun 2026 17:25:35 +0200 Subject: [PATCH 08/30] chore: cleanup DWDM --- extensions/dwdm/dwdm.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index 90e37ff..256107f 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -18,6 +18,7 @@ generics: order_weight: 2000 - name: connector_type kind: Dropdown + optional: true order_weight: 1100 choices: - name: FC @@ -128,7 +129,7 @@ nodes: - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -147,13 +148,13 @@ nodes: relationships: - name: front_interfaces peer: DcimOadmFrontInterface - identifier: front_interfaces + identifier: optical_multiplexer__front_interfaces optional: true cardinality: many kind: Component - name: rear_interface peer: DcimOadmRearInterface - identifier: rear_interfaces + identifier: optical_multiplexer__rear_interface optional: true cardinality: one kind: Component @@ -178,12 +179,13 @@ nodes: - name: optical_multiplexer peer: DcimOpticalMultiplexer order_weight: 900 - identifier: front_interfaces + identifier: optical_multiplexer__front_interfaces optional: false cardinality: one kind: Parent - name: channels peer: DcimWdmChannel + identifier: oadm_interface__channels order_weight: 1200 optional: true cardinality: many @@ -209,7 +211,7 @@ nodes: - name: optical_multiplexer peer: DcimOpticalMultiplexer order_weight: 900 - identifier: rear_interface + identifier: optical_multiplexer__rear_interface optional: false cardinality: one kind: Parent @@ -236,10 +238,11 @@ nodes: - name: channel kind: Number description: WDM channel number. + order_weight: 1000 - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -255,10 +258,12 @@ nodes: label: Wavelength (nm) kind: Text # Text until float possible in Number Kind description: Wavelength of the channel in nm. + order_weight: 1200 - name: frequency label: Frequency (GHz) kind: Text # Text until float possible in Number Kind description: Frequency of the channel in GHz. + order_weight: 1300 - name: WdmSFP namespace: Dcim @@ -272,7 +277,7 @@ nodes: - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -288,6 +293,7 @@ nodes: - name: wdm_channel label: WDM Channel peer: DcimWdmChannel + identifier: wdm_sfp__channel kind: Attribute cardinality: one optional: false From bbd501c89a283968b48dce1f1f9d505bca3974b7 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 23 Jun 2026 17:27:45 +0200 Subject: [PATCH 09/30] add vrf to demo schema --- tasks/schemas.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/schemas.py b/tasks/schemas.py index 7685071..7944094 100644 --- a/tasks/schemas.py +++ b/tasks/schemas.py @@ -114,6 +114,7 @@ def load_demo_ipam_dcim(context: Context) -> None: "extensions/vlan", "extensions/qinq", "extensions/rack", + "extensions/rack", ] for path in schemas_to_load: _load_extension(context, Path(path)) From ab2df5af24b1243efdd4dea5e901ced6f265e95d Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 23 Jun 2026 17:28:36 +0200 Subject: [PATCH 10/30] fix schema demo command --- tasks/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/schemas.py b/tasks/schemas.py index 7944094..27f18cb 100644 --- a/tasks/schemas.py +++ b/tasks/schemas.py @@ -114,7 +114,7 @@ def load_demo_ipam_dcim(context: Context) -> None: "extensions/vlan", "extensions/qinq", "extensions/rack", - "extensions/rack", + "extensions/vrf", ] for path in schemas_to_load: _load_extension(context, Path(path)) From 58af5a28135fa77b272de228c01150a3fd574f1c Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 7 Jul 2026 13:53:01 +0200 Subject: [PATCH 11/30] fix: Various cleanup and improvements --- base/dcim.yml | 12 +++-- extensions/circuit/circuit.yml | 1 + extensions/location_site/location_site.yml | 52 ++++++++++++++++++++++ extensions/qinq/{qinq.yaml => qinq.yml} | 14 ++++++ extensions/rack/rack.yml | 22 ++++++++- extensions/vlan/vlan.yml | 15 +++++-- 6 files changed, 107 insertions(+), 9 deletions(-) create mode 100644 extensions/location_site/location_site.yml rename extensions/qinq/{qinq.yaml => qinq.yml} (68%) diff --git a/base/dcim.yml b/base/dcim.yml index 4b939a1..402a6a9 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -382,6 +382,10 @@ nodes: label: Active description: Fully operational and currently in service. color: "#00d25b" + - name: reserved + label: Reserved + description: Reserved for future use, not yet active. + color: "#4d90fe" - name: provisioning label: Provisioning description: In the process of being set up and configured. @@ -390,10 +394,10 @@ nodes: label: Maintenance description: Undergoing routine maintenance or repairs. color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" + - name: deprecated + label: Deprecated + description: No longer in use and scheduled for removal. + color: "#e04040" - name: role kind: Dropdown optional: true diff --git a/extensions/circuit/circuit.yml b/extensions/circuit/circuit.yml index 6613a8c..41da057 100644 --- a/extensions/circuit/circuit.yml +++ b/extensions/circuit/circuit.yml @@ -28,6 +28,7 @@ nodes: order_weight: 1100 - name: circuit_type kind: Dropdown + optional: true description: Specifies the type of circuit. choices: - name: internet_access diff --git a/extensions/location_site/location_site.yml b/extensions/location_site/location_site.yml new file mode 100644 index 0000000..905111e --- /dev/null +++ b/extensions/location_site/location_site.yml @@ -0,0 +1,52 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +version: "1.0" + +nodes: + - name: Site + namespace: Location + label: Site + inherit_from: + - LocationGeneric + - LocationHosting + - IpamPrefixScope + - IpamVLANGroupScope + menu_placement: LocationGeneric + display_label: name__value + icon: ri:building-line + attributes: + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1250 + choices: + - name: active + label: Active + color: "#00d25b" + - name: planned + label: Planned + color: "#2196f3" + - name: staging + label: Staging + color: "#f0ad4e" + - name: decommissioning + label: Decommissioning + color: "#ff9800" + - name: retired + label: Retired + color: "#6c757d" + - name: facility + kind: Text + unique: false + optional: true + order_weight: 1100 + - name: physical_address + kind: Text + unique: false + optional: true + order_weight: 1500 + - name: timezone + kind: Text + optional: true + order_weight: 1300 diff --git a/extensions/qinq/qinq.yaml b/extensions/qinq/qinq.yml similarity index 68% rename from extensions/qinq/qinq.yaml rename to extensions/qinq/qinq.yml index bf792c2..99cee02 100644 --- a/extensions/qinq/qinq.yaml +++ b/extensions/qinq/qinq.yml @@ -25,8 +25,22 @@ nodes: label: C-VLAN description: A VLAN assigned to customer traffic, encapsulated within an S-VLAN. include_in_menu: false + display_label: "{{ svlan__name__value }}-{{ vlan_id__value }}" + human_friendly_id: + - svlan__name__value + - vlan_id__value + uniqueness_constraints: + - [vlan_id__value, svlan] inherit_from: - GenericVLAN + attributes: + - name: name + kind: Text + optional: true + read_only: true + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ svlan__name__value }}-{{ vlan_id__value }}" relationships: - name: svlan label: Supplier vlan diff --git a/extensions/rack/rack.yml b/extensions/rack/rack.yml index fe0495a..57ddf89 100644 --- a/extensions/rack/rack.yml +++ b/extensions/rack/rack.yml @@ -34,15 +34,27 @@ nodes: choices: - name: active label: Active + description: Rack is installed and in use. color: "#00d25b" + - name: available + label: Available + description: Rack is installed and has capacity for new equipment. + color: "#00bcd4" + - name: reserved + label: Reserved + description: Rack is allocated but not yet in use. + color: "#4d90fe" - name: planned label: Planned + description: Rack is planned but not yet installed. color: "#2196f3" - name: decommissioning label: Decommissioning + description: Rack is being phased out and emptied. color: "#ff9800" - - name: retired + - name: deprecated label: Retired + description: Rack has been removed from service. color: "#6c757d" - name: height label: Height (U) @@ -50,6 +62,14 @@ nodes: optional: false default_value: 42 order_weight: 1300 + - name: serial_number + kind: Text + optional: true + order_weight: 1400 + - name: asset_tag + kind: Text + optional: true + order_weight: 1500 relationships: - name: site peer: LocationSite diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index 821c7ce..6ba4df2 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -48,6 +48,10 @@ generics: label: Active description: Fully operational and currently in service. color: "#00d25b" + - name: reserved + label: Reserved + description: Reserved for future use, not yet active. + color: "#4d90fe" - name: provisioning label: Provisioning description: In the process of being set up and configured. @@ -56,10 +60,10 @@ generics: label: Maintenance description: Undergoing routine maintenance or repairs. color: "#ff9800" - - name: drained - label: Drained - description: Temporarily taken out of service. - color: "#9e9e9e" + - name: deprecated + label: Deprecated + description: No longer in use and scheduled for removal. + color: "#e04040" - name: role kind: Dropdown optional: true @@ -113,6 +117,9 @@ nodes: - name: name kind: Text order_weight: 1000 + - name: description + kind: Text + optional: true relationships: - name: scope peer: IpamVLANGroupScope From b77d474691248a633c927fd153b90ca9e0d54b24 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Fri, 24 Jul 2026 13:34:38 +0200 Subject: [PATCH 12/30] fix: align relationships between route target and VRF --- extensions/vrf/vrf.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index 7b90763..fb1e1db 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -76,9 +76,16 @@ nodes: kind: Text optional: true relationships: - - name: vrf + - name: import_vrf + label: Imported by VRFs + identifier: vrf__import + peer: IpamVRF + optional: true + cardinality: many + - name: export_vrf + label: Exported by VRFs + identifier: vrf__export peer: IpamVRF - identifier: vrf__route_target optional: true cardinality: many From 95a9ab8e9e5f100d81fb92bb120885dfd16714d3 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Fri, 24 Jul 2026 13:44:01 +0200 Subject: [PATCH 13/30] fix: align relationship identifier --- base/dcim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/base/dcim.yml b/base/dcim.yml index 402a6a9..ca71345 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -252,6 +252,7 @@ generics: - name: ip_addresses label: IP Addresses peer: IpamIPAddress + identifier: ip_address__interface cardinality: many kind: Attribute optional: true From 74b7ba2218ed9b385f64ca3398fb8bd4ebf32034 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Fri, 24 Jul 2026 14:04:46 +0200 Subject: [PATCH 14/30] feat: add disclaimer text --- base/dcim.yml | 5 +++++ base/ipam.yml | 5 +++++ base/location.yml | 5 +++++ base/organization.yml | 5 +++++ experimental/azure/azure.yml | 5 +++++ experimental/circuit_service/circuit_service.yml | 5 +++++ experimental/infiniband/infiniband.yml | 5 +++++ experimental/location_extended/location_extended.yml | 5 +++++ experimental/modules_linecards/linecard.yml | 5 +++++ experimental/modules_routing_engine/routing_engine.yml | 5 +++++ experimental/optical_transport/optical_transport.yml | 5 +++++ experimental/qos/qos.yml | 5 +++++ experimental/security/security.yml | 5 +++++ experimental/tenancy/tenancy.yml | 5 +++++ experimental/topology/topology.yml | 5 +++++ experimental/vlan-translation/vlan-translation.yml | 5 +++++ extensions/aggregate/aggregate.yml | 5 +++++ extensions/cable/cable.yml | 5 +++++ extensions/circuit/circuit.yml | 5 +++++ extensions/circuit_contract/circuit_contract.yml | 5 +++++ extensions/cluster/cluster.yml | 5 +++++ extensions/compute/compute.yml | 5 +++++ extensions/cross_connect/cross_connect.yml | 5 +++++ extensions/dwdm/dwdm.yml | 5 +++++ extensions/firewall_policer/firewall_policer.yml | 5 +++++ extensions/hosting_cluster/hosting_cluster.yml | 5 +++++ extensions/interface_breakout/interface_breakout.yml | 5 +++++ extensions/lag/lag.yml | 5 +++++ extensions/location_minimal/location_minimal.yml | 5 +++++ extensions/location_site/location_site.yml | 5 +++++ extensions/mlag/mlag.yml | 5 +++++ extensions/modules/modules.yml | 5 +++++ extensions/patch_panel/patch_panel.yml | 5 +++++ extensions/peering_ixp/peering_ixp.yml | 5 +++++ extensions/physical_disk/physical_disk.yml | 5 +++++ extensions/qinq/qinq.yml | 5 +++++ extensions/rack/rack.yml | 5 +++++ extensions/routing/routing.yml | 5 +++++ extensions/routing_aggregate/aggregate.yml | 5 +++++ extensions/routing_bgp/bgp.yml | 5 +++++ extensions/routing_bgp_community/bgp_community.yml | 5 +++++ extensions/routing_bgp_rr/bgp_rr.yml | 5 +++++ extensions/routing_ospf/ospf.yml | 5 +++++ extensions/routing_pim/pim.yml | 5 +++++ extensions/routing_policies/routing_policies.yml | 5 +++++ .../routing_policies_aggregate.yml | 5 +++++ extensions/routing_policies_bgp/routing_policies_bgp.yml | 5 +++++ extensions/routing_policies_ospf/routing_policies_ospf.yml | 5 +++++ extensions/routing_policies_pim/routing_policies_pim.yml | 5 +++++ extensions/sfp/sfp.yml | 5 +++++ extensions/snmp/snmp.yml | 5 +++++ extensions/topology/topology.yml | 5 +++++ extensions/users/users.yml | 5 +++++ extensions/vlan/vlan.yml | 5 +++++ extensions/vrf/vrf.yml | 5 +++++ extensions/vrrp/vrrp.yml | 5 +++++ 56 files changed, 280 insertions(+) diff --git a/base/dcim.yml b/base/dcim.yml index ca71345..049c1d8 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/base/ipam.yml b/base/ipam.yml index 6d21405..259dbf4 100644 --- a/base/ipam.yml +++ b/base/ipam.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/base/location.yml b/base/location.yml index 6481e0e..7a529ba 100644 --- a/base/location.yml +++ b/base/location.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/base/organization.yml b/base/organization.yml index 01b07fd..ab36d7e 100644 --- a/base/organization.yml +++ b/base/organization.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/experimental/azure/azure.yml b/experimental/azure/azure.yml index 89cbb3e..6b7fe33 100644 --- a/experimental/azure/azure.yml +++ b/experimental/azure/azure.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/experimental/circuit_service/circuit_service.yml b/experimental/circuit_service/circuit_service.yml index 87a5be8..ba54181 100644 --- a/experimental/circuit_service/circuit_service.yml +++ b/experimental/circuit_service/circuit_service.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" nodes: diff --git a/experimental/infiniband/infiniband.yml b/experimental/infiniband/infiniband.yml index 19ab0e8..aa180b9 100644 --- a/experimental/infiniband/infiniband.yml +++ b/experimental/infiniband/infiniband.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" nodes: diff --git a/experimental/location_extended/location_extended.yml b/experimental/location_extended/location_extended.yml index 7ead665..4ce118d 100644 --- a/experimental/location_extended/location_extended.yml +++ b/experimental/location_extended/location_extended.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/experimental/modules_linecards/linecard.yml b/experimental/modules_linecards/linecard.yml index 7701339..c2e4935 100644 --- a/experimental/modules_linecards/linecard.yml +++ b/experimental/modules_linecards/linecard.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" diff --git a/experimental/modules_routing_engine/routing_engine.yml b/experimental/modules_routing_engine/routing_engine.yml index 1d4d2b6..d8d3969 100644 --- a/experimental/modules_routing_engine/routing_engine.yml +++ b/experimental/modules_routing_engine/routing_engine.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/experimental/optical_transport/optical_transport.yml b/experimental/optical_transport/optical_transport.yml index b507918..4755944 100644 --- a/experimental/optical_transport/optical_transport.yml +++ b/experimental/optical_transport/optical_transport.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/experimental/qos/qos.yml b/experimental/qos/qos.yml index 23db03a..823f06b 100644 --- a/experimental/qos/qos.yml +++ b/experimental/qos/qos.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/experimental/security/security.yml b/experimental/security/security.yml index e1ed134..e6178b7 100644 --- a/experimental/security/security.yml +++ b/experimental/security/security.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" generics: diff --git a/experimental/tenancy/tenancy.yml b/experimental/tenancy/tenancy.yml index 756085b..8fdf619 100644 --- a/experimental/tenancy/tenancy.yml +++ b/experimental/tenancy/tenancy.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/experimental/topology/topology.yml b/experimental/topology/topology.yml index f79ac4d..b2c1d8d 100644 --- a/experimental/topology/topology.yml +++ b/experimental/topology/topology.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" generics: diff --git a/experimental/vlan-translation/vlan-translation.yml b/experimental/vlan-translation/vlan-translation.yml index b6b423e..9666425 100644 --- a/experimental/vlan-translation/vlan-translation.yml +++ b/experimental/vlan-translation/vlan-translation.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: '1.0' diff --git a/extensions/aggregate/aggregate.yml b/extensions/aggregate/aggregate.yml index ddff7c0..4047501 100644 --- a/extensions/aggregate/aggregate.yml +++ b/extensions/aggregate/aggregate.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/cable/cable.yml b/extensions/cable/cable.yml index b5d2050..2221c3c 100644 --- a/extensions/cable/cable.yml +++ b/extensions/cable/cable.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/circuit/circuit.yml b/extensions/circuit/circuit.yml index 41da057..8a066a8 100644 --- a/extensions/circuit/circuit.yml +++ b/extensions/circuit/circuit.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/circuit_contract/circuit_contract.yml b/extensions/circuit_contract/circuit_contract.yml index 18d64d0..fc2d4f4 100644 --- a/extensions/circuit_contract/circuit_contract.yml +++ b/extensions/circuit_contract/circuit_contract.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" nodes: diff --git a/extensions/cluster/cluster.yml b/extensions/cluster/cluster.yml index 8ae6f8d..3b3853f 100644 --- a/extensions/cluster/cluster.yml +++ b/extensions/cluster/cluster.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/compute/compute.yml b/extensions/compute/compute.yml index 7093b98..b43ef8e 100644 --- a/extensions/compute/compute.yml +++ b/extensions/compute/compute.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/cross_connect/cross_connect.yml b/extensions/cross_connect/cross_connect.yml index da256ef..ec20e9b 100644 --- a/extensions/cross_connect/cross_connect.yml +++ b/extensions/cross_connect/cross_connect.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index 256107f..dcca8a6 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/firewall_policer/firewall_policer.yml b/extensions/firewall_policer/firewall_policer.yml index cc07506..730d1a7 100644 --- a/extensions/firewall_policer/firewall_policer.yml +++ b/extensions/firewall_policer/firewall_policer.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/hosting_cluster/hosting_cluster.yml b/extensions/hosting_cluster/hosting_cluster.yml index 350dcf9..0402d94 100644 --- a/extensions/hosting_cluster/hosting_cluster.yml +++ b/extensions/hosting_cluster/hosting_cluster.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/interface_breakout/interface_breakout.yml b/extensions/interface_breakout/interface_breakout.yml index 966bda7..2370b84 100644 --- a/extensions/interface_breakout/interface_breakout.yml +++ b/extensions/interface_breakout/interface_breakout.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" extensions: diff --git a/extensions/lag/lag.yml b/extensions/lag/lag.yml index f95c4cb..bc25dc1 100644 --- a/extensions/lag/lag.yml +++ b/extensions/lag/lag.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/location_minimal/location_minimal.yml b/extensions/location_minimal/location_minimal.yml index 59b5ff2..72c5ffd 100644 --- a/extensions/location_minimal/location_minimal.yml +++ b/extensions/location_minimal/location_minimal.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/location_site/location_site.yml b/extensions/location_site/location_site.yml index 905111e..5d51dee 100644 --- a/extensions/location_site/location_site.yml +++ b/extensions/location_site/location_site.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/mlag/mlag.yml b/extensions/mlag/mlag.yml index d2d6228..13f04ac 100644 --- a/extensions/mlag/mlag.yml +++ b/extensions/mlag/mlag.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/modules/modules.yml b/extensions/modules/modules.yml index f8ccd68..55e4f23 100644 --- a/extensions/modules/modules.yml +++ b/extensions/modules/modules.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" diff --git a/extensions/patch_panel/patch_panel.yml b/extensions/patch_panel/patch_panel.yml index 0e29077..755e450 100644 --- a/extensions/patch_panel/patch_panel.yml +++ b/extensions/patch_panel/patch_panel.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/peering_ixp/peering_ixp.yml b/extensions/peering_ixp/peering_ixp.yml index 71560fe..b155e44 100644 --- a/extensions/peering_ixp/peering_ixp.yml +++ b/extensions/peering_ixp/peering_ixp.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" nodes: diff --git a/extensions/physical_disk/physical_disk.yml b/extensions/physical_disk/physical_disk.yml index 909f9e4..32d3cea 100644 --- a/extensions/physical_disk/physical_disk.yml +++ b/extensions/physical_disk/physical_disk.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/qinq/qinq.yml b/extensions/qinq/qinq.yml index 99cee02..5d08efc 100644 --- a/extensions/qinq/qinq.yml +++ b/extensions/qinq/qinq.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/rack/rack.yml b/extensions/rack/rack.yml index 57ddf89..a618519 100644 --- a/extensions/rack/rack.yml +++ b/extensions/rack/rack.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing/routing.yml b/extensions/routing/routing.yml index 176b626..c2b4088 100644 --- a/extensions/routing/routing.yml +++ b/extensions/routing/routing.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_aggregate/aggregate.yml b/extensions/routing_aggregate/aggregate.yml index 41fe4e6..e8d4d7e 100644 --- a/extensions/routing_aggregate/aggregate.yml +++ b/extensions/routing_aggregate/aggregate.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index 8ccd9b0..6f088d5 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing_bgp_community/bgp_community.yml b/extensions/routing_bgp_community/bgp_community.yml index a4ecb99..858372d 100644 --- a/extensions/routing_bgp_community/bgp_community.yml +++ b/extensions/routing_bgp_community/bgp_community.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_bgp_rr/bgp_rr.yml b/extensions/routing_bgp_rr/bgp_rr.yml index 6f866fe..1b7f004 100644 --- a/extensions/routing_bgp_rr/bgp_rr.yml +++ b/extensions/routing_bgp_rr/bgp_rr.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing_ospf/ospf.yml b/extensions/routing_ospf/ospf.yml index dcb19eb..75ee1b9 100644 --- a/extensions/routing_ospf/ospf.yml +++ b/extensions/routing_ospf/ospf.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing_pim/pim.yml b/extensions/routing_pim/pim.yml index 5aab18e..ab7196c 100644 --- a/extensions/routing_pim/pim.yml +++ b/extensions/routing_pim/pim.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/routing_policies/routing_policies.yml b/extensions/routing_policies/routing_policies.yml index fa66ffc..ba3502f 100644 --- a/extensions/routing_policies/routing_policies.yml +++ b/extensions/routing_policies/routing_policies.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_policies_aggregate/routing_policies_aggregate.yml b/extensions/routing_policies_aggregate/routing_policies_aggregate.yml index 8336f88..0869569 100644 --- a/extensions/routing_policies_aggregate/routing_policies_aggregate.yml +++ b/extensions/routing_policies_aggregate/routing_policies_aggregate.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_policies_bgp/routing_policies_bgp.yml b/extensions/routing_policies_bgp/routing_policies_bgp.yml index a3fe79b..8fe4baa 100644 --- a/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_policies_ospf/routing_policies_ospf.yml b/extensions/routing_policies_ospf/routing_policies_ospf.yml index bccb969..a71e416 100644 --- a/extensions/routing_policies_ospf/routing_policies_ospf.yml +++ b/extensions/routing_policies_ospf/routing_policies_ospf.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/routing_policies_pim/routing_policies_pim.yml b/extensions/routing_policies_pim/routing_policies_pim.yml index 75c124b..7b05d68 100644 --- a/extensions/routing_policies_pim/routing_policies_pim.yml +++ b/extensions/routing_policies_pim/routing_policies_pim.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/sfp/sfp.yml b/extensions/sfp/sfp.yml index 11b475c..38e0850 100644 --- a/extensions/sfp/sfp.yml +++ b/extensions/sfp/sfp.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/snmp/snmp.yml b/extensions/snmp/snmp.yml index d81ccb7..97d5836 100644 --- a/extensions/snmp/snmp.yml +++ b/extensions/snmp/snmp.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/topology/topology.yml b/extensions/topology/topology.yml index da7c900..ac89666 100644 --- a/extensions/topology/topology.yml +++ b/extensions/topology/topology.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/users/users.yml b/extensions/users/users.yml index 3bcdc51..d78778a 100644 --- a/extensions/users/users.yml +++ b/extensions/users/users.yml @@ -1,4 +1,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- --- version: "1.0" diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index 6ba4df2..eaea742 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" generics: diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index fb1e1db..7b36e9a 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: diff --git a/extensions/vrrp/vrrp.yml b/extensions/vrrp/vrrp.yml index d690eb3..6fb0368 100644 --- a/extensions/vrrp/vrrp.yml +++ b/extensions/vrrp/vrrp.yml @@ -1,5 +1,10 @@ --- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- version: "1.0" nodes: From 48e3a4b44afade47498491322b825ffb36c5feb6 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:13:16 +0200 Subject: [PATCH 15/30] feat: complete refactor of device module --- .metadata.yml | 21 +- base/dcim.yml | 4 + .../{modules => device_module}/README.md | 0 extensions/device_module/device_module.yml | 193 ++++++++++++++++++ .../device_psu_module/device_psu_module.yml | 59 ++++++ extensions/modules/modules.yml | 132 ------------ 6 files changed, 270 insertions(+), 139 deletions(-) rename extensions/{modules => device_module}/README.md (100%) create mode 100644 extensions/device_module/device_module.yml create mode 100644 extensions/device_psu_module/device_psu_module.yml delete mode 100644 extensions/modules/modules.yml diff --git a/.metadata.yml b/.metadata.yml index a95a74a..0f27a06 100644 --- a/.metadata.yml +++ b/.metadata.yml @@ -41,7 +41,7 @@ experimental/infiniband: experimental/optical_transport: dependencies: - base - - extensions/modules + - extensions/device_module - extensions/cable description: > Comprehensive optical transport network schemas for DWDM/WDM systems (ADVA FSP 3000 and similar @@ -61,7 +61,7 @@ experimental/location_extended: experimental/modules_linecards: dependencies: - base - - extensions/modules + - extensions/device_module description: This schema extension allows you to capture Linecard related information like the version. You can insert the Linecard into a Dcim Physical Device and @@ -71,7 +71,7 @@ experimental/modules_linecards: experimental/modules_routing_engine: dependencies: - base - - extensions/modules + - extensions/device_module description: This schema extension allows you to capture Routing Engine related information like the version. You can insert the Routing Engine into a Dcim Physical @@ -227,14 +227,21 @@ extensions/mlag: - Add support for layer 3 overlay for MLAG interfaces (loopback, peer address ...) - Create virtual relationship so MLAG interfaces can be seen on the devices in the domain name: MLAG -extensions/modules: +extensions/device_module: dependencies: - base description: | - This schema extension allows you to capture Device Modules related information like the serial number or the status. You can insert the Module into a Dcim Physical Device. + This schema extension lets you capture module bays on a Dcim Physical Device and the modules installed into them (e.g. fan trays, line cards). A device can have any number of module bays, and each bay can optionally hold one module. - NOTE: This extension doesn't contain any Nodes, you can use the extension module_linecards or modules_routing_engine to use it - name: Modules + NOTE: This extension ships a standard Module/ModuleType node pair ready to use, alongside the generic Module/ModuleType you can build your own flavors on top of (see the device_psu_module, modules_linecards, or modules_routing_engine extensions). + name: Device Modules +extensions/device_psu_module: + dependencies: + - base + - extensions/device_module + description: | + This schema extension adds a PSU (Power Supply Unit) flavor on top of the generic Module/ModuleType from extensions/device_module, so you can track power supplies installed in a device's module bays alongside PSU-specific attributes like wattage and hot-swap capability. + name: Device PSU Module extensions/patch_panel: dependencies: - base diff --git a/base/dcim.yml b/base/dcim.yml index 049c1d8..74b1ebf 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -62,6 +62,10 @@ generics: description: Generic holding attributes and relationships relevant for physical device. include_in_menu: false attributes: + - name: name # Here for computed attribute + kind: Text + unique: true + allow_override: any - name: position label: Position (U) description: Lowest unit. diff --git a/extensions/modules/README.md b/extensions/device_module/README.md similarity index 100% rename from extensions/modules/README.md rename to extensions/device_module/README.md diff --git a/extensions/device_module/device_module.yml b/extensions/device_module/device_module.yml new file mode 100644 index 0000000..be7763c --- /dev/null +++ b/extensions/device_module/device_module.yml @@ -0,0 +1,193 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- + +version: "1.0" + +generics: + - name: GenericModule + namespace: Dcim + description: "A generic module, such as a Linecard or Routing Engine, installed in a module bay." + label: "Module" + icon: mdi:expansion-card + human_friendly_id: + - computed_name__value + display_label: computed_name__value + attributes: + # Overriten at node level + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + allow_override: any + order_weight: 1000 + - name: serial_number + kind: Text + optional: true + description: "Serial number of the module, if known." + order_weight: 1100 + - name: description + kind: Text + optional: true + order_weight: 1200 + relationships: + - name: module_bay + label: Module Bay + peer: DcimModuleBay + identifier: module_bay__module + # A module only exists once installed - it must be installed to be tracked. + # Spares awaiting installation aren't modeled by this node. + optional: false + cardinality: one + kind: Attribute + order_weight: 900 + + - name: GenericModuleType + namespace: Dcim + description: "A generic module type, with common specifications like part number and manufacturer." + label: "Module Type" + icon: mdi:database-cog + menu_placement: DcimGenericModule + display_label: name__value + uniqueness_constraints: + - ["name__value", "manufacturer"] + human_friendly_id: + - name__value + order_by: + - manufacturer__name__value + - name__value + attributes: + - name: name + kind: Text + unique: true + description: "Name of the module type." + order_weight: 1000 + - name: description + kind: Text + optional: true + description: "Description of the module type." + order_weight: 1100 + - name: part_number + label: Part Number + kind: Text + optional: true + description: "Part number of the module." + order_weight: 1200 + relationships: + - name: manufacturer + peer: OrganizationManufacturer + identifier: manufacturer__moduletype + cardinality: one + optional: false + kind: Attribute + description: "Manufacturer of the module type." + order_weight: 1250 + +nodes: + - name: ModuleBay + namespace: Dcim + description: "A physical bay on a device that can receive a module." + label: "Module Bay" + icon: mdi:tray + menu_placement: DcimDevice + human_friendly_id: + - computed_name__value + display_label: computed_name__value + order_by: + - device__name__value + - name__value + uniqueness_constraints: + - ["device", "name__value"] + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ device__name__value }} > {{ name__value }}" + description: "Name computed from the device and bay name." + order_weight: 800 + - name: name + kind: Text + description: "Name of the bay, e.g. 'slot 1' or 'psu1'." + order_weight: 1000 + - name: description + kind: Text + optional: true + order_weight: 1100 + relationships: + - name: device + label: Device + # DcimGenericDevice (not DcimPhysicalDevice) so `name` is resolvable in computed_name above - + # PhysicalDevice itself carries no identifying attribute. + peer: DcimPhysicalDevice + identifier: device__module_bays + optional: false + cardinality: one + kind: Parent + order_weight: 900 + - name: installed_module + label: Installed Module + peer: DcimGenericModule + identifier: module_bay__module + optional: true + cardinality: one + kind: Attribute + order_weight: 1200 + + - name: Module + namespace: Dcim + description: "Standard module installed in a device." + label: "Module" + icon: mdi:expansion-card + include_in_menu: false + inherit_from: + - DcimGenericModule + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ module_bay__computed_name__value }} ({{ module_type__name__value }})" + description: "Name computed from the module bay and module type." + order_weight: 1000 + relationships: + - name: module_type + peer: DcimModuleType + optional: false + cardinality: one + kind: Attribute + order_weight: 950 + + - name: ModuleType + namespace: Dcim + description: "Standard module type, defining common specifications for a Module." + label: "Module Type" + icon: mdi:database-cog + include_in_menu: false + inherit_from: + - DcimGenericModuleType + +extensions: + nodes: + # DCIM Extensions + - kind: DcimPhysicalDevice + relationships: + - name: module_bays + label: Module Bays + peer: DcimModuleBay + identifier: device__module_bays + cardinality: many + kind: Component + optional: true + description: "Module bays available on this device." diff --git a/extensions/device_psu_module/device_psu_module.yml b/extensions/device_psu_module/device_psu_module.yml new file mode 100644 index 0000000..c407e2b --- /dev/null +++ b/extensions/device_psu_module/device_psu_module.yml @@ -0,0 +1,59 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- + +version: "1.0" + +nodes: + - name: PSUModule + namespace: Dcim + description: "Power Supply Unit (PSU) installed in a device." + label: "PSU Module" + icon: mdi:power-plug + include_in_menu: false + inherit_from: + - DcimGenericModule + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ module_bay__computed_name__value }} ({{ module_type__name__value }})" + description: "Name computed from the module bay and module type." + order_weight: 1000 + relationships: + - name: module_type + peer: DcimPSUModuleType + optional: false + cardinality: one + kind: Attribute + order_weight: 950 + + - name: PSUModuleType + namespace: Dcim + description: "PSU module type, defining common specifications such as wattage and hot-swap capability." + label: "PSU Module Type" + icon: mdi:database-cog + include_in_menu: false + inherit_from: + - DcimGenericModuleType + attributes: + - name: wattage + description: "Wattage in watts." + kind: Number + optional: true + order_weight: 1300 + - name: hotswappable + label: Hot-Swappable + description: "Whether the PSU can be replaced without powering down the device." + kind: Boolean + optional: false + default_value: false + order_weight: 1350 diff --git a/extensions/modules/modules.yml b/extensions/modules/modules.yml deleted file mode 100644 index 55e4f23..0000000 --- a/extensions/modules/modules.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -# --------------------------------------------------------------------------- -# This schema is a starting point for building with Infrahub, not a finished production model. -# Adapting it for your environment typically requires architectural review — see -# docs.infrahub.app, or reach out to OpsMill for help. -# --------------------------------------------------------------------------- - -version: "1.0" - -generics: - - name: GenericModule - namespace: Device - description: "A generic module, such as a Linecard or Routing Engine, installed in a device." - label: "Module" - icon: mdi:expansion-card - human_friendly_id: - - serial_number__value - display_label: serial_number__value - order_by: - - serial_number__value - attributes: - - name: serial_number - kind: Text - unique: true - description: "Unique serial number of the module." - order_weight: 1000 - - name: description - kind: Text - optional: true - order_weight: 1100 - - name: status - kind: Dropdown - choices: - - name: provisioning - label: Provisioning - description: "Linecard is being provisioned." - color: "#A9DFBF" # light pastel green - - name: active - label: Active - description: "Linecard is active and operational." - color: "#A9CCE3" # pastel blue - - name: maintenance - label: Maintenance - description: "Linecard is under maintenance." - color: "#FFF2CC" # pastel yellow - - name: disabled - label: Disabled - description: "Linecard has been disabled." - color: "#D3D3D3" # light grey - - name: outage - label: Outage - description: "Linecard is currently experiencing an outage." - color: "#F4CCCC" # pastel red - default_value: "active" - order_weight: 1300 - relationships: - - name: module_type - peer: DeviceGenericModuleType - optional: false - cardinality: one - kind: Attribute - order_weight: 1150 - - name: device - label: Device - peer: DcimPhysicalDevice - identifier: device__modules - # We could have module in the storage so Device should not be mandatory - optional: true - cardinality: one - kind: Attribute # Parent - order_weight: 1000 - - - name: GenericModuleType - namespace: Device - description: "A generic module type, with common specifications like part number and manufacturer." - label: "Module Type" - icon: mdi:database-cog - menu_placement: DeviceGenericModule - display_label: name__value - uniqueness_constraints: - - ["name__value", "manufacturer"] - human_friendly_id: - - name__value - order_by: - - manufacturer__name__value - - name__value - attributes: - - name: name - kind: Text - unique: true - description: "Name of the module type." - order_weight: 1000 - - name: description - kind: Text - optional: true - description: "Description of the module type." - order_weight: 1100 - - name: part_number - label: Part Number - kind: Text - optional: true - unique: true - description: "Part number of the module." - order_weight: 1200 - relationships: - - name: manufacturer - peer: OrganizationManufacturer - identifier: manufacturer__moduletype - cardinality: one - optional: false - kind: Attribute - description: "Manufacturer of the module type." - order_weight: 1250 - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - description: "Tags associated with the module type." - order_weight: 3000 - -extensions: - nodes: - # DCIM Extensions - - kind: DcimPhysicalDevice - relationships: - - name: modules - peer: DeviceGenericModule - identifier: device__modules - cardinality: many - kind: Component From 706fffa6660c7ede73a3379aace79419bbd00a9a Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:23:34 +0200 Subject: [PATCH 16/30] chore: patch panel can now use regular device modules --- extensions/patch_panel/patch_panel.yml | 55 -------------------------- 1 file changed, 55 deletions(-) diff --git a/extensions/patch_panel/patch_panel.yml b/extensions/patch_panel/patch_panel.yml index 755e450..296a8ca 100644 --- a/extensions/patch_panel/patch_panel.yml +++ b/extensions/patch_panel/patch_panel.yml @@ -151,12 +151,6 @@ nodes: optional: true cardinality: many kind: Component - - name: patch_panel_modules - label: Modules - peer: DcimPatchPanelModule - optional: true - cardinality: many - kind: Component - name: FrontPatchPanelInterface label: Patch Panel Front Interfaces @@ -221,52 +215,3 @@ nodes: optional: false cardinality: one kind: Parent - - - name: PatchPanelModule - namespace: Dcim - label: Patch Panel Module - menu_placement: DcimPatchPanel - icon: mdi:expansion-card - human_friendly_id: - - patch_panel__name__value - - name__value - display_label: "{{ patch_panel__name__value }} > {{ name__value }}" - order_by: - - patch_panel__name__value - - position__value - uniqueness_constraints: - - [patch_panel, position__value] - attributes: - - name: name - kind: Text - order_weight: 1000 - - name: position - kind: Number - description: Position for the module inside the Patch Panel. - order_weight: 1100 - - name: module_type - label: Module Type - kind: Dropdown - description: Type of module inserted into the patch panel. - order_weight: 1200 - optional: true - choices: - - name: 3_mpo_24_fo_lc - label: 24 FO LC 3 MPO - description: High-density MPO cassette with 24 fibers to front and 3 MPO to rear. - color: "#7f7fff" - - name: serial - kind: Text - optional: true - order_weight: 1500 - - name: description - kind: Text - optional: true - order_weight: 2000 - relationships: - - name: patch_panel - peer: DcimPatchPanel - optional: false - order_weight: 900 - cardinality: one - kind: Parent From 8581d2a5f9ba29ad8280932e1bceede15f3e1a82 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:54:02 +0200 Subject: [PATCH 17/30] chore: move policer to experimental --- {extensions => experimental}/firewall_policer/README.md | 0 .../firewall_policer/firewall_policer.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {extensions => experimental}/firewall_policer/README.md (100%) rename {extensions => experimental}/firewall_policer/firewall_policer.yml (100%) diff --git a/extensions/firewall_policer/README.md b/experimental/firewall_policer/README.md similarity index 100% rename from extensions/firewall_policer/README.md rename to experimental/firewall_policer/README.md diff --git a/extensions/firewall_policer/firewall_policer.yml b/experimental/firewall_policer/firewall_policer.yml similarity index 100% rename from extensions/firewall_policer/firewall_policer.yml rename to experimental/firewall_policer/firewall_policer.yml From 9a5d2a4539c69370e61de43a7b8122164dbf1ae4 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:54:21 +0200 Subject: [PATCH 18/30] chore: remove empty folder --- extensions/meet_me_room/README.md | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 extensions/meet_me_room/README.md diff --git a/extensions/meet_me_room/README.md b/extensions/meet_me_room/README.md deleted file mode 100644 index 1cdb12b..0000000 --- a/extensions/meet_me_room/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# 🧩 Meet me room - -This extension will allow you to capture meet me room within a datacenter. It will be part of the location hierarchy and you will be able to attach various "hosting" related objects (circuit endpoints, patch panels...) - -## Node - -- MMR - -## Dependencies - -- Base -- LocationMinimal From 737ba66cd69cabb745dcb5e44ee32422d2fd27c0 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:54:48 +0200 Subject: [PATCH 19/30] feat: allow linking IXP to BGP sessions --- .metadata.yml | 2 ++ extensions/peering_ixp/peering_ixp.yml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.metadata.yml b/.metadata.yml index 0f27a06..bd96fc4 100644 --- a/.metadata.yml +++ b/.metadata.yml @@ -256,6 +256,8 @@ extensions/peering_ixp: - extensions/routing - extensions/routing_bgp - extensions/routing_bgp_community + - extensions/routing_policies + - extensions/routing_policies_bgp description: This schema extension contains all you need to model anything revolving around internet peering (Exchange points ...)! diff --git a/extensions/peering_ixp/peering_ixp.yml b/extensions/peering_ixp/peering_ixp.yml index b155e44..f81d722 100644 --- a/extensions/peering_ixp/peering_ixp.yml +++ b/extensions/peering_ixp/peering_ixp.yml @@ -181,8 +181,30 @@ nodes: kind: Attribute description: "The router this IXP connection is connected to" order_weight: 1400 + - name: bgp_sessions + label: BGP Sessions + peer: RoutingBGPSession + identifier: ixpconn__bgpsessions + optional: true + cardinality: many + kind: Component + description: "BGP sessions established over this IXP connection" + order_weight: 1450 - name: tags peer: BuiltinTag cardinality: many kind: Attribute order_weight: 3000 + +extensions: + nodes: + - kind: RoutingBGPSession + relationships: + - name: ixp_connection + label: IXP Connection + peer: PeeringIXPConnection + identifier: ixpconn__bgpsessions + optional: true + cardinality: one + kind: Parent + description: "The IXP connection (port) this BGP session is established over" From 98a730fbd7bbe33ac694015bedf01d9db0698611 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 11:55:08 +0200 Subject: [PATCH 20/30] feat: add position to module bay --- extensions/device_module/device_module.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/device_module/device_module.yml b/extensions/device_module/device_module.yml index be7763c..f953405 100644 --- a/extensions/device_module/device_module.yml +++ b/extensions/device_module/device_module.yml @@ -103,6 +103,7 @@ nodes: - name__value uniqueness_constraints: - ["device", "name__value"] + - ["device", "position__value"] attributes: - name: computed_name kind: Text @@ -116,8 +117,15 @@ nodes: order_weight: 800 - name: name kind: Text - description: "Name of the bay, e.g. 'slot 1' or 'psu1'." + description: "Name of the bay, e.g. 'slot 1' or 'psu 1'." order_weight: 1000 + - name: position + kind: Number + description: "Numeric position of the bay within the device, used for ordering (e.g. slot 1, 2, 3...)." + optional: false + parameters: + min_value: 1 + order_weight: 1050 - name: description kind: Text optional: true From 53e22bf435efe011634620f8fa6183719b4bc60b Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 12:11:59 +0200 Subject: [PATCH 21/30] fix: adjust identifier and peer for relationships --- .../routing_policies_bgp/routing_policies_bgp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/routing_policies_bgp/routing_policies_bgp.yml b/extensions/routing_policies_bgp/routing_policies_bgp.yml index 8fe4baa..bc18050 100644 --- a/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -32,14 +32,14 @@ extensions: - name: import_routing_policies label: Import Routing Policies peer: RoutingPolicyBGP - identifier: bgp__import_policies + identifier: bgppeergroup__import_policies description: "The routing-policies used by this instance for import." kind: Generic cardinality: many - name: export_routing_policies label: Export Routing Policies peer: RoutingPolicyBGP - identifier: bgp__export_policies + identifier: bgppeergroup__export_policies description: "The routing-policies used by this instance for export." kind: Generic cardinality: many @@ -55,15 +55,15 @@ extensions: relationships: - name: import_routing_policies label: Import Routing Policies - peer: RoutingPolicy - identifier: bgp__import_policies + peer: RoutingPolicyBGP + identifier: bgpsession__import_policies description: "The routing-policies used by this instance for import." kind: Generic cardinality: many - name: export_routing_policies label: Export Routing Policies - peer: RoutingPolicy - identifier: bgp__export_policies + peer: RoutingPolicyBGP + identifier: bgpsession__export_policies description: "The routing-policies used by this instance for export." kind: Generic cardinality: many From bd841785bf5eb1f7b511b2b84919020ec6f099a6 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 12:12:24 +0200 Subject: [PATCH 22/30] fix: improve snmp extension --- extensions/snmp/snmp.yml | 59 ++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/extensions/snmp/snmp.yml b/extensions/snmp/snmp.yml index 97d5836..b349344 100644 --- a/extensions/snmp/snmp.yml +++ b/extensions/snmp/snmp.yml @@ -31,6 +31,13 @@ generics: peer: SnmpClient cardinality: many kind: Component + - name: devices + label: Devices + description: Devices this community is configured on. + peer: DcimDevice + cardinality: many + kind: Attribute + order_weight: 1200 nodes: # -------------------- Snmp Community -------------------- @@ -52,10 +59,14 @@ nodes: kind: Password order_weight: 1300 - name: access - kind: Text - enum: - - Read-Only - - Read-Write + kind: Dropdown + choices: + - name: read_only + label: Read-Only + description: Read-only access. + - name: read_write + label: Read-Write + description: Read-write access. order_weight: 1200 - name: CommunityV3 @@ -77,11 +88,17 @@ nodes: order_weight: 1300 - name: auth_protocol label: Authentication Protocol - kind: Text - enum: - - None - - MD5 - - SHA + kind: Dropdown + choices: + - name: none + label: None + description: No authentication. + - name: md5 + label: MD5 + description: MD5 authentication. + - name: sha + label: SHA + description: SHA authentication. order_weight: 1400 - name: auth_password label: Authentication Password @@ -90,11 +107,17 @@ nodes: optional: true - name: privacy_protocol label: Privacy Protocol - kind: Text - enum: - - None - - DES - - AES + kind: Dropdown + choices: + - name: none + label: None + description: No privacy. + - name: des + label: DES + description: DES encryption. + - name: aes + label: AES + description: AES encryption. order_weight: 1600 - name: privacy_password label: Privacy Password @@ -128,7 +151,6 @@ nodes: order_by: - name__value attributes: - # TODO improve - Should it be a relationship to IPAddress or IPPrefix node ? - name: name kind: Text order_weight: 1000 @@ -138,6 +160,13 @@ nodes: order_weight: 1100 optional: true relationships: + - name: ip_address + label: IP Address + description: Authorized SNMP client address. + peer: IpamIPAddress + cardinality: many + kind: Attribute + order_weight: 1150 - name: community peer: SnmpCommunity cardinality: many From e869b2a9b2cbc20ac8939ba0bb1ea16f5c7e6e6a Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 12:12:47 +0200 Subject: [PATCH 23/30] chore: get rid of old enum --- extensions/routing_bgp/bgp.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index 6f088d5..00acc6c 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -146,10 +146,14 @@ nodes: kind: Text optional: true - name: session_type - kind: Text - enum: - - EXTERNAL - - INTERNAL + kind: Dropdown + choices: + - name: external + label: External + description: "Session established with a router in a different autonomous system." + - name: internal + label: Internal + description: "Session established with a router in the same autonomous system." description: "Type of BGP Session" order_weight: 1200 - name: role From 8eae84032ec9ba83edc767df24aa0c25a703b61f Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 16:20:43 +0200 Subject: [PATCH 24/30] chore: use proper validator for number --- extensions/vrrp/vrrp.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/extensions/vrrp/vrrp.yml b/extensions/vrrp/vrrp.yml index 6fb0368..dc673d8 100644 --- a/extensions/vrrp/vrrp.yml +++ b/extensions/vrrp/vrrp.yml @@ -26,10 +26,13 @@ nodes: unique: true description: Unique name of the entry order_weight: 1000 - - name: group - kind: Text - description: VRRP Group - label: Group + - name: vrid + kind: Number + parameters: + min_value: 1 + max_value: 255 + description: Virtual Router ID (VRID, should be between 1 and 255) + label: VRID order_weight: 1100 - name: password kind: HashedPassword @@ -38,10 +41,10 @@ nodes: optional: true order_weight: 1400 relationships: - - name: ip_address + - name: ip_addresses on_delete: cascade description: VRRP IP (v4 or v6) - label: IP Address + label: IP Addresses peer: IpamIPAddress optional: true cardinality: many @@ -69,9 +72,10 @@ nodes: - name: priority kind: Number label: VRRP Priority - description: VRRP Priority (Should be between 0 to 255) - # Using a Regex until https://github.com/opsmill/infrahub/issues/2967 - regex: ^(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])$ + parameters: + min_value: 1 + max_value: 255 + description: VRRP Priority (Should be between 1 and 255) default_value: 100 order_weight: 1100 relationships: From 21e46497e2b557786203280432fd0a090fc35d6d Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 16:21:10 +0200 Subject: [PATCH 25/30] feat: new tenancy schema --- extensions/tenancy/README.md | 3 + extensions/tenancy/tenancy.yml | 120 +++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 extensions/tenancy/README.md create mode 100644 extensions/tenancy/tenancy.yml diff --git a/extensions/tenancy/README.md b/extensions/tenancy/README.md new file mode 100644 index 0000000..ee0330f --- /dev/null +++ b/extensions/tenancy/README.md @@ -0,0 +1,3 @@ +# tenancy + +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/tenancy) for the corresponding documentation. diff --git a/extensions/tenancy/tenancy.yml b/extensions/tenancy/tenancy.yml new file mode 100644 index 0000000..53a7950 --- /dev/null +++ b/extensions/tenancy/tenancy.yml @@ -0,0 +1,120 @@ +--- +# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json +# --------------------------------------------------------------------------- +# This schema is a starting point for building with Infrahub, not a finished production model. +# Adapting it for your environment typically requires architectural review — see +# docs.infrahub.app, or reach out to OpsMill for help. +# --------------------------------------------------------------------------- +version: "1.0" + +nodes: + - name: Tenant + namespace: Tenancy + description: A tenant is the owner of the corresponding devices, addressing, and locations. + icon: mdi:domain + include_in_menu: true + inherit_from: + - OrganizationGeneric + relationships: + - name: devices + label: Devices + peer: DcimGenericDevice + identifier: tenant__device + cardinality: many + optional: true + kind: Generic + - name: prefixes + label: Prefixes + peer: IpamPrefix + identifier: tenant__prefix + cardinality: many + optional: true + kind: Generic + - name: addresses + label: Addresses + peer: IpamIPAddress + identifier: tenant__ipaddress + cardinality: many + optional: true + kind: Generic + - name: locations + label: Locations + peer: LocationHosting + identifier: tenant__location + cardinality: many + optional: true + kind: Generic + +extensions: + nodes: + - kind: DcimGenericDevice + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__device + optional: true + cardinality: one + kind: Attribute + order_weight: 1800 + - kind: IpamPrefix + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__prefix + optional: true + cardinality: one + kind: Attribute + order_weight: 1400 + - kind: IpamIPAddress + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__ipaddress + optional: true + cardinality: one + kind: Attribute + order_weight: 1300 + - kind: LocationHosting + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__location + optional: true + cardinality: one + kind: Attribute + +# --------------------------------------------------------------------------- +# Composing with other extensions +# --------------------------------------------------------------------------- +# This extension only wires Tenant onto nodes that live in the base schema, so it has +# no dependency beyond `base` and can always be loaded on its own. +# +# Some extensions (e.g. `extensions/circuit`, which defines `DcimCircuit`) are optional +# and aren't guaranteed to be loaded. Adding a hard `peer: DcimCircuit` relationship here +# would break schema loading whenever the circuit extension isn't present, so that wiring +# is intentionally left out of this file. +# +# If you do load `extensions/circuit` and want a Tenant on a Circuit, add the reciprocal +# pair below to your own schema (e.g. a small local extension file that depends on both +# `extensions/tenancy` and `extensions/circuit`): +# +# extensions: +# nodes: +# - kind: DcimCircuit +# relationships: +# - name: tenant +# peer: TenancyTenant +# identifier: tenant__circuit +# optional: true +# cardinality: one +# kind: Attribute +# - kind: TenancyTenant +# relationships: +# - name: circuits +# peer: DcimCircuit +# identifier: tenant__circuit +# cardinality: many +# optional: true +# kind: Generic +# +# The same pattern applies to any other optional extension node you want tenancy on. From e62d9379bdff7d49c067774ca3b4477804c12ba4 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 4 Aug 2026 16:27:53 +0200 Subject: [PATCH 26/30] docs: cleanup and regenerate doc --- .metadata.yml | 28 +- docs/docs/home.mdx | 14 +- docs/docs/reference/aggregate.mdx | 120 ++++ docs/docs/reference/cable.mdx | 13 +- docs/docs/reference/circuit.mdx | 102 ++- docs/docs/reference/circuit_contract.mdx | 3 +- docs/docs/reference/cluster.mdx | 3 +- docs/docs/reference/compute.mdx | 15 +- docs/docs/reference/dcim.mdx | 189 ++--- docs/docs/reference/device_module.mdx | 327 +++++++++ docs/docs/reference/device_psu_module.mdx | 105 +++ docs/docs/reference/dwdm.mdx | 22 +- docs/docs/reference/hosting_cluster.mdx | 52 +- docs/docs/reference/ipam.mdx | 221 ++++-- docs/docs/reference/lag.mdx | 14 +- docs/docs/reference/location.mdx | 33 +- docs/docs/reference/location_minimal.mdx | 159 ++-- docs/docs/reference/location_site.mdx | 83 +++ docs/docs/reference/mlag.mdx | 6 - docs/docs/reference/modules_linecards.mdx | 12 +- .../docs/reference/modules_routing_engine.mdx | 22 +- docs/docs/reference/optical_transport.mdx | 31 +- docs/docs/reference/organization.mdx | 8 +- docs/docs/reference/patch_panel.mdx | 82 --- docs/docs/reference/peering_ixp.mdx | 40 ++ docs/docs/reference/qinq.mdx | 109 ++- docs/docs/reference/rack.mdx | 155 ++++ docs/docs/reference/routing_bgp.mdx | 23 +- docs/docs/reference/routing_policies_bgp.mdx | 16 +- docs/docs/reference/sfp.mdx | 10 +- docs/docs/reference/snmp.mdx | 66 +- docs/docs/reference/tenancy.mdx | 122 +++- docs/docs/reference/topology.mdx | 680 +++++++++++++++++- docs/docs/reference/vlan.mdx | 161 +++-- docs/docs/reference/vrf.mdx | 36 +- docs/docs/reference/vrrp.mdx | 27 +- extensions/aggregate/README.md | 3 + extensions/device_module/README.md | 4 +- extensions/device_psu_module/README.md | 3 + extensions/location_site/README.md | 3 + extensions/rack/README.md | 3 + extensions/routing_bgp/bgp.yml | 9 +- extensions/topology/README.md | 3 - extensions/topology/topology.yml | 37 - 44 files changed, 2395 insertions(+), 779 deletions(-) create mode 100644 docs/docs/reference/aggregate.mdx create mode 100644 docs/docs/reference/device_module.mdx create mode 100644 docs/docs/reference/device_psu_module.mdx create mode 100644 docs/docs/reference/location_site.mdx create mode 100644 docs/docs/reference/rack.mdx create mode 100644 extensions/aggregate/README.md create mode 100644 extensions/device_psu_module/README.md create mode 100644 extensions/location_site/README.md create mode 100644 extensions/rack/README.md delete mode 100644 extensions/topology/README.md delete mode 100644 extensions/topology/topology.yml diff --git a/.metadata.yml b/.metadata.yml index bd96fc4..71a7260 100644 --- a/.metadata.yml +++ b/.metadata.yml @@ -87,14 +87,6 @@ experimental/security: - base description: This schema extension contains models for implementing detailed security. name: Security -experimental/tenancy: - dependencies: - - base - - extensions/circuit - description: - This schema extension introduces tenancy for some of the schema nodes - (circuits...) - name: Tenancy experimental/topology: dependencies: - base @@ -171,7 +163,7 @@ extensions/dwdm: channel number but via the wavelength and/or the frequency. This model provides a unique entry in Infrahub for those. name: DWDM -extensions/firewall_policer: +experimental/firewall_policer: dependencies: - base description: @@ -211,6 +203,14 @@ extensions/location_minimal: This schema extension is minimal but will provide you with basic items to store location related data. name: Location Minimal +extensions/location_site: + dependencies: + - base + description: >- + This schema extension introduces a standalone Location.Site node (with facility, + physical address, timezone, and status). It defines the same Site node as + extensions/location_minimal, so load one or the other, not both. + name: Location Site extensions/mlag: dependencies: - base @@ -409,13 +409,15 @@ extensions/snmp: Clients. As you can see this extension is not linked to Tenancy or Device, as you could decide to link the Community to different models based on your use case. name: SNMP -extensions/topology: +extensions/tenancy: dependencies: - base description: - This schema extension introduces abstract network pods and services - running in the pods, such as MPLS and EVPN. - name: Topology + This schema extension introduces a Tenant node that can own devices, IP + prefixes/addresses, and hosting locations. See the comment at the bottom of + `tenancy.yml` for an example of how to extend tenancy onto optional extension + nodes such as `DcimCircuit`. + name: Tenancy extensions/users: dependencies: - base diff --git a/docs/docs/home.mdx b/docs/docs/home.mdx index aaa3e94..3eeacf5 100644 --- a/docs/docs/home.mdx +++ b/docs/docs/home.mdx @@ -94,6 +94,7 @@ This list provides an overview of the schemas available in this repository. Each | ---- | ----------- | | **[Azure](./reference/azure.mdx)** | This schema extension introduces cloud support for Microsoft Azure. | | **[Circuit Service](./reference/circuit_service.mdx)** | This schema extension contains model coming on top of circuit to capture a single service shared across multiple circuits. For example you have a MPLS network supported by a provider connecting multiple locations: - One single CircuitService would be needed to store MPLS related information (e.g. service id, provider ...) - On each site we would create a circuit connecting on one side our device and the CircuitService on the other side | +| **[Firewall Policer](./reference/firewall_policer.mdx)** | This schema extension contains models for VMs. You might consider Cluster or/and Hypervisor extension to go with! | | **[Infiniband](./reference/infiniband.mdx)** | This schema extension adds support for InfiniBand switches. | | **[Location Extended](./reference/location_extended.mdx)** | This schema extension is the most detailed when it comes to location, you'll find all the layers you can think of. | | **[Modules Linecards](./reference/modules_linecards.mdx)** | This schema extension allows you to capture Linecard related information like the version. You can insert the Linecard into a Dcim Physical Device and leverage the Linecard type model. The Linecard can accept PIC to help configure PORT information like breakout-capabilities and configurations. | @@ -101,7 +102,6 @@ This list provides an overview of the schemas available in this repository. Each | **[Optical Transport](./reference/optical_transport.mdx)** | Comprehensive optical transport network schemas for DWDM/WDM systems (ADVA FSP 3000 and similar platforms). Covers four layers: wavelength (ITU-T G.694.1 grid, optical bands, DWDM channels), topology (logical optical nodes, passive multiplexers, fiber links), equipment (transponder/amplifier/ROADM modules, ROADM degrees, WSS cross-connects), and service (end-to-end optical services, optical paths, path segments). Not designed to be loaded together with extensions/dwdm. | | **[QoS](./reference/qos.mdx)** | This schema extension contains models for Quality of Service (QoS) | | **[Security](./reference/security.mdx)** | This schema extension contains models for implementing detailed security. | -| **[Tenancy](./reference/tenancy.mdx)** | This schema extension introduces tenancy for some of the schema nodes (circuits...) | | **[Topology](./reference/topology.mdx)** | A schema for defining and managing network topology, strategies, and services. | | **[VLAN Translation](./reference/vlan-translation.mdx)** | This schema extension is based on Juniper VLAN MAP, and not yet test out for other vendors. | @@ -109,23 +109,27 @@ This list provides an overview of the schemas available in this repository. Each | Name | Description | | ---- | ----------- | +| **[Aggregate](./reference/aggregate.mdx)** | This schema extension contains models to capture IP aggregates assigned by a Regional Internet Registry (RIR). It introduces an Aggregate node (top-level IPv4/IPv6 prefix) and an RIR node (registry or private entity managing address space). | | **[Cable](./reference/cable.mdx)** | This schema extension contains a basic Cable model allowing you to connect two endpoints. | | **[Circuit](./reference/circuit.mdx)** | This schema extension contains Circuits and ways to connect them with your infrastructure! The circuit could be a fiber connecting two sites, you would then have two endpoints, one on each site. | +| **[Circuit Contract](./reference/circuit_contract.mdx)** | This schema extension provides models for managing Circuit Contracts, enabling structured representation of service agreements with network providers. Compatible with Infrahub 1.8. | | **[Cluster](./reference/cluster.mdx)** | This schema extension contains the foundations to capture clusters. With this one in place you can unlock various clusters flavors (hosting cluster able to host VMs, firewall clusters built with specific appliances ...) | | **[Compute](./reference/compute.mdx)** | With this schema extension in place you will be able to capture all your physical servers. It also gives you the baseline to build virtualization. You might consider HostingCluster extension to go with! | | **[Cross Connect](./reference/cross_connect.mdx)** | This extension contains schema to capture Cross Connect. You can see it as "a cable operated by a provider". You will be able to attach it to a location and then connect endpoints to it (e.g. rear interface of a patch panel, circuit endpoint ...) | +| **[Device Modules](./reference/device_module.mdx)** | This schema extension lets you capture module bays on a Dcim Physical Device and the modules installed into them (e.g. fan trays, line cards). A device can have any number of module bays, and each bay can optionally hold one module. NOTE: This extension ships a standard Module/ModuleType node pair ready to use, alongside the generic Module/ModuleType you can build your own flavors on top of (see the device_psu_module, modules_linecards, or modules_routing_engine extensions). | +| **[Device PSU Module](./reference/device_psu_module.mdx)** | This schema extension adds a PSU (Power Supply Unit) flavor on top of the generic Module/ModuleType from extensions/device_module, so you can track power supplies installed in a device's module bays alongside PSU-specific attributes like wattage and hot-swap capability. | | **[DWDM](./reference/dwdm.mdx)** | This schema extension contains models for OADM (Optical Add Drop Multiplexer) supporting various WDM (Wavelength Division Multiplexing) technologies such as DWDM (Dense Wavelength Division Multiplexing) or CWDM (Coarse Wavelength Division Multiplexing). With some vendors, the tunable optics are not configured via the channel number but via the wavelength and/or the frequency. This model provides a unique entry in Infrahub for those. | -| **[Firewall Policer](./reference/firewall_policer.mdx)** | This schema extension contains models for VMs. You might consider Cluster or/and Hypervisor extension to go with! | | **[Hosting Cluster](./reference/hosting_cluster.mdx)** | A rather generic cluster built with compute units (e.g. servers) and able to host VMs. | | **[Interface Breakout](./reference/interface_breakout.mdx)** | This schema extension introduces relationships to support breakout interfaces, enabling you to document the breakout of a physical interface into smaller physical interfaces. | | **[Lag](./reference/lag.mdx)** | This schema extension includes models for Link Aggregation Groups (LAGs), enabling you to link physical interfaces as building blocs of your LAG interface. It can be used in standard networking environments as well as in compute scenarios, such as capturing bond interfaces. | | **[Location Minimal](./reference/location_minimal.mdx)** | This schema extension is minimal but will provide you with basic items to store location related data. | +| **[Location Site](./reference/location_site.mdx)** | This schema extension introduces a standalone Location.Site node (with facility, physical address, timezone, and status). It defines the same Site node as extensions/location_minimal, so load one or the other, not both. | | **[MLAG](./reference/mlag.mdx)** | This schema extension contains the foundations to capture Multi-Chassis Link Aggregation Group (MLAG). It comes on top of the LAG extension. In this implementation, a MLAG interface is essentially a LAG interface but linked to a MLAG domain (instead of a device). The MLAG domain regroup devices together (usually 2) and is built over LAG interfaces used as peer-link between the devices. MLAG interfaces defined at the MLAG domain level are then spread across all devices in the domain. Note: This is a very minimalist implementation of MLAG, the goal is to make it easy to blend with existing models you might have. For example, if you are operating in a data center fabric environment you might already have a LeafGroup or similar concept. In that case you can have your LeafGroup inherit from GenericMlagDomain and add the necessary relationships/attributes. Next steps: - Add support for layer 3 overlay for MLAG interfaces (loopback, peer address ...) - Create virtual relationship so MLAG interfaces can be seen on the devices in the domain | -| **[Modules](./reference/modules.mdx)** | This schema extension allows you to capture Device Modules related information like the serial number or the status. You can insert the Module into a Dcim Physical Device. NOTE: This extension doesn't contain any Nodes, you can use the extension module_linecards or modules_routing_engine to use it | | **[Patch Panel](./reference/patch_panel.mdx)** | This schema extension allows you to capture patch panel related information like rear/front interfaces and mapping between them. You can insert the patch panel into a rack and leverage the device type model. Finally you can also capture information about potential modules you would insert into your patch panel. NOTE: This extension is compatible with all sort of connectors, meaning you can plug cable, circuits, cross-connect to front & rear interfaces! | | **[Peering IXP](./reference/peering_ixp.mdx)** | This schema extension contains all you need to model anything revolving around internet peering (Exchange points ...)! | | **[Physical Disk](./reference/physical_disk.mdx)** | Simple schema allowing you to capture physical disks information for the sake of inventory and lifecycle management. NOTE: This extension is compatible with all sort of device. You can apply the generic "DeviceWithPhysicalDisks" to particular model to enable disks tracking. You might also link that schema to location for instance to capture spares. | | **[QinQ](./reference/qinq.mdx)** | This schema extension brings extensions to VLAN model in order to support QinQ. | +| **[Rack](./reference/rack.mdx)** | This schema extension introduces a Rack model representing a physical equipment rack installed at a site. Racks can be placed at a LocationSite and can host devices and other equipment. | | **[Routing](./reference/routing.mdx)** | This schema extension contains generics to create Routing Protocol "Instance". The idea is to create one Routing Protocol instance per IpamVRF + DcimDevice pair. | | **[Routing Aggregate](./reference/routing_aggregate.mdx)** | This schema extension contains all you need to model the Aggregate Routing Protocol. | | **[Routing BGP](./reference/routing_bgp.mdx)** | This schema extension contains all you need to model your BGP platform. | @@ -140,7 +144,7 @@ This list provides an overview of the schemas available in this repository. Each | **[Routing Policies OSPF](./reference/routing_policies_ospf.mdx)** | This extension is using the Routing Policies extensions and the Routing OSPF one together. | | **[SFP](./reference/sfp.mdx)** | This schema extension gives you all the models you need to document Small Form-factor Pluggable (SFP). You can either plug it into an interface or attach it to a location (e.g. it's a spare SFP stored in a rack). Improvements: - As of now there is no verification with type / form factor / protocol / distance ... - You could plug any SFP into any equipment interface (e.g. a virtual interface ...) - You could link a SFP to an interface AND a location ... | | **[SNMP](./reference/snmp.mdx)** | This schema extension contains models for SNMP Communities and SNMP Clients. As you can see this extension is not linked to Tenancy or Device, as you could decide to link the Community to different models based on your use case. | -| **[Topology](./reference/topology.mdx)** | This schema extension introduces abstract network pods and services running in the pods, such as MPLS and EVPN. | +| **[Tenancy](./reference/tenancy.mdx)** | This schema extension introduces a Tenant node that can own devices, IP prefixes/addresses, and hosting locations. See the comment at the bottom of `tenancy.yml` for an example of how to extend tenancy onto optional extension nodes such as `DcimCircuit`. | | **[Users](./reference/users.mdx)** | This schema extension contains models for account management. | | **[VLAN](./reference/vlan.mdx)** | This schema extension contains models to support VLANs in you network. | | **[VRF](./reference/vrf.mdx)** | This schema extension contains models to support VRF in your network. | @@ -157,4 +161,4 @@ This error indicates that the schema you are trying to load has dependencies on To resolve this, ensure that you have loaded all required schemas before attempting to load the one in question. You can find the list of dependencies in the schema documentation. -::: +::: \ No newline at end of file diff --git a/docs/docs/reference/aggregate.mdx b/docs/docs/reference/aggregate.mdx new file mode 100644 index 0000000..d776ea9 --- /dev/null +++ b/docs/docs/reference/aggregate.mdx @@ -0,0 +1,120 @@ +--- +title: Aggregate +--- + +This schema extension contains models to capture IP aggregates assigned by a Regional Internet Registry (RIR). It introduces an Aggregate node (top-level IPv4/IPv6 prefix) and an RIR node (registry or private entity managing address space). + +## Details + +- **Dependencies:** + - [base](dcim) + +## Nodes + +### Aggregate + +- **Label:** Aggregate +- **Description:** An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. +- **Namespace:** Ipam +- **Icon:** mdi:ip-network +- **Human Friendly ID:** prefix__value +- **Inherit From:** BuiltinIPPrefix + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| description | | Text | True | | | +| date_added | | DateTime | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| rir | OrganizationRIR | False | one | Attribute | + +### RIR + +- **Label:** RIR +- **Description:** A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or a private entity managing private address space. +- **Namespace:** Organization +- **Icon:** mdi:certificate +- **Inherit From:** OrganizationGeneric + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| is_private | Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. | Boolean | | False | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| aggregates | IpamAggregate | True | many | Generic | + +## Code + +```yaml +version: '1.0' +nodes: +- name: Aggregate + namespace: Ipam + description: An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. + label: Aggregate + icon: mdi:ip-network + menu_placement: OrganizationRIR + include_in_menu: true + order_by: + - prefix__value + display_label: prefix__value + human_friendly_id: + - prefix__value + inherit_from: + - BuiltinIPPrefix + attributes: + - name: description + kind: Text + optional: true + order_weight: 1100 + - name: date_added + label: Date Added + kind: DateTime + optional: true + order_weight: 1200 + relationships: + - name: rir + label: RIR + peer: OrganizationRIR + identifier: aggregate__rir + optional: false + cardinality: one + kind: Attribute + order_weight: 1000 +- name: RIR + namespace: Organization + description: A Regional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC) or + a private entity managing private address space. + label: RIR + icon: mdi:certificate + include_in_menu: true + inherit_from: + - OrganizationGeneric + attributes: + - name: is_private + label: Private + description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address + space. + kind: Boolean + default_value: false + order_weight: 1300 + relationships: + - name: aggregates + peer: IpamAggregate + identifier: aggregate__rir + optional: true + cardinality: many + kind: Generic + order_weight: 1400 + +``` \ No newline at end of file diff --git a/docs/docs/reference/cable.mdx b/docs/docs/reference/cable.mdx index b3cdc51..5d17f72 100644 --- a/docs/docs/reference/cable.mdx +++ b/docs/docs/reference/cable.mdx @@ -23,7 +23,7 @@ This schema extension contains a basic Cable model allowing you to connect two e | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | True | | connected, planned | +| status | | Dropdown | False | connected | connected, planned | | cable_type | | Dropdown | True | | cat3, cat5, cat5e, cat6, cat6a, cat7, cat7a, cat8, mmf-om1, mmf-om2, mmf-om3, mmf-om4, mmf-om5, smf-os1, smf-os2, dac-passive, dac-active, aoc, coaxial, mrj21-trunk, power, usb | | color | | Dropdown | True | | dark-red, red, pink, rose, fuchsia, purple, dark-purple, indigo, blue, light-blue, cyan, teal, aqua, dark-green, green, light-green, lime, yellow, amber, orange, dark-orange, brown, light-grey, grey, dark-grey, black | | label | | Text | True | | | @@ -39,22 +39,27 @@ nodes: description: Physical cable connecting two endpoints label: Cable icon: mdi:cable-data + display_label: label__value + menu_placement: DcimDevice + order_by: + - label__value inherit_from: - DcimConnector attributes: - name: status kind: Dropdown - optional: true + optional: false + default_value: connected order_weight: 1000 choices: - name: connected label: Connected description: Fully operational and currently in connected - color: '#7fbf7f' + color: '#00d25b' - name: planned label: Planned description: In the process of being set up - color: '#ffff7f' + color: '#2196f3' - name: cable_type kind: Dropdown optional: true diff --git a/docs/docs/reference/circuit.mdx b/docs/docs/reference/circuit.mdx index e5aa791..3cb59c3 100644 --- a/docs/docs/reference/circuit.mdx +++ b/docs/docs/reference/circuit.mdx @@ -26,16 +26,16 @@ This schema extension contains Circuits and ways to connect them with your infra | ---- | ----------- | ---- | -------- | ------------- | ------- | | circuit_id | | Text | | | | | description | | Text | True | | | -| circuit_type | Specifies the type of circuit. | Dropdown | | | upstream, peering, dark_fiber, mpls | -| status | | Dropdown | | | active, provisioning, maintenance, drained | +| commit_rate | | Number | True | | | +| circuit_type | Specifies the type of circuit. | Dropdown | True | | internet_access, point_to_point, peering, dark_fiber, mpls | +| status | | Dropdown | False | active | active, provisioning, maintenance, drained | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | provider | OrganizationProvider | False | one | Attribute | -| location | LocationHosting | True | one | Attribute | -| enpoints | DcimCircuitEndpoint | True | many | Component | +| endpoints | DcimCircuitEndpoint | True | many | Component | ### CircuitEndpoint @@ -44,7 +44,7 @@ This schema extension contains Circuits and ways to connect them with your infra - **Namespace:** Dcim - **Icon:** mdi:ethernet - **Uniqueness Constraints:** - - circuit, name__value + - circuit, side__value - **Human Friendly ID:** circuit__circuit_id__value, name__value - **Inherit From:** DcimEndpoint @@ -52,8 +52,9 @@ This schema extension contains Circuits and ways to connect them with your infra | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the circuit endoint, could be a MMR position for instance. | Text | | | | -| status | | Dropdown | True | | active, provisioning, maintenance, drained | +| side | | Dropdown | False | | a, z | +| name | | Text | False | | | +| status | | Dropdown | False | active | active, provisioning, maintenance, drained | | description | | Text | True | | | #### Relationships @@ -85,7 +86,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| circuits | DcimCircuit | True | many | | +| circuit_endpoints | DcimCircuitEndpoint | True | many | | ## Code @@ -109,64 +110,70 @@ nodes: - name: description kind: Text optional: true + - name: commit_rate + label: Commit Rate (Kbps) + kind: Number + optional: true + order_weight: 1100 - name: circuit_type kind: Dropdown + optional: true description: Specifies the type of circuit. choices: - - name: upstream - label: Upstream - description: Connection to an upstream provider or Internet service provider - (ISP) + - name: internet_access + label: Internet Access + description: Broadband or dedicated internet access circuit. color: '#1e90ff' + - name: point_to_point + label: Point to Point + description: Dedicated layer 2 or layer 3 link between two sites. + color: '#a0c878' - name: peering label: Peering - description: Connection to another network for exchange of traffic + description: Connection to another network for exchange of traffic. color: '#20b2aa' - name: dark_fiber label: Dark Fiber - description: Leased, unlit fiber for customer management and operation - color: '#333333' + description: Leased, unlit fiber managed and operated by the customer. + color: '#555555' - name: mpls label: MPLS - description: Multi-Protocol Label Switching circuit for QoS-based routing + description: Multi-Protocol Label Switching circuit for QoS-based routing. color: '#7f00ff' - name: status kind: Dropdown + optional: false + default_value: active choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' + color: '#ff9800' - name: drained label: Drained description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#9e9e9e' relationships: - name: provider peer: OrganizationProvider optional: false cardinality: one kind: Attribute - - name: location - label: Location - peer: LocationHosting - optional: true - cardinality: one - kind: Attribute - order_weight: 1500 - - name: enpoints + identifier: circuit__provider + - name: endpoints peer: DcimCircuitEndpoint optional: true cardinality: many kind: Component + identifier: circuit__endpoint - name: CircuitEndpoint namespace: Dcim description: A circuit endpoint, could be a position in a MMR... @@ -180,35 +187,52 @@ nodes: - name__value uniqueness_constraints: - - circuit - - name__value + - side__value order_by: - name__value display_label: name__value attributes: + - name: side + label: Side + kind: Dropdown + optional: false + order_weight: 950 + choices: + - name: a + label: A + description: A-side of the circuit. + - name: z + label: Z + description: Z-side of the circuit. - name: name kind: Text - description: Name of the circuit endoint, could be a MMR position for instance. + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ circuit__circuit_id__value }}_{{ side__value | upper }}' + read_only: true + optional: false order_weight: 1000 - name: status kind: Dropdown - optional: true + optional: false + default_value: active choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' + color: '#ff9800' - name: drained label: Drained description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#9e9e9e' - name: description kind: Text optional: true @@ -219,6 +243,7 @@ nodes: optional: false cardinality: one kind: Parent + identifier: circuit__endpoint - name: location label: Location peer: LocationHosting @@ -226,6 +251,7 @@ nodes: cardinality: one kind: Attribute order_weight: 1500 + identifier: circuit_endpoint__location extensions: nodes: - kind: OrganizationProvider @@ -234,11 +260,13 @@ extensions: peer: DcimCircuit cardinality: many optional: true + identifier: circuit__provider - kind: LocationHosting relationships: - - name: circuits - peer: DcimCircuit + - name: circuit_endpoints + peer: DcimCircuitEndpoint cardinality: many optional: true + identifier: circuit_endpoint__location ``` \ No newline at end of file diff --git a/docs/docs/reference/circuit_contract.mdx b/docs/docs/reference/circuit_contract.mdx index 5b9becc..c1dc729 100644 --- a/docs/docs/reference/circuit_contract.mdx +++ b/docs/docs/reference/circuit_contract.mdx @@ -18,7 +18,6 @@ This schema extension provides models for managing Circuit Contracts, enabling s - **Description:** A contract document associated with a circuit service, including terms, costs, and validity period. - **Namespace:** Dcim - **Icon:** mdi:file-sign -- **Display Label:** Contract (Circuit `{{ circuit__circuit_id__value }}`) - **Human Friendly ID:** name__value - **Inherit From:** CoreFileObject @@ -110,6 +109,7 @@ nodes: cardinality: one optional: false order_weight: 950 + identifier: circuit__contract extensions: nodes: - kind: DcimCircuit @@ -118,5 +118,6 @@ extensions: peer: DcimCircuitContract cardinality: one optional: true + identifier: circuit__contract ``` \ No newline at end of file diff --git a/docs/docs/reference/cluster.mdx b/docs/docs/reference/cluster.mdx index 864af9e..40a64d4 100644 --- a/docs/docs/reference/cluster.mdx +++ b/docs/docs/reference/cluster.mdx @@ -14,7 +14,6 @@ This schema extension contains the foundations to capture clusters. With this on ### Generic -- **Label:** Clusters - **Description:** A cluster of machines hosting services or other machines. - **Namespace:** Cluster - **Icon:** mdi:dots-hexagon @@ -77,8 +76,8 @@ generics: - name: Generic namespace: Cluster description: A cluster of machines hosting services or other machines. - label: Clusters icon: mdi:dots-hexagon + include_in_menu: false human_friendly_id: - name__value order_by: diff --git a/docs/docs/reference/compute.mdx b/docs/docs/reference/compute.mdx index ee856bc..e003eac 100644 --- a/docs/docs/reference/compute.mdx +++ b/docs/docs/reference/compute.mdx @@ -23,7 +23,7 @@ With this schema extension in place you will be able to capture all your physica | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | False | | active, provisioning, maintenance, drained | +| status | | Dropdown | False | active | active, provisioning, maintenance, drained | ### VirtualMachine @@ -85,12 +85,14 @@ generics: peer: VirtualizationVirtualMachine kind: Component optional: true + identifier: host__virtual_machine nodes: - name: PhysicalServer namespace: Compute description: A physical server with fixed resources and specific hardware characteristics. label: Physical Server icon: mdi:server + menu_placement: DcimDevice inherit_from: - ComputeGenericUnit - DcimGenericDevice @@ -100,29 +102,31 @@ nodes: - name: status kind: Dropdown optional: false + default_value: active order_weight: 1100 choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' + color: '#ff9800' - name: drained label: Drained description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#9e9e9e' - name: VirtualMachine namespace: Virtualization description: A virtual machine hosted on a server or a cluster. label: Virtual Machine icon: carbon:virtual-machine + include_in_menu: true inherit_from: - ComputeGenericUnit - DcimGenericDevice @@ -159,5 +163,6 @@ nodes: cardinality: one kind: Attribute order_weight: 1500 + identifier: host__virtual_machine ``` \ No newline at end of file diff --git a/docs/docs/reference/dcim.mdx b/docs/docs/reference/dcim.mdx index 9d6691b..0b8ed0c 100644 --- a/docs/docs/reference/dcim.mdx +++ b/docs/docs/reference/dcim.mdx @@ -16,8 +16,6 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information - **Description:** A model of device - **Namespace:** Dcim - **Icon:** mdi:poll -- **Uniqueness Constraints:** - - manufacturer, name__value - **Human Friendly ID:** name__value #### Attributes @@ -35,9 +33,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| platform | DcimPlatform | | one | Attribute | | manufacturer | OrganizationManufacturer | False | one | Attribute | -| tags | BuiltinTag | True | many | Attribute | ### Platform @@ -45,8 +41,6 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information - **Description:** A Platform represent the type of software running on a device. - **Namespace:** Dcim - **Icon:** mdi:application-cog-outline -- **Uniqueness Constraints:** - - name__value - **Human Friendly ID:** name__value #### Attributes @@ -55,23 +49,18 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | | | | | description | | Text | True | | | -| nornir_platform | | Text | True | | | -| napalm_driver | | Text | True | | | -| netmiko_device_type | | Text | True | | | -| ansible_network_os | | Text | True | | | -| containerlab_os | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| devices | DcimGenericDevice | True | many | | +| devices | DcimGenericDevice | True | many | Generic | | manufacturer | OrganizationManufacturer | | one | Attribute | ### Device - **Label:** Network Device -- **Description:** A configurable network device for managing and directing data traffic, including routers, switches... +- **Description:** A configurable network device including routers, switches... - **Namespace:** Dcim - **Icon:** clarity:network-switch-solid - **Inherit From:** CoreArtifactTarget, DcimGenericDevice, DcimPhysicalDevice @@ -80,7 +69,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | False | | active, provisioning, maintenance, drained | +| status | | Dropdown | False | active | active, reserved, provisioning, maintenance, deprecated | | role | | Dropdown | True | | core, edge, cpe, spine, leaf, tor | ### Physical @@ -90,6 +79,12 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information - **Namespace:** Interface - **Inherit From:** DcimInterface, InterfaceLayer2, InterfaceLayer3, DcimEndpoint, InterfaceHasSubInterface +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| mtu | | Number | | 1500 | | + ### Virtual - **Label:** Virtual Interface @@ -119,7 +114,6 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | | | | | description | | Text | True | | | -| os_version | | Text | True | | | #### Relationships @@ -139,6 +133,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | | position | Lowest unit. | Number | True | | | | serial | | Text | True | | | | rack_face | On which face of the rack the device is mounted. | Dropdown | False | front | front, rear | @@ -170,13 +165,14 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| connected_endpoints | DcimEndpoint | True | many | Generic | +| connected_endpoints | DcimEndpoint | True | many | Attribute | ### Interface - **Label:** Interface - **Description:** Generic Network Interface - **Namespace:** Dcim +- **Icon:** mdi:ethernet - **Uniqueness Constraints:** - device, name__value - **Human Friendly ID:** device__name__value, name__value @@ -187,16 +183,14 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | Name of the interface | Text | | | | | description | A brief description of the interface | Text | True | | | -| mtu | | Number | | 1514 | | -| status | The status of the interface | Dropdown | | active | provisioning, free, active, maintenance, disabled, deleted, outage | -| role | The role of the interface in the network | Dropdown | True | | lag, core, cust, access, management, peering, upstream | +| status | The status of the interface | Dropdown | False | active | provisioning, free, active, maintenance, disabled | +| role | The role of the interface in the network | Dropdown | True | | core, customer, access, management, peering, upstream | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | device | DcimGenericDevice | False | one | Parent | -| tags | BuiltinTag | True | many | Attribute | ### Layer2 @@ -208,6 +202,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | +| mac_address | | MacAddress | True | | | | l2_mode | Layer 2 mode of the interface | Dropdown | True | | access, trunk, trunk_all | ### Layer3 @@ -216,13 +211,6 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information - **Description:** Layer 3 specific attributes for network interfaces - **Namespace:** Interface -#### Attributes - -| name | description | kind | optional | default_value | choices | -| ---- | ----------- | ---- | -------- | ------------- | ------- | -| dot1q_id | Dot1Q VLAN ID | Number | True | | | -| mac_address | | Text | True | | | - #### Relationships | name | peer | optional | cardinality | kind | @@ -250,6 +238,7 @@ generics: description: Generic Device object. label: Device icon: mdi:server + include_in_menu: false human_friendly_id: - name__value order_by: @@ -264,10 +253,6 @@ generics: kind: Text optional: true order_weight: 2000 - - name: os_version - kind: Text - optional: true - order_weight: 2200 relationships: - name: interfaces peer: DcimInterface @@ -284,6 +269,7 @@ generics: - name: primary_address peer: IpamIPAddress label: Primary IP Address + identifier: device__primary_address optional: true cardinality: one kind: Attribute @@ -294,12 +280,17 @@ generics: cardinality: one kind: Attribute order_weight: 1250 + identifier: device__platform - name: PhysicalDevice namespace: Dcim description: Generic holding attributes and relationships relevant for physical device. include_in_menu: false attributes: + - name: name + kind: Text + unique: true + allow_override: any - name: position label: Position (U) description: Lowest unit. @@ -338,6 +329,7 @@ generics: cardinality: one kind: Attribute order_weight: 1500 + identifier: physical_device__location - name: Endpoint namespace: Dcim description: Generic Endpoint to receive a connector. @@ -349,6 +341,7 @@ generics: cardinality: one order_weight: 1500 kind: Attribute + identifier: connector__endpoint - name: Connector namespace: Dcim description: Generic Connector to link two endpoints together. @@ -359,12 +352,15 @@ generics: optional: true cardinality: many order_weight: 1500 - kind: Generic + kind: Attribute + identifier: connector__endpoint - name: Interface namespace: Dcim description: Generic Network Interface label: Interface - include_in_menu: false + icon: mdi:ethernet + include_in_menu: true + menu_placement: DcimDevice display_label: name__value order_by: - device__name__value @@ -385,59 +381,43 @@ generics: optional: true description: A brief description of the interface order_weight: 1100 - - name: mtu - label: MTU - kind: Number - default_value: 1514 - order_weight: 1300 - name: status kind: Dropdown description: The status of the interface + optional: false + default_value: active choices: - name: provisioning label: Provisioning description: Interface is being provisioned. - color: '#A9DFBF' + color: '#f0ad4e' - name: free label: Free description: Interface is unused. - color: '#CDEACC' + color: '#c8e6c9' - name: active label: Active description: Interface is active and operational. - color: '#A9CCE3' + color: '#00d25b' - name: maintenance label: Maintenance description: Interface is under maintenance. - color: '#FFF2CC' + color: '#ff9800' - name: disabled label: Disabled description: Interface has been disabled. - color: '#D3D3D3' - - name: deleted - label: Deleted - description: Interface has been deleted. - color: '#FAD7A0' - - name: outage - label: Outage - description: Interface is currently experiencing an outage. - color: '#F4CCCC' - default_value: active + color: '#6c757d' order_weight: 1200 - name: role kind: Dropdown optional: true description: The role of the interface in the network choices: - - name: lag - label: Lag - description: Interface LAG. - color: '#A9DFBF' - name: core label: Core Interface description: Central part of the network. color: '#A9CCE3' - - name: cust + - name: customer label: Customer Interface description: Interface dedicated to customer connections. color: '#D2B4DE' @@ -466,18 +446,17 @@ generics: cardinality: one kind: Parent order_weight: 1025 - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 3000 - name: Layer2 namespace: Interface include_in_menu: false description: Layer 2 specific attributes for network interfaces label: Layer 2 Interface attributes: + - name: mac_address + label: MAC Address + kind: MacAddress + optional: true + order_weight: 1400 - name: l2_mode label: Layer2 Mode kind: Dropdown @@ -499,22 +478,11 @@ generics: include_in_menu: false description: Layer 3 specific attributes for network interfaces label: Layer 3 Interface - attributes: - - name: dot1q_id - label: VLAN ID (dot1q) - kind: Number - description: Dot1Q VLAN ID - order_weight: 1600 - optional: true - - name: mac_address - label: Mac Address - kind: Text - optional: true - order_weight: 1550 relationships: - name: ip_addresses label: IP Addresses peer: IpamIPAddress + identifier: ip_address__interface cardinality: many kind: Attribute optional: true @@ -540,15 +508,13 @@ nodes: description: A model of device label: Device Type icon: mdi:poll + menu_placement: DcimDevice human_friendly_id: - name__value display_label: name__value order_by: - manufacturer__name__value - name__value - uniqueness_constraints: - - - manufacturer - - name__value attributes: - name: name kind: Text @@ -580,36 +546,25 @@ nodes: kind: Number order_weight: 1600 relationships: - - name: platform - peer: DcimPlatform - cardinality: one - kind: Attribute - order_weight: 1300 - name: manufacturer peer: OrganizationManufacturer cardinality: one kind: Attribute order_weight: 1250 optional: false - - name: tags - peer: BuiltinTag - optional: true - cardinality: many - kind: Attribute - order_weight: 2000 + identifier: manufacturer__device_type - name: Platform namespace: Dcim description: A Platform represent the type of software running on a device. label: Platform icon: mdi:application-cog-outline + menu_placement: DcimDevice human_friendly_id: - name__value display_label: name__value order_by: - manufacturer__name__value - name__value - uniqueness_constraints: - - - name__value attributes: - name: name kind: Text @@ -619,42 +574,25 @@ nodes: kind: Text optional: true order_weight: 1200 - - name: nornir_platform - kind: Text - optional: true - order_weight: 1500 - - name: napalm_driver - kind: Text - optional: true - order_weight: 1600 - - name: netmiko_device_type - kind: Text - optional: true - order_weight: 1700 - - name: ansible_network_os - kind: Text - optional: true - order_weight: 1800 - - name: containerlab_os - kind: Text - optional: true - order_weight: 1900 relationships: - name: devices peer: DcimGenericDevice optional: true cardinality: many + kind: Generic order_weight: 1350 + identifier: device__platform - name: manufacturer peer: OrganizationManufacturer cardinality: one kind: Attribute order_weight: 1300 + identifier: manufacturer__platform - name: Device label: Network Device - description: A configurable network device for managing and directing data traffic, - including routers, switches... + description: A configurable network device including routers, switches... icon: clarity:network-switch-solid + generate_template: true namespace: Dcim inherit_from: - CoreArtifactTarget @@ -664,24 +602,29 @@ nodes: - name: status kind: Dropdown optional: false + default_value: active order_weight: 1100 choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' + - name: reserved + label: Reserved + description: Reserved for future use, not yet active. + color: '#4d90fe' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' - - name: drained - label: Drained - description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#ff9800' + - name: deprecated + label: Deprecated + description: No longer in use and scheduled for removal. + color: '#e04040' - name: role kind: Dropdown optional: true @@ -722,6 +665,12 @@ nodes: - DcimEndpoint - InterfaceHasSubInterface include_in_menu: false + attributes: + - name: mtu + label: MTU + kind: Number + default_value: 1500 + order_weight: 1300 - name: Virtual namespace: Interface label: Virtual Interface diff --git a/docs/docs/reference/device_module.mdx b/docs/docs/reference/device_module.mdx new file mode 100644 index 0000000..43bc679 --- /dev/null +++ b/docs/docs/reference/device_module.mdx @@ -0,0 +1,327 @@ +--- +title: Device Modules +--- + +This schema extension lets you capture module bays on a Dcim Physical Device and the modules installed into them (e.g. fan trays, line cards). A device can have any number of module bays, and each bay can optionally hold one module. + +NOTE: This extension ships a standard Module/ModuleType node pair ready to use, alongside the generic Module/ModuleType you can build your own flavors on top of (see the device_psu_module, modules_linecards, or modules_routing_engine extensions). + +## Details + +- **Dependencies:** + - [base](dcim) + +## Nodes + +### ModuleBay + +- **Label:** Module Bay +- **Description:** A physical bay on a device that can receive a module. +- **Namespace:** Dcim +- **Icon:** mdi:tray +- **Uniqueness Constraints:** + - device, name__value + - device, position__value +- **Human Friendly ID:** computed_name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| computed_name | Name computed from the device and bay name. | Text | False | | | +| name | Name of the bay, e.g. 'slot 1' or 'psu 1'. | Text | | | | +| position | Numeric position of the bay within the device, used for ordering (e.g. slot 1, 2, 3...). | Number | False | | | +| description | | Text | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| device | DcimPhysicalDevice | False | one | Parent | +| installed_module | DcimGenericModule | True | one | Attribute | + +### Module + +- **Label:** Module +- **Description:** Standard module installed in a device. +- **Namespace:** Dcim +- **Icon:** mdi:expansion-card +- **Inherit From:** DcimGenericModule + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| computed_name | Name computed from the module bay and module type. | Text | False | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| module_type | DcimModuleType | False | one | Attribute | + +### ModuleType + +- **Label:** Module Type +- **Description:** Standard module type, defining common specifications for a Module. +- **Namespace:** Dcim +- **Icon:** mdi:database-cog +- **Inherit From:** DcimGenericModuleType + +## Generics + +### GenericModule + +- **Label:** Module +- **Description:** A generic module, such as a Linecard or Routing Engine, installed in a module bay. +- **Namespace:** Dcim +- **Icon:** mdi:expansion-card +- **Human Friendly ID:** computed_name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| computed_name | | Text | False | | | +| serial_number | Serial number of the module, if known. | Text | True | | | +| description | | Text | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| module_bay | DcimModuleBay | False | one | Attribute | + +### GenericModuleType + +- **Label:** Module Type +- **Description:** A generic module type, with common specifications like part number and manufacturer. +- **Namespace:** Dcim +- **Icon:** mdi:database-cog +- **Uniqueness Constraints:** + - name__value, manufacturer +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | Name of the module type. | Text | | | | +| description | Description of the module type. | Text | True | | | +| part_number | Part number of the module. | Text | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| manufacturer | OrganizationManufacturer | False | one | Attribute | + +## Extensions + +:::note + +In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. + +::: + +### DcimPhysicalDevice + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| module_bays | DcimModuleBay | True | many | Component | + +## Code + +```yaml +version: '1.0' +generics: +- name: GenericModule + namespace: Dcim + description: A generic module, such as a Linecard or Routing Engine, installed in + a module bay. + label: Module + icon: mdi:expansion-card + human_friendly_id: + - computed_name__value + display_label: computed_name__value + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + allow_override: any + order_weight: 1000 + - name: serial_number + kind: Text + optional: true + description: Serial number of the module, if known. + order_weight: 1100 + - name: description + kind: Text + optional: true + order_weight: 1200 + relationships: + - name: module_bay + label: Module Bay + peer: DcimModuleBay + identifier: module_bay__module + optional: false + cardinality: one + kind: Attribute + order_weight: 900 +- name: GenericModuleType + namespace: Dcim + description: A generic module type, with common specifications like part number + and manufacturer. + label: Module Type + icon: mdi:database-cog + menu_placement: DcimGenericModule + display_label: name__value + uniqueness_constraints: + - - name__value + - manufacturer + human_friendly_id: + - name__value + order_by: + - manufacturer__name__value + - name__value + attributes: + - name: name + kind: Text + unique: true + description: Name of the module type. + order_weight: 1000 + - name: description + kind: Text + optional: true + description: Description of the module type. + order_weight: 1100 + - name: part_number + label: Part Number + kind: Text + optional: true + description: Part number of the module. + order_weight: 1200 + relationships: + - name: manufacturer + peer: OrganizationManufacturer + identifier: manufacturer__moduletype + cardinality: one + optional: false + kind: Attribute + description: Manufacturer of the module type. + order_weight: 1250 +nodes: +- name: ModuleBay + namespace: Dcim + description: A physical bay on a device that can receive a module. + label: Module Bay + icon: mdi:tray + menu_placement: DcimDevice + human_friendly_id: + - computed_name__value + display_label: computed_name__value + order_by: + - device__name__value + - name__value + uniqueness_constraints: + - - device + - name__value + - - device + - position__value + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ device__name__value }} > {{ name__value }}' + description: Name computed from the device and bay name. + order_weight: 800 + - name: name + kind: Text + description: Name of the bay, e.g. 'slot 1' or 'psu 1'. + order_weight: 1000 + - name: position + kind: Number + description: Numeric position of the bay within the device, used for ordering + (e.g. slot 1, 2, 3...). + optional: false + parameters: + min_value: 1 + order_weight: 1050 + - name: description + kind: Text + optional: true + order_weight: 1100 + relationships: + - name: device + label: Device + peer: DcimPhysicalDevice + identifier: device__module_bays + optional: false + cardinality: one + kind: Parent + order_weight: 900 + - name: installed_module + label: Installed Module + peer: DcimGenericModule + identifier: module_bay__module + optional: true + cardinality: one + kind: Attribute + order_weight: 1200 +- name: Module + namespace: Dcim + description: Standard module installed in a device. + label: Module + icon: mdi:expansion-card + include_in_menu: false + inherit_from: + - DcimGenericModule + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ module_bay__computed_name__value }} ({{ module_type__name__value + }})' + description: Name computed from the module bay and module type. + order_weight: 1000 + relationships: + - name: module_type + peer: DcimModuleType + optional: false + cardinality: one + kind: Attribute + order_weight: 950 +- name: ModuleType + namespace: Dcim + description: Standard module type, defining common specifications for a Module. + label: Module Type + icon: mdi:database-cog + include_in_menu: false + inherit_from: + - DcimGenericModuleType +extensions: + nodes: + - kind: DcimPhysicalDevice + relationships: + - name: module_bays + label: Module Bays + peer: DcimModuleBay + identifier: device__module_bays + cardinality: many + kind: Component + optional: true + description: Module bays available on this device. + +``` \ No newline at end of file diff --git a/docs/docs/reference/device_psu_module.mdx b/docs/docs/reference/device_psu_module.mdx new file mode 100644 index 0000000..3ce6d53 --- /dev/null +++ b/docs/docs/reference/device_psu_module.mdx @@ -0,0 +1,105 @@ +--- +title: Device PSU Module +--- + +This schema extension adds a PSU (Power Supply Unit) flavor on top of the generic Module/ModuleType from extensions/device_module, so you can track power supplies installed in a device's module bays alongside PSU-specific attributes like wattage and hot-swap capability. + +## Details + +- **Dependencies:** + - [base](dcim) + - [extensions/device_module](device_module) + +## Nodes + +### PSUModule + +- **Label:** PSU Module +- **Description:** Power Supply Unit (PSU) installed in a device. +- **Namespace:** Dcim +- **Icon:** mdi:power-plug +- **Inherit From:** DcimGenericModule + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| computed_name | Name computed from the module bay and module type. | Text | False | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| module_type | DcimPSUModuleType | False | one | Attribute | + +### PSUModuleType + +- **Label:** PSU Module Type +- **Description:** PSU module type, defining common specifications such as wattage and hot-swap capability. +- **Namespace:** Dcim +- **Icon:** mdi:database-cog +- **Inherit From:** DcimGenericModuleType + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| wattage | Wattage in watts. | Number | True | | | +| hotswappable | Whether the PSU can be replaced without powering down the device. | Boolean | False | False | | + +## Code + +```yaml +version: '1.0' +nodes: +- name: PSUModule + namespace: Dcim + description: Power Supply Unit (PSU) installed in a device. + label: PSU Module + icon: mdi:power-plug + include_in_menu: false + inherit_from: + - DcimGenericModule + attributes: + - name: computed_name + kind: Text + read_only: true + optional: false + unique: true + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ module_bay__computed_name__value }} ({{ module_type__name__value + }})' + description: Name computed from the module bay and module type. + order_weight: 1000 + relationships: + - name: module_type + peer: DcimPSUModuleType + optional: false + cardinality: one + kind: Attribute + order_weight: 950 +- name: PSUModuleType + namespace: Dcim + description: PSU module type, defining common specifications such as wattage and + hot-swap capability. + label: PSU Module Type + icon: mdi:database-cog + include_in_menu: false + inherit_from: + - DcimGenericModuleType + attributes: + - name: wattage + description: Wattage in watts. + kind: Number + optional: true + order_weight: 1300 + - name: hotswappable + label: Hot-Swappable + description: Whether the PSU can be replaced without powering down the device. + kind: Boolean + optional: false + default_value: false + order_weight: 1350 + +``` \ No newline at end of file diff --git a/docs/docs/reference/dwdm.mdx b/docs/docs/reference/dwdm.mdx index db6c99c..81c9cff 100644 --- a/docs/docs/reference/dwdm.mdx +++ b/docs/docs/reference/dwdm.mdx @@ -121,7 +121,7 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | | | | | description | | Text | True | | | -| connector_type | | Dropdown | | | FC, LC, LC_PC, LC_UPC, LC_APC, LSH, LSH_PC, LSH_UPC, LSH_APC, LX_5, LX_5_PC, LX_5_UPC, LX_5_APC, MPO, MTRJ, SC, SC_PC, SC_UPC, SC_APC, ST, CS, SN, SMA_905, SMA_906, URM_P2 | +| connector_type | | Dropdown | True | | FC, LC, LC_PC, LC_UPC, LC_APC, LSH, LSH_PC, LSH_UPC, LSH_APC, LX_5, LX_5_PC, LX_5_UPC, LX_5_APC, MPO, MTRJ, SC, SC_PC, SC_UPC, SC_APC, ST, CS, SN, SMA_905, SMA_906, URM_P2 | ## Code @@ -143,6 +143,7 @@ generics: order_weight: 2000 - name: connector_type kind: Dropdown + optional: true order_weight: 1100 choices: - name: FC @@ -251,7 +252,7 @@ nodes: - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -271,13 +272,13 @@ nodes: relationships: - name: front_interfaces peer: DcimOadmFrontInterface - identifier: front_interfaces + identifier: optical_multiplexer__front_interfaces optional: true cardinality: many kind: Component - name: rear_interface peer: DcimOadmRearInterface - identifier: rear_interfaces + identifier: optical_multiplexer__rear_interface optional: true cardinality: one kind: Component @@ -302,12 +303,13 @@ nodes: - name: optical_multiplexer peer: DcimOpticalMultiplexer order_weight: 900 - identifier: front_interfaces + identifier: optical_multiplexer__front_interfaces optional: false cardinality: one kind: Parent - name: channels peer: DcimWdmChannel + identifier: oadm_interface__channels order_weight: 1200 optional: true cardinality: many @@ -333,7 +335,7 @@ nodes: - name: optical_multiplexer peer: DcimOpticalMultiplexer order_weight: 900 - identifier: rear_interface + identifier: optical_multiplexer__rear_interface optional: false cardinality: one kind: Parent @@ -360,10 +362,11 @@ nodes: - name: channel kind: Number description: WDM channel number. + order_weight: 1000 - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -380,10 +383,12 @@ nodes: label: Wavelength (nm) kind: Text description: Wavelength of the channel in nm. + order_weight: 1200 - name: frequency label: Frequency (GHz) kind: Text description: Frequency of the channel in GHz. + order_weight: 1300 - name: WdmSFP namespace: Dcim inherit_from: @@ -396,7 +401,7 @@ nodes: - name: wdm_type kind: Dropdown description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1110 + order_weight: 1100 optional: false choices: - name: cwdm @@ -413,6 +418,7 @@ nodes: - name: wdm_channel label: WDM Channel peer: DcimWdmChannel + identifier: wdm_sfp__channel kind: Attribute cardinality: one optional: false diff --git a/docs/docs/reference/hosting_cluster.mdx b/docs/docs/reference/hosting_cluster.mdx index ad01f0c..3155fd5 100644 --- a/docs/docs/reference/hosting_cluster.mdx +++ b/docs/docs/reference/hosting_cluster.mdx @@ -25,8 +25,8 @@ A rather generic cluster built with compute units (e.g. servers) and able to hos | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| cluster_type | Type of the cluster. | Dropdown | | | aws, kvm, gcp, vmware | -| status | | Dropdown | False | | active, provisioning, maintenance, drained | +| technology | Underlying virtualisation or clustering technology. | Dropdown | | | vmware, kvm, hyper_v, xen, nutanix, openstack, kubernetes, public_cloud | +| status | | Dropdown | False | active | active, provisioning, maintenance, drained | ## Code @@ -38,49 +38,63 @@ nodes: label: Hosting Cluster description: A cluster hosting virtual machines. icon: mdi:dots-hexagon - menu_placement: ClusterGeneric + menu_placement: VirtualizationVirtualMachine inherit_from: - ClusterGeneric - VirtualizationHostVirtualMachine - ClusterGenericComputeUnitNodes attributes: - - name: cluster_type + - name: technology + label: Technology kind: Dropdown order_weight: 1200 - description: Type of the cluster. + description: Underlying virtualisation or clustering technology. choices: - - name: aws - label: Amazon Web Service - color: '#b90028' - - name: kvm - label: KVM - color: '#0082e2' - - name: gcp - label: Google Cloud Platform - color: '#e29200' - name: vmware - label: VMware + label: VMware vSphere color: '#3d8600' + - name: kvm + label: KVM / QEMU + color: '#0082e2' + - name: hyper_v + label: Hyper-V + color: '#00adef' + - name: xen + label: Xen / XenServer + color: '#f5821f' + - name: nutanix + label: Nutanix AHV + color: '#024da1' + - name: openstack + label: OpenStack + color: '#ed1944' + - name: kubernetes + label: Kubernetes + color: '#326ce5' + - name: public_cloud + label: Public Cloud + color: '#888888' - name: status kind: Dropdown optional: false + default_value: active order_weight: 1300 choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' + color: '#ff9800' - name: drained label: Drained description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#9e9e9e' ``` \ No newline at end of file diff --git a/docs/docs/reference/ipam.mdx b/docs/docs/reference/ipam.mdx index a332b9c..29c5022 100644 --- a/docs/docs/reference/ipam.mdx +++ b/docs/docs/reference/ipam.mdx @@ -10,6 +10,31 @@ Basic IPAM schema to capture IP addresses, subnets, and related information. ## Nodes +### Prefix + +- **Label:** Prefix +- **Description:** IPv4 or IPv6 network (with mask) +- **Namespace:** Ipam +- **Icon:** mdi:ip-network +- **Uniqueness Constraints:** + - prefix__value, ip_namespace +- **Human Friendly ID:** ip_namespace__name__value, prefix__value +- **Inherit From:** BuiltinIPPrefix + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| status | | Dropdown | False | active | active, deprecated, reserved | +| description | | Text | True | | | +| role | | Dropdown | True | | management, link, customer, supernet, backbone | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| scope | IpamPrefixScope | True | one | Attribute | + ### IPAddress - **Label:** IP Address @@ -18,85 +43,67 @@ Basic IPAM schema to capture IP addresses, subnets, and related information. - **Icon:** mdi:ip - **Uniqueness Constraints:** - address__value, ip_namespace -- **Human Friendly ID:** address__value, ip_namespace__name__value +- **Human Friendly ID:** ip_namespace__name__value, address__value - **Inherit From:** BuiltinIPAddress #### Attributes | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | +| description | | Text | True | | | +| status | | Dropdown | False | active | active, reserved, deprecated | +| role | | Dropdown | True | | loopback, secondary, anycast | | fqdn | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | +| primary_of | DcimGenericDevice | True | many | Attribute | | interface | InterfaceLayer3 | True | one | | -### Prefix +## Generics + +### VLANGroupScope -- **Label:** Prefix -- **Description:** IPv4 or IPv6 network (with mask) - **Namespace:** Ipam -- **Icon:** mdi:ip-network -- **Uniqueness Constraints:** - - prefix__value, ip_namespace -- **Human Friendly ID:** prefix__value, ip_namespace__name__value -- **Inherit From:** BuiltinIPPrefix -#### Attributes +### PrefixScope -| name | description | kind | optional | default_value | choices | -| ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | | | active, deprecated, reserved | -| role | | Dropdown | True | | loopback, management, public, server, supernet, technical, loopback-vtep | +- **Description:** Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). +- **Namespace:** Ipam #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| organization | OrganizationGeneric | True | one | Attribute | -| location | LocationHosting | True | one | Attribute | -| gateway | IpamIPAddress | True | one | Attribute | +| prefixes | IpamPrefix | True | many | Generic | ## Code ```yaml version: '1.0' -nodes: -- name: IPAddress +generics: +- name: VLANGroupScope namespace: Ipam - description: IP Address - label: IP Address - icon: mdi:ip include_in_menu: false - order_by: - - address__value - display_label: address__value - inherit_from: - - BuiltinIPAddress - uniqueness_constraints: - - - address__value - - ip_namespace - human_friendly_id: - - address__value - - ip_namespace__name__value - attributes: - - name: fqdn - label: FQDN - kind: Text - optional: true - regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? {{ name__value }}' - order_by: - - patch_panel__name__value - - position__value - uniqueness_constraints: - - - patch_panel - - position__value - attributes: - - name: name - kind: Text - order_weight: 1000 - - name: position - kind: Number - description: Position for the module inside the Patch Panel. - order_weight: 1100 - - name: module_type - label: Module Type - kind: Dropdown - description: Type of module inserted into the patch panel. - order_weight: 1200 - optional: true - choices: - - name: 3_mpo_24_fo_lc - label: 24 FO LC 3 MPO - description: High-density MPO cassette with 24 fibers to front and 3 MPO to - rear. - color: '#7f7fff' - - name: serial - kind: Text - optional: true - order_weight: 1500 - - name: description - kind: Text - optional: true - order_weight: 2000 - relationships: - - name: patch_panel - peer: DcimPatchPanel - optional: false - order_weight: 900 - cardinality: one - kind: Parent ``` \ No newline at end of file diff --git a/docs/docs/reference/peering_ixp.mdx b/docs/docs/reference/peering_ixp.mdx index debf679..f143d81 100644 --- a/docs/docs/reference/peering_ixp.mdx +++ b/docs/docs/reference/peering_ixp.mdx @@ -11,6 +11,8 @@ This schema extension contains all you need to model anything revolving around i - [extensions/routing](routing) - [extensions/routing_bgp](routing_bgp) - [extensions/routing_bgp_community](routing_bgp_community) + - [extensions/routing_policies](routing_policies) + - [extensions/routing_policies_bgp](routing_policies_bgp) ## Nodes @@ -70,8 +72,25 @@ This schema extension contains all you need to model anything revolving around i | ipv4_address | IpamIPAddress | | one | Attribute | | internet_exchange_point | PeeringIXP | False | one | Parent | | router | DcimDevice | | one | Attribute | +| bgp_sessions | RoutingBGPSession | True | many | Component | | tags | BuiltinTag | | many | Attribute | +## Extensions + +:::note + +In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. + +::: + +### RoutingBGPSession + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| ixp_connection | PeeringIXPConnection | True | one | Parent | + ## Code ```yaml @@ -250,10 +269,31 @@ nodes: kind: Attribute description: The router this IXP connection is connected to order_weight: 1400 + - name: bgp_sessions + label: BGP Sessions + peer: RoutingBGPSession + identifier: ixpconn__bgpsessions + optional: true + cardinality: many + kind: Component + description: BGP sessions established over this IXP connection + order_weight: 1450 - name: tags peer: BuiltinTag cardinality: many kind: Attribute order_weight: 3000 +extensions: + nodes: + - kind: RoutingBGPSession + relationships: + - name: ixp_connection + label: IXP Connection + peer: PeeringIXPConnection + identifier: ixpconn__bgpsessions + optional: true + cardinality: one + kind: Parent + description: The IXP connection (port) this BGP session is established over ``` \ No newline at end of file diff --git a/docs/docs/reference/qinq.mdx b/docs/docs/reference/qinq.mdx index 439a46a..9a2306e 100644 --- a/docs/docs/reference/qinq.mdx +++ b/docs/docs/reference/qinq.mdx @@ -10,63 +10,94 @@ This schema extension brings extensions to VLAN model in order to support QinQ. - [base](dcim) - [extensions/vlan](vlan) -## Extensions +## Nodes -:::note +### SVLAN -In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. +- **Label:** S-VLAN +- **Description:** A VLAN used to encapsulate multiple CVLANs. +- **Namespace:** Ipam +- **Inherit From:** GenericVLAN -::: +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| cvlan | IpamCVLAN | True | many | Attribute | + +### CVLAN -### IpamVLAN +- **Label:** C-VLAN +- **Description:** A VLAN assigned to customer traffic, encapsulated within an S-VLAN. +- **Namespace:** Ipam +- **Uniqueness Constraints:** + - vlan_id__value, svlan +- **Human Friendly ID:** svlan__name__value, vlan_id__value +- **Inherit From:** GenericVLAN #### Attributes | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| qinq_role | | Dropdown | True | | suplier, customer | +| name | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| svlan | IpamVLAN | True | one | Attribute | -| cvlan | IpamVLAN | True | many | Attribute | +| svlan | IpamSVLAN | False | one | Attribute | ## Code ```yaml version: '1.0' -extensions: - nodes: - - kind: IpamVLAN - attributes: - - name: qinq_role - kind: Dropdown - optional: true - choices: - - name: suplier - label: Suplier - description: A VLAN used to encapsulate multiple CVLANs. - - name: customer - label: Customer - description: A VLAN assigned to customer traffic. - relationships: - - name: svlan - label: Supplier vlan - peer: IpamVLAN - optional: true - direction: inbound - identifier: vlan__qinq - cardinality: one - kind: Attribute - - name: cvlan - label: Customer vlan(s) - peer: IpamVLAN - optional: true - direction: outbound - identifier: vlan__qinq - cardinality: many - kind: Attribute +nodes: +- name: SVLAN + namespace: Ipam + label: S-VLAN + description: A VLAN used to encapsulate multiple CVLANs. + include_in_menu: false + inherit_from: + - GenericVLAN + relationships: + - name: cvlan + label: Customer vlan(s) + peer: IpamCVLAN + optional: true + direction: outbound + identifier: vlan__qinq + cardinality: many + kind: Attribute +- name: CVLAN + namespace: Ipam + label: C-VLAN + description: A VLAN assigned to customer traffic, encapsulated within an S-VLAN. + include_in_menu: false + display_label: '{{ svlan__name__value }}-{{ vlan_id__value }}' + human_friendly_id: + - svlan__name__value + - vlan_id__value + uniqueness_constraints: + - - vlan_id__value + - svlan + inherit_from: + - GenericVLAN + attributes: + - name: name + kind: Text + optional: true + read_only: true + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ svlan__name__value }}-{{ vlan_id__value }}' + relationships: + - name: svlan + label: Supplier vlan + peer: IpamSVLAN + optional: false + direction: inbound + identifier: vlan__qinq + cardinality: one + kind: Attribute ``` \ No newline at end of file diff --git a/docs/docs/reference/rack.mdx b/docs/docs/reference/rack.mdx new file mode 100644 index 0000000..90d6116 --- /dev/null +++ b/docs/docs/reference/rack.mdx @@ -0,0 +1,155 @@ +--- +title: Rack +--- + +This schema extension introduces a Rack model representing a physical equipment rack installed at a site. Racks can be placed at a LocationSite and can host devices and other equipment. + +## Details + +- **Dependencies:** + - [base](dcim) + - [extensions/location_minimal](location_minimal) + +## Nodes + +### Rack + +- **Label:** Rack +- **Description:** A physical equipment rack installed at a site. +- **Namespace:** Location +- **Icon:** clarity:rack-server-line +- **Human Friendly ID:** name__value +- **Inherit From:** LocationHosting + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | False | | | +| facility_id | | Text | True | | | +| status | | Dropdown | False | active | active, available, reserved, planned, decommissioning, deprecated | +| height | | Number | False | 42 | | +| serial_number | | Text | True | | | +| asset_tag | | Text | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| site | LocationSite | False | one | Attribute | +| tags | BuiltinTag | True | many | Attribute | + +## Extensions + +:::note + +In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. + +::: + +### LocationSite + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| racks | LocationRack | True | many | Component | + +## Code + +```yaml +version: '1.0' +nodes: +- name: Rack + namespace: Location + label: Rack + description: A physical equipment rack installed at a site. + icon: clarity:rack-server-line + menu_placement: LocationGeneric + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + inherit_from: + - LocationHosting + attributes: + - name: name + kind: Text + unique: true + optional: false + order_weight: 1000 + - name: facility_id + kind: Text + optional: true + order_weight: 1100 + - name: status + kind: Dropdown + optional: false + default_value: active + order_weight: 1200 + choices: + - name: active + label: Active + description: Rack is installed and in use. + color: '#00d25b' + - name: available + label: Available + description: Rack is installed and has capacity for new equipment. + color: '#00bcd4' + - name: reserved + label: Reserved + description: Rack is allocated but not yet in use. + color: '#4d90fe' + - name: planned + label: Planned + description: Rack is planned but not yet installed. + color: '#2196f3' + - name: decommissioning + label: Decommissioning + description: Rack is being phased out and emptied. + color: '#ff9800' + - name: deprecated + label: Retired + description: Rack has been removed from service. + color: '#6c757d' + - name: height + label: Height (U) + kind: Number + optional: false + default_value: 42 + order_weight: 1300 + - name: serial_number + kind: Text + optional: true + order_weight: 1400 + - name: asset_tag + kind: Text + optional: true + order_weight: 1500 + relationships: + - name: site + peer: LocationSite + optional: false + cardinality: one + kind: Attribute + order_weight: 900 + identifier: site__racks + - name: tags + peer: BuiltinTag + cardinality: many + kind: Attribute + optional: true + order_weight: 3000 +extensions: + nodes: + - kind: LocationSite + relationships: + - name: racks + peer: LocationRack + cardinality: many + optional: true + kind: Component + identifier: site__racks + +``` \ No newline at end of file diff --git a/docs/docs/reference/routing_bgp.mdx b/docs/docs/reference/routing_bgp.mdx index 1a95566..c185934 100644 --- a/docs/docs/reference/routing_bgp.mdx +++ b/docs/docs/reference/routing_bgp.mdx @@ -78,7 +78,7 @@ This schema extension contains all you need to model your BGP platform. | ---- | ----------- | ---- | -------- | ------------- | ------- | | import_policies | | Text | True | | | | export_policies | | Text | True | | | -| session_type | Type of BGP Session | Text | | | | +| session_type | Type of BGP Session | Dropdown | | | external, internal | | role | Role of the BGP Session | Dropdown | | | backbone, upstream, peering | | local_pref | Force Local Pref for this BGP Peer Session. | Number | True | | | @@ -202,15 +202,17 @@ nodes: - name: maximum_routes kind: Number optional: true + parameters: + min_value: 0 description: Maximum routes for the BGP Group. order_weight: 1400 - regex: ^[0-9]+$ - name: local_pref kind: Number optional: true + parameters: + min_value: 0 description: Force Local Pref for this BGP Peer Group. order_weight: 1450 - regex: ^[0-9]+$ - name: send_community kind: Checkbox optional: true @@ -262,10 +264,14 @@ nodes: kind: Text optional: true - name: session_type - kind: Text - enum: - - EXTERNAL - - INTERNAL + kind: Dropdown + choices: + - name: external + label: External + description: Session established with a router in a different autonomous system. + - name: internal + label: Internal + description: Session established with a router in the same autonomous system. description: Type of BGP Session order_weight: 1200 - name: role @@ -288,9 +294,10 @@ nodes: - name: local_pref kind: Number optional: true + parameters: + min_value: 0 description: Force Local Pref for this BGP Peer Session. order_weight: 1450 - regex: ^[0-9]+$ relationships: - name: local_as identifier: bgpsession__local_as diff --git a/docs/docs/reference/routing_policies_bgp.mdx b/docs/docs/reference/routing_policies_bgp.mdx index 3f2b430..4884f0c 100644 --- a/docs/docs/reference/routing_policies_bgp.mdx +++ b/docs/docs/reference/routing_policies_bgp.mdx @@ -59,8 +59,8 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_routing_policies | RoutingPolicy | | many | Generic | -| export_routing_policies | RoutingPolicy | | many | Generic | +| import_routing_policies | RoutingPolicyBGP | | many | Generic | +| export_routing_policies | RoutingPolicyBGP | | many | Generic | ## Code @@ -89,14 +89,14 @@ extensions: - name: import_routing_policies label: Import Routing Policies peer: RoutingPolicyBGP - identifier: bgp__import_policies + identifier: bgppeergroup__import_policies description: The routing-policies used by this instance for import. kind: Generic cardinality: many - name: export_routing_policies label: Export Routing Policies peer: RoutingPolicyBGP - identifier: bgp__export_policies + identifier: bgppeergroup__export_policies description: The routing-policies used by this instance for export. kind: Generic cardinality: many @@ -111,15 +111,15 @@ extensions: relationships: - name: import_routing_policies label: Import Routing Policies - peer: RoutingPolicy - identifier: bgp__import_policies + peer: RoutingPolicyBGP + identifier: bgpsession__import_policies description: The routing-policies used by this instance for import. kind: Generic cardinality: many - name: export_routing_policies label: Export Routing Policies - peer: RoutingPolicy - identifier: bgp__export_policies + peer: RoutingPolicyBGP + identifier: bgpsession__export_policies description: The routing-policies used by this instance for export. kind: Generic cardinality: many diff --git a/docs/docs/reference/sfp.mdx b/docs/docs/reference/sfp.mdx index 7cea68b..816bac9 100644 --- a/docs/docs/reference/sfp.mdx +++ b/docs/docs/reference/sfp.mdx @@ -64,7 +64,7 @@ Improvements: | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| interface | DcimInterface | True | one | Attribute | +| interface | InterfacePhysical | True | one | Attribute | | spare_location | LocationHosting | True | one | Attribute | | manufacturer | OrganizationManufacturer | True | one | Attribute | @@ -76,7 +76,7 @@ In this context "extensions" refer to modifications or additions to the existing ::: -### DcimInterface +### InterfacePhysical #### Relationships @@ -229,11 +229,12 @@ generics: color: '#0099cc' relationships: - name: interface - peer: DcimInterface + peer: InterfacePhysical kind: Attribute optional: true cardinality: one order_weight: 1200 + identifier: sfp__interface - name: spare_location peer: LocationHosting kind: Attribute @@ -278,12 +279,13 @@ nodes: order_weight: 1150 extensions: nodes: - - kind: DcimInterface + - kind: InterfacePhysical relationships: - name: plugged_sfp peer: DcimGenericSFP cardinality: one optional: true + identifier: sfp__interface - kind: LocationHosting relationships: - name: spare_sfps diff --git a/docs/docs/reference/snmp.mdx b/docs/docs/reference/snmp.mdx index 0830ee6..d14bea5 100644 --- a/docs/docs/reference/snmp.mdx +++ b/docs/docs/reference/snmp.mdx @@ -25,7 +25,7 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | community_string | | Password | | | | -| access | | Text | | | | +| access | | Dropdown | | | read_only, read_write | ### CommunityV3 @@ -41,9 +41,9 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | username | | Text | | | | -| auth_protocol | | Text | | | | +| auth_protocol | | Dropdown | | | none, md5, sha | | auth_password | | Password | True | | | -| privacy_protocol | | Text | | | | +| privacy_protocol | | Dropdown | | | none, des, aes | | privacy_password | | Password | True | | | | security_level | | Dropdown | | | noAuthNoPriv, authNoPriv, authPriv | @@ -66,6 +66,7 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | +| ip_address | IpamIPAddress | | many | Attribute | | community | SnmpCommunity | | many | | ## Generics @@ -90,6 +91,7 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | clients | SnmpClient | | many | Component | +| devices | DcimDevice | | many | Attribute | ## Code @@ -119,6 +121,13 @@ generics: peer: SnmpClient cardinality: many kind: Component + - name: devices + label: Devices + description: Devices this community is configured on. + peer: DcimDevice + cardinality: many + kind: Attribute + order_weight: 1200 nodes: - name: CommunityV2 namespace: Snmp @@ -138,10 +147,14 @@ nodes: kind: Password order_weight: 1300 - name: access - kind: Text - enum: - - Read-Only - - Read-Write + kind: Dropdown + choices: + - name: read_only + label: Read-Only + description: Read-only access. + - name: read_write + label: Read-Write + description: Read-write access. order_weight: 1200 - name: CommunityV3 namespace: Snmp @@ -162,11 +175,17 @@ nodes: order_weight: 1300 - name: auth_protocol label: Authentication Protocol - kind: Text - enum: - - None - - MD5 - - SHA + kind: Dropdown + choices: + - name: none + label: None + description: No authentication. + - name: md5 + label: MD5 + description: MD5 authentication. + - name: sha + label: SHA + description: SHA authentication. order_weight: 1400 - name: auth_password label: Authentication Password @@ -175,11 +194,17 @@ nodes: optional: true - name: privacy_protocol label: Privacy Protocol - kind: Text - enum: - - None - - DES - - AES + kind: Dropdown + choices: + - name: none + label: None + description: No privacy. + - name: des + label: DES + description: DES encryption. + - name: aes + label: AES + description: AES encryption. order_weight: 1600 - name: privacy_password label: Privacy Password @@ -221,6 +246,13 @@ nodes: order_weight: 1100 optional: true relationships: + - name: ip_address + label: IP Address + description: Authorized SNMP client address. + peer: IpamIPAddress + cardinality: many + kind: Attribute + order_weight: 1150 - name: community peer: SnmpCommunity cardinality: many diff --git a/docs/docs/reference/tenancy.mdx b/docs/docs/reference/tenancy.mdx index f0d844c..d8d9679 100644 --- a/docs/docs/reference/tenancy.mdx +++ b/docs/docs/reference/tenancy.mdx @@ -2,19 +2,18 @@ title: Tenancy --- -This schema extension introduces tenancy for some of the schema nodes (circuits...) +This schema extension introduces a Tenant node that can own devices, IP prefixes/addresses, and hosting locations. See the comment at the bottom of `tenancy.yml` for an example of how to extend tenancy onto optional extension nodes such as `DcimCircuit`. ## Details - **Dependencies:** - [base](dcim) - - [extensions/circuit](circuit) ## Nodes ### Tenant -- **Description:** A tenant is owning the corresponding entity +- **Description:** A tenant is the owner of the corresponding devices, addressing, and locations. - **Namespace:** Tenancy - **Icon:** mdi:domain - **Inherit From:** OrganizationGeneric @@ -23,9 +22,50 @@ This schema extension introduces tenancy for some of the schema nodes (circuits. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| tags | BuiltinTag | True | many | Attribute | -| location | LocationBuilding | True | many | | -| circuit | DcimCircuit | True | many | | +| devices | DcimGenericDevice | True | many | Generic | +| prefixes | IpamPrefix | True | many | Generic | +| addresses | IpamIPAddress | True | many | Generic | +| locations | LocationHosting | True | many | Generic | + +## Extensions + +:::note + +In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. + +::: + +### DcimGenericDevice + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| tenant | TenancyTenant | True | one | Attribute | + +### IpamPrefix + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| tenant | TenancyTenant | True | one | Attribute | + +### IpamIPAddress + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| tenant | TenancyTenant | True | one | Attribute | + +### LocationHosting + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| tenant | TenancyTenant | True | one | Attribute | ## Code @@ -34,25 +74,77 @@ version: '1.0' nodes: - name: Tenant namespace: Tenancy - description: A tenant is owning the corresponding entity + description: A tenant is the owner of the corresponding devices, addressing, and + locations. icon: mdi:domain include_in_menu: true inherit_from: - OrganizationGeneric relationships: - - name: tags - peer: BuiltinTag + - name: devices + label: Devices + peer: DcimGenericDevice + identifier: tenant__device + cardinality: many + optional: true + kind: Generic + - name: prefixes + label: Prefixes + peer: IpamPrefix + identifier: tenant__prefix cardinality: many - kind: Attribute optional: true - order_weight: 3000 - - name: location - peer: LocationBuilding + kind: Generic + - name: addresses + label: Addresses + peer: IpamIPAddress + identifier: tenant__ipaddress cardinality: many optional: true - - name: circuit - peer: DcimCircuit + kind: Generic + - name: locations + label: Locations + peer: LocationHosting + identifier: tenant__location cardinality: many optional: true + kind: Generic +extensions: + nodes: + - kind: DcimGenericDevice + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__device + optional: true + cardinality: one + kind: Attribute + order_weight: 1800 + - kind: IpamPrefix + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__prefix + optional: true + cardinality: one + kind: Attribute + order_weight: 1400 + - kind: IpamIPAddress + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__ipaddress + optional: true + cardinality: one + kind: Attribute + order_weight: 1300 + - kind: LocationHosting + relationships: + - name: tenant + peer: TenancyTenant + identifier: tenant__location + optional: true + cardinality: one + kind: Attribute ``` \ No newline at end of file diff --git a/docs/docs/reference/topology.mdx b/docs/docs/reference/topology.mdx index 8e4fd60..4d490b5 100644 --- a/docs/docs/reference/topology.mdx +++ b/docs/docs/reference/topology.mdx @@ -2,54 +2,720 @@ title: Topology --- -This schema extension introduces abstract network pods and services running in the pods, such as MPLS and EVPN. +A schema for defining and managing network topology, strategies, and services. ## Details - **Dependencies:** - [base](dcim) -## Generics +## Nodes -### Generic +### Topology - **Label:** Topology -- **Description:** Generic model for topology. +- **Description:** A Topology represents the entire network pod. - **Namespace:** Topology - **Icon:** carbon:network-3 +- **Human Friendly ID:** name__value +- **Inherit From:** CoreArtifactTarget #### Attributes | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | | description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | +| elements | TopologyGenericElement | True | many | Component | +| strategy | TopologyNetworkStrategy | True | one | Component | | location | LocationGeneric | True | one | Attribute | +| devices | DcimGenericDevice | True | many | Component | +| network_services | TopologyNetworkService | True | many | Component | + +### MPLSStrategy + +- **Label:** MPLS Strategy +- **Description:** Specific strategy attributes for MPLS. +- **Namespace:** Topology +- **Icon:** eos-icons:neural-network +- **Human Friendly ID:** name__value +- **Inherit From:** TopologyNetworkStrategy + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| underlay | | Dropdown | | | ospf, isis, bgp | +| overlay | | Dropdown | | | ldp, rsvp, segment_routing | + +### EVPNStrategy + +- **Label:** EVPN Strategy +- **Description:** Specific strategy attributes for EVPN. +- **Namespace:** Topology +- **Icon:** carbon:load-balancer-network +- **Human Friendly ID:** name__value +- **Inherit From:** TopologyNetworkStrategy + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| underlay | | Dropdown | | | ebgp, ospf, isis | +| overlay | | Dropdown | | | ebgp, ibgp | + +### PhysicalElement + +- **Label:** Physical Topology Element +- **Description:** Physical aspect of topology elements. +- **Namespace:** Topology +- **Icon:** carbon:network-3-reference +- **Human Friendly ID:** name__value +- **Inherit From:** TopologyGenericElement + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| mtu | | Number | | 1500 | | +| border | | Boolean | | False | | +| mlag_support | | Boolean | | False | | +| device_role | | Dropdown | | | spine, leaf, pe_router, p_router, route_reflector, cpe, firewall | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| device_type | DcimDeviceType | True | one | Attribute | + +### DhcpOption + +- **Label:** Dhcp Option +- **Description:** Represents a configurable option within a Dhcp server. +- **Namespace:** Network +- **Icon:** gis:globe-options +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | +| description | | Text | True | | | +| option_code | | Number | | | | +| content | | Text | | | | + +### DhcpServer + +- **Label:** Dhcp Server +- **Description:** Represents a Dhcp server in the network. +- **Namespace:** Network +- **Icon:** eos-icons:ip +- **Human Friendly ID:** name__value +- **Inherit From:** NetworkManagementServer + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| lease_time | | Text | | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| dhcp_options | NetworkDhcpOption | True | many | Component | + +### NameServer + +- **Label:** DNS Server +- **Description:** Represents a DNS server in the network. +- **Namespace:** Network +- **Icon:** eos-icons:dns +- **Human Friendly ID:** name__value +- **Inherit From:** NetworkManagementServer + +### NTPServer + +- **Label:** NTP Server +- **Description:** Represents a NTP server in the network. +- **Namespace:** Network +- **Icon:** iconoir:time-zone +- **Human Friendly ID:** name__value +- **Inherit From:** NetworkManagementServer + +### NetworkServiceIdentifier + +- **Label:** Network Service Identifier +- **Description:** Generic model for different types of identifiers used in network services. +- **Namespace:** Topology +- **Icon:** mdi:identifier +- **Human Friendly ID:** identifier__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| identifier | | Number | | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| service | TopologyNetworkService | True | one | | + +### NetworkService + +- **Label:** Network Service +- **Description:** Network services attached to a Topology. +- **Namespace:** Topology +- **Icon:** carbon:ibm-cloud-internet-services +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | +| description | | Text | | | | +| service_type | | Text | | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| identifier | TopologyNetworkServiceIdentifier | False | one | Attribute | +| topology | TopologyTopology | False | one | Parent | +| vlan | InfraVLAN | True | one | Component | +| prefix | InfraPrefix | True | one | Component | + +## Generics + +### ManagementServer + +- **Label:** Network Management Servers +- **Description:** Generic model for network management server (dns, ntp, and dhcp). +- **Namespace:** Network +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | +| description | | Text | True | | | +| status | | Dropdown | | | active, provisioning, maintenance, drained | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| location | LocationGeneric | True | many | | +| ip_addresses | InfraIPAddress | True | many | Component | + +### GenericElement + +- **Label:** Generic Topology Element +- **Description:** Base model for elements +- **Namespace:** Topology +- **Icon:** carbon:network-3-reference +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | +| description | | Text | True | | | +| quantity | | Number | | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| topology | TopologyTopology | False | one | Parent | + +### NetworkStrategy + +- **Label:** Network Strategy +- **Description:** Generic model for network strategies (underlays and overlays). +- **Namespace:** Topology +- **Icon:** iconoir:strategy +- **Human Friendly ID:** name__value + +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | | | | +| description | | Text | True | | | + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| topology | TopologyTopology | True | many | | + +## Extensions + +:::note + +In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements. + +::: + +### DcimGenericDevice + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| topology | TopologyTopology | True | one | | + +### IpamPrefix + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| network_service | TopologyNetworkService | True | one | | ## Code ```yaml version: '1.0' generics: -- name: Generic +- name: ManagementServer + namespace: Network + description: Generic model for network management server (dns, ntp, and dhcp). + label: Network Management Servers + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + include_in_menu: true + attributes: + - name: name + kind: Text + order_weight: 1000 + - name: description + kind: Text + order_weight: 1100 + optional: true + - name: status + kind: Dropdown + choices: + - name: active + label: Active + description: Fully operational and currently in service. + color: '#7fbf7f' + - name: provisioning + label: Provisioning + description: In the process of being set up and configured. + color: '#ffff7f' + - name: maintenance + label: Maintenance + description: Undergoing routine maintenance or repairs. + color: '#ffd27f' + - name: drained + label: Drained + description: Temporarily taken out of service. + color: '#bfbfbf' + relationships: + - name: location + peer: LocationGeneric + optional: true + cardinality: many + - name: ip_addresses + peer: InfraIPAddress + optional: true + cardinality: many + kind: Component +- name: GenericElement + namespace: Topology + description: Base model for elements + label: Generic Topology Element + icon: carbon:network-3-reference + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + include_in_menu: false + menu_placement: TopologyTopology + attributes: + - name: name + kind: Text + order_weight: 1000 + - name: description + kind: Text + order_weight: 1100 + optional: true + - name: quantity + kind: Number + order_weight: 1200 + relationships: + - name: topology + peer: TopologyTopology + cardinality: one + kind: Parent + optional: false +- name: NetworkStrategy + namespace: Topology + description: Generic model for network strategies (underlays and overlays). + label: Network Strategy + icon: iconoir:strategy + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + include_in_menu: true + menu_placement: TopologyTopology + attributes: + - name: name + kind: Text + order_weight: 1000 + - name: description + kind: Text + order_weight: 1100 + optional: true + relationships: + - name: topology + peer: TopologyTopology + optional: true + cardinality: many +nodes: +- name: Topology namespace: Topology - description: Generic model for topology. + description: A Topology represents the entire network pod. label: Topology icon: carbon:network-3 + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + inherit_from: + - CoreArtifactTarget attributes: + - name: name + kind: Text + unique: true + order_weight: 1000 - name: description kind: Text - order_weight: 1300 optional: true + order_weight: 1100 relationships: + - name: elements + peer: TopologyGenericElement + optional: true + cardinality: many + kind: Component + - name: strategy + peer: TopologyNetworkStrategy + optional: true + cardinality: one + kind: Component - name: location peer: LocationGeneric optional: true cardinality: one kind: Attribute + - name: devices + peer: DcimGenericDevice + optional: true + cardinality: many + kind: Component + - name: network_services + peer: TopologyNetworkService + optional: true + cardinality: many + kind: Component +- name: MPLSStrategy + namespace: Topology + description: Specific strategy attributes for MPLS. + label: MPLS Strategy + icon: eos-icons:neural-network + inherit_from: + - TopologyNetworkStrategy + menu_placement: TopologyNetworkStrategy + include_in_menu: false + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + attributes: + - name: underlay + kind: Dropdown + choices: + - name: ospf + label: OSPF + - name: isis + label: ISIS + - name: bgp + label: BGP + - name: overlay + kind: Dropdown + choices: + - name: ldp + label: LDP + - name: rsvp + label: RSVP + - name: segment_routing + label: Segment Routing +- name: EVPNStrategy + namespace: Topology + description: Specific strategy attributes for EVPN. + label: EVPN Strategy + icon: carbon:load-balancer-network + inherit_from: + - TopologyNetworkStrategy + menu_placement: TopologyNetworkStrategy + include_in_menu: false + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + attributes: + - name: underlay + kind: Dropdown + choices: + - name: ebgp + label: EBGP + - name: ospf + label: OSPF + - name: isis + label: ISIS + - name: overlay + kind: Dropdown + choices: + - name: ebgp + label: EBGP + - name: ibgp + label: IBGP +- name: PhysicalElement + namespace: Topology + description: Physical aspect of topology elements. + label: Physical Topology Element + icon: carbon:network-3-reference + menu_placement: TopologyTopology + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + inherit_from: + - TopologyGenericElement + attributes: + - name: mtu + kind: Number + default_value: 1500 + order_weight: 3000 + - name: border + kind: Boolean + label: Is a Topology Border + default_value: false + order_weight: 2400 + - name: mlag_support + kind: Boolean + label: MLAG Support + default_value: false + order_weight: 2500 + - name: device_role + label: Role + kind: Dropdown + choices: + - name: spine + color: '#ffb3ba' + - name: leaf + color: '#ffdfba' + - name: pe_router + color: '#baffc9' + - name: p_router + color: '#bae1ff' + - name: route_reflector + color: '#ffbaba' + - name: cpe + color: '#f2bae1' + - name: firewall + color: '#c5a3ff' + order_weight: 1300 + relationships: + - name: device_type + label: Type + peer: DcimDeviceType + optional: true + cardinality: one + kind: Attribute + order_weight: 1400 +- name: DhcpOption + namespace: Network + description: Represents a configurable option within a Dhcp server. + label: Dhcp Option + icon: gis:globe-options + menu_placement: NetworkManagementServer + include_in_menu: false + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + attributes: + - name: name + kind: Text + order_weight: 1000 + - name: description + kind: Text + optional: true + order_weight: 1100 + - name: option_code + kind: Number + order_weight: 2000 + - name: content + kind: Text + order_weight: 2100 +- name: DhcpServer + namespace: Network + description: Represents a Dhcp server in the network. + label: Dhcp Server + icon: eos-icons:ip + menu_placement: NetworkManagementServer + include_in_menu: false + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + inherit_from: + - NetworkManagementServer + attributes: + - name: lease_time + kind: Text + order_weight: 2100 + relationships: + - name: dhcp_options + peer: NetworkDhcpOption + optional: true + cardinality: many + kind: Component +- name: NameServer + namespace: Network + description: Represents a DNS server in the network. + label: DNS Server + icon: eos-icons:dns + menu_placement: NetworkManagementServer + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + inherit_from: + - NetworkManagementServer +- name: NTPServer + namespace: Network + description: Represents a NTP server in the network. + label: NTP Server + icon: iconoir:time-zone + menu_placement: NetworkManagementServer + human_friendly_id: + - name__value + display_label: name__value + order_by: + - name__value + inherit_from: + - NetworkManagementServer +- name: NetworkServiceIdentifier + namespace: Topology + description: Generic model for different types of identifiers used in network services. + label: Network Service Identifier + icon: mdi:identifier + menu_placement: TopologyNetworkService + human_friendly_id: + - identifier__value + order_by: + - identifier__value + display_label: identifier__value + attributes: + - name: identifier + kind: Number + relationships: + - name: service + label: Network Service + peer: TopologyNetworkService + cardinality: one + optional: true +- name: NetworkService + namespace: Topology + description: Network services attached to a Topology. + label: Network Service + icon: carbon:ibm-cloud-internet-services + human_friendly_id: + - name__value + order_by: + - name__value + display_label: name__value + attributes: + - name: name + label: Service Name + kind: Text + order_weight: 1000 + - name: description + kind: Text + order_weight: 1100 + - name: service_type + kind: Text + enum: + - Layer2 + - Layer3 + order_weight: 1200 + relationships: + - name: identifier + peer: TopologyNetworkServiceIdentifier + cardinality: one + kind: Attribute + optional: false + - name: topology + peer: TopologyTopology + cardinality: one + kind: Parent + optional: false + - name: vlan + peer: InfraVLAN + optional: true + cardinality: one + kind: Component + order_weight: 1500 + - name: prefix + peer: InfraPrefix + optional: true + cardinality: one + kind: Component + order_weight: 1400 +extensions: + nodes: + - kind: DcimGenericDevice + relationships: + - name: topology + peer: TopologyTopology + optional: true + cardinality: one + - kind: IpamPrefix + relationships: + - name: network_service + label: Network Service + peer: TopologyNetworkService + optional: true + cardinality: one + order_weight: 1400 ``` \ No newline at end of file diff --git a/docs/docs/reference/vlan.mdx b/docs/docs/reference/vlan.mdx index 18065bb..394bda3 100644 --- a/docs/docs/reference/vlan.mdx +++ b/docs/docs/reference/vlan.mdx @@ -14,11 +14,15 @@ This schema extension contains models to support VLANs in you network. ### VLAN - **Label:** VLAN -- **Description:** A VLAN is isolated layer two domain - **Namespace:** Ipam -- **Icon:** mdi:lan-pending -- **Uniqueness Constraints:** - - vlan_id__value, l2domain +- **Inherit From:** GenericVLAN + +### VLANGroup + +- **Label:** VLAN Group +- **Description:** A VLAN group scopes VLANs to a domain (site, rack, etc.). +- **Namespace:** Ipam +- **Icon:** mdi:domain-switch - **Human Friendly ID:** name__value #### Attributes @@ -27,24 +31,35 @@ This schema extension contains models to support VLANs in you network. | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | | | | | description | | Text | True | | | -| vlan_id | | Number | | | | -| status | | Dropdown | | | active, provisioning, maintenance, drained | -| role | | Dropdown | True | | server, management, user | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| location | LocationHosting | True | many | | -| prefixes | IpamPrefix | True | many | | -| l2domain | IpamL2Domain | False | one | Attribute | +| scope | IpamVLANGroupScope | True | one | Attribute | +| vlans | GenericVLAN | True | many | Component | -### L2Domain +## Generics -- **Label:** Layer 2 Domain -- **Description:** Represents layer 2 domain. +### VLANGroupScope + +- **Description:** Mixin for objects that can scope a VLAN group (e.g. Region, Site, Rack). - **Namespace:** Ipam -- **Icon:** mdi:domain-switch + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| vlan_groups | IpamVLANGroup | True | many | Attribute | + +### VLAN + +- **Label:** VLAN +- **Description:** A VLAN is isolated layer two domain +- **Namespace:** Generic +- **Icon:** mdi:lan-pending +- **Uniqueness Constraints:** + - vlan_id__value, vlan_group - **Human Friendly ID:** name__value #### Attributes @@ -52,12 +67,17 @@ This schema extension contains models to support VLANs in you network. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | | | | +| description | | Text | True | | | +| vlan_id | | Number | | | | +| status | | Dropdown | False | active | active, reserved, provisioning, maintenance, deprecated | +| role | | Dropdown | True | | server, management, user | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vlans | IpamVLAN | True | many | Component | +| prefixes | IpamPrefix | True | many | Attribute | +| vlan_group | IpamVLANGroup | False | one | Attribute | ## Extensions @@ -73,7 +93,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vlan | IpamVLAN | True | one | Attribute | +| vlan | GenericVLAN | True | one | Attribute | ### InterfaceLayer2 @@ -81,31 +101,34 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| untagged_vlan | IpamVLAN | True | one | Generic | -| tagged_vlan | IpamVLAN | True | many | Generic | - -### LocationHosting - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| vlans | IpamVLAN | True | many | | +| untagged_vlan | GenericVLAN | True | one | Generic | +| tagged_vlan | GenericVLAN | True | many | Generic | ## Code ```yaml version: '1.0' -nodes: -- name: VLAN +generics: +- name: VLANGroupScope namespace: Ipam + description: Mixin for objects that can scope a VLAN group (e.g. Region, Site, Rack). + include_in_menu: false + relationships: + - name: vlan_groups + label: VLAN Groups + peer: IpamVLANGroup + identifier: vlan_group__scope + cardinality: many + optional: true + kind: Attribute +- name: VLAN + namespace: Generic description: A VLAN is isolated layer two domain label: VLAN icon: mdi:lan-pending - menu_placement: IpamL2Domain uniqueness_constraints: - - vlan_id__value - - l2domain + - vlan_group human_friendly_id: - name__value order_by: @@ -114,30 +137,39 @@ nodes: attributes: - name: name kind: Text + order_weight: 910 - name: description kind: Text optional: true - name: vlan_id kind: Number + order_weight: 900 - name: status kind: Dropdown + optional: false + default_value: active + order_weight: 920 choices: - name: active label: Active description: Fully operational and currently in service. - color: '#7fbf7f' + color: '#00d25b' + - name: reserved + label: Reserved + description: Reserved for future use, not yet active. + color: '#4d90fe' - name: provisioning label: Provisioning description: In the process of being set up and configured. - color: '#ffff7f' + color: '#f0ad4e' - name: maintenance label: Maintenance description: Undergoing routine maintenance or repairs. - color: '#ffd27f' - - name: drained - label: Drained - description: Temporarily taken out of service. - color: '#bfbfbf' + color: '#ff9800' + - name: deprecated + label: Deprecated + description: No longer in use and scheduled for removal. + color: '#e04040' - name: role kind: Dropdown optional: true @@ -155,25 +187,33 @@ nodes: description: Segments designed for end-user access and activities. color: '#a0b78d' relationships: - - name: location - peer: LocationHosting - optional: true - cardinality: many - name: prefixes peer: IpamPrefix optional: true cardinality: many - - name: l2domain - peer: IpamL2Domain + kind: Attribute + identifier: vlan__prefix + - name: vlan_group + label: VLAN Group + peer: IpamVLANGroup optional: false cardinality: one kind: Attribute - order_weight: 1200 -- name: L2Domain + order_weight: 930 + identifier: vlan_group__vlan +nodes: +- name: VLAN namespace: Ipam - description: Represents layer 2 domain. - label: Layer 2 Domain + label: VLAN + include_in_menu: false + inherit_from: + - GenericVLAN +- name: VLANGroup + namespace: Ipam + description: A VLAN group scopes VLANs to a domain (site, rack, etc.). + label: VLAN Group icon: mdi:domain-switch + menu_placement: GenericVLAN human_friendly_id: - name__value display_label: name__value @@ -181,44 +221,49 @@ nodes: - name: name kind: Text order_weight: 1000 + - name: description + kind: Text + optional: true relationships: + - name: scope + peer: IpamVLANGroupScope + identifier: vlan_group__scope + optional: true + cardinality: one + kind: Attribute + order_weight: 900 - name: vlans - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: many kind: Component + identifier: vlan_group__vlan extensions: nodes: - kind: IpamPrefix relationships: - name: vlan - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: one kind: Attribute order_weight: 1400 + identifier: vlan__prefix - kind: InterfaceLayer2 relationships: - name: untagged_vlan label: Untagged VLAN - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: one kind: Generic identifier: interface_l2__untagged_vlan - name: tagged_vlan label: Tagged VLANs - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: many kind: Generic identifier: interface_l2__tagged_vlan - - kind: LocationHosting - relationships: - - name: vlans - label: VLANs - peer: IpamVLAN - cardinality: many - optional: true ``` \ No newline at end of file diff --git a/docs/docs/reference/vrf.mdx b/docs/docs/reference/vrf.mdx index 533c885..03db3d9 100644 --- a/docs/docs/reference/vrf.mdx +++ b/docs/docs/reference/vrf.mdx @@ -25,15 +25,15 @@ This schema extension contains models to support VRF in your network. | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | False | | | | vrf_rd | | Text | True | | | +| enforce_unique | | Boolean | True | True | | | description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| namespace | BuiltinIPNamespace | False | one | Attribute | -| import_rt | IpamRouteTarget | True | one | Attribute | -| export_rt | IpamRouteTarget | True | one | Attribute | +| import_rt | IpamRouteTarget | True | many | Attribute | +| export_rt | IpamRouteTarget | True | many | Attribute | ### RouteTarget @@ -54,7 +54,8 @@ This schema extension contains models to support VRF in your network. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vrf | IpamVRF | True | many | | +| import_vrf | IpamVRF | True | many | | +| export_vrf | IpamVRF | True | many | | ## Extensions @@ -104,29 +105,30 @@ nodes: label: Route Distinguisher kind: Text optional: true + - name: enforce_unique + label: Enforce Unique + kind: Boolean + default_value: true + optional: true + order_weight: 1100 - name: description kind: Text optional: true order_weight: 1200 relationships: - - name: namespace - peer: BuiltinIPNamespace - optional: false - cardinality: one - kind: Attribute - name: import_rt identifier: vrf__import label: Import Targets peer: IpamRouteTarget optional: true - cardinality: one + cardinality: many kind: Attribute - name: export_rt identifier: vrf__export label: Export Targets peer: IpamRouteTarget optional: true - cardinality: one + cardinality: many kind: Attribute - name: RouteTarget namespace: Ipam @@ -147,7 +149,15 @@ nodes: kind: Text optional: true relationships: - - name: vrf + - name: import_vrf + label: Imported by VRFs + identifier: vrf__import + peer: IpamVRF + optional: true + cardinality: many + - name: export_vrf + label: Exported by VRFs + identifier: vrf__export peer: IpamVRF optional: true cardinality: many @@ -158,6 +168,7 @@ extensions: - name: vrf label: VRF peer: IpamVRF + identifier: prefix__vrf optional: true cardinality: one kind: Attribute @@ -167,6 +178,7 @@ extensions: - name: vrf label: VRF peer: IpamVRF + identifier: ip_address__vrf optional: true cardinality: one kind: Attribute diff --git a/docs/docs/reference/vrrp.mdx b/docs/docs/reference/vrrp.mdx index da59512..120d947 100644 --- a/docs/docs/reference/vrrp.mdx +++ b/docs/docs/reference/vrrp.mdx @@ -24,14 +24,14 @@ This schema extension contains models for VRRP. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | Unique name of the entry | Text | | | | -| group | VRRP Group | Text | | | | +| vrid | Virtual Router ID (VRID, should be between 1 and 255) | Number | | | | | password | VRRP Password/Key | HashedPassword | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| ip_address | IpamIPAddress | True | many | Attribute | +| ip_addresses | IpamIPAddress | True | many | Attribute | | vrrp_interfaces | NetworkVRRPInterface | | many | Component | ### VRRPInterface @@ -47,7 +47,7 @@ This schema extension contains models for VRRP. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| priority | VRRP Priority (Should be between 0 to 255) | Number | | 100 | | +| priority | VRRP Priority (Should be between 1 and 255) | Number | | 100 | | #### Relationships @@ -102,10 +102,13 @@ nodes: unique: true description: Unique name of the entry order_weight: 1000 - - name: group - kind: Text - description: VRRP Group - label: Group + - name: vrid + kind: Number + parameters: + min_value: 1 + max_value: 255 + description: Virtual Router ID (VRID, should be between 1 and 255) + label: VRID order_weight: 1100 - name: password kind: HashedPassword @@ -114,10 +117,10 @@ nodes: optional: true order_weight: 1400 relationships: - - name: ip_address + - name: ip_addresses on_delete: cascade description: VRRP IP (v4 or v6) - label: IP Address + label: IP Addresses peer: IpamIPAddress optional: true cardinality: many @@ -145,8 +148,10 @@ nodes: - name: priority kind: Number label: VRRP Priority - description: VRRP Priority (Should be between 0 to 255) - regex: ^(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])$ + parameters: + min_value: 1 + max_value: 255 + description: VRRP Priority (Should be between 1 and 255) default_value: 100 order_weight: 1100 relationships: diff --git a/extensions/aggregate/README.md b/extensions/aggregate/README.md new file mode 100644 index 0000000..4f159e7 --- /dev/null +++ b/extensions/aggregate/README.md @@ -0,0 +1,3 @@ +# aggregate + +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/aggregate) for the corresponding documentation. diff --git a/extensions/device_module/README.md b/extensions/device_module/README.md index b4bf961..f23726f 100644 --- a/extensions/device_module/README.md +++ b/extensions/device_module/README.md @@ -1,3 +1,3 @@ -# modules +# device_module -Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/modules) for the corresponding documentation. +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/device_module) for the corresponding documentation. diff --git a/extensions/device_psu_module/README.md b/extensions/device_psu_module/README.md new file mode 100644 index 0000000..d45d793 --- /dev/null +++ b/extensions/device_psu_module/README.md @@ -0,0 +1,3 @@ +# device_psu_module + +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/device_psu_module) for the corresponding documentation. diff --git a/extensions/location_site/README.md b/extensions/location_site/README.md new file mode 100644 index 0000000..437e14e --- /dev/null +++ b/extensions/location_site/README.md @@ -0,0 +1,3 @@ +# location_site + +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/location_site) for the corresponding documentation. diff --git a/extensions/rack/README.md b/extensions/rack/README.md new file mode 100644 index 0000000..f67fd70 --- /dev/null +++ b/extensions/rack/README.md @@ -0,0 +1,3 @@ +# rack + +Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/rack) for the corresponding documentation. diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index 00acc6c..cd1a9a2 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -86,15 +86,17 @@ nodes: - name: maximum_routes kind: Number optional: true + parameters: + min_value: 0 description: "Maximum routes for the BGP Group." order_weight: 1400 - regex: "^[0-9]+$" - name: local_pref kind: Number optional: true + parameters: + min_value: 0 description: "Force Local Pref for this BGP Peer Group." order_weight: 1450 - regex: "^[0-9]+$" - name: send_community kind: Checkbox optional: true @@ -176,9 +178,10 @@ nodes: - name: local_pref kind: Number optional: true + parameters: + min_value: 0 description: "Force Local Pref for this BGP Peer Session." order_weight: 1450 - regex: "^[0-9]+$" relationships: - name: local_as identifier: bgpsession__local_as diff --git a/extensions/topology/README.md b/extensions/topology/README.md deleted file mode 100644 index ba24f1c..0000000 --- a/extensions/topology/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# topology - -Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/topology) for the corresponding documentation. diff --git a/extensions/topology/topology.yml b/extensions/topology/topology.yml deleted file mode 100644 index ac89666..0000000 --- a/extensions/topology/topology.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json -# --------------------------------------------------------------------------- -# This schema is a starting point for building with Infrahub, not a finished production model. -# Adapting it for your environment typically requires architectural review — see -# docs.infrahub.app, or reach out to OpsMill for help. -# --------------------------------------------------------------------------- -version: "1.0" - -generics: - - name: Generic - namespace: Topology - description: Generic model for topology. - label: Topology - icon: carbon:network-3 - # default_filter: name__value - # display_label: name__value - attributes: - # TODO: I believe at some point some Containerlab tricks will happen here - # e.g. boolean "is container lab topo" then if ticked we generate artifact - # Or actually it would be better to create a group for that? - # Then - - name: description - kind: Text - order_weight: 1300 - optional: true - relationships: - - name: location - peer: LocationGeneric - optional: true - cardinality: one - kind: Attribute - # TODO: When implementing design ... - # - name: design - # peer: TopologyDesign - # kind: Attribute - # cardinality: one From 4eb6626e07ef5c90425e684f63cc48b4565d1ee6 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 5 Aug 2026 10:05:32 +0200 Subject: [PATCH 27/30] fix: change relationship kind --- extensions/peering_ixp/peering_ixp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/peering_ixp/peering_ixp.yml b/extensions/peering_ixp/peering_ixp.yml index f81d722..b53fa06 100644 --- a/extensions/peering_ixp/peering_ixp.yml +++ b/extensions/peering_ixp/peering_ixp.yml @@ -206,5 +206,5 @@ extensions: identifier: ixpconn__bgpsessions optional: true cardinality: one - kind: Parent - description: "The IXP connection (port) this BGP session is established over" + kind: Attribute + description: "The IXP connection this BGP session is established over" From 6ba3e6b9fc09e16981a93bde39b5c9ed0ee4bc39 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 5 Aug 2026 10:09:48 +0200 Subject: [PATCH 28/30] chore: format all extensions schema --- extensions/aggregate/aggregate.yml | 30 ++--- extensions/cable/cable.yml | 20 +-- extensions/circuit/circuit.yml | 48 ++++---- .../circuit_contract/circuit_contract.yml | 12 +- extensions/cluster/cluster.yml | 30 ++--- extensions/compute/compute.yml | 24 ++-- extensions/cross_connect/cross_connect.yml | 20 +-- extensions/device_module/device_module.yml | 62 +++++----- .../device_psu_module/device_psu_module.yml | 16 +-- extensions/dwdm/dwdm.yml | 115 +++++++++--------- .../hosting_cluster/hosting_cluster.yml | 12 +- .../interface_breakout/interface_breakout.yml | 10 +- extensions/lag/lag.yml | 34 +++--- .../location_minimal/location_minimal.yml | 22 ++-- extensions/location_site/location_site.yml | 8 +- extensions/mlag/mlag.yml | 64 +++++----- extensions/patch_panel/patch_panel.yml | 80 ++++++------ extensions/peering_ixp/peering_ixp.yml | 94 +++++++------- extensions/physical_disk/physical_disk.yml | 32 +++-- extensions/qinq/qinq.yml | 30 ++--- extensions/rack/rack.yml | 24 ++-- extensions/routing/routing.yml | 14 +-- extensions/routing_aggregate/aggregate.yml | 8 +- extensions/routing_bgp/bgp.yml | 80 ++++++------ .../routing_bgp_community/bgp_community.yml | 18 +-- extensions/routing_bgp_rr/bgp_rr.yml | 18 +-- extensions/routing_ospf/ospf.yml | 52 ++++---- extensions/routing_pim/pim.yml | 44 +++---- .../routing_policies/routing_policies.yml | 20 +-- .../routing_policies_aggregate.yml | 2 +- .../routing_policies_bgp.yml | 26 ++-- .../routing_policies_ospf.yml | 14 +-- .../routing_policies_pim.yml | 14 +-- extensions/sfp/sfp.yml | 38 +++--- extensions/snmp/snmp.yml | 50 ++++---- extensions/tenancy/tenancy.yml | 50 ++++---- extensions/users/users.yml | 34 +++--- extensions/vlan/vlan.yml | 58 ++++----- extensions/vrf/vrf.yml | 50 ++++---- extensions/vrrp/vrrp.yml | 60 ++++----- 40 files changed, 717 insertions(+), 720 deletions(-) diff --git a/extensions/aggregate/aggregate.yml b/extensions/aggregate/aggregate.yml index 4047501..2b1513c 100644 --- a/extensions/aggregate/aggregate.yml +++ b/extensions/aggregate/aggregate.yml @@ -13,33 +13,33 @@ nodes: description: An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. label: Aggregate icon: mdi:ip-network - menu_placement: OrganizationRIR include_in_menu: true + menu_placement: OrganizationRIR + inherit_from: + - BuiltinIPPrefix + human_friendly_id: + - prefix__value order_by: - prefix__value display_label: prefix__value - human_friendly_id: - - prefix__value - inherit_from: - - BuiltinIPPrefix attributes: - name: description kind: Text optional: true order_weight: 1100 - name: date_added - label: Date Added kind: DateTime + label: Date Added optional: true order_weight: 1200 relationships: - name: rir - label: RIR peer: OrganizationRIR - identifier: aggregate__rir - optional: false - cardinality: one + label: RIR kind: Attribute + cardinality: one + optional: false + identifier: aggregate__rir order_weight: 1000 - name: RIR @@ -54,16 +54,16 @@ nodes: - OrganizationGeneric attributes: - name: is_private - label: Private - description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. kind: Boolean + label: Private default_value: false + description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. order_weight: 1300 relationships: - name: aggregates peer: IpamAggregate - identifier: aggregate__rir - optional: true - cardinality: many kind: Generic + cardinality: many + optional: true + identifier: aggregate__rir order_weight: 1400 diff --git a/extensions/cable/cable.yml b/extensions/cable/cable.yml index 2221c3c..df06da9 100644 --- a/extensions/cable/cable.yml +++ b/extensions/cable/cable.yml @@ -13,18 +13,16 @@ nodes: description: Physical cable connecting two endpoints label: Cable icon: mdi:cable-data - display_label: label__value menu_placement: DcimDevice - order_by: - - label__value inherit_from: - DcimConnector + order_by: + - label__value + display_label: label__value attributes: - name: status kind: Dropdown - optional: false default_value: connected - order_weight: 1000 choices: - name: connected label: Connected @@ -34,10 +32,10 @@ nodes: label: Planned description: In the process of being set up color: "#2196f3" + optional: false + order_weight: 1000 - name: cable_type kind: Dropdown - optional: true - order_weight: 1100 choices: # Copper Cables - name: cat3 @@ -136,10 +134,10 @@ nodes: label: USB description: "Universal Serial Bus cable." color: "#000000" # Black + optional: true + order_weight: 1100 - name: color kind: Dropdown - optional: true - order_weight: 1300 choices: - name: dark-red label: Dark Red @@ -219,13 +217,15 @@ nodes: - name: black label: Black color: "#111111" + optional: true + order_weight: 1300 - name: label kind: Text optional: true order_weight: 1200 # As we can't put float in Number "forcing" length in cm - name: length - label: Length (in cm) kind: Number + label: Length (in cm) optional: true order_weight: 1350 diff --git a/extensions/circuit/circuit.yml b/extensions/circuit/circuit.yml index 8a066a8..d3947df 100644 --- a/extensions/circuit/circuit.yml +++ b/extensions/circuit/circuit.yml @@ -27,14 +27,12 @@ nodes: kind: Text optional: true - name: commit_rate - label: Commit Rate (Kbps) kind: Number + label: Commit Rate (Kbps) optional: true order_weight: 1100 - name: circuit_type kind: Dropdown - optional: true - description: Specifies the type of circuit. choices: - name: internet_access label: Internet Access @@ -56,9 +54,10 @@ nodes: label: MPLS description: Multi-Protocol Label Switching circuit for QoS-based routing. color: "#7f00ff" + optional: true + description: Specifies the type of circuit. - name: status kind: Dropdown - optional: false default_value: active choices: - name: active @@ -77,42 +76,41 @@ nodes: label: Drained description: Temporarily taken out of service. color: "#9e9e9e" + optional: false relationships: - name: provider peer: OrganizationProvider - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false identifier: circuit__provider - name: endpoints peer: DcimCircuitEndpoint - optional: true - cardinality: many kind: Component + cardinality: many + optional: true identifier: circuit__endpoint - name: CircuitEndpoint namespace: Dcim description: A circuit endpoint, could be a position in a MMR... label: Circuit Endpoint - inherit_from: - - DcimEndpoint icon: mdi:ethernet menu_placement: DcimCircuit + inherit_from: + - DcimEndpoint human_friendly_id: - circuit__circuit_id__value - name__value - uniqueness_constraints: - - [circuit, side__value] order_by: - name__value display_label: name__value + uniqueness_constraints: + - [circuit, side__value] attributes: - name: side - label: Side kind: Dropdown - optional: false - order_weight: 950 + label: Side choices: - name: a label: A @@ -120,17 +118,18 @@ nodes: - name: z label: Z description: Z-side of the circuit. + optional: false + order_weight: 950 - name: name kind: Text + read_only: true computed_attribute: kind: Jinja2 jinja2_template: "{{ circuit__circuit_id__value }}_{{ side__value | upper }}" - read_only: true optional: false order_weight: 1000 - name: status kind: Dropdown - optional: false default_value: active choices: - name: active @@ -149,26 +148,27 @@ nodes: label: Drained description: Temporarily taken out of service. color: "#9e9e9e" + optional: false - name: description kind: Text optional: true relationships: - name: circuit peer: DcimCircuit - order_weight: 900 - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false identifier: circuit__endpoint + order_weight: 900 - name: location - label: Location peer: LocationHosting - optional: false - cardinality: one + label: Location kind: Attribute - order_weight: 1500 + cardinality: one + optional: false identifier: circuit_endpoint__location + order_weight: 1500 extensions: nodes: - kind: OrganizationProvider diff --git a/extensions/circuit_contract/circuit_contract.yml b/extensions/circuit_contract/circuit_contract.yml index fc2d4f4..449f7d1 100644 --- a/extensions/circuit_contract/circuit_contract.yml +++ b/extensions/circuit_contract/circuit_contract.yml @@ -1,20 +1,20 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: - name: CircuitContract namespace: Dcim - inherit_from: - - CoreFileObject description: A contract document associated with a circuit service, including terms, costs, and validity period. label: Circuit Contract icon: mdi:file-sign menu_placement: DcimCircuit + inherit_from: + - CoreFileObject human_friendly_id: - name__value order_by: @@ -23,10 +23,10 @@ nodes: attributes: - name: name kind: Text + read_only: true # You must set the attribute to read-only as the value will be handled by the system computed_attribute: kind: Jinja2 jinja2_template: "contract_{{ circuit__circuit_id__value }}" - read_only: true # You must set the attribute to read-only as the value will be handled by the system optional: false # As it's a Jinja2 kind of attribute you can make it mandatory - name: contract_start kind: DateTime @@ -39,7 +39,6 @@ nodes: optional: true - name: currency kind: Dropdown - optional: true choices: - name: usd label: USD @@ -50,6 +49,7 @@ nodes: - name: gbp label: GBP description: British Pound Sterling + optional: true relationships: # Example of a relationship to capture the account that signed the contract # - name: signed_by @@ -62,9 +62,9 @@ nodes: kind: Attribute cardinality: one optional: false - order_weight: 950 identifier: circuit__contract + order_weight: 950 extensions: nodes: - kind: DcimCircuit diff --git a/extensions/cluster/cluster.yml b/extensions/cluster/cluster.yml index 3b3853f..26530e5 100644 --- a/extensions/cluster/cluster.yml +++ b/extensions/cluster/cluster.yml @@ -21,25 +21,25 @@ generics: attributes: - name: name kind: Text - description: Name of the cluster. unique: true + description: Name of the cluster. order_weight: 1000 - name: description kind: Text optional: true relationships: - name: location - label: Location peer: LocationGeneric - optional: false - cardinality: many + label: Location kind: Attribute + cardinality: many + optional: false order_weight: 1400 - name: tags peer: BuiltinTag - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true order_weight: 2000 - name: GenericComputeUnitNodes @@ -48,29 +48,29 @@ generics: include_in_menu: false relationships: - name: nodes - label: Nodes - identifier: worker_in_cluster - cardinality: many peer: ComputeGenericUnit + label: Nodes kind: Component + cardinality: many + identifier: worker_in_cluster extensions: nodes: - kind: ComputeGenericUnit relationships: - name: worker_in_cluster - identifier: worker_in_cluster - label: Worker in cluster peer: ClusterGenericComputeUnitNodes + label: Worker in cluster cardinality: one - description: This device is a worker node of the specified cluster. optional: true + identifier: worker_in_cluster + description: This device is a worker node of the specified cluster. - kind: LocationGeneric relationships: - name: clusters - label: Clusters peer: ClusterGeneric - cardinality: many + label: Clusters kind: Component - description: All clusters available on that location. + cardinality: many optional: true + description: All clusters available on that location. diff --git a/extensions/compute/compute.yml b/extensions/compute/compute.yml index b43ef8e..52a3e2a 100644 --- a/extensions/compute/compute.yml +++ b/extensions/compute/compute.yml @@ -19,9 +19,9 @@ generics: include_in_menu: false relationships: - name: virtual_machines - cardinality: many peer: VirtualizationVirtualMachine kind: Component + cardinality: many optional: true identifier: host__virtual_machine @@ -41,9 +41,7 @@ nodes: attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -62,6 +60,8 @@ nodes: description: Temporarily taken out of service. color: "#9e9e9e" + optional: false + order_weight: 1100 - name: VirtualMachine namespace: Virtualization description: A virtual machine hosted on a server or a cluster. @@ -74,34 +74,34 @@ nodes: attributes: - name: role kind: Dropdown - optional: true - description: Role of the virtual machine. - order_weight: 1400 choices: - name: application color: "#7f7fff" - name: storage color: "#bf7fbf" + optional: true + description: Role of the virtual machine. + order_weight: 1400 - name: vcpu kind: Number optional: true - order_weight: 1900 description: Number of CPU cores assigned to the VM. + order_weight: 1900 - name: memory kind: Number optional: true - order_weight: 1900 description: Amount of memory (in GB) assigned to the VM. + order_weight: 1900 - name: disk kind: Number optional: true - order_weight: 1900 description: Disk space (in GB) assigned to the VM. + order_weight: 1900 relationships: - name: host peer: VirtualizationHostVirtualMachine - optional: false - cardinality: one kind: Attribute - order_weight: 1500 + cardinality: one + optional: false identifier: host__virtual_machine + order_weight: 1500 diff --git a/extensions/cross_connect/cross_connect.yml b/extensions/cross_connect/cross_connect.yml index ec20e9b..539a1f6 100644 --- a/extensions/cross_connect/cross_connect.yml +++ b/extensions/cross_connect/cross_connect.yml @@ -15,12 +15,12 @@ nodes: icon: streamline:arrow-crossover-right-solid inherit_from: - DcimConnector - order_by: - - provider__name__value - display_label: "{{ identifier__value }} (Provider: {{ provider__name__value }})" human_friendly_id: - provider__name__value - identifier__value + order_by: + - provider__name__value + display_label: "{{ identifier__value }} (Provider: {{ provider__name__value }})" uniqueness_constraints: - [identifier__value, provider] attributes: @@ -33,8 +33,6 @@ nodes: order_weight: 1300 - name: status kind: Dropdown - optional: true - order_weight: 1200 choices: - name: connected label: Connected @@ -48,17 +46,19 @@ nodes: label: Reserved description: "Fully connected and reserved for a future use" color: "#9090de" + optional: true + order_weight: 1200 relationships: - name: location - label: Location peer: LocationHosting - optional: false - cardinality: one + label: Location kind: Attribute + cardinality: one + optional: false order_weight: 1100 - name: provider peer: OrganizationProvider - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 1000 diff --git a/extensions/device_module/device_module.yml b/extensions/device_module/device_module.yml index f953405..5d98ca4 100644 --- a/extensions/device_module/device_module.yml +++ b/extensions/device_module/device_module.yml @@ -21,9 +21,9 @@ generics: # Overriten at node level - name: computed_name kind: Text + unique: true read_only: true optional: false - unique: true allow_override: any order_weight: 1000 - name: serial_number @@ -37,14 +37,14 @@ generics: order_weight: 1200 relationships: - name: module_bay - label: Module Bay peer: DcimModuleBay + label: Module Bay + kind: Attribute + cardinality: one + optional: false identifier: module_bay__module # A module only exists once installed - it must be installed to be tracked. # Spares awaiting installation aren't modeled by this node. - optional: false - cardinality: one - kind: Attribute order_weight: 900 - name: GenericModuleType @@ -53,14 +53,14 @@ generics: label: "Module Type" icon: mdi:database-cog menu_placement: DcimGenericModule - display_label: name__value - uniqueness_constraints: - - ["name__value", "manufacturer"] human_friendly_id: - name__value order_by: - manufacturer__name__value - name__value + display_label: name__value + uniqueness_constraints: + - ["name__value", "manufacturer"] attributes: - name: name kind: Text @@ -73,18 +73,18 @@ generics: description: "Description of the module type." order_weight: 1100 - name: part_number - label: Part Number kind: Text + label: Part Number optional: true description: "Part number of the module." order_weight: 1200 relationships: - name: manufacturer peer: OrganizationManufacturer - identifier: manufacturer__moduletype + kind: Attribute cardinality: one optional: false - kind: Attribute + identifier: manufacturer__moduletype description: "Manufacturer of the module type." order_weight: 1250 @@ -97,22 +97,22 @@ nodes: menu_placement: DcimDevice human_friendly_id: - computed_name__value - display_label: computed_name__value order_by: - device__name__value - name__value + display_label: computed_name__value uniqueness_constraints: - ["device", "name__value"] - ["device", "position__value"] attributes: - name: computed_name kind: Text - read_only: true - optional: false unique: true + read_only: true computed_attribute: kind: Jinja2 jinja2_template: "{{ device__name__value }} > {{ name__value }}" + optional: false description: "Name computed from the device and bay name." order_weight: 800 - name: name @@ -121,10 +121,10 @@ nodes: order_weight: 1000 - name: position kind: Number - description: "Numeric position of the bay within the device, used for ordering (e.g. slot 1, 2, 3...)." - optional: false parameters: min_value: 1 + optional: false + description: "Numeric position of the bay within the device, used for ordering (e.g. slot 1, 2, 3...)." order_weight: 1050 - name: description kind: Text @@ -132,22 +132,22 @@ nodes: order_weight: 1100 relationships: - name: device + peer: DcimPhysicalDevice label: Device # DcimGenericDevice (not DcimPhysicalDevice) so `name` is resolvable in computed_name above - # PhysicalDevice itself carries no identifying attribute. - peer: DcimPhysicalDevice - identifier: device__module_bays - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: device__module_bays order_weight: 900 - name: installed_module - label: Installed Module peer: DcimGenericModule - identifier: module_bay__module - optional: true - cardinality: one + label: Installed Module kind: Attribute + cardinality: one + optional: true + identifier: module_bay__module order_weight: 1200 - name: Module @@ -161,20 +161,20 @@ nodes: attributes: - name: computed_name kind: Text - read_only: true - optional: false unique: true + read_only: true computed_attribute: kind: Jinja2 jinja2_template: "{{ module_bay__computed_name__value }} ({{ module_type__name__value }})" + optional: false description: "Name computed from the module bay and module type." order_weight: 1000 relationships: - name: module_type peer: DcimModuleType - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 950 - name: ModuleType @@ -192,10 +192,10 @@ extensions: - kind: DcimPhysicalDevice relationships: - name: module_bays - label: Module Bays peer: DcimModuleBay - identifier: device__module_bays - cardinality: many + label: Module Bays kind: Component + cardinality: many optional: true + identifier: device__module_bays description: "Module bays available on this device." diff --git a/extensions/device_psu_module/device_psu_module.yml b/extensions/device_psu_module/device_psu_module.yml index c407e2b..6c19931 100644 --- a/extensions/device_psu_module/device_psu_module.yml +++ b/extensions/device_psu_module/device_psu_module.yml @@ -20,20 +20,20 @@ nodes: attributes: - name: computed_name kind: Text - read_only: true - optional: false unique: true + read_only: true computed_attribute: kind: Jinja2 jinja2_template: "{{ module_bay__computed_name__value }} ({{ module_type__name__value }})" + optional: false description: "Name computed from the module bay and module type." order_weight: 1000 relationships: - name: module_type peer: DcimPSUModuleType - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 950 - name: PSUModuleType @@ -46,14 +46,14 @@ nodes: - DcimGenericModuleType attributes: - name: wattage - description: "Wattage in watts." kind: Number optional: true + description: "Wattage in watts." order_weight: 1300 - name: hotswappable - label: Hot-Swappable - description: "Whether the PSU can be replaced without powering down the device." kind: Boolean - optional: false + label: Hot-Swappable default_value: false + optional: false + description: "Whether the PSU can be replaced without powering down the device." order_weight: 1350 diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index dcca8a6..2e4a82a 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -9,10 +9,10 @@ version: "1.0" generics: - name: GenericOadmInterface - label: Optical Multiplexer Interfaces - menu_placement: DcimOpticalMultiplexer namespace: Dcim + label: Optical Multiplexer Interfaces icon: mdi:ethernet + menu_placement: DcimOpticalMultiplexer attributes: - name: name kind: Text @@ -23,8 +23,6 @@ generics: order_weight: 2000 - name: connector_type kind: Dropdown - optional: true - order_weight: 1100 choices: - name: FC label: FC @@ -112,20 +110,21 @@ generics: # label: Splice # description: "Permanent fiber connection method where two fiber ends are fused." + optional: true + order_weight: 1100 nodes: - name: OpticalMultiplexer + namespace: Dcim + description: An OADM (Optical Add Drop Multiplexer) supporting various WDM (Wavelength Division Multiplexing) technologies. label: Optical Multiplexer - description: An OADM (Optical Add Drop Multiplexer) supporting various - WDM (Wavelength Division Multiplexing) technologies. icon: mdi:transit-connection-variant - namespace: Dcim + inherit_from: + - DcimPhysicalDevice human_friendly_id: - name__value order_by: - name__value display_label: name__value - inherit_from: - - DcimPhysicalDevice attributes: - name: name kind: Text @@ -133,9 +132,7 @@ nodes: order_weight: 1000 - name: wdm_type kind: Dropdown - description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1100 - optional: false + default_value: dwdm choices: - name: cwdm label: CWDM (Coarse Wavelength Division Multiplexing) @@ -145,7 +142,9 @@ nodes: label: DWDM (Dense Wavelength Division Multiplexing) description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" - default_value: dwdm + optional: false + description: Type of WDM (e.g CWDM. DWDM) + order_weight: 1100 - name: description kind: Text optional: true @@ -153,79 +152,82 @@ nodes: relationships: - name: front_interfaces peer: DcimOadmFrontInterface - identifier: optical_multiplexer__front_interfaces - optional: true - cardinality: many kind: Component + cardinality: many + optional: true + identifier: optical_multiplexer__front_interfaces - name: rear_interface peer: DcimOadmRearInterface - identifier: optical_multiplexer__rear_interface - optional: true - cardinality: one kind: Component + cardinality: one + optional: true + identifier: optical_multiplexer__rear_interface - name: OadmFrontInterface + namespace: Dcim label: Optical Multiplexer Front Interfaces menu_placement: DcimGenericOadmInterface - namespace: Dcim + inherit_from: + - DcimEndpoint + - DcimGenericOadmInterface human_friendly_id: - optical_multiplexer__name__value - name__value - display_label: "{{ optical_multiplexer__name__value }} > {{ name__value }}" order_by: - optical_multiplexer__name__value - name__value + display_label: "{{ optical_multiplexer__name__value }} > {{ name__value }}" uniqueness_constraints: - [optical_multiplexer, name__value] - inherit_from: - - DcimEndpoint - - DcimGenericOadmInterface relationships: - name: optical_multiplexer peer: DcimOpticalMultiplexer - order_weight: 900 - identifier: optical_multiplexer__front_interfaces - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: optical_multiplexer__front_interfaces + order_weight: 900 - name: channels peer: DcimWdmChannel - identifier: oadm_interface__channels - order_weight: 1200 - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true + identifier: oadm_interface__channels + order_weight: 1200 - name: OadmRearInterface + namespace: Dcim label: Optical Multiplexer Rear Interfaces menu_placement: DcimGenericOadmInterface - namespace: Dcim + inherit_from: + - DcimEndpoint + - DcimGenericOadmInterface human_friendly_id: - optical_multiplexer__name__value - name__value - display_label: "{{ optical_multiplexer__name__value }} > {{ name__value }}" order_by: - optical_multiplexer__name__value - name__value + display_label: "{{ optical_multiplexer__name__value }} > {{ name__value }}" uniqueness_constraints: - [optical_multiplexer, name__value] - inherit_from: - - DcimEndpoint - - DcimGenericOadmInterface relationships: - name: optical_multiplexer peer: DcimOpticalMultiplexer - order_weight: 900 - identifier: optical_multiplexer__rear_interface - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: optical_multiplexer__rear_interface + order_weight: 900 - name: WdmChannel namespace: Dcim description: A WDM channel with its wavelength and frequency. label: WDM Channel icon: game-icons:laser-warning + human_friendly_id: + - wdm_type__value + - channel__value order_by: - wdm_type__value - channel__value @@ -236,9 +238,6 @@ nodes: # For a given type channel number must be unique - [channel__value, wdm_type__value] # TODO: Maybe add some further validations - human_friendly_id: - - wdm_type__value - - channel__value attributes: - name: channel kind: Number @@ -246,9 +245,7 @@ nodes: order_weight: 1000 - name: wdm_type kind: Dropdown - description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1100 - optional: false + default_value: dwdm choices: - name: cwdm label: CWDM (Coarse Wavelength Division Multiplexing) @@ -258,32 +255,32 @@ nodes: label: DWDM (Dense Wavelength Division Multiplexing) description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" - default_value: dwdm + optional: false + description: Type of WDM (e.g CWDM. DWDM) + order_weight: 1100 - name: wavelength - label: Wavelength (nm) kind: Text # Text until float possible in Number Kind + label: Wavelength (nm) description: Wavelength of the channel in nm. order_weight: 1200 - name: frequency - label: Frequency (GHz) kind: Text # Text until float possible in Number Kind + label: Frequency (GHz) description: Frequency of the channel in GHz. order_weight: 1300 - name: WdmSFP namespace: Dcim - inherit_from: - - DcimGenericSFP description: SFP with configuration for Wavelength Division Multiplexing. label: WDM SFP icon: mdi:laser-pointer menu_placement: DcimGenericSFP + inherit_from: + - DcimGenericSFP attributes: - name: wdm_type kind: Dropdown - description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1100 - optional: false + default_value: dwdm choices: - name: cwdm label: CWDM (Coarse Wavelength Division Multiplexing) @@ -293,13 +290,15 @@ nodes: label: DWDM (Dense Wavelength Division Multiplexing) description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" - default_value: dwdm + optional: false + description: Type of WDM (e.g CWDM. DWDM) + order_weight: 1100 relationships: - name: wdm_channel - label: WDM Channel peer: DcimWdmChannel - identifier: wdm_sfp__channel + label: WDM Channel kind: Attribute cardinality: one optional: false + identifier: wdm_sfp__channel order_weight: 1150 diff --git a/extensions/hosting_cluster/hosting_cluster.yml b/extensions/hosting_cluster/hosting_cluster.yml index 0402d94..18d41e9 100644 --- a/extensions/hosting_cluster/hosting_cluster.yml +++ b/extensions/hosting_cluster/hosting_cluster.yml @@ -10,8 +10,8 @@ version: "1.0" nodes: - name: Hosting namespace: Cluster - label: Hosting Cluster description: A cluster hosting virtual machines. + label: Hosting Cluster icon: mdi:dots-hexagon menu_placement: VirtualizationVirtualMachine inherit_from: @@ -20,10 +20,8 @@ nodes: - ClusterGenericComputeUnitNodes # Means it's built out of regular compute unit (e.g. server) attributes: - name: technology - label: Technology kind: Dropdown - order_weight: 1200 - description: Underlying virtualisation or clustering technology. + label: Technology choices: - name: vmware label: VMware vSphere @@ -49,11 +47,11 @@ nodes: - name: public_cloud label: Public Cloud color: "#888888" + description: Underlying virtualisation or clustering technology. + order_weight: 1200 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1300 choices: - name: active label: Active @@ -71,3 +69,5 @@ nodes: label: Drained description: Temporarily taken out of service. color: "#9e9e9e" + optional: false + order_weight: 1300 diff --git a/extensions/interface_breakout/interface_breakout.yml b/extensions/interface_breakout/interface_breakout.yml index 2370b84..f48aa8e 100644 --- a/extensions/interface_breakout/interface_breakout.yml +++ b/extensions/interface_breakout/interface_breakout.yml @@ -13,16 +13,16 @@ extensions: attributes: - name: breakout_capability kind: Boolean - optional: false default_value: false + optional: false description: "Indicates if the port supports breakout capability" relationships: - name: breakout_child_interfaces peer: InterfacePhysical label: "Breakout child interface(s)" - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true identifier: "physical__breakout" direction: outbound description: "Interfaces resulting from the breakout" @@ -30,9 +30,9 @@ extensions: - name: breakout_parent_interface peer: InterfacePhysical label: "Breakout parent interface" - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true identifier: "physical__breakout" direction: inbound description: "Interface from which breakout is created" diff --git a/extensions/lag/lag.yml b/extensions/lag/lag.yml index bc25dc1..cfc55e2 100644 --- a/extensions/lag/lag.yml +++ b/extensions/lag/lag.yml @@ -23,30 +23,31 @@ generics: order_weight: 1100 relationships: - name: bundle_members - label: "Member(s)" peer: InterfacePhysical - identifier: interface__bundle - cardinality: many + label: "Member(s)" kind: Attribute + cardinality: many + identifier: interface__bundle description: "Physical Interfaces that are members of this aggregate" order_weight: 1800 nodes: - name: Lag namespace: Interface - label: LAG Interface description: "LAG interface" + label: LAG Interface + include_in_menu: false inherit_from: - DcimInterface - InterfaceLayer2 - InterfaceLayer3 - InterfaceHasSubInterface - GenericInterfaceBundle - include_in_menu: false attributes: - name: lacp_rate - label: "LACP Rate" kind: Dropdown + label: "LACP Rate" + default_value: fast choices: - name: slow label: Slow @@ -54,12 +55,12 @@ nodes: - name: fast label: Fast color: "#E6E6FA" # lavender - default_value: fast description: "LACP rate for the aggregated interface" order_weight: 1700 - name: lacp_mode - label: LACP Mode kind: Dropdown + label: LACP Mode + default_value: active choices: - name: active label: Active @@ -71,17 +72,16 @@ nodes: label: Disabled color: "#E6E6FA" # lavender description: "LACP mode for the aggregated interface" - default_value: active order_weight: 1750 relationships: # Redifine the relationship here to add common_parent constraint - name: bundle_members - common_parent: device - label: "Member(s)" peer: InterfacePhysical - identifier: interface__bundle - cardinality: many + label: "Member(s)" kind: Attribute + cardinality: many + identifier: interface__bundle + common_parent: device description: "Physical Interfaces that are members of this aggregate" order_weight: 1800 @@ -90,11 +90,11 @@ extensions: - kind: InterfacePhysical relationships: - name: bundle - label: Interface Bundle peer: GenericInterfaceBundle - identifier: interface__bundle - optional: true - cardinality: one + label: Interface Bundle kind: Attribute + cardinality: one + optional: true + identifier: interface__bundle description: "Interface Bundle using this Physical Interface" order_weight: 1800 diff --git a/extensions/location_minimal/location_minimal.yml b/extensions/location_minimal/location_minimal.yml index 72c5ffd..16589fc 100644 --- a/extensions/location_minimal/location_minimal.yml +++ b/extensions/location_minimal/location_minimal.yml @@ -11,42 +11,40 @@ nodes: - name: Region namespace: Location label: Region + icon: carbon:cics-region-target + + menu_placement: LocationGeneric inherit_from: - LocationGeneric - IpamPrefixScope - menu_placement: LocationGeneric parent: "" children: LocationCountry - icon: carbon:cics-region-target - - name: Country namespace: Location label: Country + icon: gis:search-country + + menu_placement: LocationGeneric inherit_from: - LocationGeneric - menu_placement: LocationGeneric parent: LocationRegion children: LocationSite - icon: gis:search-country - - name: Site namespace: Location label: Site + icon: ri:building-line + menu_placement: LocationGeneric inherit_from: - LocationGeneric - LocationHosting - IpamPrefixScope - IpamVLANGroupScope - menu_placement: LocationGeneric - display_label: name__value parent: LocationCountry - icon: ri:building-line + display_label: name__value attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1250 choices: - name: active label: Active @@ -63,6 +61,8 @@ nodes: - name: retired label: Retired color: "#6c757d" + optional: false + order_weight: 1250 - name: facility kind: Text unique: false diff --git a/extensions/location_site/location_site.yml b/extensions/location_site/location_site.yml index 5d51dee..9f3c93f 100644 --- a/extensions/location_site/location_site.yml +++ b/extensions/location_site/location_site.yml @@ -11,20 +11,18 @@ nodes: - name: Site namespace: Location label: Site + icon: ri:building-line + menu_placement: LocationGeneric inherit_from: - LocationGeneric - LocationHosting - IpamPrefixScope - IpamVLANGroupScope - menu_placement: LocationGeneric display_label: name__value - icon: ri:building-line attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1250 choices: - name: active label: Active @@ -41,6 +39,8 @@ nodes: - name: retired label: Retired color: "#6c757d" + optional: false + order_weight: 1250 - name: facility kind: Text unique: false diff --git a/extensions/mlag/mlag.yml b/extensions/mlag/mlag.yml index 13f04ac..397b922 100644 --- a/extensions/mlag/mlag.yml +++ b/extensions/mlag/mlag.yml @@ -15,31 +15,31 @@ generics: # and add the necessary relationships/attributes to it following MlagDomain node example below - name: MlagDomain namespace: Generic - include_in_menu: false label: MLAG Domain - display_label: domain_id__value + include_in_menu: false human_friendly_id: - domain_id__value + display_label: domain_id__value attributes: - name: domain_id - label: "MLAG Domain ID" kind: Text + label: "MLAG Domain ID" unique: true # TODO: This one could be a mess to make unique... description: "Identifier for the MLAG domain" order_weight: 900 - name: reload_delay - label: "Reload Delay" kind: Number - description: "Time in seconds to wait before bringing up the MLAG after a reload" + label: "Reload Delay" default_value: 300 + description: "Time in seconds to wait before bringing up the MLAG after a reload" order_weight: 1650 relationships: - name: peer_links - label: "Peer Links" - description: "LAG interfaces used as peer-links between the MLAG peers" peer: InterfaceLag - cardinality: many + label: "Peer Links" kind: Attribute + cardinality: many + description: "LAG interfaces used as peer-links between the MLAG peers" order_weight: 1500 # Depending on the use-case this could be optional or not # Example: User creates a MLAG domain and generator implements it = keep it optional @@ -50,30 +50,30 @@ generics: # max_count: 2 # min_count: 2 - name: mlag_interfaces - label: "MLAG Interface(s)" peer: MlagInterface - cardinality: many + label: "MLAG Interface(s)" kind: Component + cardinality: many description: "Bundle interfaces that are spread across all devices in this MLAG domain." order_weight: 1500 nodes: - name: Interface namespace: Mlag - label: MLAG Interface description: "Multi-Chassis Link Aggregation Group Interface" + label: MLAG Interface + include_in_menu: false inherit_from: - InterfaceLayer2 - GenericInterfaceBundle - include_in_menu: false - uniqueness_constraints: - - [mlag_domain, name__value] human_friendly_id: - mlag_domain__domain_id__value - name__value order_by: - name__value display_label: name__value + uniqueness_constraints: + - [mlag_domain, name__value] attributes: - name: name kind: Text @@ -86,7 +86,7 @@ nodes: order_weight: 1100 - name: status kind: Dropdown - description: "The status of the interface" + default_value: "active" choices: - name: provisioning label: Provisioning @@ -116,12 +116,10 @@ nodes: label: Outage description: "Interface is currently experiencing an outage." color: "#F4CCCC" # pastel red - default_value: "active" + description: "The status of the interface" order_weight: 1200 - name: role kind: Dropdown - optional: true - description: "The role of the interface in the network" choices: - name: server label: Server Interface @@ -131,35 +129,37 @@ nodes: label: Router Interface description: "Interface connecting routers" color: "#B2D4E6" # pastel sky blue + optional: true + description: "The role of the interface in the network" order_weight: 1250 relationships: - name: mlag_domain - label: "MLAG Domain" peer: GenericMlagDomain - optional: false - cardinality: one + label: "MLAG Domain" kind: Parent + cardinality: one + optional: false description: "MLAG Domain this MLAG Interface belongs to" order_weight: 1750 # Placeholder node implementation of MLAG domain - name: Domain namespace: Mlag - label: MLAG Domain description: "MLAG (Multi-Chassis Link Aggregation Group) Domain" + label: MLAG Domain icon: mingcute:cloud-line inherit_from: - GenericMlagDomain relationships: - name: peers peer: DcimDevice - optional: false - cardinality: many kind: Generic + cardinality: many + optional: false identifier: device__mlag_domain # Most of the vendor limit to 2 devices (peers) per group/domain - max_count: 2 min_count: 2 + max_count: 2 order_weight: 950 extensions: @@ -167,21 +167,21 @@ extensions: - kind: InterfaceLag relationships: - name: mlag_peer_link - label: "MLAG Peer Link" peer: MlagDomain - optional: true - cardinality: one + label: "MLAG Peer Link" kind: Attribute + cardinality: one + optional: true description: "MLAG Domain this LAG is used as peer link" order_weight: 1800 - kind: DcimDevice relationships: - name: mlag_domain - label: "MLAG Domain" peer: MlagDomain - optional: true - cardinality: one + label: "MLAG Domain" kind: Attribute + cardinality: one + optional: true + identifier: device__mlag_domain description: "MLAG Domain this device belongs to" order_weight: 1800 - identifier: device__mlag_domain diff --git a/extensions/patch_panel/patch_panel.yml b/extensions/patch_panel/patch_panel.yml index 296a8ca..c62236b 100644 --- a/extensions/patch_panel/patch_panel.yml +++ b/extensions/patch_panel/patch_panel.yml @@ -9,10 +9,10 @@ version: "1.0" generics: - name: GenericPatchPanelInterface - label: Patch Panel Interfaces - menu_placement: DcimPatchPanel namespace: Dcim + label: Patch Panel Interfaces icon: mdi:ethernet + menu_placement: DcimPatchPanel attributes: - name: name kind: Text @@ -23,7 +23,6 @@ generics: order_weight: 2000 - name: connector_type kind: Dropdown - order_weight: 1100 choices: - name: FC label: FC @@ -111,27 +110,28 @@ generics: # label: Splice # description: "Permanent fiber connection method where two fiber ends are fused." + order_weight: 1100 nodes: - name: PatchPanel - label: Patch Panel + namespace: Dcim description: A Patch Panel used for managing network cable connections in a data center or telecom setup. + label: Patch Panel icon: ic:round-device-hub - namespace: Dcim + inherit_from: + - DcimPhysicalDevice human_friendly_id: - name__value order_by: - name__value display_label: name__value - inherit_from: - - DcimPhysicalDevice attributes: - name: name kind: Text unique: true # TODO: maybe combine location / name order_weight: 1000 - name: module_capacity - label: Module Capacity kind: Number + label: Module Capacity optional: true description: The maximum number of modules that can be housed within this patch panel. - name: description @@ -141,77 +141,77 @@ nodes: relationships: - name: front_interfaces peer: DcimFrontPatchPanelInterface - identifier: front_interfaces - optional: true - cardinality: many kind: Component + cardinality: many + optional: true + identifier: front_interfaces - name: rear_interfaces peer: DcimRearPatchPanelInterface - identifier: rear_interfaces - optional: true - cardinality: many kind: Component + cardinality: many + optional: true + identifier: rear_interfaces - name: FrontPatchPanelInterface + namespace: Dcim label: Patch Panel Front Interfaces menu_placement: DcimGenericPatchPanelInterface - namespace: Dcim + inherit_from: + - DcimEndpoint + - DcimGenericPatchPanelInterface human_friendly_id: - patch_panel__name__value - name__value - display_label: "{{ patch_panel__name__value }} > {{ name__value }}" order_by: - corresponding_front_rear__name__value - name__value + display_label: "{{ patch_panel__name__value }} > {{ name__value }}" uniqueness_constraints: - [patch_panel, name__value] - inherit_from: - - DcimEndpoint - - DcimGenericPatchPanelInterface relationships: - name: corresponding_front_rear - label: Corresponding rear interface peer: DcimRearPatchPanelInterface - order_weight: 1200 - optional: true - cardinality: one + label: Corresponding rear interface kind: Attribute + cardinality: one + optional: true + order_weight: 1200 - name: patch_panel peer: DcimPatchPanel - order_weight: 900 - identifier: front_interfaces - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: front_interfaces + order_weight: 900 - name: RearPatchPanelInterface + namespace: Dcim label: Patch Panel Rear Interfaces menu_placement: DcimGenericPatchPanelInterface - namespace: Dcim + inherit_from: + - DcimEndpoint + - DcimGenericPatchPanelInterface human_friendly_id: - patch_panel__name__value - name__value - display_label: "{{ patch_panel__name__value }} > {{ name__value }}" order_by: - patch_panel__name__value - name__value + display_label: "{{ patch_panel__name__value }} > {{ name__value }}" uniqueness_constraints: - [patch_panel, name__value] - inherit_from: - - DcimEndpoint - - DcimGenericPatchPanelInterface relationships: - name: corresponding_front_rear - label: Corresponding front interfaces peer: DcimFrontPatchPanelInterface - order_weight: 1200 - optional: true - cardinality: many + label: Corresponding front interfaces kind: Attribute + cardinality: many + optional: true + order_weight: 1200 - name: patch_panel peer: DcimPatchPanel - order_weight: 900 - identifier: rear_interfaces - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: rear_interfaces + order_weight: 900 diff --git a/extensions/peering_ixp/peering_ixp.yml b/extensions/peering_ixp/peering_ixp.yml index b53fa06..477d210 100644 --- a/extensions/peering_ixp/peering_ixp.yml +++ b/extensions/peering_ixp/peering_ixp.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: - name: IXP @@ -25,11 +25,12 @@ nodes: order_weight: 1000 - name: description kind: Text - description: "An optional description of the Internet Exchange" optional: true + description: "An optional description of the Internet Exchange" order_weight: 1100 - name: status kind: Dropdown + default_value: "enabled" choices: - name: enabled label: Enabled @@ -39,49 +40,48 @@ nodes: label: Disabled description: "Internet Exchange is not operational" color: "#b0bec5" - default_value: "enabled" order_weight: 1200 relationships: - name: connections peer: PeeringIXPConnection - optional: true - cardinality: many kind: Component + cardinality: many + optional: true description: "IXP connections associated with this Internet Exchange" - name: local_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true order_weight: 1300 - name: import_policies - label: Import Routing Policies peer: RoutingPolicyBGP - identifier: ixp__import_bgppolicies - optional: true - cardinality: many + label: Import Routing Policies kind: Generic + cardinality: many + optional: true + identifier: ixp__import_bgppolicies description: "Import routing policies applied to the session" - name: export_policies - label: Export Routing Policies peer: RoutingPolicyBGP - identifier: ixp__export_bgppolicies - optional: true - cardinality: many + label: Export Routing Policies kind: Generic + cardinality: many + optional: true + identifier: ixp__export_bgppolicies description: "Export routing policies applied to the session" - name: bgp_communities - label: "BGP Communities" peer: RoutingBGPCommunity - optional: true - cardinality: many + label: "BGP Communities" kind: Generic + cardinality: many + optional: true description: "BGP communities associated with the session" - name: tags peer: BuiltinTag - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true order_weight: 3000 - name: IXPConnection @@ -90,13 +90,13 @@ nodes: label: "IXP Connection" icon: "mdi:lan-connect" menu_placement: PeeringIXP - uniqueness_constraints: - - ["name__value"] human_friendly_id: - "name__value" order_by: - name__value display_label: name__value + uniqueness_constraints: + - ["name__value"] attributes: - name: name kind: Text @@ -109,14 +109,14 @@ nodes: description: "Description of the IXP Connection" order_weight: 1100 - name: peeringdb_netixlan - label: PeeringDB Netixlan kind: Number + label: PeeringDB Netixlan optional: true description: "PeeringDB ID for the IXP connection" order_weight: 1150 - name: status kind: Dropdown - optional: true + default_value: "enabled" choices: - name: enabled label: Enabled @@ -138,12 +138,12 @@ nodes: label: Disabled description: "The system is not operational and cannot be used." color: "#b0bec5" - default_value: "enabled" + optional: true order_weight: 1200 - name: vlan kind: Number - description: "VLAN ID for the connection" optional: true + description: "VLAN ID for the connection" order_weight: 1300 - name: mac_address kind: MacAddress @@ -153,47 +153,47 @@ nodes: order_weight: 1350 relationships: - name: ipv6_address - label: IPv6 Address - description: "IPv6 address assigned to the connection" peer: IpamIPAddress - identifier: ixpconn__ipv6_address - cardinality: one + label: IPv6 Address kind: Attribute + cardinality: one + identifier: ixpconn__ipv6_address + description: "IPv6 address assigned to the connection" order_weight: 1400 - name: ipv4_address - label: IPv4 Address - description: "IPv4 address assigned to the connection" peer: IpamIPAddress - identifier: ixpconn__ipv4_address - cardinality: one + label: IPv4 Address kind: Attribute + cardinality: one + identifier: ixpconn__ipv4_address + description: "IPv4 address assigned to the connection" order_weight: 1375 - name: internet_exchange_point - label: IXP peer: PeeringIXP - optional: false - cardinality: one + label: IXP kind: Parent + cardinality: one + optional: false description: "The Internet Exchange Point this connection is part of" - name: router peer: DcimDevice - cardinality: one kind: Attribute + cardinality: one description: "The router this IXP connection is connected to" order_weight: 1400 - name: bgp_sessions - label: BGP Sessions peer: RoutingBGPSession - identifier: ixpconn__bgpsessions - optional: true - cardinality: many + label: BGP Sessions kind: Component + cardinality: many + optional: true + identifier: ixpconn__bgpsessions description: "BGP sessions established over this IXP connection" order_weight: 1450 - name: tags peer: BuiltinTag - cardinality: many kind: Attribute + cardinality: many order_weight: 3000 extensions: @@ -201,10 +201,10 @@ extensions: - kind: RoutingBGPSession relationships: - name: ixp_connection - label: IXP Connection peer: PeeringIXPConnection - identifier: ixpconn__bgpsessions - optional: true - cardinality: one + label: IXP Connection kind: Attribute + cardinality: one + optional: true + identifier: ixpconn__bgpsessions description: "The IXP connection this BGP session is established over" diff --git a/extensions/physical_disk/physical_disk.yml b/extensions/physical_disk/physical_disk.yml index 32d3cea..0f7b7b3 100644 --- a/extensions/physical_disk/physical_disk.yml +++ b/extensions/physical_disk/physical_disk.yml @@ -10,28 +10,26 @@ version: "1.0" generics: - name: DeviceWithPhysicalDisks namespace: Dcim - description: - Generic that hold relationship toward physical disks. To apply on device that can have physical - disks. + description: Generic that hold relationship toward physical disks. To apply on device that can have physical disks. include_in_menu: false relationships: - name: physical_disks - cardinality: many peer: DcimPhysicalDisk - optional: true kind: Component + cardinality: many + optional: true nodes: - name: PhysicalDisk namespace: Dcim description: Physical Disk label: Physical Disk icon: carbon:vmdk-disk + human_friendly_id: + - name__value order_by: - name__value display_label: name__value - human_friendly_id: - - name__value uniqueness_constraints: - [device, name__value] attributes: @@ -41,9 +39,6 @@ nodes: order_weight: 900 - name: disk_type kind: Dropdown - description: Specifies the type of disk - order_weight: 950 - optional: true choices: - name: ssd label: SSD @@ -61,9 +56,11 @@ nodes: label: Hybrid description: Hybrid Drive color: "#ffcc80" + optional: true + description: Specifies the type of disk + order_weight: 950 - name: status kind: Dropdown - description: Lifecycle status of the hardware component. choices: - name: in_inventory label: In Inventory @@ -81,18 +78,19 @@ nodes: label: Disposed description: The disk has been securely erased and disposed of. color: "#dc3545" + description: Lifecycle status of the hardware component. - name: size - label: Size (GB) kind: Number + label: Size (GB) optional: false - order_weight: 1000 description: Disk capacity (in GB). + order_weight: 1000 - name: serial_number kind: Text - description: Serial number of the disk unique: true - order_weight: 1100 optional: true + description: Serial number of the disk + order_weight: 1100 - name: description kind: Text unique: false @@ -101,7 +99,7 @@ nodes: relationships: - name: device peer: DcimDeviceWithPhysicalDisks - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false order_weight: 800 diff --git a/extensions/qinq/qinq.yml b/extensions/qinq/qinq.yml index 5d08efc..d56f310 100644 --- a/extensions/qinq/qinq.yml +++ b/extensions/qinq/qinq.yml @@ -10,48 +10,48 @@ version: "1.0" nodes: - name: SVLAN namespace: Ipam - label: S-VLAN description: A VLAN used to encapsulate multiple CVLANs. + label: S-VLAN include_in_menu: false inherit_from: - GenericVLAN relationships: - name: cvlan - label: Customer vlan(s) peer: IpamCVLAN - optional: true - direction: outbound - identifier: vlan__qinq - cardinality: many + label: Customer vlan(s) kind: Attribute + cardinality: many + optional: true + identifier: vlan__qinq + direction: outbound - name: CVLAN namespace: Ipam - label: C-VLAN description: A VLAN assigned to customer traffic, encapsulated within an S-VLAN. + label: C-VLAN include_in_menu: false - display_label: "{{ svlan__name__value }}-{{ vlan_id__value }}" + inherit_from: + - GenericVLAN human_friendly_id: - svlan__name__value - vlan_id__value + display_label: "{{ svlan__name__value }}-{{ vlan_id__value }}" uniqueness_constraints: - [vlan_id__value, svlan] - inherit_from: - - GenericVLAN attributes: - name: name kind: Text - optional: true read_only: true computed_attribute: kind: Jinja2 jinja2_template: "{{ svlan__name__value }}-{{ vlan_id__value }}" + optional: true relationships: - name: svlan - label: Supplier vlan peer: IpamSVLAN + label: Supplier vlan + kind: Attribute + cardinality: one optional: false - direction: inbound identifier: vlan__qinq - cardinality: one - kind: Attribute + direction: inbound diff --git a/extensions/rack/rack.yml b/extensions/rack/rack.yml index a618519..43130b9 100644 --- a/extensions/rack/rack.yml +++ b/extensions/rack/rack.yml @@ -10,17 +10,17 @@ version: "1.0" nodes: - name: Rack namespace: Location - label: Rack description: A physical equipment rack installed at a site. + label: Rack icon: clarity:rack-server-line menu_placement: LocationGeneric + inherit_from: + - LocationHosting human_friendly_id: - name__value order_by: - name__value display_label: name__value - inherit_from: - - LocationHosting attributes: - name: name kind: Text @@ -33,9 +33,7 @@ nodes: order_weight: 1100 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1200 choices: - name: active label: Active @@ -61,11 +59,13 @@ nodes: label: Retired description: Rack has been removed from service. color: "#6c757d" + optional: false + order_weight: 1200 - name: height - label: Height (U) kind: Number - optional: false + label: Height (U) default_value: 42 + optional: false order_weight: 1300 - name: serial_number kind: Text @@ -78,15 +78,15 @@ nodes: relationships: - name: site peer: LocationSite - optional: false - cardinality: one kind: Attribute - order_weight: 900 + cardinality: one + optional: false identifier: site__racks + order_weight: 900 - name: tags peer: BuiltinTag - cardinality: many kind: Attribute + cardinality: many optional: true order_weight: 3000 @@ -96,7 +96,7 @@ extensions: relationships: - name: racks peer: LocationRack + kind: Component cardinality: many optional: true - kind: Component identifier: site__racks diff --git a/extensions/routing/routing.yml b/extensions/routing/routing.yml index c2b4088..bf4594e 100644 --- a/extensions/routing/routing.yml +++ b/extensions/routing/routing.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" generics: @@ -18,8 +18,8 @@ generics: # TODO: Should be computed later - name: description kind: Text - optional: false unique: true + optional: false description: "Description of the protocol" order_weight: 1100 - name: status @@ -42,14 +42,14 @@ generics: relationships: - name: device peer: DcimDevice - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false order_weight: 1050 - name: vrf - label: VRF peer: IpamVRF - optional: false - cardinality: one + label: VRF kind: Attribute + cardinality: one + optional: false order_weight: 1075 diff --git a/extensions/routing_aggregate/aggregate.yml b/extensions/routing_aggregate/aggregate.yml index e8d4d7e..629cb3c 100644 --- a/extensions/routing_aggregate/aggregate.yml +++ b/extensions/routing_aggregate/aggregate.yml @@ -12,16 +12,16 @@ nodes: namespace: Routing description: "Aggregate Protocol with action and BGP communities" label: "Aggregate Routes" - include_in_menu: false icon: "grommet-icons:aggregate" + include_in_menu: false inherit_from: - "RoutingProtocol" attributes: - name: discard - label: Discard kind: Boolean - optional: true + label: Discard default_value: false + optional: true order_weight: 1275 - name: import_policies kind: Text @@ -33,7 +33,7 @@ nodes: order_weight: 1350 relationships: - name: destination - kind: Attribute peer: IpamPrefix + kind: Attribute description: "Destination network for the static route." order_weight: 1200 diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index cd1a9a2..d128d13 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -24,14 +24,14 @@ nodes: attributes: - name: name kind: Text + unique: true description: "Name of the Autonomous System" order_weight: 1000 - unique: true - name: asn kind: Number + unique: true description: "Autonomous System Number" order_weight: 1050 - unique: true - name: description kind: Text optional: true @@ -40,20 +40,20 @@ nodes: relationships: - name: organization peer: OrganizationGeneric - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false - name: location peer: LocationGeneric - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true - name: devices peer: DcimDevice - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true - name: BGPPeerGroup namespace: Routing description: A BGP Peer Group is used to regroup parameters that are shared across multiple peers @@ -71,8 +71,8 @@ nodes: attributes: - name: name kind: Text - optional: false unique: true + optional: false description: "Name of the BGP Group" order_weight: 1000 - name: import_policies @@ -85,16 +85,16 @@ nodes: order_weight: 1350 - name: maximum_routes kind: Number - optional: true parameters: min_value: 0 + optional: true description: "Maximum routes for the BGP Group." order_weight: 1400 - name: local_pref kind: Number - optional: true parameters: min_value: 0 + optional: true description: "Force Local Pref for this BGP Peer Group." order_weight: 1450 - name: send_community @@ -103,8 +103,8 @@ nodes: description: "Whether to send community attributes." order_weight: 1500 - name: address_family - description: "The address family for the routing policy indicating the type of IP address." kind: Dropdown + default_value: "ipv4" choices: - name: "ipv4" label: IPv4 @@ -114,22 +114,22 @@ nodes: label: IPv6 description: "Policy applies to IPv6 addresses." color: "#E6E6FA" # lavender - default_value: "ipv4" + description: "The address family for the routing policy indicating the type of IP address." order_weight: 1150 relationships: - name: local_as - identifier: bgppeergroup__local_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgppeergroup__local_as - name: remote_as - identifier: bgppeergroup__remote_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgppeergroup__remote_as - name: BGPSession namespace: Routing description: A BGP Session represent a point to point connection between two routers @@ -177,66 +177,66 @@ nodes: order_weight: 1600 - name: local_pref kind: Number - optional: true parameters: min_value: 0 + optional: true description: "Force Local Pref for this BGP Peer Session." order_weight: 1450 relationships: - name: local_as - identifier: bgpsession__local_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__local_as - name: remote_as - identifier: bgpsession__remote_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__remote_as - name: local_ip - identifier: bgpsession__local_ip peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__local_ip - name: remote_ip - identifier: bgpsession__remote_ip peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__remote_ip - name: device peer: DcimDevice - optional: true cardinality: one + optional: true - name: peer_group peer: RoutingBGPPeerGroup - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true - name: peer_session peer: RoutingBGPSession - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true extensions: nodes: - kind: DcimGenericDevice relationships: - name: asn peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true order_weight: 1600 - kind: OrganizationGeneric relationships: - name: asn + peer: RoutingAutonomousSystem label: Autonomous System cardinality: many optional: true - peer: RoutingAutonomousSystem order_weight: 2000 diff --git a/extensions/routing_bgp_community/bgp_community.yml b/extensions/routing_bgp_community/bgp_community.yml index 858372d..ed6f704 100644 --- a/extensions/routing_bgp_community/bgp_community.yml +++ b/extensions/routing_bgp_community/bgp_community.yml @@ -1,18 +1,18 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: - name: BGPCommunity namespace: Routing - icon: iconoir:community - label: "BGP Community" description: "Defines a BGP community." + label: "BGP Community" + icon: iconoir:community human_friendly_id: - name__value order_by: @@ -21,29 +21,29 @@ nodes: attributes: - name: name kind: Text + unique: true description: "The name of the BGP community." order_weight: 1000 - unique: true - name: description kind: Text - description: "An optional description of the BGP community." optional: true + description: "An optional description of the BGP community." order_weight: 1100 - name: community kind: Text + unique: true description: "The value of the BGP community (RFC1997, RFC4360, RFC8092)." order_weight: 1200 - unique: true relationships: - name: routing_policy - label: Routing Policies peer: RoutingPolicy - description: "The BGP Policies using this BGP Community." + label: Routing Policies kind: Generic cardinality: many + description: "The BGP Policies using this BGP Community." - name: tags peer: BuiltinTag kind: Attribute - optional: true cardinality: many + optional: true order_weight: 3000 diff --git a/extensions/routing_bgp_rr/bgp_rr.yml b/extensions/routing_bgp_rr/bgp_rr.yml index 1b7f004..4ea8c48 100644 --- a/extensions/routing_bgp_rr/bgp_rr.yml +++ b/extensions/routing_bgp_rr/bgp_rr.yml @@ -20,28 +20,28 @@ nodes: attributes: - name: name kind: Text + unique: true description: "Name of the Route Reflector Cluster" order_weight: 1000 - unique: true - name: description kind: Text - description: "Optional description of the Route Reflector Cluster" optional: true + description: "Optional description of the Route Reflector Cluster" order_weight: 1100 relationships: - name: cluster_id - label: "Cluster ID" peer: IpamIPAddress - description: "Cluster ID represented as a reference to an IP Address" - cardinality: one + label: "Cluster ID" kind: Attribute + cardinality: one optional: false + description: "Cluster ID represented as a reference to an IP Address" order_weight: 1200 - name: peer_groups - label: "BGP Peer Groups" peer: RoutingBGPPeerGroup - cardinality: many + label: "BGP Peer Groups" kind: Generic + cardinality: many optional: true extensions: @@ -49,8 +49,8 @@ extensions: - kind: RoutingBGPPeerGroup relationships: - name: rr_cluster - label: "RR Cluster" peer: RoutingBGPRRCluster - cardinality: one + label: "RR Cluster" kind: Attribute + cardinality: one order_weight: 1600 diff --git a/extensions/routing_ospf/ospf.yml b/extensions/routing_ospf/ospf.yml index 75ee1b9..d140e7b 100644 --- a/extensions/routing_ospf/ospf.yml +++ b/extensions/routing_ospf/ospf.yml @@ -14,28 +14,29 @@ nodes: label: "OSPF" icon: "mdi:network-outline" include_in_menu: false + inherit_from: + - "RoutingProtocol" + human_friendly_id: + - "device__name__value" + - "vrf__name__value" + - "version__value" order_by: - router_id__address__value - vrf__name__value - device__name__value + display_label: description__value uniqueness_constraints: - ["device", "vrf", "version__value"] - human_friendly_id: - - "device__name__value" - - "vrf__name__value" - - "version__value" - display_label: description__value - inherit_from: - - "RoutingProtocol" attributes: - name: reference_bandwidth kind: Number - optional: true default_value: 1000 + optional: true description: "Reference bandwidth for OSPF instance (in Mbps)." order_weight: 1150 - name: version kind: Dropdown + default_value: ospf choices: - name: ospf label: OSPFv2 @@ -45,7 +46,6 @@ nodes: label: OSPFv3 description: "Open Shortest Path First version 3." color: "#E6E6FA" # lavender - default_value: ospf description: "Version of the OSPF protocol." order_weight: 1100 - name: import_policies @@ -59,36 +59,36 @@ nodes: relationships: - name: router_id peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true - name: ospf_interfaces - label: OSPF Interfaces peer: RoutingOSPFInterface - identifier: ospf__ospfinterfaces - optional: true - cardinality: many + label: OSPF Interfaces kind: Component + cardinality: many + optional: true + identifier: ospf__ospfinterfaces - name: OSPFInterface namespace: Routing description: "Pivot table linking OSPF configuration to an interface." label: "OSPF Interface" icon: "mdi:ethernet" include_in_menu: false + human_friendly_id: + - "description__value" order_by: - description__value display_label: description__value uniqueness_constraints: - ["ospf", "interface"] - human_friendly_id: - - "description__value" attributes: # Could be computed later on based on OSPF Instance / Interface Name - name: description kind: Text - optional: false unique: true + optional: false description: "Description of the OSPF interface." order_weight: 1500 - name: metric @@ -98,6 +98,7 @@ nodes: order_weight: 1400 - name: mode kind: Dropdown + default_value: normal choices: - name: normal label: Normal @@ -111,13 +112,12 @@ nodes: label: Peer-to-Peer description: "OSPF peer-to-peer interface mode." color: "#E6E6FA" # lavender - default_value: normal description: "Mode of the OSPF interface." order_weight: 1300 - name: authentication_key kind: Password - description: "Shared secret used to authenticate and secure routing messages between neighboring routers." optional: true + description: "Shared secret used to authenticate and secure routing messages between neighboring routers." order_weight: 1250 - name: authentication_mode kind: Dropdown @@ -136,16 +136,16 @@ nodes: order_weight: 1200 relationships: - name: ospf - label: OSPF peer: RoutingOSPF - identifier: ospf__ospfinterfaces - optional: false - cardinality: one + label: OSPF kind: Parent + cardinality: one + optional: false + identifier: ospf__ospfinterfaces order_weight: 1100 - name: interface peer: InterfaceLayer3 - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 1200 diff --git a/extensions/routing_pim/pim.yml b/extensions/routing_pim/pim.yml index ab7196c..2b5cef2 100644 --- a/extensions/routing_pim/pim.yml +++ b/extensions/routing_pim/pim.yml @@ -16,20 +16,20 @@ nodes: include_in_menu: false inherit_from: - "RoutingProtocol" + human_friendly_id: + - "device__name__value" + - "vrf__name__value" order_by: - vrf__name__value - device__name__value + display_label: description__value uniqueness_constraints: - ["device", "vrf"] - human_friendly_id: - - "device__name__value" - - "vrf__name__value" - display_label: description__value attributes: - name: dr_priority kind: Number - optional: true default_value: 1 + optional: true description: "Designated Router priority." order_weight: 1250 - name: import_policies @@ -43,37 +43,37 @@ nodes: relationships: - name: rp_address peer: IpamIPAddress + kind: Attribute + cardinality: one optional: true description: "Rendezvous Point (RP) address for PIM." - cardinality: one - kind: Attribute - name: pim_interfaces - label: PIM Interfaces peer: RoutingPIMInterface - identifier: pim__piminterfaces - optional: true - cardinality: many + label: PIM Interfaces kind: Component + cardinality: many + optional: true + identifier: pim__piminterfaces - name: PIMInterface namespace: Routing description: "Interface configuration for PIM." label: "PIM Interface" icon: "mdi:ethernet" include_in_menu: false + human_friendly_id: + - "description__value" order_by: - description__value display_label: description__value uniqueness_constraints: - ["pim", "interface"] - human_friendly_id: - - "description__value" attributes: # Could be computed later on based on PIM Instance / Interface Name - name: description kind: Text - optional: false unique: true + optional: false description: "Description of the OSPF interface." order_weight: 1100 - name: pim_mode @@ -95,27 +95,27 @@ nodes: order_weight: 1150 - name: hello_interval kind: Number - optional: true default_value: 30 + optional: true description: "Interval for PIM hello messages (in seconds)." order_weight: 1300 - name: dr_priority kind: Number - optional: true default_value: 1 + optional: true description: "Designated Router priority on the interface." order_weight: 1250 relationships: - name: pim - label: PIM peer: RoutingPIM - identifier: pim__piminterfaces - optional: false - cardinality: one + label: PIM kind: Parent + cardinality: one + optional: false + identifier: pim__piminterfaces - name: interface peer: InterfaceLayer3 - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 1200 diff --git a/extensions/routing_policies/routing_policies.yml b/extensions/routing_policies/routing_policies.yml index ba3502f..9f5310f 100644 --- a/extensions/routing_policies/routing_policies.yml +++ b/extensions/routing_policies/routing_policies.yml @@ -1,18 +1,18 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" generics: - name: Policy namespace: Routing + description: "Policy defining the rules for routing traffic in a network." icon: carbon:deployment-policy include_in_menu: false - description: "Policy defining the rules for routing traffic in a network." human_friendly_id: - "name__value" order_by: @@ -21,19 +21,18 @@ generics: attributes: - name: name kind: Text - description: "The name of the routing policy." unique: true optional: false + description: "The name of the routing policy." order_weight: 1000 - name: description kind: Text - description: "An optional description of the routing policy." optional: true + description: "An optional description of the routing policy." order_weight: 1100 - name: policy_type - label: Type kind: Dropdown - description: "The type of routing policy which specifies the direction of route advertisement." + label: Type choices: - name: import-policy label: Import @@ -47,16 +46,17 @@ generics: label: Import + Export description: "Policy for both incoming and outgoing routes." color: "#E6E6FA" # lavender + description: "The type of routing policy which specifies the direction of route advertisement." order_weight: 1200 - name: weight kind: Number - description: "Priority of the routing policy. The higher the number, the higher the priority." - optional: true default_value: 1000 + optional: true + description: "Priority of the routing policy. The higher the number, the higher the priority." order_weight: 1400 - name: address_family - description: "The address family for the routing policy indicating the type of IP address." kind: Dropdown + default_value: "all" choices: - name: "ipv4" label: IPv4 @@ -70,5 +70,5 @@ generics: label: All description: "Policy applies to both IPv4 and IPv6 addresses." color: "#E6E6FA" # lavender - default_value: "all" + description: "The address family for the routing policy indicating the type of IP address." order_weight: 1150 diff --git a/extensions/routing_policies_aggregate/routing_policies_aggregate.yml b/extensions/routing_policies_aggregate/routing_policies_aggregate.yml index 0869569..57dce38 100644 --- a/extensions/routing_policies_aggregate/routing_policies_aggregate.yml +++ b/extensions/routing_policies_aggregate/routing_policies_aggregate.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: diff --git a/extensions/routing_policies_bgp/routing_policies_bgp.yml b/extensions/routing_policies_bgp/routing_policies_bgp.yml index bc18050..5804078 100644 --- a/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: @@ -30,20 +30,20 @@ extensions: state: absent relationships: - name: import_routing_policies - label: Import Routing Policies peer: RoutingPolicyBGP - identifier: bgppeergroup__import_policies - description: "The routing-policies used by this instance for import." + label: Import Routing Policies kind: Generic cardinality: many + identifier: bgppeergroup__import_policies + description: "The routing-policies used by this instance for import." - name: export_routing_policies - label: Export Routing Policies peer: RoutingPolicyBGP - identifier: bgppeergroup__export_policies - description: "The routing-policies used by this instance for export." + label: Export Routing Policies kind: Generic cardinality: many + identifier: bgppeergroup__export_policies + description: "The routing-policies used by this instance for export." - kind: RoutingBGPSession attributes: - name: import_policies @@ -54,16 +54,16 @@ extensions: state: absent relationships: - name: import_routing_policies - label: Import Routing Policies peer: RoutingPolicyBGP - identifier: bgpsession__import_policies - description: "The routing-policies used by this instance for import." + label: Import Routing Policies kind: Generic cardinality: many + identifier: bgpsession__import_policies + description: "The routing-policies used by this instance for import." - name: export_routing_policies - label: Export Routing Policies peer: RoutingPolicyBGP - identifier: bgpsession__export_policies - description: "The routing-policies used by this instance for export." + label: Export Routing Policies kind: Generic cardinality: many + identifier: bgpsession__export_policies + description: "The routing-policies used by this instance for export." diff --git a/extensions/routing_policies_ospf/routing_policies_ospf.yml b/extensions/routing_policies_ospf/routing_policies_ospf.yml index a71e416..0415855 100644 --- a/extensions/routing_policies_ospf/routing_policies_ospf.yml +++ b/extensions/routing_policies_ospf/routing_policies_ospf.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: @@ -30,16 +30,16 @@ extensions: state: absent relationships: - name: import_routing_policies - label: Import Routing Policies peer: RoutingPolicyOSPF - identifier: ospf__import_policies - description: "The routing-policies used by this instance for import." + label: Import Routing Policies kind: Generic cardinality: many + identifier: ospf__import_policies + description: "The routing-policies used by this instance for import." - name: export_routing_policies - label: Export Routing Policies peer: RoutingPolicyOSPF - identifier: ospf__export_policies - description: "The routing-policies used by this instance for export." + label: Export Routing Policies kind: Generic cardinality: many + identifier: ospf__export_policies + description: "The routing-policies used by this instance for export." diff --git a/extensions/routing_policies_pim/routing_policies_pim.yml b/extensions/routing_policies_pim/routing_policies_pim.yml index 7b05d68..fab427a 100644 --- a/extensions/routing_policies_pim/routing_policies_pim.yml +++ b/extensions/routing_policies_pim/routing_policies_pim.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: @@ -30,16 +30,16 @@ extensions: state: absent relationships: - name: import_routing_policies - label: Import Routing Policies peer: RoutingPolicyPIM - identifier: pim__import_policies - description: "The routing-policies used by this instance for import." + label: Import Routing Policies kind: Generic cardinality: many + identifier: pim__import_policies + description: "The routing-policies used by this instance for import." - name: export_routing_policies - label: Export Routing Policies peer: RoutingPolicyPIM - identifier: pim__export_policies - description: "The routing-policies used by this instance for export." + label: Export Routing Policies kind: Generic cardinality: many + identifier: pim__export_policies + description: "The routing-policies used by this instance for export." diff --git a/extensions/sfp/sfp.yml b/extensions/sfp/sfp.yml index 38e0850..c1c27a0 100644 --- a/extensions/sfp/sfp.yml +++ b/extensions/sfp/sfp.yml @@ -22,9 +22,6 @@ generics: order_weight: 1400 - name: sfp_type kind: Dropdown - description: "Type of SFP, such as LR, SR, T." - order_weight: 1100 - optional: false choices: - name: lr label: LR (Long Reach) @@ -66,10 +63,11 @@ generics: label: AOC (Active Optical Cable) description: Active Optical Cable, used for short connections over fiber. color: "#6699ff" + optional: false + description: "Type of SFP, such as LR, SR, T." + order_weight: 1100 - name: status kind: Dropdown - optional: false - order_weight: 1300 default_value: plugged choices: - name: plugged @@ -84,11 +82,10 @@ generics: label: Decommissioned description: Decommissioned might be broken or not used anymore. color: "#ffd27f" + optional: false + order_weight: 1300 - name: form_factor kind: Dropdown - description: "The physical form factor of the SFP module." - order_weight: 1000 - optional: false choices: - name: sfp label: SFP @@ -129,55 +126,58 @@ generics: - name: osfp label: OSFP color: "#0099cc" + optional: false + description: "The physical form factor of the SFP module." + order_weight: 1000 relationships: - name: interface peer: InterfacePhysical kind: Attribute - optional: true cardinality: one - order_weight: 1200 + optional: true identifier: sfp__interface + order_weight: 1200 - name: spare_location peer: LocationHosting kind: Attribute - optional: true cardinality: one + optional: true order_weight: 1500 - name: manufacturer peer: OrganizationManufacturer - cardinality: one kind: Attribute + cardinality: one optional: true order_weight: 1350 nodes: - name: StandardSFP namespace: Dcim - inherit_from: - - DcimGenericSFP description: Standard SFP module for various types (e.g., LR, SR, T). label: Standard SFP icon: mdi:gpu menu_placement: DcimGenericSFP - - name: BidiSFP - namespace: Dcim inherit_from: - DcimGenericSFP + - name: BidiSFP + namespace: Dcim description: "Bidirectional SFP supporting two wavelengths for single-fiber operation." label: Bidirectional SFP icon: lineicons:arrow-both-direction-vertical-1 menu_placement: DcimGenericSFP + inherit_from: + - DcimGenericSFP attributes: - name: wavelength_tx - label: "Transmit Wavelength (nm)" kind: Number + label: "Transmit Wavelength (nm)" optional: false description: "Transmit wavelength in nm." order_weight: 1175 - name: wavelength_rx - label: "Receive Wavelength (nm)" kind: Number + label: "Receive Wavelength (nm)" optional: false description: "Receive wavelength in nm." order_weight: 1150 @@ -200,7 +200,7 @@ extensions: - kind: OrganizationManufacturer relationships: - name: sfps - label: SFPs peer: DcimGenericSFP + label: SFPs cardinality: many optional: true diff --git a/extensions/snmp/snmp.yml b/extensions/snmp/snmp.yml index b349344..2b81405 100644 --- a/extensions/snmp/snmp.yml +++ b/extensions/snmp/snmp.yml @@ -15,28 +15,28 @@ generics: icon: iconoir:community human_friendly_id: - name__value - display_label: name__value order_by: - name__value + display_label: name__value attributes: - name: name kind: Text order_weight: 1000 - name: description kind: Text - order_weight: 1100 optional: true + order_weight: 1100 relationships: - name: clients peer: SnmpClient - cardinality: many kind: Component + cardinality: many - name: devices - label: Devices - description: Devices this community is configured on. peer: DcimDevice - cardinality: many + label: Devices kind: Attribute + cardinality: many + description: Devices this community is configured on. order_weight: 1200 nodes: @@ -47,13 +47,13 @@ nodes: label: SNMP v1/v2c icon: iconoir:community menu_placement: SnmpCommunity + inherit_from: + - SnmpCommunity human_friendly_id: - name__value - display_label: name__value order_by: - name__value - inherit_from: - - SnmpCommunity + display_label: name__value attributes: - name: community_string kind: Password @@ -75,20 +75,20 @@ nodes: label: SNMP v3 icon: iconoir:community menu_placement: SnmpCommunity + inherit_from: + - SnmpCommunity human_friendly_id: - name__value - display_label: name__value order_by: - name__value - inherit_from: - - SnmpCommunity + display_label: name__value attributes: - name: username kind: Text order_weight: 1300 - name: auth_protocol - label: Authentication Protocol kind: Dropdown + label: Authentication Protocol choices: - name: none label: None @@ -101,13 +101,13 @@ nodes: description: SHA authentication. order_weight: 1400 - name: auth_password - label: Authentication Password kind: Password - order_weight: 1500 + label: Authentication Password optional: true + order_weight: 1500 - name: privacy_protocol - label: Privacy Protocol kind: Dropdown + label: Privacy Protocol choices: - name: none label: None @@ -120,13 +120,13 @@ nodes: description: AES encryption. order_weight: 1600 - name: privacy_password - label: Privacy Password kind: Password - order_weight: 1700 + label: Privacy Password optional: true + order_weight: 1700 - name: security_level - label: Security Level kind: Dropdown + label: Security Level choices: - name: noAuthNoPriv label: NoAuthNoPriv @@ -147,25 +147,25 @@ nodes: menu_placement: SnmpCommunity human_friendly_id: - name__value - display_label: name__value order_by: - name__value + display_label: name__value attributes: - name: name kind: Text order_weight: 1000 - name: client_description - label: Description kind: Text - order_weight: 1100 + label: Description optional: true + order_weight: 1100 relationships: - name: ip_address - label: IP Address - description: Authorized SNMP client address. peer: IpamIPAddress - cardinality: many + label: IP Address kind: Attribute + cardinality: many + description: Authorized SNMP client address. order_weight: 1150 - name: community peer: SnmpCommunity diff --git a/extensions/tenancy/tenancy.yml b/extensions/tenancy/tenancy.yml index 53a7950..55cf1af 100644 --- a/extensions/tenancy/tenancy.yml +++ b/extensions/tenancy/tenancy.yml @@ -17,70 +17,67 @@ nodes: - OrganizationGeneric relationships: - name: devices - label: Devices peer: DcimGenericDevice - identifier: tenant__device + label: Devices + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__device - name: prefixes - label: Prefixes peer: IpamPrefix - identifier: tenant__prefix + label: Prefixes + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__prefix - name: addresses - label: Addresses peer: IpamIPAddress - identifier: tenant__ipaddress + label: Addresses + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__ipaddress - name: locations - label: Locations peer: LocationHosting - identifier: tenant__location - cardinality: many - optional: true + label: Locations kind: Generic + cardinality: many + optional: true + identifier: tenant__location extensions: nodes: - kind: DcimGenericDevice relationships: - name: tenant peer: TenancyTenant - identifier: tenant__device - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: tenant__device order_weight: 1800 - kind: IpamPrefix relationships: - name: tenant peer: TenancyTenant - identifier: tenant__prefix - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: tenant__prefix order_weight: 1400 - kind: IpamIPAddress relationships: - name: tenant peer: TenancyTenant - identifier: tenant__ipaddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: tenant__ipaddress order_weight: 1300 - kind: LocationHosting relationships: - name: tenant peer: TenancyTenant - identifier: tenant__location - optional: true - cardinality: one kind: Attribute # --------------------------------------------------------------------------- @@ -118,3 +115,6 @@ extensions: # kind: Generic # # The same pattern applies to any other optional extension node you want tenancy on. + cardinality: one + optional: true + identifier: tenant__location diff --git a/extensions/users/users.yml b/extensions/users/users.yml index d78778a..bcb7980 100644 --- a/extensions/users/users.yml +++ b/extensions/users/users.yml @@ -1,10 +1,10 @@ +--- # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json # --------------------------------------------------------------------------- # This schema is a starting point for building with Infrahub, not a finished production model. # Adapting it for your environment typically requires architectural review — see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- ---- version: "1.0" nodes: @@ -13,27 +13,26 @@ nodes: description: "User Group" label: "User Groups" icon: "iconoir:group" - display_label: name__value - order_by: - - name__value human_friendly_id: - "name__value" + order_by: + - name__value + display_label: name__value attributes: - name: name kind: Text - order_weight: 1000 unique: true + order_weight: 1000 - name: description kind: Text optional: true order_weight: 1100 - name: idle_timeout - label: Idle Timeout (s) kind: Number + label: Idle Timeout (s) order_weight: 1300 - name: permissions kind: Dropdown - optional: false choices: - name: admin description: "All rights on device." @@ -44,6 +43,7 @@ nodes: - name: read-only description: "Read only right on configuration." color: "#E6E6FA" # lavender + optional: false order_weight: 1200 - name: Account @@ -51,18 +51,18 @@ nodes: description: "User login and authentication" label: "User Account" icon: "mdi:account-key" - display_label: name__value - order_by: - - name__value human_friendly_id: - "name__value" + order_by: + - name__value + display_label: name__value attributes: - name: name - label: Username kind: Text + label: Username + unique: true description: "The login username" order_weight: 1000 - unique: true - name: full_name kind: Text optional: true @@ -86,23 +86,23 @@ nodes: relationships: - name: user_group peer: UserGroup + kind: Attribute cardinality: one optional: false - kind: Attribute order_weight: 1200 - name: organization peer: OrganizationGeneric - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false extensions: nodes: # Organization Extensions - kind: OrganizationGeneric relationships: - name: accounts - kind: Component peer: UserAccount - description: "List of Accounts under this organization" + kind: Component cardinality: many + description: "List of Accounts under this organization" diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index eaea742..d7304f9 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -14,25 +14,25 @@ generics: include_in_menu: false relationships: - name: vlan_groups - label: VLAN Groups peer: IpamVLANGroup - identifier: vlan_group__scope - cardinality: many - optional: true + label: VLAN Groups kind: Attribute + cardinality: many + optional: true + identifier: vlan_group__scope - name: VLAN namespace: Generic description: A VLAN is isolated layer two domain label: VLAN icon: mdi:lan-pending - uniqueness_constraints: - - [vlan_id__value, vlan_group] human_friendly_id: - name__value order_by: - name__value display_label: name__value + uniqueness_constraints: + - [vlan_id__value, vlan_group] attributes: - name: name kind: Text @@ -45,9 +45,7 @@ generics: order_weight: 900 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 920 choices: - name: active label: Active @@ -69,9 +67,10 @@ generics: label: Deprecated description: No longer in use and scheduled for removal. color: "#e04040" + optional: false + order_weight: 920 - name: role kind: Dropdown - optional: true choices: - name: server label: Server @@ -85,22 +84,23 @@ generics: label: User description: Segments designed for end-user access and activities. color: "#a0b78d" + optional: true relationships: - name: prefixes peer: IpamPrefix - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true identifier: vlan__prefix - name: vlan_group - label: VLAN Group peer: IpamVLANGroup - optional: false - cardinality: one + label: VLAN Group kind: Attribute - order_weight: 930 + cardinality: one + optional: false identifier: vlan_group__vlan + order_weight: 930 nodes: - name: VLAN namespace: Ipam @@ -128,16 +128,16 @@ nodes: relationships: - name: scope peer: IpamVLANGroupScope - identifier: vlan_group__scope - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: vlan_group__scope order_weight: 900 - name: vlans peer: GenericVLAN - optional: true - cardinality: many kind: Component + cardinality: many + optional: true identifier: vlan_group__vlan extensions: @@ -146,24 +146,24 @@ extensions: relationships: - name: vlan peer: GenericVLAN - optional: true - cardinality: one kind: Attribute - order_weight: 1400 + cardinality: one + optional: true identifier: vlan__prefix + order_weight: 1400 - kind: InterfaceLayer2 relationships: - name: untagged_vlan - label: Untagged VLAN peer: GenericVLAN - optional: true - cardinality: one + label: Untagged VLAN kind: Generic + cardinality: one + optional: true identifier: interface_l2__untagged_vlan - name: tagged_vlan - label: Tagged VLANs peer: GenericVLAN - optional: true - cardinality: many + label: Tagged VLANs kind: Generic + cardinality: many + optional: true identifier: interface_l2__tagged_vlan diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index 7b36e9a..54492b2 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -21,15 +21,15 @@ nodes: attributes: - name: name kind: Text - optional: false unique: true + optional: false - name: vrf_rd - label: Route Distinguisher kind: Text + label: Route Distinguisher optional: true - name: enforce_unique - label: Enforce Unique kind: Boolean + label: Enforce Unique default_value: true optional: true order_weight: 1100 @@ -47,20 +47,20 @@ nodes: # cardinality: one # kind: Attribute - name: import_rt - identifier: vrf__import - label: Import Targets peer: IpamRouteTarget - optional: true - cardinality: many + label: Import Targets kind: Attribute + cardinality: many + optional: true + identifier: vrf__import - name: export_rt - identifier: vrf__export - label: Export Targets peer: IpamRouteTarget - optional: true - cardinality: many + label: Export Targets kind: Attribute + cardinality: many + optional: true + identifier: vrf__export - name: RouteTarget namespace: Ipam description: Route Target (RFC 4360) @@ -82,37 +82,37 @@ nodes: optional: true relationships: - name: import_vrf - label: Imported by VRFs - identifier: vrf__import peer: IpamVRF - optional: true + label: Imported by VRFs cardinality: many + optional: true + identifier: vrf__import - name: export_vrf - label: Exported by VRFs - identifier: vrf__export peer: IpamVRF - optional: true + label: Exported by VRFs cardinality: many + optional: true + identifier: vrf__export extensions: nodes: - kind: IpamPrefix relationships: - name: vrf - label: VRF peer: IpamVRF - identifier: prefix__vrf - optional: true - cardinality: one + label: VRF kind: Attribute + cardinality: one + optional: true + identifier: prefix__vrf order_weight: 1150 - kind: IpamIPAddress relationships: - name: vrf - label: VRF peer: IpamVRF - identifier: ip_address__vrf - optional: true - cardinality: one + label: VRF kind: Attribute + cardinality: one + optional: true + identifier: ip_address__vrf order_weight: 1150 diff --git a/extensions/vrrp/vrrp.yml b/extensions/vrrp/vrrp.yml index dc673d8..54f9d17 100644 --- a/extensions/vrrp/vrrp.yml +++ b/extensions/vrrp/vrrp.yml @@ -10,14 +10,14 @@ version: "1.0" nodes: - name: VRRPGroup namespace: Network + description: VRRP Group configuration label: VRRP Group icon: fluent:virtual-network-20-filled - description: VRRP Group configuration - display_label: name__value - order_by: - - name__value human_friendly_id: - name__value + order_by: + - name__value + display_label: name__value attributes: # Could become a 'computed field' based on group + ip - name: name @@ -28,42 +28,42 @@ nodes: order_weight: 1000 - name: vrid kind: Number + label: VRID parameters: min_value: 1 max_value: 255 description: Virtual Router ID (VRID, should be between 1 and 255) - label: VRID order_weight: 1100 - name: password kind: HashedPassword - description: VRRP Password/Key label: Password optional: true + description: VRRP Password/Key order_weight: 1400 relationships: - name: ip_addresses - on_delete: cascade - description: VRRP IP (v4 or v6) - label: IP Addresses peer: IpamIPAddress - optional: true - cardinality: many + label: IP Addresses kind: Attribute + cardinality: many + optional: true + on_delete: cascade + description: VRRP IP (v4 or v6) order_weight: 1200 - name: vrrp_interfaces - on_delete: cascade - kind: Component peer: NetworkVRRPInterface - cardinality: many label: VRRP Interfaces + kind: Component + cardinality: many + on_delete: cascade order_weight: 1300 - name: VRRPInterface namespace: Network + description: VRRP Interface configuration label: VRRP Interface icon: carbon:interface-usage menu_placement: NetworkVRRPGroup - description: VRRP Interface configuration order_by: - priority__value uniqueness_constraints: @@ -72,28 +72,28 @@ nodes: - name: priority kind: Number label: VRRP Priority + default_value: 100 parameters: min_value: 1 max_value: 255 description: VRRP Priority (Should be between 1 and 255) - default_value: 100 order_weight: 1100 relationships: - name: vrrp_group - description: VRRP Group - label: VRRP Group peer: NetworkVRRPGroup - optional: false - cardinality: one + label: VRRP Group kind: Attribute + cardinality: one + optional: false + description: VRRP Group order_weight: 1200 - name: interface - description: Interface L3 - label: Interface peer: InterfaceLayer3 - optional: false - cardinality: one + label: Interface kind: Attribute + cardinality: one + optional: false + description: Interface L3 order_weight: 1300 extensions: @@ -101,18 +101,18 @@ extensions: - kind: InterfaceLayer3 relationships: - name: vrrp - kind: Component peer: NetworkVRRPInterface - description: VRRP Interface Configuration - cardinality: one label: VRRP + kind: Component + cardinality: one + description: VRRP Interface Configuration order_weight: 1500 - kind: IpamIPAddress relationships: - name: vrrp - kind: Component peer: NetworkVRRPGroup - description: Part of VRRP Group - cardinality: one label: VRRP Group + kind: Component + cardinality: one + description: Part of VRRP Group order_weight: 1600 From d2b05dc583afa02826b1fcdacc914c0a8852b1b9 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 5 Aug 2026 10:10:38 +0200 Subject: [PATCH 29/30] chore: format all base schema --- base/dcim.yml | 156 +++++++++++++++++++++--------------------- base/ipam.yml | 66 +++++++++--------- base/location.yml | 6 +- base/organization.yml | 20 +++--- 4 files changed, 124 insertions(+), 124 deletions(-) diff --git a/base/dcim.yml b/base/dcim.yml index 74b1ebf..b4f1eab 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -31,32 +31,32 @@ generics: relationships: - name: interfaces peer: DcimInterface - optional: true + kind: Component cardinality: many + optional: true identifier: device__interface - kind: Component - name: tags peer: BuiltinTag - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true order_weight: 2000 - name: primary_address peer: IpamIPAddress label: Primary IP Address - identifier: device__primary_address - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: device__primary_address order_weight: 1700 - name: platform peer: DcimPlatform - optional: true - cardinality: one kind: Attribute - order_weight: 1250 + cardinality: one + optional: true identifier: device__platform + order_weight: 1250 - name: PhysicalDevice namespace: Dcim description: Generic holding attributes and relationships relevant for physical device. @@ -67,22 +67,19 @@ generics: unique: true allow_override: any - name: position - label: Position (U) - description: Lowest unit. kind: Number + label: Position (U) optional: true + description: Lowest unit. order_weight: 1500 - name: serial kind: Text optional: true order_weight: 1500 - name: rack_face - label: Rack Face - description: On which face of the rack the device is mounted. kind: Dropdown - optional: false + label: Rack Face default_value: front - order_weight: 1515 choices: - name: front label: Front @@ -90,22 +87,25 @@ generics: - name: rear label: Rear description: Device mounted on the rear face of the rack. + optional: false + description: On which face of the rack the device is mounted. + order_weight: 1515 relationships: - name: device_type peer: DcimDeviceType - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true order_weight: 1200 - name: location - label: Location peer: LocationHosting - optional: false - cardinality: one + label: Location kind: Attribute - order_weight: 1500 + cardinality: one + optional: false identifier: physical_device__location + order_weight: 1500 - name: Endpoint namespace: Dcim description: Generic Endpoint to receive a connector. @@ -113,12 +113,12 @@ generics: relationships: - name: connector peer: DcimConnector - optional: true - cardinality: one - order_weight: 1500 kind: Attribute + cardinality: one + optional: true identifier: connector__endpoint + order_weight: 1500 - name: Connector namespace: Dcim description: Generic Connector to link two endpoints together. @@ -126,12 +126,12 @@ generics: relationships: - name: connected_endpoints peer: DcimEndpoint - optional: true - cardinality: many - order_weight: 1500 kind: Attribute + cardinality: many + optional: true identifier: connector__endpoint + order_weight: 1500 - name: Interface namespace: Dcim description: Generic Network Interface @@ -139,15 +139,15 @@ generics: icon: mdi:ethernet include_in_menu: true menu_placement: DcimDevice - display_label: name__value + human_friendly_id: + - device__name__value + - name__value order_by: - device__name__value - name__value + display_label: name__value uniqueness_constraints: - [device, name__value] - human_friendly_id: - - device__name__value - - name__value attributes: - name: name kind: Text @@ -160,8 +160,6 @@ generics: order_weight: 1100 - name: status kind: Dropdown - description: "The status of the interface" - optional: false default_value: "active" choices: - name: provisioning @@ -184,11 +182,11 @@ generics: label: Disabled description: "Interface has been disabled." color: "#6c757d" + optional: false + description: "The status of the interface" order_weight: 1200 - name: role kind: Dropdown - optional: true - description: "The role of the interface in the network" choices: - name: core label: Core Interface @@ -214,31 +212,32 @@ generics: label: Upstream Interface description: "Interface dedicated to upstream traffic between networks." color: "#B2D4E6" + optional: true + description: "The role of the interface in the network" order_weight: 1250 relationships: - name: device peer: DcimGenericDevice - identifier: device__interface - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: device__interface order_weight: 1025 - name: Layer2 namespace: Interface - include_in_menu: false description: "Layer 2 specific attributes for network interfaces" label: "Layer 2 Interface" + include_in_menu: false attributes: - name: mac_address - label: MAC Address kind: MacAddress + label: MAC Address optional: true order_weight: 1400 - name: l2_mode - label: Layer2 Mode kind: Dropdown - optional: true + label: Layer2 Mode choices: - name: access label: Access @@ -249,22 +248,23 @@ generics: - name: trunk_all label: Trunk (All) description: "Trunk all mode" + optional: true description: "Layer 2 mode of the interface" order_weight: 1500 - name: Layer3 namespace: Interface - include_in_menu: false description: "Layer 3 specific attributes for network interfaces" label: "Layer 3 Interface" + include_in_menu: false relationships: - name: ip_addresses - label: IP Addresses peer: IpamIPAddress - identifier: ip_address__interface - cardinality: many + label: IP Addresses kind: Attribute + cardinality: many optional: true + identifier: ip_address__interface description: "List of IP addresses associated with the interface" order_weight: 1150 @@ -274,12 +274,12 @@ generics: include_in_menu: false relationships: - name: sub_interfaces - label: "Sub-interface(s)" peer: InterfaceVirtual - identifier: "sub__interface" - optional: true - cardinality: many + label: "Sub-interface(s)" kind: Attribute + cardinality: many + optional: true + identifier: "sub__interface" description: "Sub-interfaces of this interface" order_weight: 1750 @@ -292,10 +292,10 @@ nodes: menu_placement: DcimDevice human_friendly_id: - name__value - display_label: name__value order_by: - manufacturer__name__value - name__value + display_label: name__value attributes: - name: name kind: Text @@ -306,35 +306,35 @@ nodes: optional: true order_weight: 1100 - name: part_number + kind: Text label: Part Number optional: true - kind: Text order_weight: 1200 - name: height + kind: Number label: Height (U) - optional: false default_value: 1 - kind: Number + optional: false order_weight: 1400 - name: full_depth + kind: Boolean label: Full Depth default_value: true - kind: Boolean order_weight: 1500 - name: weight + kind: Number label: Weight (kg) optional: true - kind: Number order_weight: 1600 relationships: - name: manufacturer peer: OrganizationManufacturer - cardinality: one kind: Attribute - order_weight: 1250 + cardinality: one optional: false identifier: manufacturer__device_type + order_weight: 1250 - name: Platform namespace: Dcim description: A Platform represent the type of software running on a device. @@ -343,10 +343,10 @@ nodes: menu_placement: DcimDevice human_friendly_id: - name__value - display_label: name__value order_by: - manufacturer__name__value - name__value + display_label: name__value attributes: - name: name kind: Text @@ -359,34 +359,32 @@ nodes: relationships: - name: devices peer: DcimGenericDevice - optional: true - cardinality: many kind: Generic - order_weight: 1350 + cardinality: many + optional: true identifier: device__platform + order_weight: 1350 - name: manufacturer peer: OrganizationManufacturer - cardinality: one kind: Attribute - order_weight: 1300 + cardinality: one identifier: manufacturer__platform + order_weight: 1300 - name: Device - label: Network Device + namespace: Dcim description: A configurable network device including routers, switches... + label: Network Device icon: clarity:network-switch-solid - generate_template: true - namespace: Dcim inherit_from: - CoreArtifactTarget - DcimGenericDevice - DcimPhysicalDevice + generate_template: true attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -408,10 +406,10 @@ nodes: label: Deprecated description: No longer in use and scheduled for removal. color: "#e04040" + optional: false + order_weight: 1100 - name: role kind: Dropdown - optional: true - order_weight: 1400 choices: - name: core label: Core Router @@ -438,38 +436,40 @@ nodes: description: Tor switch part of a Fabric. color: "#e8e7fd" + optional: true + order_weight: 1400 - name: Physical namespace: Interface - label: Physical Interface description: "Physical network port on a device" + label: Physical Interface + include_in_menu: false inherit_from: - DcimInterface - InterfaceLayer2 - InterfaceLayer3 - DcimEndpoint - InterfaceHasSubInterface - include_in_menu: false attributes: - name: mtu - label: MTU kind: Number + label: MTU default_value: 1500 order_weight: 1300 - name: Virtual namespace: Interface - label: Virtual Interface description: "Virtual interface like VLAN or Loopback" + label: Virtual Interface + include_in_menu: false inherit_from: - DcimInterface - InterfaceLayer2 - InterfaceLayer3 # - InterfaceHasSubInterface # Depending if you want your virtual interfaces to have sub interface - include_in_menu: false relationships: - name: parent_interface peer: InterfaceHasSubInterface - cardinality: one kind: Attribute + cardinality: one identifier: "sub__interface" description: "Parent interface to which this sub-interface belongs" diff --git a/base/ipam.yml b/base/ipam.yml index 259dbf4..be4a5bd 100644 --- a/base/ipam.yml +++ b/base/ipam.yml @@ -22,34 +22,32 @@ generics: relationships: - name: prefixes peer: IpamPrefix - identifier: prefix__prefix_scope - cardinality: many - optional: true kind: Generic + cardinality: many + optional: true + identifier: prefix__prefix_scope nodes: - name: Prefix namespace: Ipam description: IPv4 or IPv6 network (with mask) - include_in_menu: false - icon: mdi:ip-network label: Prefix - order_by: - - prefix__value - display_label: prefix__value + icon: mdi:ip-network + include_in_menu: false inherit_from: - BuiltinIPPrefix - uniqueness_constraints: - - [prefix__value, ip_namespace] human_friendly_id: - ip_namespace__name__value - prefix__value + order_by: + - prefix__value + display_label: prefix__value + uniqueness_constraints: + - [prefix__value, ip_namespace] attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -60,14 +58,14 @@ nodes: - name: reserved label: Reserved color: "#4d90fe" + optional: false + order_weight: 1100 - name: description kind: Text optional: true order_weight: 1150 - name: role kind: Dropdown - optional: true - order_weight: 1200 choices: - name: management label: Management @@ -89,31 +87,33 @@ nodes: label: Backbone description: Core network infrastructure prefixes. color: "#AEC6CF" + optional: true + order_weight: 1200 relationships: - name: scope peer: IpamPrefixScope + kind: Attribute + cardinality: one optional: true identifier: prefix__prefix_scope - cardinality: one - kind: Attribute order_weight: 1300 - name: IPAddress namespace: Ipam description: IP Address - include_in_menu: false label: IP Address icon: mdi:ip - order_by: - - address__value - display_label: address__value + include_in_menu: false inherit_from: - BuiltinIPAddress - uniqueness_constraints: - - [address__value, ip_namespace] human_friendly_id: - ip_namespace__name__value - address__value + order_by: + - address__value + display_label: address__value + uniqueness_constraints: + - [address__value, ip_namespace] attributes: - name: description kind: Text @@ -121,9 +121,7 @@ nodes: order_weight: 1050 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -134,10 +132,10 @@ nodes: - name: deprecated label: Deprecated color: "#e04040" + optional: false + order_weight: 1100 - name: role kind: Dropdown - optional: true - order_weight: 1150 choices: - name: loopback label: Loopback @@ -148,24 +146,26 @@ nodes: - name: anycast label: Anycast color: "#FDFD96" + optional: true + order_weight: 1150 - name: fqdn - label: FQDN kind: Text + label: FQDN + regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Date: Wed, 5 Aug 2026 10:25:36 +0200 Subject: [PATCH 30/30] linting --- docs/docs/home.mdx | 2 +- extensions/dwdm/dwdm.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/home.mdx b/docs/docs/home.mdx index 3eeacf5..a7da38b 100644 --- a/docs/docs/home.mdx +++ b/docs/docs/home.mdx @@ -161,4 +161,4 @@ This error indicates that the schema you are trying to load has dependencies on To resolve this, ensure that you have loaded all required schemas before attempting to load the one in question. You can find the list of dependencies in the schema documentation. -::: \ No newline at end of file +::: diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index 2e4a82a..52793ec 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -115,7 +115,9 @@ generics: nodes: - name: OpticalMultiplexer namespace: Dcim - description: An OADM (Optical Add Drop Multiplexer) supporting various WDM (Wavelength Division Multiplexing) technologies. + description: | + An OADM (Optical Add Drop Multiplexer) supporting various WDM + (Wavelength Division Multiplexing) technologies. label: Optical Multiplexer icon: mdi:transit-connection-variant inherit_from: