From 20fea1accd324cb7fd0c113bcbb31c2db56b5e90 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Fri, 19 Jun 2026 13:00:22 +0200 Subject: [PATCH 01/37] 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 00000000..a0eb034b --- /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 00000000..b5d20504 --- /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 00000000..6613a8cd --- /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 00000000..18d64d0b --- /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 00000000..8ae6f8d5 --- /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 00000000..7093b981 --- /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 00000000..4b939a1e --- /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 00000000..350dcf93 --- /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 00000000..c0ea8678 --- /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/37] 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 8b6cae72..a95a74a5 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 a35d6a97..4b939a1e 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 0b3ef6ec..6d21405a 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/37] 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 a0eb034b..00000000 --- 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 b5d20504..00000000 --- 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 6613a8cd..00000000 --- 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 18d64d0b..00000000 --- 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 8ae6f8d5..00000000 --- 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 7093b981..00000000 --- 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 4b939a1e..00000000 --- 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 350dcf93..00000000 --- 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 c0ea8678..00000000 --- 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/37] 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 93882345..7685071c 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/37] 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 fd6801a4..ccf40d05 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/37] 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 a0eb034b..ddff7c04 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/37] 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 ccf40d05..7b907638 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/37] 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 90e37ff9..256107f8 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/37] 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 7685071c..79440940 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/37] 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 79440940..27f18cbc 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/37] 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 4b939a1e..402a6a9c 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 6613a8cd..41da057d 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 00000000..905111ed --- /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 bf792c2b..99cee02d 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 fe0495ac..57ddf894 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 821c7ce9..6ba4df26 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/37] 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 7b907638..fb1e1db2 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/37] fix: align relationship identifier --- base/dcim.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/base/dcim.yml b/base/dcim.yml index 402a6a9c..ca71345e 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/37] 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 ca71345e..049c1d82 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 6d21405a..259dbf4b 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 6481e0e7..7a529baa 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 01b07fd8..ab36d7e2 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 89cbb3e0..6b7fe33c 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 87a5be80..ba541817 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 19ab0e80..aa180b9a 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 7ead6658..4ce118d5 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 77013391..c2e49359 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 1d4d2b68..d8d39699 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 b507918e..47559449 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 23db03af..823f06b7 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 e1ed134b..e6178b79 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 756085b3..8fdf6198 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 f79ac4d2..b2c1d8d3 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 b6b423e2..9666425a 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 ddff7c04..40475017 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 b5d20504..2221c3cc 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 41da057d..8a066a80 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 18d64d0b..fc2d4f4e 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 8ae6f8d5..3b3853f1 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 7093b981..b43ef8ea 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 da256ef3..ec20e9b4 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 256107f8..dcca8a68 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 cc075063..730d1a7d 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 350dcf93..0402d94d 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 966bda7a..2370b849 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 f95c4cbf..bc25dc1a 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 59b5ff28..72c5ffd7 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 905111ed..5d51dee2 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 d2d62287..13f04ac8 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 f8ccd680..55e4f23f 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 0e29077e..755e450d 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 71560fe2..b155e447 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 909f9e42..32d3cead 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 99cee02d..5d08efc8 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 57ddf894..a618519f 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 176b6263..c2b40884 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 41fe4e64..e8d4d7e6 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 8ccd9b01..6f088d5e 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 a4ecb99d..858372de 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 6f866fe1..1b7f0040 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 dcb19eb6..75ee1b93 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 5aab18e4..ab7196c0 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 fa66ffc6..ba3502f9 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 8336f88b..08695694 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 a3fe79b3..8fe4baab 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 bccb969a..a71e416d 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 75c124be..7b05d680 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 11b475cf..38e08504 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 d81ccb73..97d5836c 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 da7c900e..ac89666a 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 3bcdc51e..d78778a1 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 6ba4df26..eaea742d 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 fb1e1db2..7b36e9ab 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 d690eb3f..6fb0368f 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/37] 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 a95a74a5..0f27a063 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 049c1d82..74b1ebfe 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 00000000..be7763cd --- /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 00000000..c407e2b8 --- /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 55e4f23f..00000000 --- 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/37] 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 755e450d..296a8ca4 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/37] 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/37] 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 1cdb12b5..00000000 --- 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/37] 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 0f27a063..bd96fc41 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 b155e447..f81d7226 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/37] 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 be7763cd..f9534057 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/37] 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 8fe4baab..bc180500 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/37] 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 97d5836c..b3493441 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/37] 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 6f088d5e..00acc6c0 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/37] 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 6fb0368f..dc673d87 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/37] 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 00000000..ee0330f1 --- /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 00000000..53a7950c --- /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/37] 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 bd96fc41..71a72600 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 aaa3e941..3eeacf5c 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 00000000..d776ea9b --- /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 b3cdc514..5d17f721 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 e5aa7911..3cb59c39 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 5b9becc6..c1dc7291 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 864af9e3..40a64d47 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 ee856bc7..e003eac6 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 9d6691bf..0b8ed0c3 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 00000000..43bc6799 --- /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 00000000..3ce6d53a --- /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 db6c99c4..81c9cff6 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 ad01f0ce..3155fd5e 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 a332b9cb..29c5022d 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 debf679e..f143d815 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 439a46ac..9a2306eb 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 00000000..90d6116b --- /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 1a955660..c185934d 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 3f2b4309..4884f0c9 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 7cea68b8..816bac97 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 0830ee61..d14bea59 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 f0d844c8..d8d96796 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 8e4fd600..4d490b56 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 18065bba..394bda37 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 533c8851..03db3d9a 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 da595122..120d9479 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 00000000..4f159e7e --- /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 b4bf961d..f23726f1 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 00000000..d45d7938 --- /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 00000000..437e14e5 --- /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 00000000..f67fd702 --- /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 00acc6c0..cd1a9a20 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 ba24f1c1..00000000 --- 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 ac89666a..00000000 --- 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/37] 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 f81d7226..b53fa065 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/37] 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 40475017..2b1513c0 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 2221c3cc..df06da9c 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 8a066a80..d3947dff 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 fc2d4f4e..449f7d11 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 3b3853f1..26530e53 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 b43ef8ea..52a3e2a0 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 ec20e9b4..539a1f69 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 f9534057..5d98ca44 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 c407e2b8..6c199315 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 dcca8a68..2e4a82a8 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 0402d94d..18d41e90 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 2370b849..f48aa8e1 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 bc25dc1a..cfc55e2f 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 72c5ffd7..16589fcb 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 5d51dee2..9f3c93f7 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 13f04ac8..397b922c 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 296a8ca4..c62236be 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 b53fa065..477d210e 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 32d3cead..0f7b7b38 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 5d08efc8..d56f3108 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 a618519f..43130b9f 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 c2b40884..bf4594e6 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 e8d4d7e6..629cb3c4 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 cd1a9a20..d128d13b 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 858372de..ed6f7044 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 1b7f0040..4ea8c482 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 75ee1b93..d140e7b3 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 ab7196c0..2b5cef26 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 ba3502f9..9f5310fc 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 08695694..57dce38e 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 bc180500..58040789 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 a71e416d..04158556 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 7b05d680..fab427ab 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 38e08504..c1c27a05 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 b3493441..2b81405f 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 53a7950c..55cf1afd 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 d78778a1..bcb79804 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 eaea742d..d7304f9f 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 7b36e9ab..54492b25 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 dc673d87..54f9d171 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/37] 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 74b1ebfe..b4f1eab5 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 259dbf4b..be4a5bd9 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/37] 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 3eeacf5c..a7da38bd 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 2e4a82a8..52793ec9 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: From 09ea44f6836b4dbab8e2cf7997ef29316e1e7917 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 10:55:17 +0200 Subject: [PATCH 31/37] adding some placeholder data --- objects/base/01_organization.yml | 27 +++ objects/base/02_dcim.yml | 49 +++++ objects/base/03_ipam.yml | 29 +++ objects/extensions/aggregate/aggregate.yml | 42 +++++ objects/extensions/circuit/circuit.yml | 117 ++++++++++++ objects/extensions/compute/compute.yml | 48 +++++ .../cross_connect/cross_connect.yml | 86 +++++++++ .../device_module/device_module.yml | 87 +++++++++ .../device_psu_module/device_psu_module.yml | 87 +++++++++ objects/extensions/dwdm/dwdm.yml | 170 ++++++++++++++++++ .../hosting_cluster/hosting_cluster.yml | 90 ++++++++++ .../interface_breakout/interface_breakout.yml | 77 ++++++++ objects/extensions/lag/lag.yml | 57 ++++++ .../location_minimal/location_minimal.yml | 29 +++ objects/extensions/mlag/mlag.yml | 146 +++++++++++++++ .../extensions/patch_panel/patch_panel.yml | 83 +++++++++ .../extensions/peering_ixp/peering_ixp.yml | 98 ++++++++++ objects/extensions/qinq/qinq.yml | 45 +++++ objects/extensions/rack/rack.yml | 46 +++++ objects/extensions/routing/routing.yml | 49 +++++ .../routing_aggregate/routing_aggregate.yml | 48 +++++ .../extensions/routing_bgp/routing_bgp.yml | 170 ++++++++++++++++++ .../routing_bgp_community.yml | 26 +++ .../routing_bgp_rr/routing_bgp_rr.yml | 81 +++++++++ .../extensions/routing_ospf/routing_ospf.yml | 91 ++++++++++ .../extensions/routing_pim/routing_pim.yml | 148 +++++++++++++++ .../routing_policies_aggregate.yml | 53 ++++++ .../routing_policies_bgp.yml | 83 +++++++++ .../routing_policies_ospf.yml | 68 +++++++ .../routing_policies_pim.yml | 78 ++++++++ objects/extensions/sfp/sfp.yml | 103 +++++++++++ objects/extensions/snmp/snmp.yml | 77 ++++++++ objects/extensions/tenancy/tenancy.yml | 29 +++ objects/extensions/users/users.yml | 70 ++++++++ objects/extensions/vlan/vlan.yml | 41 +++++ objects/extensions/vrf/vrf.yml | 48 +++++ objects/extensions/vrrp/vrrp.yml | 109 +++++++++++ 37 files changed, 2785 insertions(+) create mode 100644 objects/base/01_organization.yml create mode 100644 objects/base/02_dcim.yml create mode 100644 objects/base/03_ipam.yml create mode 100644 objects/extensions/aggregate/aggregate.yml create mode 100644 objects/extensions/circuit/circuit.yml create mode 100644 objects/extensions/compute/compute.yml create mode 100644 objects/extensions/cross_connect/cross_connect.yml create mode 100644 objects/extensions/device_module/device_module.yml create mode 100644 objects/extensions/device_psu_module/device_psu_module.yml create mode 100644 objects/extensions/dwdm/dwdm.yml create mode 100644 objects/extensions/hosting_cluster/hosting_cluster.yml create mode 100644 objects/extensions/interface_breakout/interface_breakout.yml create mode 100644 objects/extensions/lag/lag.yml create mode 100644 objects/extensions/location_minimal/location_minimal.yml create mode 100644 objects/extensions/mlag/mlag.yml create mode 100644 objects/extensions/patch_panel/patch_panel.yml create mode 100644 objects/extensions/peering_ixp/peering_ixp.yml create mode 100644 objects/extensions/qinq/qinq.yml create mode 100644 objects/extensions/rack/rack.yml create mode 100644 objects/extensions/routing/routing.yml create mode 100644 objects/extensions/routing_aggregate/routing_aggregate.yml create mode 100644 objects/extensions/routing_bgp/routing_bgp.yml create mode 100644 objects/extensions/routing_bgp_community/routing_bgp_community.yml create mode 100644 objects/extensions/routing_bgp_rr/routing_bgp_rr.yml create mode 100644 objects/extensions/routing_ospf/routing_ospf.yml create mode 100644 objects/extensions/routing_pim/routing_pim.yml create mode 100644 objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml create mode 100644 objects/extensions/routing_policies_bgp/routing_policies_bgp.yml create mode 100644 objects/extensions/routing_policies_ospf/routing_policies_ospf.yml create mode 100644 objects/extensions/routing_policies_pim/routing_policies_pim.yml create mode 100644 objects/extensions/sfp/sfp.yml create mode 100644 objects/extensions/snmp/snmp.yml create mode 100644 objects/extensions/tenancy/tenancy.yml create mode 100644 objects/extensions/users/users.yml create mode 100644 objects/extensions/vlan/vlan.yml create mode 100644 objects/extensions/vrf/vrf.yml create mode 100644 objects/extensions/vrrp/vrrp.yml diff --git a/objects/base/01_organization.yml b/objects/base/01_organization.yml new file mode 100644 index 00000000..f5aa5c6a --- /dev/null +++ b/objects/base/01_organization.yml @@ -0,0 +1,27 @@ +# --------------------------------------------------------------------------- +# Mock data for base/organization.yml. +# Depends on: (none) -- safe to load first. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: OrganizationManufacturer + data: + - name: Cisco + description: Cisco Systems, Inc. + - name: Juniper + description: Juniper Networks, Inc. + - name: Dell + description: Dell Technologies Inc. + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: OrganizationProvider + data: + - name: Lumen + description: Lumen Technologies -- transit and dark fiber provider. + - name: Colt + description: Colt Technology Services -- transit and cross connects. diff --git a/objects/base/02_dcim.yml b/objects/base/02_dcim.yml new file mode 100644 index 00000000..910a0cbe --- /dev/null +++ b/objects/base/02_dcim.yml @@ -0,0 +1,49 @@ +# --------------------------------------------------------------------------- +# Mock data for base/dcim.yml. +# Depends on: base/organization.yml (manufacturer references). +# +# NOTE: DcimDevice is intentionally NOT populated here. DcimPhysicalDevice.location +# is a required relationship to LocationHosting, and base/location.yml only defines +# the abstract LocationGeneric/LocationHosting mixins -- there is no concrete node +# to attach a device to until a location extension is loaded. See +# objects/extensions/rack and objects/extensions/compute for device instances built +# on top of extensions/location_minimal. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimPlatform + data: + - name: Cisco IOS-XR + manufacturer: Cisco + - name: Juniper Junos + manufacturer: Juniper + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDeviceType + data: + - name: ASR9001 + description: Cisco ASR 9001 aggregation router. + manufacturer: Cisco + part_number: ASR-9001 + height: 2 + full_depth: true + weight: 18 + - name: MX204 + description: Juniper MX204 universal routing platform. + manufacturer: Juniper + part_number: MX204-HWBASE3-AC + height: 1 + full_depth: false + weight: 9 + - name: PowerEdge R660 + description: Dell PowerEdge R660 rack server. + manufacturer: Dell + part_number: R660 + height: 1 + full_depth: true + weight: 16 diff --git a/objects/base/03_ipam.yml b/objects/base/03_ipam.yml new file mode 100644 index 00000000..be8b7fd0 --- /dev/null +++ b/objects/base/03_ipam.yml @@ -0,0 +1,29 @@ +# --------------------------------------------------------------------------- +# Mock data for base/ipam.yml. +# Depends on: (none) -- safe to load with the rest of base. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamPrefix + data: + - prefix: 10.0.0.0/16 + description: Global backbone supernet. + status: active + role: backbone + - prefix: 192.0.2.0/24 + description: Documentation / demo prefix (RFC 5737). + status: active + role: link + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamIPAddress + data: + - address: 192.0.2.1/32 + description: Demo loopback address. + status: active + role: loopback diff --git a/objects/extensions/aggregate/aggregate.yml b/objects/extensions/aggregate/aggregate.yml new file mode 100644 index 00000000..9e0de295 --- /dev/null +++ b/objects/extensions/aggregate/aggregate.yml @@ -0,0 +1,42 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/aggregate. +# Depends on: base only. +# IpamAggregate inherits BuiltinIPPrefix; its only mandatory attribute is +# `prefix` (an IPNetwork). `ip_namespace` is optional and defaults to the +# built-in "default" namespace when omitted. OrganizationRIR is a concrete +# node (inherits the OrganizationGeneric generic), so it's referenced as a +# plain scalar human_friendly_id (name__value) from the `rir` relationship, +# which is cardinality one with a concrete peer. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: OrganizationRIR + data: + - name: ARIN + description: American Registry for Internet Numbers. + - name: RIPE NCC + description: Réseau IP Européens Network Coordination Centre. + - name: Private (RFC 1918) + description: Internal registry for RFC 1918 / RFC 4193 private address space. + is_private: true + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamAggregate + data: + - prefix: "10.0.0.0/8" + rir: "Private (RFC 1918)" + description: Private address space aggregate (RFC 1918). + date_added: "2020-01-01T00:00:00Z" + - prefix: "192.0.0.0/8" + rir: ARIN + description: Legacy Class C space aggregate. + date_added: "2015-06-01T00:00:00Z" + - prefix: "2001:db8::/32" + rir: RIPE NCC + description: Documentation IPv6 aggregate block. + date_added: "2018-03-15T00:00:00Z" diff --git a/objects/extensions/circuit/circuit.yml b/objects/extensions/circuit/circuit.yml new file mode 100644 index 00000000..ce2c70d9 --- /dev/null +++ b/objects/extensions/circuit/circuit.yml @@ -0,0 +1,117 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/circuit. +# Depends on: base. +# +# NOTE: this file also creates the minimal LocationSite (from +# extensions/location_minimal) and OrganizationProvider (from base) fixtures +# it needs. If those extensions' own object files have already loaded the +# same records (e.g. NYC1, SJC1, Lumen, Colt), this upserts/matches them +# instead of duplicating -- see rule in AGENTS notes about repeating +# mandatory fields for an existing target. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: LocationRegion + data: + - name: Americas + description: North & South America. + children: + kind: LocationCountry + data: + - name: United States + children: + kind: LocationSite + data: + - name: NYC1 + status: active + facility: Equinix NY5 + physical_address: "755 Secaucus Rd, Secaucus, NJ 07094" + timezone: America/New_York + - name: SJC1 + status: active + facility: Equinix SV1 + physical_address: "2001 Ryan Ave, San Jose, CA 95131" + timezone: America/Los_Angeles + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: OrganizationProvider + data: + - name: Lumen + description: Lumen Technologies, circuit provider. + - name: Colt + description: Colt Technology Services, circuit provider. + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimCircuit + data: + - circuit_id: "LUMEN-00123" + description: "NYC1 to SJC1 backbone link" + commit_rate: 10000000 + circuit_type: point_to_point + status: active + provider: Lumen + # DcimCircuit.endpoints is a Component (cardinality many) -- data is a + # list. Each endpoint's `name` is a read_only computed attribute, so it + # is never set here. + endpoints: + kind: DcimCircuitEndpoint + data: + - side: a + status: active + description: "NYC1 hand-off" + # location is cardinality one, peer LocationHosting (a Generic), + # so it needs a nested kind+data block naming the concrete kind. + # LocationSite's only mandatory field is `name`; this upserts + # against the site created above. + location: + kind: LocationSite + data: + name: NYC1 + - side: z + status: active + description: "SJC1 hand-off" + location: + kind: LocationSite + data: + name: SJC1 + + - circuit_id: "COLT-00456" + description: "NYC1 internet access circuit" + commit_rate: 1000000 + circuit_type: internet_access + status: active + provider: Colt + endpoints: + kind: DcimCircuitEndpoint + data: + - side: a + status: active + description: "NYC1 hand-off" + location: + kind: LocationSite + data: + name: NYC1 + + - circuit_id: "LUMEN-00789" + description: "SJC1 dark fiber segment" + circuit_type: dark_fiber + status: provisioning + provider: Lumen + endpoints: + kind: DcimCircuitEndpoint + data: + - side: a + status: provisioning + description: "SJC1 hand-off" + location: + kind: LocationSite + data: + name: SJC1 diff --git a/objects/extensions/compute/compute.yml b/objects/extensions/compute/compute.yml new file mode 100644 index 00000000..2ac6bb99 --- /dev/null +++ b/objects/extensions/compute/compute.yml @@ -0,0 +1,48 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/compute. +# Depends on: base, extensions/location_minimal (LocationSite: SJC1). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: ComputePhysicalServer + data: + - name: sjc1-esx01 + description: ESXi hypervisor host. + status: active + device_type: PowerEdge R660 + rack_face: front + # LocationSite inherits LocationHosting (a Generic) -- specify the concrete + # kind so the reference is unambiguous. + # `location` is cardinality one, so `data` is a single mapping, not a list. + location: + kind: LocationSite + data: + name: SJC1 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: VirtualizationVirtualMachine + data: + - name: sjc1-vm-web01 + description: Web front-end VM. + role: application + vcpu: 4 + memory: 16 + disk: 100 + # VirtualizationHostVirtualMachine is a Generic -- specify the concrete kind. + # `host` is cardinality one, so `data` is a single mapping, not a list. + # A nested kind+data block is validated as a full object spec, so it must + # repeat all of the target's mandatory fields (name + location here), not + # just enough to identify it -- the upsert then matches the server above. + host: + kind: ComputePhysicalServer + data: + name: sjc1-esx01 + location: + kind: LocationSite + data: + name: SJC1 diff --git a/objects/extensions/cross_connect/cross_connect.yml b/objects/extensions/cross_connect/cross_connect.yml new file mode 100644 index 00000000..0e84eb36 --- /dev/null +++ b/objects/extensions/cross_connect/cross_connect.yml @@ -0,0 +1,86 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/cross_connect. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1, SJC1), +# extensions/rack (LocationRack: NYC1-RACK-01, DcimDevice: nyc1-rtr01 with +# interface GigabitEthernet0/0/0/0). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimCrossConnect + data: + - identifier: "XC-NYC1-0001" + description: "Long-haul fiber cross-connect to Lumen POP" + status: connected + # provider is cardinality one to a CONCRETE kind (OrganizationProvider), + # but its existence isn't guaranteed on a fresh instance, so we use a + # nested kind+data block (full create spec -- OrganizationProvider's + # only mandatory field is `name`) instead of a bare scalar reference. + # This upserts rather than duplicating if it already exists. + provider: + kind: OrganizationProvider + data: + name: Lumen + # location is cardinality one to LocationHosting, a Generic -- nested + # kind+data block. LocationSite's only mandatory field is `name`. + location: + kind: LocationSite + data: + name: NYC1 + # connected_endpoints is cardinality many to DcimEndpoint, a Generic -- + # nested kind+data with `data` as a list. InterfacePhysical's mandatory + # fields are `name` and `device`; `device` is itself cardinality one to + # a Generic (DcimGenericDevice), so it needs its own nested kind+data + # repeating DcimDevice's mandatory fields (name + location), and so on + # down to LocationSite. Every level is a full create spec, so this + # upserts/matches existing objects rather than duplicating them. + # Uses a dedicated interface (TenGigE0/0/0/1) rather than the + # GigabitEthernet0/0/0/0 fixture, since an Interface's `connector` is + # cardinality one and that one is already attached to a DcimCable. + connected_endpoints: + kind: InterfacePhysical + data: + - name: TenGigE0/0/0/1 + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: + kind: LocationSite + data: + name: NYC1 + + - identifier: "XC-NYC1-0002" + description: "Planned cross-connect for new customer circuit" + status: planned + provider: + kind: OrganizationProvider + data: + name: Colt + # Demonstrates attaching a cross-connect at the rack level instead of + # the site level. LocationRack's mandatory fields are name + site. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: + kind: LocationSite + data: + name: NYC1 + + - identifier: "XC-SJC1-0001" + description: "Reserved cross-connect pending activation" + status: reserved + provider: + kind: OrganizationProvider + data: + name: Lumen + location: + kind: LocationSite + data: + name: SJC1 diff --git a/objects/extensions/device_module/device_module.yml b/objects/extensions/device_module/device_module.yml new file mode 100644 index 00000000..7dee2553 --- /dev/null +++ b/objects/extensions/device_module/device_module.yml @@ -0,0 +1,87 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/device_module. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1), +# extensions/rack (LocationRack: NYC1-RACK-01, DcimDevice: nyc1-rtr01). +# Order: DcimModuleType -> DcimModuleBay -> DcimModule (module_bay/module_type +# are resolved by human_friendly_id, so the targets must already exist). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimModuleType + data: + - name: ASR9001-RP + description: "Route processor module for the ASR 9001." + part_number: "A9K-RP" + manufacturer: Cisco + + - name: ASR9001-FAN + description: "Fan tray module for the ASR 9001." + part_number: "A9K-FAN" + manufacturer: Cisco + + - name: MX204-RE + description: "Routing engine module for the MX204." + part_number: "RE-MX204" + manufacturer: Juniper + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimModuleBay + data: + # `device` is cardinality one and its peer DcimPhysicalDevice is a Generic, + # so it needs a nested kind+data block. The nested data mapping is + # validated as a full create spec for DcimDevice, whose only mandatory + # fields without a default are `name` and `location` -- and `location` + # is itself a Generic peer (LocationHosting), so it repeats the same + # nested pattern down to LocationRack (name + site). All values here + # match the existing nyc1-rtr01 fixture exactly, so this upserts/matches + # it instead of creating a duplicate. + - name: "slot 1" + position: 1 + description: "Primary route processor slot." + device: &nyc1_rtr01 + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + + - name: "slot 2" + position: 2 + description: "Secondary route processor slot." + device: *nyc1_rtr01 + + - name: "fan tray 1" + position: 3 + description: "Fan tray slot." + device: *nyc1_rtr01 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimModule + data: + # `module_bay` (cardinality one, peer DcimModuleBay is concrete) is + # referenced by its computed human_friendly_id: " > ". + # `module_type` (cardinality one, peer DcimModuleType is concrete) is + # referenced by its plain name. Both bays and types are created above, + # in this same file, before this document runs. + - module_bay: "nyc1-rtr01 > slot 1" + module_type: ASR9001-RP + serial_number: "FOC12345678" + + - module_bay: "nyc1-rtr01 > slot 2" + module_type: ASR9001-RP + serial_number: "FOC87654321" + + - module_bay: "nyc1-rtr01 > fan tray 1" + module_type: ASR9001-FAN + serial_number: "FAN00112233" diff --git a/objects/extensions/device_psu_module/device_psu_module.yml b/objects/extensions/device_psu_module/device_psu_module.yml new file mode 100644 index 00000000..ca5be2bc --- /dev/null +++ b/objects/extensions/device_psu_module/device_psu_module.yml @@ -0,0 +1,87 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/device_psu_module. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1), +# extensions/rack (LocationRack: NYC1-RACK-01, DcimDevice: nyc1-rtr01), +# extensions/device_module (DcimModuleBay/DcimModule kinds). +# +# Module<->ModuleBay is a strict 1:1 relationship, and nyc1-rtr01's existing +# bays ("slot 1", "slot 2", "fan tray 1") are already occupied by DcimModule +# instances from extensions/device_module -- so this file creates brand new +# bays ("PSU slot 1"/"PSU slot 2"/"PSU slot 3") to install the PSU modules +# into, instead of reusing the existing ones. +# +# Order: DcimPSUModuleType -> DcimModuleBay (new PSU bays) -> DcimPSUModule +# (module_bay/module_type are resolved by human_friendly_id, so the targets +# must already exist). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimPSUModuleType + data: + - name: ASR9001-PSU + description: "AC power supply module for the ASR 9001." + part_number: "A9K-PSU" + manufacturer: Cisco + wattage: 3000 + hotswappable: true + + - name: MX204-PSU + description: "AC power supply module for the MX204." + part_number: "PSU-MX204" + manufacturer: Juniper + wattage: 650 + hotswappable: true + + - name: PowerEdge-PSU + description: "Redundant power supply module for the PowerEdge R660." + part_number: "PWR-R660" + manufacturer: Dell + wattage: 800 + hotswappable: true + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimModuleBay + data: + # New bays, distinct from the existing "slot 1"/"slot 2"/"fan tray 1" + # (already occupied), used below to install the PSU modules. + - name: "PSU slot 1" + position: 4 + description: "Primary power supply slot." + device: &nyc1_rtr01 + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + + - name: "PSU slot 2" + position: 5 + description: "Secondary power supply slot." + device: *nyc1_rtr01 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimPSUModule + data: + # `module_bay` (cardinality one, peer DcimModuleBay is concrete) is + # referenced by its computed human_friendly_id: " > ". + # `module_type` (cardinality one, peer DcimPSUModuleType is concrete) is + # referenced by its plain name. Both bays and types are created above, + # in this same file, before this document runs. + - module_bay: "nyc1-rtr01 > PSU slot 1" + module_type: ASR9001-PSU + serial_number: "PSU00112233" + + - module_bay: "nyc1-rtr01 > PSU slot 2" + module_type: ASR9001-PSU + serial_number: "PSU44556677" diff --git a/objects/extensions/dwdm/dwdm.yml b/objects/extensions/dwdm/dwdm.yml new file mode 100644 index 00000000..c407e5da --- /dev/null +++ b/objects/extensions/dwdm/dwdm.yml @@ -0,0 +1,170 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/dwdm. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1), +# extensions/rack (LocationRack: NYC1-RACK-01, DcimDevice: nyc1-rtr01), +# extensions/sfp (DcimGenericSFP base + existing plugged/spare SFPs on +# GigabitEthernet0/0/0/0 and /1). +# +# DcimWdmChannel records are created first since both the OADM front +# interfaces and the WDM SFPs below reference them. DcimOpticalMultiplexer +# is created next, with its front/rear interfaces nested as Component +# children. A new interface (GigabitEthernet0/0/0/4) is added on nyc1-rtr01 +# for the plugged WDM SFP demo, since GigabitEthernet0/0/0/0 through /3 are +# already occupied by other fixtures. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimWdmChannel + data: + - channel: 1 + wdm_type: dwdm + wavelength: "1550.12" + frequency: "193.10" + + - channel: 2 + wdm_type: dwdm + wavelength: "1550.92" + frequency: "193.20" + + - channel: 20 + wdm_type: cwdm + wavelength: "1611.00" + frequency: "186.00" + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimOpticalMultiplexer + data: + - name: NYC1-MUX01 + wdm_type: dwdm + description: Primary DWDM multiplexer for the NYC1 backbone ring. + position: 20 + rack_face: front + # `location` (from DcimPhysicalDevice) peer is LocationHosting, a + # Generic -- specify the concrete kind. Cardinality one, so `data` is + # a single mapping. This upserts against the existing rack. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + # front_interfaces is a Component relationship (cardinality many) -- + # nest the concrete kind with `data` as a list. The `optical_multiplexer` + # Parent relationship on each child is implied by this nesting. + front_interfaces: + kind: DcimOadmFrontInterface + data: + - name: "CH1" + connector_type: LC + # `channels` peer (DcimWdmChannel) is a CONCRETE kind whose + # human_friendly_id has two components ([wdm_type__value, + # channel__value]) and the relationship is cardinality many, so + # it's a plain list of HFID lists (same pattern as + # `bundle_members` in objects/extensions/lag/lag.yml). + channels: + - [dwdm, "1"] + - name: "CH2" + connector_type: LC + channels: + - [dwdm, "2"] + # rear_interface is a Component relationship of cardinality one -- + # nest the concrete kind with `data` as a single mapping. + rear_interface: + kind: DcimOadmRearInterface + data: + name: "COM" + connector_type: LC + + - name: NYC1-MUX02 + wdm_type: cwdm + description: Secondary CWDM multiplexer, spare capacity at NYC1. + position: 22 + rack_face: front + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + front_interfaces: + kind: DcimOadmFrontInterface + data: + - name: "CH1" + connector_type: LC + channels: + - [cwdm, "20"] + rear_interface: + kind: DcimOadmRearInterface + data: + name: "COM" + connector_type: LC + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + # Upsert the existing fixture device to add a free physical interface + # for the plugged WDM SFP below (GigabitEthernet0/0/0/0 through /3 are + # already in use by other fixtures). + - name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + kind: InterfacePhysical + data: + - name: GigabitEthernet0/0/0/4 + role: core + status: active + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimWdmSFP + data: + - sfp_type: zr + form_factor: sfp_plus + status: plugged + wdm_type: dwdm + serial: "SFP-WDM-0001" + manufacturer: Cisco + # `interface` peer (InterfacePhysical) is a CONCRETE kind with a + # composite human_friendly_id ([device__name__value, name__value]). + interface: [nyc1-rtr01, GigabitEthernet0/0/0/4] + # `wdm_channel` peer (DcimWdmChannel) is a CONCRETE kind with a + # composite human_friendly_id ([wdm_type__value, channel__value]), + # cardinality one -- a plain list of the HFID parts. + wdm_channel: [dwdm, "1"] + + - sfp_type: zr + form_factor: sfp_plus + status: spare + wdm_type: dwdm + serial: "SFP-WDM-0002" + manufacturer: Cisco + spare_location: + kind: LocationSite + data: + name: NYC1 + wdm_channel: [dwdm, "2"] + + - sfp_type: zr + form_factor: qsfp28 + status: spare + wdm_type: cwdm + serial: "SFP-WDM-0003" + manufacturer: Cisco + spare_location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + wdm_channel: [cwdm, "20"] diff --git a/objects/extensions/hosting_cluster/hosting_cluster.yml b/objects/extensions/hosting_cluster/hosting_cluster.yml new file mode 100644 index 00000000..b25e1f46 --- /dev/null +++ b/objects/extensions/hosting_cluster/hosting_cluster.yml @@ -0,0 +1,90 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/hosting_cluster. +# Depends on: base, extensions/location_minimal (LocationSite: SJC1, NYC1), +# extensions/cluster (ClusterGeneric, ClusterGenericComputeUnitNodes), +# extensions/compute (ComputePhysicalServer "sjc1-esx01" already exists). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: ComputePhysicalServer + data: + - name: sjc1-esx02 + description: Second ESXi hypervisor host in the SJC1 cluster. + status: active + device_type: PowerEdge R660 + rack_face: front + location: + kind: LocationSite + data: + name: SJC1 + - name: nyc1-esx01 + description: First KVM hypervisor host in the NYC1 cluster. + status: active + device_type: PowerEdge R660 + rack_face: front + location: + kind: LocationSite + data: + name: NYC1 + - name: nyc1-esx02 + description: Second KVM hypervisor host in the NYC1 cluster. + status: active + device_type: PowerEdge R660 + rack_face: front + location: + kind: LocationSite + data: + name: NYC1 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: ClusterHosting + data: + - name: SJC1-VMware-Cluster01 + description: VMware vSphere cluster at SJC1 built from physical servers. + technology: vmware + status: active + # `location` is cardinality many (a cluster can span locations), and + # LocationGeneric is a Generic -- a flat list of HFID strings works + # against the existing LocationSite. + location: + - SJC1 + # `nodes` is cardinality many, and ComputeGenericUnit is a Generic -- + # a flat list of HFID strings is not enough (the peer schema can't be + # resolved), so specify the concrete kind with a list of upsert specs. + nodes: + kind: ComputePhysicalServer + data: + - name: sjc1-esx01 + location: + kind: LocationSite + data: + name: SJC1 + - name: sjc1-esx02 + location: + kind: LocationSite + data: + name: SJC1 + - name: NYC1-KVM-Cluster01 + description: KVM/QEMU cluster at NYC1 built from physical servers. + technology: kvm + status: active + location: + - NYC1 + nodes: + kind: ComputePhysicalServer + data: + - name: nyc1-esx01 + location: + kind: LocationSite + data: + name: NYC1 + - name: nyc1-esx02 + location: + kind: LocationSite + data: + name: NYC1 diff --git a/objects/extensions/interface_breakout/interface_breakout.yml b/objects/extensions/interface_breakout/interface_breakout.yml new file mode 100644 index 00000000..891a9dae --- /dev/null +++ b/objects/extensions/interface_breakout/interface_breakout.yml @@ -0,0 +1,77 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/interface_breakout. +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in LocationRack +# NYC1-RACK-01), which in turn depends on extensions/location_minimal for +# LocationSite NYC1. +# +# interface_breakout only extends InterfacePhysical -- it adds a +# `breakout_capability` attribute plus a self-referencing relationship pair +# (breakout_parent_interface / breakout_child_interfaces, identifier +# "physical__breakout"). It introduces no new node/generic kind, so there is +# nothing new to add to the menu. +# +# breakout_parent_interface is cardinality one with peer InterfacePhysical, a +# concrete kind whose human_friendly_id is the 2-part +# [device__name__value, name__value] (see base/dcim.yml, generic DcimInterface, +# inherited by InterfacePhysical). A cardinality-one relationship to a +# concrete peer with a multi-part HFID is referenced as a plain list of +# scalars (a "ONE_REF"): [device_name, interface_name]. +# +# The breakout parent interface is listed first below so that each child's +# breakout_parent_interface reference resolves against an interface that +# already exists by the time it is processed. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + - name: nyc1-rtr01 + status: active + role: edge + device_type: ASR9001 + platform: Cisco IOS-XR + position: 40 + rack_face: front + # LocationRack inherits LocationHosting (a Generic) -- specify the + # concrete kind so the reference is unambiguous and upserts against the + # existing rack from extensions/rack's mock data. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + # `interfaces` is a Component relationship (cardinality many, concrete + # peer InterfacePhysical) -- each entry below is created/upserted + # individually against nyc1-rtr01, alongside the existing + # GigabitEthernet0/0/0/0 interface from extensions/rack (this does not + # replace or remove it). + interfaces: + kind: InterfacePhysical + data: + - name: HundredGigE0/0/0/1 + description: "100G port, broken out into 4x 25G" + role: core + status: active + breakout_capability: true + - name: HundredGigE0/0/0/1/0 + description: "Breakout child 1/4 of HundredGigE0/0/0/1" + role: access + status: active + breakout_parent_interface: ["nyc1-rtr01", "HundredGigE0/0/0/1"] + - name: HundredGigE0/0/0/1/1 + description: "Breakout child 2/4 of HundredGigE0/0/0/1" + role: access + status: active + breakout_parent_interface: ["nyc1-rtr01", "HundredGigE0/0/0/1"] + - name: HundredGigE0/0/0/1/2 + description: "Breakout child 3/4 of HundredGigE0/0/0/1" + role: access + status: active + breakout_parent_interface: ["nyc1-rtr01", "HundredGigE0/0/0/1"] + - name: HundredGigE0/0/0/1/3 + description: "Breakout child 4/4 of HundredGigE0/0/0/1" + role: access + status: active + breakout_parent_interface: ["nyc1-rtr01", "HundredGigE0/0/0/1"] diff --git a/objects/extensions/lag/lag.yml b/objects/extensions/lag/lag.yml new file mode 100644 index 00000000..11c59647 --- /dev/null +++ b/objects/extensions/lag/lag.yml @@ -0,0 +1,57 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/lag. +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01). +# Adds two fresh physical interfaces on nyc1-rtr01 (TenGigE0/0/0/1 and /2, +# distinct from the pre-existing GigabitEthernet0/0/0/0) and bundles them +# into a LAG. `interfaces` is a Component relationship of cardinality many +# with a Generic peer (DcimInterface) -- since we need to mix two concrete +# kinds (InterfacePhysical and InterfaceLag) under it, we use the +# "list of {kind, data}" format rather than a single {kind, data: [...]} +# block. Items are created in list order, so the member interfaces are +# listed before the LAG that references them via `bundle_members`. +# InterfacePhysical's human_friendly_id is [device__name__value, name__value] +# (a 2-part list), and `bundle_members` is cardinality many with a CONCRETE +# peer (InterfacePhysical), so it's a plain list of HFID lists. +# Note: extensions/mlag builds on top of this LAG later -- kept self +# contained here. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + - name: nyc1-rtr01 + device_type: ASR9001 + platform: Cisco IOS-XR + # LocationRack inherits LocationHosting (a Generic) -- specify the + # concrete kind so the reference is unambiguous and upserts against + # the rack created by extensions/rack. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/1 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/2 + status: active + role: core + - kind: InterfaceLag + data: + name: Bundle-Ether1 + description: LAG toward nyc1-sw01 uplink. + status: active + role: core + bundle_number: 1 + lacp_mode: active + lacp_rate: fast + bundle_members: + - ["nyc1-rtr01", "TenGigE0/0/0/1"] + - ["nyc1-rtr01", "TenGigE0/0/0/2"] diff --git a/objects/extensions/location_minimal/location_minimal.yml b/objects/extensions/location_minimal/location_minimal.yml new file mode 100644 index 00000000..49da4899 --- /dev/null +++ b/objects/extensions/location_minimal/location_minimal.yml @@ -0,0 +1,29 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/location_minimal. +# Depends on: base. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: LocationRegion + data: + - name: Americas + description: North & South America. + children: + kind: LocationCountry + data: + - name: United States + children: + kind: LocationSite + data: + - name: NYC1 + status: active + facility: Equinix NY5 + physical_address: "755 Secaucus Rd, Secaucus, NJ 07094" + timezone: America/New_York + - name: SJC1 + status: active + facility: Equinix SV1 + physical_address: "2001 Ryan Ave, San Jose, CA 95131" + timezone: America/Los_Angeles diff --git a/objects/extensions/mlag/mlag.yml b/objects/extensions/mlag/mlag.yml new file mode 100644 index 00000000..faa538a4 --- /dev/null +++ b/objects/extensions/mlag/mlag.yml @@ -0,0 +1,146 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/mlag. +# Depends on: base, extensions/lag (DcimDevice: nyc1-rtr01, in NYC1-RACK-01, +# with interfaces TenGigE0/0/0/1 and /2 bundled into InterfaceLag +# "Bundle-Ether1"). +# +# A MlagDomain regroups exactly 2 devices (peers, min_count/max_count = 2) +# built over LAG interfaces used as peer-links. So we add a second device, +# nyc1-rtr02, in the same rack/site, with its own pair of physical interfaces +# bundled into its own "Bundle-Ether1" LAG -- mirroring nyc1-rtr01's peer-link +# LAG. Both LAGs then become the domain's peer_links. +# +# MlagInterface inherits GenericInterfaceBundle (bundle_members, cardinality +# many, peer InterfacePhysical) but NOT DcimInterface -- it has no single +# "device" of its own. Instead it is "spread across devices in the domain" +# by bundling physical interfaces that live on different peer devices. We +# add TenGigE0/0/0/3 and /4 on both devices to serve as those members. +# +# MlagInterface.mlag_domain is a Parent relationship (mandatory, cardinality +# one) paired with MlagDomain.mlag_interfaces (Component, cardinality many), +# so nesting the MlagInterface records under mlag_interfaces implies the +# mlag_domain link -- no need to set it explicitly, matching how +# extensions/rack nests InterfacePhysical under DcimDevice.interfaces. +# +# peer_links (peer InterfaceLag, concrete kind, cardinality many) and peers +# (peer DcimDevice, concrete kind, cardinality many) both use flat lists of +# human_friendly_id refs -- InterfaceLag's HFID is a 2-part +# [device__name__value, name__value] list, DcimDevice's HFID is just +# name__value. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + # Upsert against the existing nyc1-rtr01 (created by extensions/rack, + # extended by extensions/lag) -- add the two physical interfaces that + # will become MLAG interface members toward downstream access switches. + - name: nyc1-rtr01 + device_type: ASR9001 + platform: Cisco IOS-XR + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/3 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/4 + status: active + role: core + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + # Second peer of the MLAG domain -- same rack/site as nyc1-rtr01, with a + # mirrored peer-link LAG and its own pair of MLAG-facing interfaces. + - name: nyc1-rtr02 + status: active + role: edge + device_type: ASR9001 + platform: Cisco IOS-XR + position: 41 + rack_face: front + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/1 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/2 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/3 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/4 + status: active + role: core + - kind: InterfaceLag + data: + name: Bundle-Ether1 + description: MLAG peer-link toward nyc1-rtr01. + status: active + role: core + bundle_number: 1 + lacp_mode: active + lacp_rate: fast + bundle_members: + - ["nyc1-rtr02", "TenGigE0/0/0/1"] + - ["nyc1-rtr02", "TenGigE0/0/0/2"] + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: MlagDomain + data: + - domain_id: "NYC1-MLAG-01" + reload_delay: 300 + peers: + - "nyc1-rtr01" + - "nyc1-rtr02" + peer_links: + - ["nyc1-rtr01", "Bundle-Ether1"] + - ["nyc1-rtr02", "Bundle-Ether1"] + mlag_interfaces: + kind: MlagInterface + data: + - name: Bundle-Ether100 + description: MLAG port-channel toward nyc1-acc-sw01. + status: active + role: router + bundle_number: 100 + bundle_members: + - ["nyc1-rtr01", "TenGigE0/0/0/3"] + - ["nyc1-rtr02", "TenGigE0/0/0/3"] + - name: Bundle-Ether101 + description: MLAG port-channel toward nyc1-acc-sw02. + status: active + role: router + bundle_number: 101 + bundle_members: + - ["nyc1-rtr01", "TenGigE0/0/0/4"] + - ["nyc1-rtr02", "TenGigE0/0/0/4"] diff --git a/objects/extensions/patch_panel/patch_panel.yml b/objects/extensions/patch_panel/patch_panel.yml new file mode 100644 index 00000000..39c6bae3 --- /dev/null +++ b/objects/extensions/patch_panel/patch_panel.yml @@ -0,0 +1,83 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/patch_panel. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1), +# extensions/rack (LocationRack: NYC1-RACK-01). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimPatchPanel + data: + - name: NYC1-PP-01 + description: 24-port LC fiber patch panel. + module_capacity: 24 + position: 38 + rack_face: front + # LocationRack inherits LocationHosting (a Generic) -- specify the + # concrete kind so the reference is unambiguous. `location` is + # cardinality one, so `data` is a single mapping, not a list. This + # matches the existing NYC1-RACK-01 rack created by extensions/rack. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + # rear_interfaces is a Component relationship (cardinality many) -- + # nest the concrete kind with `data` as a list. The `patch_panel` + # Parent relationship on each child is implied by this nesting. + rear_interfaces: + kind: DcimRearPatchPanelInterface + data: + - name: RJ1 + connector_type: LC + - name: RJ2 + connector_type: LC + + - name: NYC1-PP-02 + description: 12-port SC fiber patch panel. + module_capacity: 12 + position: 37 + rack_face: front + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + rear_interfaces: + kind: DcimRearPatchPanelInterface + data: + - name: RJ1 + connector_type: SC + +--- +# Front interfaces are created as their own top-level documents (rather than +# nested under the patch panel) so each one can reference its corresponding +# rear interface created above via `corresponding_front_rear`. This document +# runs after the one above, so those rear interfaces already exist. +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimFrontPatchPanelInterface + data: + - name: FR1 + connector_type: LC + # patch_panel peer (DcimPatchPanel) is a CONCRETE kind with a + # single-field human_friendly_id (name), so a plain scalar works. + patch_panel: NYC1-PP-01 + # corresponding_front_rear peer (DcimRearPatchPanelInterface) is a + # CONCRETE kind but its human_friendly_id has two components + # (patch_panel__name, name) -- a cardinality-one reference to a + # multi-component HFID must be given as a list of the HFID parts, + # in order, not a single scalar string. + corresponding_front_rear: [NYC1-PP-01, RJ1] + + - name: FR2 + connector_type: LC + patch_panel: NYC1-PP-01 + corresponding_front_rear: [NYC1-PP-01, RJ2] + + - name: FR1 + connector_type: SC + patch_panel: NYC1-PP-02 + corresponding_front_rear: [NYC1-PP-02, RJ1] diff --git a/objects/extensions/peering_ixp/peering_ixp.yml b/objects/extensions/peering_ixp/peering_ixp.yml new file mode 100644 index 00000000..056f0ee8 --- /dev/null +++ b/objects/extensions/peering_ixp/peering_ixp.yml @@ -0,0 +1,98 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/peering_ixp. +# Depends on: extensions/routing (RoutingAutonomousSystem, RoutingBGPCommunity +# via routing_bgp_community, RoutingPolicyBGP via routing_policies_bgp, +# RoutingBGPSession via routing_bgp -- all already created), base (DcimDevice: +# nyc1-rtr01/nyc1-rtr02; LocationSite: NYC1/SJC1), extensions/vrf (IpamIPAddress +# 192.0.2.21/32, 192.0.2.22/32 in the "default" namespace). +# +# This file owns PeeringIXP and PeeringIXPConnection for real, and adds one +# more RoutingBGPSession upsert to wire the extension's ixp_connection +# attribute (added by extensions/peering_ixp/peering_ixp.yml onto +# RoutingBGPSession) onto a pre-existing session. +# +# PeeringIXP's human_friendly_id is just `name__value`, so it's referenced as +# a plain scalar string. local_as (cardinality one, peer +# RoutingAutonomousSystem, a concrete kind) uses that kind's two-part +# [asn, name] HFID as a YAML list, quoting the Number asn component as a +# string. import_policies/export_policies (cardinality many, peer +# RoutingPolicyBGP -- concrete, HFID name__value) and bgp_communities +# (cardinality many, peer RoutingBGPCommunity -- concrete, HFID name__value) +# are flat lists of HFID scalars. +# +# PeeringIXPConnection's human_friendly_id is also just `name__value`. +# internet_exchange_point (Parent, cardinality one, mandatory) references +# PeeringIXP by its scalar HFID. router (cardinality one, peer DcimDevice, +# concrete, HFID name__value) is a plain scalar. ipv4_address (cardinality +# one, peer IpamIPAddress, concrete) uses that kind's two-part +# [ip_namespace, address] HFID as a YAML list. +# +# The RoutingBGPSession upsert below matches the existing "eBGP session to +# Customer A via CUST-A-EBGP on nyc1-rtr01" record (created by +# objects/extensions/routing_bgp) by its description HFID and repeats only +# its mandatory fields (description/status/role/session_type/vrf -- per +# convention, see objects/extensions/routing_policies_bgp for the same +# pattern) while adding the new ixp_connection link. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: PeeringIXP + data: + - name: NYC1-IX + description: "New York area internet exchange point serving the NYC1 site." + status: enabled + local_as: + - "65000" + - NYC1-BACKBONE-AS + import_policies: + - CUST-A-IMPORT-PREFER-CUSTOMER + export_policies: + - CUST-A-EXPORT-DEFAULT-ROUTE + bgp_communities: + - NO-EXPORT + + - name: SJC1-IX + description: "San Jose area internet exchange point serving the SJC1 site." + status: enabled + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: PeeringIXPConnection + data: + - name: nyc1-rtr01-NYC1-IX + description: "nyc1-rtr01's connection into NYC1-IX" + peeringdb_netixlan: 25256 + status: enabled + vlan: 100 + router: nyc1-rtr01 + internet_exchange_point: NYC1-IX + ipv4_address: + - default + - 192.0.2.21/32 + + - name: nyc1-rtr02-NYC1-IX + description: "nyc1-rtr02's connection into NYC1-IX" + status: enabled + vlan: 200 + router: nyc1-rtr02 + internet_exchange_point: NYC1-IX + ipv4_address: + - default + - 192.0.2.22/32 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPSession + data: + - description: "eBGP session to Customer A via CUST-A-EBGP on nyc1-rtr01" + status: active + session_type: external + role: peering + vrf: CUST-A + ixp_connection: nyc1-rtr01-NYC1-IX diff --git a/objects/extensions/qinq/qinq.yml b/objects/extensions/qinq/qinq.yml new file mode 100644 index 00000000..473e0f2c --- /dev/null +++ b/objects/extensions/qinq/qinq.yml @@ -0,0 +1,45 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/qinq. +# Depends on: base, extensions/location_minimal, extensions/vlan +# (IpamVLANGroup: NYC1-VLANs). +# IpamSVLAN and IpamCVLAN both inherit from GenericVLAN, so each needs its own +# vlan_id/vlan_group. IpamCVLAN's `name` attribute is a read-only computed +# attribute (Jinja2 from svlan + vlan_id), so it is never set here. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamSVLAN + data: + - name: NYC1-SVLAN-3001 + description: Supplier VLAN carrying customer traffic for tenant A at NYC1. + vlan_id: 3001 + status: active + vlan_group: NYC1-VLANs + - name: NYC1-SVLAN-3002 + description: Supplier VLAN carrying customer traffic for tenant B at NYC1. + vlan_id: 3002 + status: active + vlan_group: NYC1-VLANs + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamCVLAN + data: + # `name` is read-only/computed (svlan name + vlan_id) -- do not set it. + - vlan_id: 101 + status: active + vlan_group: NYC1-VLANs + # IpamSVLAN is a concrete kind -- plain human_friendly_id scalar. + svlan: NYC1-SVLAN-3001 + - vlan_id: 102 + status: active + vlan_group: NYC1-VLANs + svlan: NYC1-SVLAN-3001 + - vlan_id: 103 + status: active + vlan_group: NYC1-VLANs + svlan: NYC1-SVLAN-3002 diff --git a/objects/extensions/rack/rack.yml b/objects/extensions/rack/rack.yml new file mode 100644 index 00000000..4255e0d1 --- /dev/null +++ b/objects/extensions/rack/rack.yml @@ -0,0 +1,46 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/rack. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: LocationRack + data: + - name: NYC1-RACK-01 + site: NYC1 + status: active + height: 42 + facility_id: "R101" + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + - name: nyc1-rtr01 + status: active + role: edge + device_type: ASR9001 + platform: Cisco IOS-XR + position: 40 + rack_face: front + # LocationRack inherits LocationHosting (a Generic) -- specify the concrete + # kind so the reference is unambiguous and upserts against the rack above. + # `location` is cardinality one, so `data` is a single mapping, not a list. + # A nested kind+data block is validated as a full object spec, so it must + # repeat all of the target's mandatory fields (name + site here), not just + # enough to identify it -- the upsert then matches the rack created above. + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + kind: InterfacePhysical + data: + - name: GigabitEthernet0/0/0/0 + role: core + status: active diff --git a/objects/extensions/routing/routing.yml b/objects/extensions/routing/routing.yml new file mode 100644 index 00000000..71d7f24a --- /dev/null +++ b/objects/extensions/routing/routing.yml @@ -0,0 +1,49 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing. +# Depends on: base (DcimDevice: nyc1-rtr01, from extensions/rack). +# +# extensions/routing/routing.yml defines only the abstract RoutingProtocol +# generic (device + vrf + description + status, all mandatory) -- it has no +# concrete node of its own, so nothing of kind "RoutingProtocol" can be +# created directly. RoutingBGPPeerGroup (from extensions/routing_bgp) is used +# below purely to exercise/prove the generic's mandatory-field contract with +# a real instance attached to nyc1-rtr01. Later waves building +# routing_bgp/routing_ospf/routing_pim/routing_aggregate own the "real" +# object files for their concrete kinds and may add to or ignore this data. +# +# extensions/vrf is being built in parallel and its data may not exist yet, +# so the IpamVRF instance below is created inline rather than assumed. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamVRF + data: + - name: CUST-A + description: VRF for Customer A routed services. + vrf_rd: "65000:100" + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPPeerGroup + data: + # `device` (cardinality one, peer DcimDevice) and `vrf` (cardinality one, + # peer IpamVRF) are both concrete kinds, so plain human_friendly_id + # scalars are used. These two relationships plus `description` and + # `status` are the mandatory fields inherited from RoutingProtocol. + - name: CUST-A-EBGP + description: "eBGP peer group for Customer A on nyc1-rtr01" + status: active + address_family: ipv4 + device: nyc1-rtr01 + vrf: CUST-A + + - name: CUST-A-IBGP + description: "iBGP peer group for Customer A on nyc1-rtr01" + status: active + address_family: ipv4 + device: nyc1-rtr01 + vrf: CUST-A diff --git a/objects/extensions/routing_aggregate/routing_aggregate.yml b/objects/extensions/routing_aggregate/routing_aggregate.yml new file mode 100644 index 00000000..eec53047 --- /dev/null +++ b/objects/extensions/routing_aggregate/routing_aggregate.yml @@ -0,0 +1,48 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_aggregate. +# Depends on: extensions/routing (RoutingProtocol generic), base/extensions/rack +# (DcimDevice: nyc1-rtr01), extensions/vrf and extensions/routing (IpamVRF: +# CUSTOMER-B, MGMT-VRF, CUST-A), extensions/aggregate (IpamPrefix: 10.0.0.0/16, +# 192.0.2.0/24, namespace "default"). +# +# RoutingAggregateRoute inherits RoutingProtocol: description (Text, unique, +# also the human_friendly_id), status (Dropdown), device (peer DcimDevice, +# concrete, cardinality one, mandatory), vrf (peer IpamVRF, concrete, +# cardinality one, mandatory) are all inherited and mandatory. discard, +# import_policies, export_policies and destination (peer IpamPrefix, many, +# optional) are added by this node. +# +# `device` and `vrf` are concrete kinds with cardinality one, so plain +# human_friendly_id scalars are used (e.g. `device: nyc1-rtr01`). `destination` +# is cardinality many with a concrete peer (IpamPrefix) whose human_friendly_id +# is composite (["ip_namespace__name", "prefix"]), so each entry is itself a +# list, e.g. `["default", "10.0.0.0/16"]`. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingAggregateRoute + data: + - description: "Aggregate summary route for Customer A allocated block on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUST-A + discard: false + import_policies: "CUST-A-EXPORT-SUMMARY" + destination: + - ["default", "10.0.0.0/16"] + + - description: "Discard route for unused Customer B subnet on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUSTOMER-B + discard: true + destination: + - ["default", "192.0.2.0/24"] + + - description: "Disabled aggregate route pending decommission on nyc1-rtr01" + status: disabled + device: nyc1-rtr01 + vrf: MGMT-VRF + discard: false diff --git a/objects/extensions/routing_bgp/routing_bgp.yml b/objects/extensions/routing_bgp/routing_bgp.yml new file mode 100644 index 00000000..22e5f184 --- /dev/null +++ b/objects/extensions/routing_bgp/routing_bgp.yml @@ -0,0 +1,170 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_bgp. +# Depends on: base (DcimDevice: nyc1-rtr01, nyc1-rtr02), extensions/routing +# (RoutingBGPPeerGroup: CUST-A-EBGP, CUST-A-IBGP on nyc1-rtr01 / VRF CUST-A -- +# created there purely to demonstrate the RoutingProtocol generic's contract). +# +# This file owns RoutingAutonomousSystem, RoutingBGPPeerGroup, and +# RoutingBGPSession for real: it adds RoutingAutonomousSystem records, wires +# local_as/remote_as onto the two peer groups already created by +# extensions/routing (matched by their name+description human_friendly_id, +# so this upserts rather than duplicates -- their mandatory fields +# description/status/device/vrf are repeated verbatim to match), adds one +# more peer group for an upstream transit uplink, and adds RoutingBGPSession +# records tying it all together. +# +# organization (RoutingAutonomousSystem) and location are cardinality-one +# relationships to Generic peers (OrganizationGeneric / LocationGeneric). +# Per convention, a plain human_friendly_id scalar is tried first since the +# target records already exist (OrganizationProvider "Acme Networks"/"Lumen" +# from base, TenancyTenant "Globex Corp" from extensions/tenancy, LocationSite +# "NYC1" from extensions/location_minimal). +# +# RoutingBGPSession's human_friendly_id is just `description__value` (the +# live schema resolves this from the RoutingProtocol generic's unique +# `description` attribute -- RoutingBGPSession declares no HFID of its own). +# local_as/remote_as on peer groups and sessions reference +# RoutingAutonomousSystem, whose HFID is the two-part [asn, name] -- a YAML +# list. peer_group on RoutingBGPSession references RoutingBGPPeerGroup, whose +# HFID is the two-part [name, description] -- also a YAML list. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamVRF + data: + - name: TRANSIT-VRF + description: Routing table for upstream transit peering on nyc1-rtr02. + vrf_rd: "65000:0" + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingAutonomousSystem + data: + - asn: 65000 + name: NYC1-BACKBONE-AS + description: "Our own backbone AS, announced from nyc1-rtr01 and nyc1-rtr02." + organization: "Acme Networks" + location: "NYC1" + devices: + - nyc1-rtr01 + - nyc1-rtr02 + + - asn: 65001 + name: CUSTOMER-A-AS + description: "Customer A's autonomous system, peered via the CUST-A BGP peer groups." + organization: "Globex Corp" + + - asn: 65002 + name: TRANSIT-PROVIDER-AS + description: "Upstream transit provider autonomous system." + organization: "Lumen" + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPPeerGroup + data: + # These two already exist (created by extensions/routing/routing.yml as + # a demo of the RoutingProtocol contract). Matching on name+description + # upserts them instead of creating duplicates; mandatory fields + # (description/status/device/vrf) are repeated verbatim, and local_as/ + # remote_as are added on top. + - name: CUST-A-EBGP + description: "eBGP peer group for Customer A on nyc1-rtr01" + status: active + address_family: ipv4 + device: nyc1-rtr01 + vrf: CUST-A + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65001" + - CUSTOMER-A-AS + + - name: CUST-A-IBGP + description: "iBGP peer group for Customer A on nyc1-rtr01" + status: active + address_family: ipv4 + device: nyc1-rtr01 + vrf: CUST-A + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65000" + - NYC1-BACKBONE-AS + + - name: TRANSIT-UPSTREAM-EBGP + description: "eBGP peer group for upstream transit provider on nyc1-rtr02" + status: active + address_family: ipv4 + device: nyc1-rtr02 + vrf: TRANSIT-VRF + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65002" + - TRANSIT-PROVIDER-AS + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPSession + data: + - description: "eBGP session to Customer A via CUST-A-EBGP on nyc1-rtr01" + status: active + session_type: external + role: peering + local_pref: 100 + device: nyc1-rtr01 + vrf: CUST-A + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65001" + - CUSTOMER-A-AS + peer_group: + - CUST-A-EBGP + - "eBGP peer group for Customer A on nyc1-rtr01" + + - description: "iBGP session to Customer A via CUST-A-IBGP on nyc1-rtr01" + status: active + session_type: internal + role: backbone + device: nyc1-rtr01 + vrf: CUST-A + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65000" + - NYC1-BACKBONE-AS + peer_group: + - CUST-A-IBGP + - "iBGP peer group for Customer A on nyc1-rtr01" + + - description: "eBGP session to upstream transit provider via TRANSIT-UPSTREAM-EBGP on nyc1-rtr02" + status: active + session_type: external + role: upstream + local_pref: 50 + device: nyc1-rtr02 + vrf: TRANSIT-VRF + local_as: + - "65000" + - NYC1-BACKBONE-AS + remote_as: + - "65002" + - TRANSIT-PROVIDER-AS + peer_group: + - TRANSIT-UPSTREAM-EBGP + - "eBGP peer group for upstream transit provider on nyc1-rtr02" diff --git a/objects/extensions/routing_bgp_community/routing_bgp_community.yml b/objects/extensions/routing_bgp_community/routing_bgp_community.yml new file mode 100644 index 00000000..8c7026f4 --- /dev/null +++ b/objects/extensions/routing_bgp_community/routing_bgp_community.yml @@ -0,0 +1,26 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_bgp_community. +# Standalone: RoutingBGPCommunity (namespace Routing, name BGPCommunity) has +# no device/vrf requirement -- it is a plain community list model with just +# name/description/community plus optional `routing_policy` (Generic +# RoutingPolicy, cardinality many) and `tags` relationships. Neither +# relationship is exercised here since no concrete RoutingPolicy +# implementer's object data exists yet in this repo. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPCommunity + data: + - name: CUSTOMER-A-ROUTES + description: "Tags routes learned from Customer A's network." + community: "65000:100" + + - name: BLACKHOLE + description: "Remote-triggered black hole (RTBH) community for DDoS mitigation." + community: "65000:666" + + - name: NO-EXPORT + description: "Well-known community preventing readvertisement to any eBGP peer." + community: "65535:65281" diff --git a/objects/extensions/routing_bgp_rr/routing_bgp_rr.yml b/objects/extensions/routing_bgp_rr/routing_bgp_rr.yml new file mode 100644 index 00000000..d8df95cd --- /dev/null +++ b/objects/extensions/routing_bgp_rr/routing_bgp_rr.yml @@ -0,0 +1,81 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_bgp_rr. +# Depends on: extensions/routing_bgp (RoutingBGPPeerGroup: CUST-A-IBGP on +# nyc1-rtr01, already loaded with data). +# +# extensions/routing_bgp_rr/bgp_rr.yml defines RoutingBGPRRCluster +# (namespace Routing, name BGPRRCluster) with: +# - name (unique, mandatory), description (optional) +# - cluster_id: cardinality-one, MANDATORY relationship to the concrete +# kind IpamIPAddress (Cluster ID represented as a reference to an IP +# Address) -- new loopback-style addresses are created below for this, +# since only 192.0.2.1/32 already exists (from objects/base/03_ipam.yml) +# and reusing it across clusters would be semantically wrong. +# IpamIPAddress's human_friendly_id is the two-part +# [ip_namespace__name__value, address__value] -- a plain address scalar +# is rejected ("HFID does not contain the same number of elements"), so +# references use the [default,
] YAML list form. +# - peer_groups: cardinality-many, optional relationship to the concrete +# kind RoutingBGPPeerGroup. +# +# It also adds an `extensions: nodes:` block wiring a reciprocal +# relationship onto RoutingBGPPeerGroup: `rr_cluster` (cardinality one, +# optional). Confirmed on the live schema that peer_groups (on +# RoutingBGPRRCluster) and rr_cluster (on RoutingBGPPeerGroup) share the same +# identifier (routingbgppeergroup__routingbgprrcluster) -- they are the same +# edge, so setting peer_groups here is sufficient; RoutingBGPPeerGroup does +# not need to be touched separately. +# +# RoutingBGPPeerGroup's human_friendly_id is the two-part +# [name__value, description__value] -- a YAML list, matching the convention +# used in objects/extensions/routing_bgp/routing_bgp.yml. +# +# Only CUST-A-IBGP (an iBGP peer group) is wired to a cluster below -- route +# reflection only applies to iBGP sessions, so the two eBGP peer groups +# (CUST-A-EBGP, TRANSIT-UPSTREAM-EBGP) are intentionally left unwired. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamIPAddress + data: + - address: 192.0.2.21/32 + description: "Cluster ID for NYC1-CORE-RR" + status: active + role: loopback + - address: 192.0.2.22/32 + description: "Cluster ID for NYC1-EDGE-RR" + status: active + role: loopback + - address: 192.0.2.23/32 + description: "Cluster ID for NYC1-DR-RR" + status: active + role: loopback + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPRRCluster + data: + - name: NYC1-CORE-RR + description: "Core route reflector cluster for iBGP full-mesh avoidance at NYC1" + cluster_id: + - default + - 192.0.2.21/32 + peer_groups: + - - CUST-A-IBGP + - "iBGP peer group for Customer A on nyc1-rtr01" + + - name: NYC1-EDGE-RR + description: "Edge route reflector cluster for NYC1 edge routers" + cluster_id: + - default + - 192.0.2.22/32 + + - name: NYC1-DR-RR + description: "Disaster-recovery route reflector cluster for NYC1" + cluster_id: + - default + - 192.0.2.23/32 diff --git a/objects/extensions/routing_ospf/routing_ospf.yml b/objects/extensions/routing_ospf/routing_ospf.yml new file mode 100644 index 00000000..67fc139e --- /dev/null +++ b/objects/extensions/routing_ospf/routing_ospf.yml @@ -0,0 +1,91 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_ospf. +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01), +# extensions/routing (RoutingProtocol generic: device + vrf + description + +# status, all mandatory), extensions/routing (IpamVRF: CUST-A). +# +# RoutingOSPF inherits RoutingProtocol, so `device` (peer DcimDevice, +# cardinality one) and `vrf` (peer IpamVRF, cardinality one) are both +# concrete kinds -- plain human_friendly_id scalars are used. RoutingOSPF +# overrides human_friendly_id to [device__name__value, vrf__name__value, +# version__value] (see extensions/routing_ospf/ospf.yml), so references to +# it elsewhere in this file use a 3-part HFID list. +# +# Two fresh interfaces (GigabitEthernet0/0/0/5 and /6) are added on +# nyc1-rtr01 in the first document below, distinct from the interfaces +# already claimed by other extensions (GigabitEthernet0/0/0/0-4, TenGigE +# 0/0/0/1-2, Bundle-Ether1, HundredGigE0/0/0/1 + breakout children). +# +# RoutingOSPF.ospf_interfaces is a Component relationship of cardinality +# many with a CONCRETE peer (RoutingOSPFInterface), so it's nested as +# {data: [...]} (kind omitted). Each nested RoutingOSPFInterface repeats its +# own mandatory `ospf` field (Parent relationship, cardinality one, concrete +# peer RoutingOSPF) even though it's already nested under that OSPF +# instance -- same pattern as extensions/vrrp's vrrp_interfaces/vrrp_group. +# `interface` (cardinality one, GENERIC peer InterfaceLayer3) requires a +# nested {kind, data} block -- InterfaceLayer3 itself has no human_friendly_id +# defined (only its concrete implementers do), so a plain HFID scalar/list +# fails with "Unable to lookup node by HFID, schema 'InterfaceLayer3' does +# not have a HFID defined." The nested block repeats InterfacePhysical's own +# mandatory fields (name + device) and upserts against the interfaces +# created in the first document above. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + - name: nyc1-rtr01 + device_type: ASR9001 + platform: Cisco IOS-XR + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + - kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/5 + status: active + role: core + - kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/6 + status: active + role: core + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingOSPF + data: + - description: "OSPF instance for Customer A VRF on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUST-A + version: ospf + reference_bandwidth: 1000 + ospf_interfaces: + data: + - description: "OSPF core-facing interface for Customer A on nyc1-rtr01" + area: "0.0.0.0" + mode: normal + ospf: ["nyc1-rtr01", "CUST-A", "ospf"] + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/5 + device: nyc1-rtr01 + + - description: "OSPF passive management interface for Customer A on nyc1-rtr01" + area: "0.0.0.0" + mode: passive + ospf: ["nyc1-rtr01", "CUST-A", "ospf"] + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/6 + device: nyc1-rtr01 diff --git a/objects/extensions/routing_pim/routing_pim.yml b/objects/extensions/routing_pim/routing_pim.yml new file mode 100644 index 00000000..6b807773 --- /dev/null +++ b/objects/extensions/routing_pim/routing_pim.yml @@ -0,0 +1,148 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_pim. +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01), +# extensions/routing (abstract RoutingProtocol generic: device + vrf + +# description + status, all mandatory, inherited by RoutingPIM), and +# extensions/vrf (IpamVRF: CUSTOMER-A, CUSTOMER-B). +# +# NOTE: the live schema for RoutingPIM (as loaded on the target Infrahub +# instance) differs slightly from extensions/routing_pim/pim.yml as currently +# checked into this branch: import_policies/export_policies are not plain +# Text attributes there -- they are optional many-cardinality relationships +# (import_routing_policies/export_routing_policies, peer RoutingPolicyPIM, a +# Generic with no mock fixtures of its own yet) -- so they're omitted below +# rather than guessed at. +# +# extensions/routing_pim/pim.yml defines two concrete kinds: +# - RoutingPIM (namespace Routing, name PIM): inherits RoutingProtocol, adds +# dr_priority (optional) plus rp_address (optional, peer IpamIPAddress) +# and pim_interfaces (Component, cardinality many, peer +# RoutingPIMInterface, identifier pim__piminterfaces). Its +# human_friendly_id is the 2-part [device__name__value, +# vrf__name__value] -- NOT the raw device/vrf attributes -- so +# references to an existing RoutingPIM elsewhere use +# [device_name, vrf_name]. +# - RoutingPIMInterface (namespace Routing, name PIMInterface): description +# (unique, mandatory), pim_mode (Dropdown: sparse/dense/bidirectional, +# mandatory -- no `optional: true` on it in the schema), +# hello_interval/dr_priority (optional, defaulted). Relationships: pim +# (Parent, cardinality one, concrete peer RoutingPIM, identifier +# pim__piminterfaces, mandatory) and interface (Attribute, cardinality +# one, GENERIC peer InterfaceLayer3, mandatory). Its human_friendly_id is +# the single field description__value; uniqueness_constraints is +# [pim, interface]. +# +# GigabitEthernet0/0/0/0 through /4 are already used by other extensions' +# mock data (rack, cable, vrrp, sfp, dwdm) -- new interfaces +# (GigabitEthernet0/0/0/5 and /0/0/0/6) are added below instead of +# double-using an occupied one. They are created first, as a Component +# relationship on the existing nyc1-rtr01 device (this upserts the device and +# adds the two interfaces without touching /0 through /4). +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + - name: nyc1-rtr01 + status: active + role: edge + device_type: ASR9001 + platform: Cisco IOS-XR + position: 40 + rack_face: front + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + kind: InterfacePhysical + data: + - name: GigabitEthernet0/0/0/5 + description: "PIM-enabled interface toward Customer A multicast source" + role: core + status: active + - name: GigabitEthernet0/0/0/6 + description: "PIM-enabled interface toward Customer A multicast receivers" + role: core + status: active + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPIM + data: + # `device` (cardinality one, peer DcimDevice) and `vrf` (cardinality one, + # peer IpamVRF) are both concrete kinds, so plain human_friendly_id + # scalars are used, same as extensions/routing's RoutingBGPPeerGroup + # mock data. These two relationships plus `description` and `status` are + # the mandatory fields inherited from RoutingProtocol. + - description: "PIM instance for Customer A multicast on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUSTOMER-A + dr_priority: 100 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPIMInterface + data: + # `pim` is cardinality one with a CONCRETE peer (RoutingPIM), whose + # human_friendly_id is the 2-part [device__name__value, vrf__name__value] + # -- so the reference below is the list [nyc1-rtr01, CUSTOMER-A], + # matching the RoutingPIM instance created above. + # + # `interface` is cardinality one with a GENERIC peer (InterfaceLayer3). + # Unlike a concrete peer, a Generic has no human_friendly_id of its own, + # so a plain scalar/list HFID can't be resolved against it ("Unable to + # lookup node by HFID, schema 'InterfaceLayer3' does not have a HFID + # defined") even though GigabitEthernet0/0/0/5 and /6 already exist -- a + # nested {kind: InterfacePhysical, data: {...}} block is required, and + # per interface_breakout/vrrp's mock data it must repeat every mandatory + # field down the chain (InterfacePhysical: name, device; DcimDevice: + # name, location; LocationRack: name, site -- site's peer LocationSite is + # CONCRETE, so a plain HFID string is enough there), not just enough to + # identify the interface. This upserts against the interfaces created + # above rather than duplicating them. + - description: "PIM interface on GigabitEthernet0/0/0/5 (nyc1-rtr01, Customer A)" + pim_mode: sparse + hello_interval: 30 + dr_priority: 100 + pim: ["nyc1-rtr01", "CUSTOMER-A"] + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/5 + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + + - description: "PIM interface on GigabitEthernet0/0/0/6 (nyc1-rtr01, Customer A)" + pim_mode: sparse + hello_interval: 30 + dr_priority: 90 + pim: ["nyc1-rtr01", "CUSTOMER-A"] + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/6 + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 diff --git a/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml b/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml new file mode 100644 index 00000000..d42e5222 --- /dev/null +++ b/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml @@ -0,0 +1,53 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_policies_aggregate. +# Depends on: extensions/routing_policies (RoutingPolicy generic), +# extensions/routing_aggregate (RoutingAggregateRoute, DcimDevice nyc1-rtr01). +# +# RoutingPolicyAggregate inherits RoutingPolicy: name (Text, unique, the +# human_friendly_id), description (Text, optional), policy_type (Dropdown: +# import-policy / export-policy / import-export-policy), weight (Number, +# default 1000), address_family (Dropdown: ipv4 / ipv6 / all, default all). +# +# The `extensions: nodes:` block in +# extensions/routing_policies_aggregate/routing_policies_aggregate.yml that +# would add real import_routing_policies / export_routing_policies +# relationships onto RoutingAggregateRoute is commented out in the schema +# file and is NOT active on the live instance -- confirmed against the live +# schema, RoutingAggregateRoute only has plain import_policies / +# export_policies Text attributes, no relationship to RoutingPolicyAggregate. +# +# So there is no relationship to wire here. Instead, "wiring" is done the +# same way the existing extensions/routing_aggregate mock data already does +# it: by free-text convention. The first RoutingAggregateRoute record +# ("Aggregate summary route for Customer A allocated block on nyc1-rtr01", +# loaded by objects/extensions/routing_aggregate) already sets +# import_policies: "CUST-A-EXPORT-SUMMARY" as a plain string. The first +# RoutingPolicyAggregate record below is named to match that existing +# free-text value, so the two line up conceptually even though there is no +# actual graph edge between them. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPolicyAggregate + data: + - name: "CUST-A-EXPORT-SUMMARY" + description: >- + Export policy controlling advertisement of the Customer A summary + aggregate route. Referenced by name from the + RoutingAggregateRoute.import_policies free-text field on nyc1-rtr01. + policy_type: "export-policy" + weight: 500 + address_family: "ipv4" + + - name: "CUST-B-DISCARD-EXPORT" + description: "Export policy suppressing advertisement of the discarded Customer B subnet aggregate." + policy_type: "export-policy" + weight: 200 + address_family: "ipv4" + + - name: "MGMT-DEFAULT-IMPORT" + description: "Import policy accepting the default route learned on management-VRF aggregates." + policy_type: "import-policy" + address_family: "all" diff --git a/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml b/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml new file mode 100644 index 00000000..d2a19a34 --- /dev/null +++ b/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -0,0 +1,83 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_policies_bgp. +# Depends on: extensions/routing_bgp (RoutingBGPPeerGroup: CUST-A-EBGP; +# RoutingBGPSession: the transit session on nyc1-rtr02 -- both already +# created by objects/extensions/routing_bgp/routing_bgp.yml). +# +# This file owns RoutingPolicyBGP (a concrete implementation of the +# RoutingPolicy generic from extensions/routing_policies) and wires it onto +# the pre-existing peer group / session via the import_routing_policies / +# export_routing_policies relationships added by +# extensions/routing_policies_bgp/routing_policies_bgp.yml onto +# RoutingBGPPeerGroup and RoutingBGPSession. +# +# RoutingPolicyBGP's human_friendly_id is just `name__value` (inherited from +# the RoutingPolicy generic), so it's referenced as a plain scalar string. +# +# import_routing_policies / export_routing_policies are cardinality-many +# relationships whose peer (RoutingPolicyBGP) is a concrete kind, so they use +# a flat list of HFID scalars rather than the nested kind+data form. +# +# The RoutingBGPPeerGroup/RoutingBGPSession upserts below repeat only their +# mandatory fields (per convention -- see objects/extensions/routing_bgp for +# the same pattern): RoutingBGPPeerGroup requires +# name/description/status/device/vrf; RoutingBGPSession requires +# description/status/role/session_type/vrf. Their human_friendly_id values +# (name+description for the peer group, description alone for the session) +# are among those, so no separate identity block is needed. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPolicyBGP + data: + - name: CUST-A-IMPORT-PREFER-CUSTOMER + description: "Import routes learned from Customer A, setting local preference for backbone selection." + policy_type: import-policy + weight: 100 + address_family: ipv4 + + - name: CUST-A-EXPORT-DEFAULT-ROUTE + description: "Export a default route and backbone summaries to Customer A." + policy_type: export-policy + weight: 100 + address_family: ipv4 + + - name: TRANSIT-EXPORT-NO-CUSTOMER-ROUTES + description: >- + Export only our own backbone prefixes to the upstream transit + provider, filtering out customer routes. + policy_type: export-policy + weight: 500 + address_family: all + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPPeerGroup + data: + - name: CUST-A-EBGP + description: "eBGP peer group for Customer A on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUST-A + import_routing_policies: + - CUST-A-IMPORT-PREFER-CUSTOMER + export_routing_policies: + - CUST-A-EXPORT-DEFAULT-ROUTE + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingBGPSession + data: + - description: "eBGP session to upstream transit provider via TRANSIT-UPSTREAM-EBGP on nyc1-rtr02" + status: active + session_type: external + role: upstream + vrf: TRANSIT-VRF + export_routing_policies: + - TRANSIT-EXPORT-NO-CUSTOMER-ROUTES diff --git a/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml b/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml new file mode 100644 index 00000000..62c8a9ab --- /dev/null +++ b/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml @@ -0,0 +1,68 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_policies_ospf. +# Depends on: extensions/routing_ospf (RoutingOSPF instance: device +# nyc1-rtr01, vrf CUST-A, version "ospf", already created with 2 +# RoutingOSPFInterface members). +# +# extensions/routing_policies_ospf/routing_policies_ospf.yml defines the +# concrete PolicyOSPF node (kind RoutingPolicyOSPF, inherits the abstract +# RoutingPolicy generic from extensions/routing_policies) and extends +# RoutingOSPF with two many-cardinality Generic relationships +# (import_routing_policies/export_routing_policies, peer RoutingPolicyOSPF), +# replacing the plain import_policies/export_policies Text attributes that +# used to live directly on RoutingOSPF. +# +# RoutingPolicyOSPF's human_friendly_id is just [name__value] (inherited +# from the RoutingPolicy generic), so references to it elsewhere in this +# file use a plain scalar string. +# +# The second document below re-specifies the existing RoutingOSPF instance +# by its 3-part HFID (device, vrf, version__value -- see +# extensions/routing_ospf/ospf.yml) together with its other mandatory fields +# (description, status, device, vrf) repeated verbatim, matching the +# upsert pattern used in objects/extensions/routing_bgp for +# RoutingBGPPeerGroup. This upserts the existing record rather than +# creating a duplicate, and adds import_routing_policies/ +# export_routing_policies -- both cardinality many with a CONCRETE peer +# (RoutingPolicyOSPF), so they're flat lists of HFID scalars. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPolicyOSPF + data: + - name: CUST-A-OSPF-IMPORT + description: "Import policy applied to OSPF routes learned in Customer A's VRF on nyc1-rtr01." + policy_type: import-policy + address_family: ipv4 + weight: 100 + + - name: CUST-A-OSPF-EXPORT + description: "Export policy applied to OSPF routes advertised in Customer A's VRF on nyc1-rtr01." + policy_type: export-policy + address_family: ipv4 + weight: 100 + + - name: OSPF-DEFAULT-METRIC + description: "Default metric adjustment policy applied to both imported and exported OSPF routes." + policy_type: import-export-policy + address_family: all + weight: 500 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingOSPF + data: + - description: "OSPF instance for Customer A VRF on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUST-A + version: ospf + import_routing_policies: + - CUST-A-OSPF-IMPORT + export_routing_policies: + - CUST-A-OSPF-EXPORT + - OSPF-DEFAULT-METRIC diff --git a/objects/extensions/routing_policies_pim/routing_policies_pim.yml b/objects/extensions/routing_policies_pim/routing_policies_pim.yml new file mode 100644 index 00000000..94c1f446 --- /dev/null +++ b/objects/extensions/routing_policies_pim/routing_policies_pim.yml @@ -0,0 +1,78 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/routing_policies_pim. +# Depends on: base, extensions/routing_policies (abstract RoutingPolicy +# generic: name/description/policy_type/weight/address_family), and +# extensions/routing_pim (already loaded with 1 RoutingPIM instance on +# device nyc1-rtr01 / VRF CUSTOMER-A, plus 2 RoutingPIMInterface members). +# +# extensions/routing_policies_pim/routing_policies_pim.yml: +# - Defines PolicyPIM (namespace Routing -> kind RoutingPolicyPIM), +# inheriting RoutingPolicy with no extra attributes of its own. Live +# schema confirms it adds nothing beyond the generic's fields: name +# (Text, unique, mandatory), description (Text, optional), policy_type +# (Dropdown: import-policy/export-policy/import-export-policy, +# mandatory), weight (Number, optional, default 1000), address_family +# (Dropdown: ipv4/ipv6/all, optional, default "all"). Its +# human_friendly_id is the single field name__value. +# - Extends RoutingPIM: removes its plain import_policies/export_policies +# Text attributes and adds two relationships instead -- +# import_routing_policies / export_routing_policies -- both Generic +# kind, cardinality many, peer RoutingPolicyPIM (confirmed against the +# live schema; identifiers pim__import_policies / pim__export_policies). +# These relationships live on RoutingPIM, not on RoutingPolicyPIM, so +# wiring a policy to the PIM instance means updating RoutingPIM's +# relationship lists below, not adding anything on the policy records +# themselves. +# +# RoutingPolicyPIM records are created first, then the existing RoutingPIM +# instance (device nyc1-rtr01, vrf CUSTOMER-A) is upserted with the same +# mandatory fields it already has (description, status, device, vrf, +# dr_priority) plus the two new relationship lists pointing at the policies +# below. Peer RoutingPolicyPIM is a CONCRETE kind with a human_friendly_id +# (name__value), so a flat list of name strings is enough for these +# cardinality-many relationships -- no nested kind+data block needed. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPolicyPIM + data: + - name: PIM-ALLOW-CUSTOMER-A-SOURCES + description: "Permit PIM joins toward known multicast sources in VRF CUSTOMER-A" + policy_type: import-policy + weight: 100 + address_family: ipv4 + + - name: PIM-ALLOW-CUSTOMER-A-RECEIVERS + description: "Permit PIM joins/prunes toward known receiver interfaces in VRF CUSTOMER-A" + policy_type: export-policy + weight: 100 + address_family: ipv4 + + - name: PIM-DENY-DEFAULT + description: "Default deny-all fallback PIM policy applied to both import and export" + policy_type: import-export-policy + weight: 10 + address_family: all + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: RoutingPIM + data: + # Upsert of the existing RoutingPIM instance from + # extensions/routing_pim's mock data (objects/extensions/routing_pim) -- + # description/status/device/vrf/dr_priority repeat its existing values + # unchanged; import_routing_policies/export_routing_policies are new. + - description: "PIM instance for Customer A multicast on nyc1-rtr01" + status: active + device: nyc1-rtr01 + vrf: CUSTOMER-A + dr_priority: 100 + import_routing_policies: + - PIM-ALLOW-CUSTOMER-A-SOURCES + export_routing_policies: + - PIM-ALLOW-CUSTOMER-A-RECEIVERS + - PIM-DENY-DEFAULT diff --git a/objects/extensions/sfp/sfp.yml b/objects/extensions/sfp/sfp.yml new file mode 100644 index 00000000..c4c22363 --- /dev/null +++ b/objects/extensions/sfp/sfp.yml @@ -0,0 +1,103 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/sfp. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1, SJC1), +# extensions/rack (LocationRack: NYC1-RACK-01, DcimDevice: nyc1-rtr01 with +# interface GigabitEthernet0/0/0/0), extensions/organization (OrganizationManufacturer: +# Cisco, Dell). +# +# extensions/dwdm builds on top of extensions/sfp in a later wave -- this file +# stays self-contained and doesn't assume dwdm data exists. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimDevice + data: + # Upsert the existing fixture device to add a second physical interface, + # needed so the plugged BidiSFP below has a free interface to plug into + # (GigabitEthernet0/0/0/0 is already used by the plugged StandardSFP). + - name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + interfaces: + kind: InterfacePhysical + data: + - name: GigabitEthernet0/0/0/0 + role: core + status: active + - name: GigabitEthernet0/0/0/1 + role: core + status: active +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimStandardSFP + data: + - serial: "SFP-STD-0001" + sfp_type: lr + form_factor: sfp_plus + status: plugged + manufacturer: Cisco + # `interface` peer (InterfacePhysical) is a concrete kind but has a + # composite human_friendly_id ([device__name__value, name__value]), so + # the reference is a plain list of the HFID components, not a nested + # kind+data block -- this upserts against the existing interface. + interface: [nyc1-rtr01, GigabitEthernet0/0/0/0] + + - serial: "SFP-STD-0002" + sfp_type: sr + form_factor: sfp_plus + status: spare + manufacturer: Cisco + # `spare_location` peer (LocationHosting) is a Generic -- specify the + # concrete kind. `spare_location` is cardinality one, so `data` is a + # single mapping, not a list. LocationSite's only mandatory field is + # `name`, so this is enough to upsert against the existing site. + spare_location: + kind: LocationSite + data: + name: NYC1 + + - serial: "SFP-STD-0003" + sfp_type: t + form_factor: sfp + status: spare + manufacturer: Dell + # LocationRack's mandatory fields are `name` and `site`. + spare_location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: DcimBidiSFP + data: + - serial: "SFP-BIDI-0001" + sfp_type: zr + form_factor: sfp_plus + status: plugged + wavelength_tx: 1310 + wavelength_rx: 1550 + manufacturer: Cisco + interface: [nyc1-rtr01, GigabitEthernet0/0/0/1] + + - serial: "SFP-BIDI-0002" + sfp_type: zr + form_factor: sfp_plus + status: spare + wavelength_tx: 1550 + wavelength_rx: 1310 + manufacturer: Cisco + spare_location: + kind: LocationSite + data: + name: SJC1 diff --git a/objects/extensions/snmp/snmp.yml b/objects/extensions/snmp/snmp.yml new file mode 100644 index 00000000..59f2f7fd --- /dev/null +++ b/objects/extensions/snmp/snmp.yml @@ -0,0 +1,77 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/snmp. +# Standalone extension -- no fixture dependencies. The `devices` relationship +# on SnmpCommunity (-> DcimDevice) and `ip_address` on SnmpClient +# (-> IpamIPAddress) are optional and intentionally left unset here. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: SnmpCommunityV2 + data: + - name: public-ro + description: Legacy read-only community used by monitoring pollers. + community_string: public + access: read_only + - name: private-rw + description: Read-write community used by legacy management tools. + community_string: private123 + access: read_write + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: SnmpCommunityV3 + data: + - name: monitoring-v3 + description: SNMPv3 user for the monitoring platform, auth + privacy enabled. + username: svc-monitoring + auth_protocol: sha + auth_password: AuthPass123! + privacy_protocol: aes + privacy_password: PrivPass123! + security_level: authPriv + - name: readonly-v3 + description: SNMPv3 user with authentication only, no privacy. + username: svc-readonly + auth_protocol: md5 + auth_password: ReadOnlyAuth1 + privacy_protocol: none + security_level: authNoPriv + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: SnmpClient + data: + - name: nms-poller-01 + client_description: Primary NMS polling server. + # SnmpCommunity is a Generic -- specify the concrete kind. `community` is + # cardinality many, so `data` is a list under the single kind mapping. + community: + kind: SnmpCommunityV3 + data: + - name: monitoring-v3 + username: svc-monitoring + auth_protocol: sha + privacy_protocol: aes + security_level: authPriv + - name: legacy-monitor-01 + client_description: Legacy monitoring host polling via SNMPv2c. + community: + kind: SnmpCommunityV2 + data: + - name: public-ro + community_string: public + access: read_only + - name: netops-workstation + client_description: NetOps engineer workstation with read-write access. + community: + kind: SnmpCommunityV2 + data: + - name: private-rw + community_string: private123 + access: read_write diff --git a/objects/extensions/tenancy/tenancy.yml b/objects/extensions/tenancy/tenancy.yml new file mode 100644 index 00000000..90bdda72 --- /dev/null +++ b/objects/extensions/tenancy/tenancy.yml @@ -0,0 +1,29 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/tenancy. +# Depends on: base. Optionally links to prefixes created by extensions/vlan +# (IpamPrefix: 10.0.0.0/16, 192.0.2.0/24 in the "default" IP namespace) if +# those have already been loaded -- the tenant-to-prefix wiring below is an +# upsert against those existing records, not a re-creation. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: TenancyTenant + data: + - name: Acme Corp + description: Primary tenant for the NYC1 backbone. + # IpamPrefix is a concrete kind (not a Generic/interface), so cardinality-many + # references to it are a plain list of its two-part human_friendly_id + # ([ip_namespace, prefix]), same as extensions/vlan does for IpamVLAN.prefixes. + # This upserts against the prefix already created by extensions/vlan. + prefixes: + - ["default", "10.0.0.0/16"] + + - name: Globex Corp + description: Secondary tenant, owns the point-to-point link network. + prefixes: + - ["default", "192.0.2.0/24"] + + - name: Initech + description: Tenant with no infrastructure assigned yet. diff --git a/objects/extensions/users/users.yml b/objects/extensions/users/users.yml new file mode 100644 index 00000000..8acbef88 --- /dev/null +++ b/objects/extensions/users/users.yml @@ -0,0 +1,70 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/users. +# Depends on: base only (OrganizationProvider, a concrete OrganizationGeneric +# kind defined in base/organization.yml). +# +# UserGroup is created before UserAccount because UserAccount.user_group +# references it (cardinality one, concrete peer -> plain scalar HFID string). +# +# UserAccount.organization is cardinality one but its peer (OrganizationGeneric) +# is a Generic, so it must use a nested kind+data block where data is a single +# mapping (not a list) repeating all of the target's own mandatory fields +# (name). All three accounts point at the same organization, so this upserts +# the same OrganizationProvider record each time instead of duplicating it. +# +# ssh_key/password are obviously-fake placeholder values, not real secrets. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: UserGroup + data: + - name: Administrators + description: Full administrative access to all managed devices. + idle_timeout: 900 + permissions: admin + - name: Operators + description: Day-to-day operational access for configuration changes. + idle_timeout: 1800 + permissions: operator + - name: Auditors + description: Read-only access for compliance and auditing. + idle_timeout: 3600 + permissions: read-only + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: UserAccount + data: + - name: jdoe + full_name: Jane Doe + password: "CHANGEME-placeholder-1!" + mfa_enabled: true + user_group: Administrators + organization: + kind: OrganizationProvider + data: + name: Acme Networks + + - name: bsmith + full_name: Bob Smith + ssh_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFAKEPLACEHOLDERKEYDONOTUSE bsmith@example.com" + mfa_enabled: false + user_group: Operators + organization: + kind: OrganizationProvider + data: + name: Acme Networks + + - name: agarcia + full_name: Ana Garcia + password: "CHANGEME-placeholder-2!" + mfa_enabled: true + user_group: Auditors + organization: + kind: OrganizationProvider + data: + name: Acme Networks diff --git a/objects/extensions/vlan/vlan.yml b/objects/extensions/vlan/vlan.yml new file mode 100644 index 00000000..dea28db7 --- /dev/null +++ b/objects/extensions/vlan/vlan.yml @@ -0,0 +1,41 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/vlan. +# Depends on: base, extensions/location_minimal (LocationSite: NYC1). +# The prefix reference below assumes the built-in "default" IP namespace, which +# every Infrahub instance ships with. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamVLANGroup + data: + - name: NYC1-VLANs + description: VLAN group scoped to the NYC1 site. + # IpamVLANGroupScope is a Generic -- specify the concrete kind. + # `scope` is cardinality one, so `data` is a single mapping, not a list. + scope: + kind: LocationSite + data: + name: NYC1 + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamVLAN + data: + - name: NYC1-SERVERS + description: Server VLAN at NYC1. + vlan_id: 100 + status: active + role: server + vlan_group: NYC1-VLANs + prefixes: + - ["default", "192.0.2.0/24"] + - name: NYC1-MGMT + description: Out-of-band management VLAN at NYC1. + vlan_id: 999 + status: active + role: management + vlan_group: NYC1-VLANs diff --git a/objects/extensions/vrf/vrf.yml b/objects/extensions/vrf/vrf.yml new file mode 100644 index 00000000..2c3e58e7 --- /dev/null +++ b/objects/extensions/vrf/vrf.yml @@ -0,0 +1,48 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/vrf. +# Depends on: base. Standalone otherwise -- IpamVRF has no device/location +# relationship, so these records don't need any other extension's fixtures. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamRouteTarget + data: + - name: "65000:100" + description: Shared services route target, imported by multiple customer VRFs. + - name: "65000:200" + description: Customer B dedicated route target. + - name: "65000:300" + description: Unused spare route target, reserved for future allocation. + +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: IpamVRF + data: + - name: CUSTOMER-A + vrf_rd: "65000:100" + description: Customer A dedicated VRF. + enforce_unique: true + # import_rt/export_rt are cardinality many with a CONCRETE peer + # (IpamRouteTarget), so a flat list of human_friendly_id strings is + # enough -- no nested kind/data block needed. + import_rt: + - "65000:100" + export_rt: + - "65000:100" + - name: CUSTOMER-B + vrf_rd: "65000:200" + description: Customer B VRF, also imports the shared services route target. + enforce_unique: true + import_rt: + - "65000:100" + - "65000:200" + export_rt: + - "65000:200" + - name: MGMT-VRF + vrf_rd: "65000:999" + description: Out-of-band management VRF, isolated with no route targets. + enforce_unique: true diff --git a/objects/extensions/vrrp/vrrp.yml b/objects/extensions/vrrp/vrrp.yml new file mode 100644 index 00000000..d79d3ab3 --- /dev/null +++ b/objects/extensions/vrrp/vrrp.yml @@ -0,0 +1,109 @@ +# --------------------------------------------------------------------------- +# Mock data for extensions/vrrp. +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01, +# with interface GigabitEthernet0/0/0/0). +# +# NetworkVRRPGroup.vrrp_interfaces is a Component relationship of cardinality +# many with a CONCRETE peer (NetworkVRRPInterface), so we point it at the +# NetworkVRRPInterface records created below via a {data: [...]} block (kind +# omitted since the peer is already the schema's declared concrete type). +# +# NetworkVRRPInterface links back to its group via `vrrp_group` (cardinality +# one, CONCRETE peer NetworkVRRPGroup, HFID is the single field name__value) +# -- a plain scalar string. It links to the actual port via `interface` +# (cardinality one, GENERIC peer InterfaceLayer3), which requires a nested +# {kind, data} block whose data is a single mapping repeating every mandatory +# field of the target concrete kind, not just enough to identify it: +# - InterfacePhysical: name, device +# - DcimDevice: name, location +# - LocationRack: name, site (site's peer LocationSite is CONCRETE, so a +# plain HFID string is enough there) +# This upserts against the existing nyc1-rtr01 / NYC1-RACK-01 fixtures rather +# than duplicating them. GigabitEthernet0/0/0/0 already exists (from +# extensions/rack); GigabitEthernet0/0/0/1 and /2 are fresh interfaces added +# here, created inline the same way. All three VRRP groups live on the single +# available fixture device -- a real deployment would spread group members +# across two physical routers for actual first-hop redundancy. +# +# NOTE: NetworkVRRPInterface has no human_friendly_id of its own (only +# order_by + uniqueness_constraints on [vrrp_group, interface]), so +# `infrahubctl object load` can't upsert-match an existing one -- re-running +# this file against a database that already has this data will hit a +# "Violates uniqueness constraint 'vrrp_group-interface'" error on the +# NetworkVRRPInterface record instead of upserting cleanly. This is a +# property of the schema (out of scope to change here), not a mistake in +# this file; a first load against a fresh database succeeds with zero +# errors, and the surrounding fixtures (group, rack, device, interface) all +# upsert correctly since they do have HFIDs. +# --------------------------------------------------------------------------- +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: NetworkVRRPGroup + data: + - name: NYC1-CORE-VRRP + vrid: 10 + # Obviously-fake placeholder value, not a real secret. + password: "VrrpKey-CHANGEME-1!" + vrrp_interfaces: + data: + - priority: 110 + vrrp_group: NYC1-CORE-VRRP + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/0 + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + + - name: NYC1-DIST-VRRP + vrid: 20 + vrrp_interfaces: + data: + - priority: 100 + vrrp_group: NYC1-DIST-VRRP + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/1 + status: active + role: core + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 + + - name: NYC1-MGMT-VRRP + vrid: 30 + vrrp_interfaces: + data: + - priority: 90 + vrrp_group: NYC1-MGMT-VRRP + interface: + kind: InterfacePhysical + data: + name: GigabitEthernet0/0/0/2 + status: active + role: management + device: + kind: DcimDevice + data: + name: nyc1-rtr01 + location: + kind: LocationRack + data: + name: NYC1-RACK-01 + site: NYC1 From 0339b8e382f9ee7488a43b77b18d074bba627ecd Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 10:56:04 +0200 Subject: [PATCH 32/37] cleanup experimental --- experimental/modules_linecards/linecard.yml | 6 ++-- .../modules_routing_engine/routing_engine.yml | 17 +++------- .../optical_transport/optical_transport.yml | 16 +++++----- experimental/tenancy/README.md | 3 -- experimental/tenancy/tenancy.yml | 32 ------------------- 5 files changed, 15 insertions(+), 59 deletions(-) delete mode 100644 experimental/tenancy/README.md delete mode 100644 experimental/tenancy/tenancy.yml diff --git a/experimental/modules_linecards/linecard.yml b/experimental/modules_linecards/linecard.yml index c2e49359..281509fd 100644 --- a/experimental/modules_linecards/linecard.yml +++ b/experimental/modules_linecards/linecard.yml @@ -16,7 +16,7 @@ nodes: icon: mdi:poll label: "Linecard Type" inherit_from: - - DeviceGenericModuleType + - DcimGenericModuleType relationships: - name: linecards peer: DeviceLinecard @@ -29,9 +29,9 @@ nodes: description: "A Linecard installed in a device, specifying slot, power status, and functionalities." label: "Linecard" icon: "bi:pci-card" - menu_placement: DeviceGenericModule + menu_placement: DcimGenericModule inherit_from: - - DeviceGenericModule + - DcimGenericModule attributes: - name: slot kind: Number diff --git a/experimental/modules_routing_engine/routing_engine.yml b/experimental/modules_routing_engine/routing_engine.yml index d8d39699..48fb8267 100644 --- a/experimental/modules_routing_engine/routing_engine.yml +++ b/experimental/modules_routing_engine/routing_engine.yml @@ -13,7 +13,7 @@ nodes: description: "Routing Engine Type information, detailing specifications such as part number and manufacturer." label: "Routing Engine Type" inherit_from: - - DeviceGenericModuleType + - DcimGenericModuleType relationships: - name: routing_engines peer: DeviceRoutingEngine @@ -27,18 +27,9 @@ nodes: label: "Routing Engine" icon: "mdi:cpu-64-bit" inherit_from: - - DeviceGenericModule - uniqueness_constraints: - - ["serial_number__value"] - # # Only one RE per Device RE-Slot - # - ["device", "slot__value"] - human_friendly_id: - - device__name__value - - slot__value - order_by: - - device__name__value - - slot__value - display_label: serial_number__value + - DcimGenericModule + # human_friendly_id, order_by, and display_label are inherited from DcimGenericModule + # (computed_name__value, derived from module_bay + module_type), which is already unique. attributes: - name: slot kind: Number diff --git a/experimental/optical_transport/optical_transport.yml b/experimental/optical_transport/optical_transport.yml index 47559449..42bad3bb 100644 --- a/experimental/optical_transport/optical_transport.yml +++ b/experimental/optical_transport/optical_transport.yml @@ -11,7 +11,7 @@ version: "1.0" # # Depends on: # - base/dcim.yml (DcimGenericDevice, DcimPhysicalDevice, DcimEndpoint, DcimConnector) -# - extensions/modules/modules.yml (DeviceGenericModule, DeviceGenericModuleType) +# - extensions/device_module/device_module.yml (DcimGenericModule, DcimGenericModuleType, DcimModuleBay) # - extensions/cable/cable.yml (DcimCable) # # Four layers: @@ -645,7 +645,7 @@ nodes: description: "Categorization of optical modules by function" icon: mdi:expansion-card inherit_from: - - DeviceGenericModuleType + - DcimGenericModuleType attributes: - name: name kind: Text @@ -699,7 +699,7 @@ nodes: description: "Optical-electrical-optical conversion module (100G, 400G coherent) installed in chassis" icon: mdi:chip inherit_from: - - DeviceGenericModule + - DcimGenericModule display_label: computed_name__value uniqueness_constraints: - [computed_name__value] @@ -712,7 +712,7 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ device__serial__value }}-TPD-{{ slot_number__value }}" + jinja2_template: "{{ module_bay__device__serial__value }}-TPD-{{ slot_number__value }}" description: "Computed module name (e.g., ABC123-TPD-1/1)" - name: slot_number kind: Text @@ -815,7 +815,7 @@ nodes: description: "Multiplexer/Demultiplexer/ROADM module for wavelength management installed in chassis" icon: mdi:router-network inherit_from: - - DeviceGenericModule + - DcimGenericModule display_label: computed_name__value human_friendly_id: - computed_name__value @@ -826,7 +826,7 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ device__serial__value }}-MUX-{{ slot_number__value }}" + jinja2_template: "{{ module_bay__device__serial__value }}-MUX-{{ slot_number__value }}" description: "Computed module name (e.g., ABC123-MUX-1/3)" - name: slot_number kind: Text @@ -1119,7 +1119,7 @@ nodes: description: "Optical signal amplifier module (EDFA, Raman, VGC) installed in chassis" icon: mdi:amplifier inherit_from: - - DeviceGenericModule + - DcimGenericModule display_label: computed_name__value human_friendly_id: - computed_name__value @@ -1130,7 +1130,7 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ device__serial__value }}-AMP-{{ slot_number__value }}" + jinja2_template: "{{ module_bay__device__serial__value }}-AMP-{{ slot_number__value }}" description: "Computed module name (e.g., ABC123-AMP-1/5)" - name: slot_number kind: Text diff --git a/experimental/tenancy/README.md b/experimental/tenancy/README.md deleted file mode 100644 index ee0330f1..00000000 --- a/experimental/tenancy/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# tenancy - -Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/tenancy) for the corresponding documentation. diff --git a/experimental/tenancy/tenancy.yml b/experimental/tenancy/tenancy.yml deleted file mode 100644 index 8fdf6198..00000000 --- a/experimental/tenancy/tenancy.yml +++ /dev/null @@ -1,32 +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" - -nodes: - - name: Tenant - namespace: Tenancy - description: A tenant is owning the corresponding entity - icon: mdi:domain - include_in_menu: true - inherit_from: - - OrganizationGeneric - relationships: - - name: tags - peer: BuiltinTag - cardinality: many - kind: Attribute - optional: true - order_weight: 3000 - - name: location - peer: LocationBuilding - cardinality: many - optional: true - - name: circuit - peer: DcimCircuit - cardinality: many - optional: true From ee8a5cd7be764dbfdd0d44727b2ea0eabfb4307d Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 10:57:44 +0200 Subject: [PATCH 33/37] cleanup and format --- extensions/cable/cable.yml | 4 ---- extensions/circuit/circuit.yml | 1 - extensions/circuit_contract/circuit_contract.yml | 1 - extensions/cluster/cluster.yml | 1 - extensions/compute/compute.yml | 2 +- extensions/dwdm/dwdm.yml | 7 +++---- extensions/location_minimal/location_minimal.yml | 4 ++-- extensions/patch_panel/patch_panel.yml | 6 +++--- extensions/physical_disk/physical_disk.yml | 2 +- extensions/qinq/qinq.yml | 2 +- extensions/routing_bgp/bgp.yml | 6 +++--- extensions/routing_ospf/ospf.yml | 2 +- extensions/routing_pim/pim.yml | 2 +- extensions/routing_policies_bgp/routing_policies_bgp.yml | 1 - extensions/sfp/sfp.yml | 2 +- extensions/tenancy/tenancy.yml | 9 ++++----- extensions/users/users.yml | 2 +- extensions/vlan/vlan.yml | 4 ++-- extensions/vrf/vrf.yml | 3 +-- 19 files changed, 25 insertions(+), 36 deletions(-) diff --git a/extensions/cable/cable.yml b/extensions/cable/cable.yml index df06da9c..9a13dcbb 100644 --- a/extensions/cable/cable.yml +++ b/extensions/cable/cable.yml @@ -70,7 +70,6 @@ nodes: label: CAT8 description: "Category 8 twisted pair cable." color: "#99ccff" # Light Blue - # Fiber Cables (Multi-mode) - name: mmf-om1 label: Multimode Fiber OM1 @@ -92,7 +91,6 @@ nodes: 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 @@ -102,7 +100,6 @@ nodes: label: Singlemode Fiber OS2 description: "Improved singlemode fiber." color: "#ffcc00" # Yellow - # Direct Attach and Active Optical Cables - name: dac-passive label: Passive DAC @@ -116,7 +113,6 @@ nodes: label: Active Optical Cable description: "Active Optical Cable." color: "#a0a0a0" # Grey - # Special Cables - name: coaxial label: Coaxial diff --git a/extensions/circuit/circuit.yml b/extensions/circuit/circuit.yml index d3947dff..99aca00e 100644 --- a/extensions/circuit/circuit.yml +++ b/extensions/circuit/circuit.yml @@ -167,7 +167,6 @@ nodes: cardinality: one optional: false identifier: circuit_endpoint__location - order_weight: 1500 extensions: nodes: diff --git a/extensions/circuit_contract/circuit_contract.yml b/extensions/circuit_contract/circuit_contract.yml index 449f7d11..e7df138f 100644 --- a/extensions/circuit_contract/circuit_contract.yml +++ b/extensions/circuit_contract/circuit_contract.yml @@ -63,7 +63,6 @@ nodes: cardinality: one optional: false identifier: circuit__contract - order_weight: 950 extensions: nodes: diff --git a/extensions/cluster/cluster.yml b/extensions/cluster/cluster.yml index 26530e53..6788d7da 100644 --- a/extensions/cluster/cluster.yml +++ b/extensions/cluster/cluster.yml @@ -51,7 +51,6 @@ generics: peer: ComputeGenericUnit label: Nodes kind: Component - cardinality: many identifier: worker_in_cluster extensions: diff --git a/extensions/compute/compute.yml b/extensions/compute/compute.yml index 52a3e2a0..c773ff96 100644 --- a/extensions/compute/compute.yml +++ b/extensions/compute/compute.yml @@ -59,9 +59,9 @@ nodes: label: Drained 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. diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index 52793ec9..c3ad93fc 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -109,7 +109,6 @@ generics: # - name: Splice # label: Splice # description: "Permanent fiber connection method where two fiber ends are fused." - optional: true order_weight: 1100 nodes: @@ -161,10 +160,10 @@ nodes: - name: rear_interface peer: DcimOadmRearInterface kind: Component - cardinality: one optional: true identifier: optical_multiplexer__rear_interface + - name: OadmFrontInterface namespace: Dcim label: Optical Multiplexer Front Interfaces @@ -192,11 +191,11 @@ nodes: - name: channels peer: DcimWdmChannel kind: Attribute - cardinality: many optional: true identifier: oadm_interface__channels order_weight: 1200 + - name: OadmRearInterface namespace: Dcim label: Optical Multiplexer Rear Interfaces @@ -217,11 +216,11 @@ nodes: - name: optical_multiplexer peer: DcimOpticalMultiplexer 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. diff --git a/extensions/location_minimal/location_minimal.yml b/extensions/location_minimal/location_minimal.yml index 16589fcb..dc36906c 100644 --- a/extensions/location_minimal/location_minimal.yml +++ b/extensions/location_minimal/location_minimal.yml @@ -12,23 +12,23 @@ nodes: namespace: Location label: Region icon: carbon:cics-region-target - menu_placement: LocationGeneric inherit_from: - LocationGeneric - IpamPrefixScope parent: "" children: LocationCountry + - name: Country namespace: Location label: Country icon: gis:search-country - menu_placement: LocationGeneric inherit_from: - LocationGeneric parent: LocationRegion children: LocationSite + - name: Site namespace: Location label: Site diff --git a/extensions/patch_panel/patch_panel.yml b/extensions/patch_panel/patch_panel.yml index c62236be..7253ba43 100644 --- a/extensions/patch_panel/patch_panel.yml +++ b/extensions/patch_panel/patch_panel.yml @@ -109,8 +109,8 @@ generics: # - name: Splice # label: Splice # description: "Permanent fiber connection method where two fiber ends are fused." - order_weight: 1100 + nodes: - name: PatchPanel namespace: Dcim @@ -148,10 +148,10 @@ nodes: - name: rear_interfaces peer: DcimRearPatchPanelInterface kind: Component - cardinality: many optional: true identifier: rear_interfaces + - name: FrontPatchPanelInterface namespace: Dcim label: Patch Panel Front Interfaces @@ -179,11 +179,11 @@ nodes: - name: patch_panel peer: DcimPatchPanel kind: Parent - cardinality: one optional: false identifier: front_interfaces order_weight: 900 + - name: RearPatchPanelInterface namespace: Dcim label: Patch Panel Rear Interfaces diff --git a/extensions/physical_disk/physical_disk.yml b/extensions/physical_disk/physical_disk.yml index 0f7b7b38..c805d842 100644 --- a/extensions/physical_disk/physical_disk.yml +++ b/extensions/physical_disk/physical_disk.yml @@ -16,9 +16,9 @@ generics: - name: physical_disks peer: DcimPhysicalDisk kind: Component - cardinality: many optional: true + nodes: - name: PhysicalDisk namespace: Dcim diff --git a/extensions/qinq/qinq.yml b/extensions/qinq/qinq.yml index d56f3108..b49de73f 100644 --- a/extensions/qinq/qinq.yml +++ b/extensions/qinq/qinq.yml @@ -20,11 +20,11 @@ nodes: peer: IpamCVLAN label: Customer vlan(s) kind: Attribute - cardinality: many optional: true identifier: vlan__qinq direction: outbound + - name: CVLAN namespace: Ipam description: A VLAN assigned to customer traffic, encapsulated within an S-VLAN. diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index d128d13b..ca76fe6b 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -51,9 +51,9 @@ nodes: - name: devices peer: DcimDevice 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 @@ -126,10 +126,10 @@ nodes: - name: remote_as peer: RoutingAutonomousSystem 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 @@ -219,9 +219,9 @@ nodes: - name: peer_session peer: RoutingBGPSession kind: Attribute - cardinality: one optional: true + extensions: nodes: - kind: DcimGenericDevice diff --git a/extensions/routing_ospf/ospf.yml b/extensions/routing_ospf/ospf.yml index d140e7b3..2d8213d2 100644 --- a/extensions/routing_ospf/ospf.yml +++ b/extensions/routing_ospf/ospf.yml @@ -66,10 +66,10 @@ nodes: peer: RoutingOSPFInterface 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." diff --git a/extensions/routing_pim/pim.yml b/extensions/routing_pim/pim.yml index 2b5cef26..9076c6e6 100644 --- a/extensions/routing_pim/pim.yml +++ b/extensions/routing_pim/pim.yml @@ -51,10 +51,10 @@ nodes: peer: RoutingPIMInterface label: PIM Interfaces kind: Component - cardinality: many optional: true identifier: pim__piminterfaces + - name: PIMInterface namespace: Routing description: "Interface configuration for PIM." diff --git a/extensions/routing_policies_bgp/routing_policies_bgp.yml b/extensions/routing_policies_bgp/routing_policies_bgp.yml index 58040789..8c550a5d 100644 --- a/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -41,7 +41,6 @@ extensions: label: Export Routing Policies kind: Generic cardinality: many - identifier: bgppeergroup__export_policies description: "The routing-policies used by this instance for export." - kind: RoutingBGPSession diff --git a/extensions/sfp/sfp.yml b/extensions/sfp/sfp.yml index c1c27a05..04bdbf8c 100644 --- a/extensions/sfp/sfp.yml +++ b/extensions/sfp/sfp.yml @@ -157,9 +157,9 @@ nodes: label: Standard SFP icon: mdi:gpu menu_placement: DcimGenericSFP - inherit_from: - DcimGenericSFP + - name: BidiSFP namespace: Dcim description: "Bidirectional SFP supporting two wavelengths for single-fiber operation." diff --git a/extensions/tenancy/tenancy.yml b/extensions/tenancy/tenancy.yml index 55cf1afd..eb128ee4 100644 --- a/extensions/tenancy/tenancy.yml +++ b/extensions/tenancy/tenancy.yml @@ -41,10 +41,10 @@ nodes: peer: LocationHosting label: Locations kind: Generic - cardinality: many optional: true identifier: tenant__location + extensions: nodes: - kind: DcimGenericDevice @@ -79,7 +79,9 @@ extensions: - name: tenant peer: TenancyTenant kind: Attribute - + cardinality: one + optional: true + identifier: tenant__location # --------------------------------------------------------------------------- # Composing with other extensions # --------------------------------------------------------------------------- @@ -115,6 +117,3 @@ 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 bcb79804..53df453d 100644 --- a/extensions/users/users.yml +++ b/extensions/users/users.yml @@ -93,9 +93,9 @@ nodes: - name: organization peer: OrganizationGeneric kind: Parent - cardinality: one optional: false + extensions: nodes: # Organization Extensions diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index d7304f9f..4a9a75e5 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -17,10 +17,10 @@ generics: peer: IpamVLANGroup 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 @@ -99,8 +99,8 @@ generics: cardinality: one optional: false identifier: vlan_group__vlan - order_weight: 930 + nodes: - name: VLAN namespace: Ipam diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index 54492b25..d3ef4c72 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -57,10 +57,10 @@ nodes: peer: IpamRouteTarget label: Export Targets kind: Attribute - cardinality: many optional: true identifier: vrf__export + - name: RouteTarget namespace: Ipam description: Route Target (RFC 4360) @@ -91,7 +91,6 @@ nodes: peer: IpamVRF label: Exported by VRFs cardinality: many - optional: true identifier: vrf__export extensions: From ad110a2269e1cb3d95fad001fe7cf2c4c3171421 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 10:57:54 +0200 Subject: [PATCH 34/37] cleanup and format --- base/dcim.yml | 6 ------ base/ipam.yml | 2 +- base/location.yml | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/base/dcim.yml b/base/dcim.yml index b4f1eab5..7a3d0aa6 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -55,7 +55,6 @@ generics: cardinality: one optional: true identifier: device__platform - order_weight: 1250 - name: PhysicalDevice namespace: Dcim @@ -104,7 +103,6 @@ generics: cardinality: one optional: false identifier: physical_device__location - order_weight: 1500 - name: Endpoint namespace: Dcim @@ -117,7 +115,6 @@ generics: cardinality: one optional: true identifier: connector__endpoint - order_weight: 1500 - name: Connector namespace: Dcim @@ -333,7 +330,6 @@ nodes: cardinality: one optional: false identifier: manufacturer__device_type - order_weight: 1250 - name: Platform namespace: Dcim @@ -369,7 +365,6 @@ nodes: kind: Attribute cardinality: one identifier: manufacturer__platform - order_weight: 1300 - name: Device namespace: Dcim @@ -435,7 +430,6 @@ nodes: label: Tor Switch description: Tor switch part of a Fabric. color: "#e8e7fd" - optional: true order_weight: 1400 - name: Physical diff --git a/base/ipam.yml b/base/ipam.yml index be4a5bd9..95e47977 100644 --- a/base/ipam.yml +++ b/base/ipam.yml @@ -23,10 +23,10 @@ generics: - name: prefixes peer: IpamPrefix kind: Generic - cardinality: many optional: true identifier: prefix__prefix_scope + nodes: - name: Prefix namespace: Ipam diff --git a/base/location.yml b/base/location.yml index 52bf24d9..b7d59913 100644 --- a/base/location.yml +++ b/base/location.yml @@ -35,8 +35,8 @@ generics: peer: BuiltinTag kind: Attribute cardinality: many - optional: true + - name: Hosting namespace: Location description: Location directly hosting device and services. From f11aaa9252fd0d9256b39e699798307b9bfdb670 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 12:14:09 +0200 Subject: [PATCH 35/37] fix device module schema --- extensions/device_module/device_module.yml | 32 +++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/extensions/device_module/device_module.yml b/extensions/device_module/device_module.yml index 5d98ca44..5f18ed63 100644 --- a/extensions/device_module/device_module.yml +++ b/extensions/device_module/device_module.yml @@ -103,7 +103,6 @@ nodes: display_label: computed_name__value uniqueness_constraints: - ["device", "name__value"] - - ["device", "position__value"] attributes: - name: computed_name kind: Text @@ -120,16 +119,35 @@ nodes: description: "Name of the bay, e.g. 'slot 1' or 'psu 1'." order_weight: 1000 - name: position - kind: Number - 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 + kind: Text + optional: true + description: "Position identifier, substituted into a module's token." - name: description kind: Text optional: true order_weight: 1100 + - name: role + kind: Dropdown + optional: true + description: "The role of the module bay, indicating the type of module it is intended to receive." + order_weight: 1150 + choices: + - name: supervisor + label: Supervisor + description: "Bay intended for a supervisor / routing engine module." + color: "#A9CCE3" + - name: line_card + label: Line Card + description: "Bay intended for a line card module." + color: "#B4E0DC" + - name: power_supply + label: Power Supply + description: "Bay intended for a power supply module." + color: "#E3DAC9" + - name: fan + label: Fan + description: "Bay intended for a fan module." + color: "#D2B4DE" relationships: - name: device peer: DcimPhysicalDevice From a01fc07fc866dd28355812e3a2ce078ee4d25499 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 18 Aug 2026 14:13:29 +0200 Subject: [PATCH 36/37] fix data file --- objects/extensions/device_module/device_module.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objects/extensions/device_module/device_module.yml b/objects/extensions/device_module/device_module.yml index 7dee2553..0d81463e 100644 --- a/objects/extensions/device_module/device_module.yml +++ b/objects/extensions/device_module/device_module.yml @@ -41,7 +41,7 @@ spec: # match the existing nyc1-rtr01 fixture exactly, so this upserts/matches # it instead of creating a duplicate. - name: "slot 1" - position: 1 + position: "1" description: "Primary route processor slot." device: &nyc1_rtr01 kind: DcimDevice @@ -54,12 +54,12 @@ spec: site: NYC1 - name: "slot 2" - position: 2 + position: "2" description: "Secondary route processor slot." device: *nyc1_rtr01 - name: "fan tray 1" - position: 3 + position: "3" description: "Fan tray slot." device: *nyc1_rtr01 From dce6f94045635e9589d5bff45c0c26c5e6ea9d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Lan=C4=8Da?= <135596273+lancamat1@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:43:45 +0200 Subject: [PATCH 37/37] fix: apply pass 1 review verdicts to schema library v2 (#80) * fix: keep DcimInterface.mtu on the generic so LAG and virtual interfaces keep an MTU Packet: DCIM-06 (reject, redesign), keeps DCIM-07. Moving mtu to InterfacePhysical left InterfaceLag and InterfaceVirtual with no MTU at all, which is where a non-default MTU is most often needed (bundles, SVIs, tunnels, loopbacks). The fix for a bad default (1514 was frame size) is the default, so mtu returns to the DcimInterface generic with default_value 1500. Co-Authored-By: Claude Fable 5 * fix: pluralize cardinality-many relationship names on OrganizationManufacturer Packet: ORG-N1 (change). CC-2 wants plural names on cardinality-many relationships, and both declarations are PR-touched. The rename also removes the clash with DcimGenericDevice.device_type and .platform, which are cardinality one and mean something else. Identifiers stay singular on the object part, so the forward sides in base/dcim.yml are untouched. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * fix: declare LocationHosting.name identity explicitly Packet: LOC-02 (change). The human_friendly_id was silently deriving the uniqueness constraint, which CC-4 forbids; unique: true states what Infrahub already enforces, so there is no behaviour change and no migration. optional and order_weight are written on the same three lines, and display_label plus order_by give the generic parity with LocationGeneric (it is a relationship peer in seven places and had a null display label). Checklist: CC-4, CC-6, CC-9 Co-Authored-By: Claude Fable 5 * fix(ipam): align IpamPrefix.status choice order with the base status order Packet: IPAM-05 (change, substance accepted). The mandatory plus default_value plus base palette work is exactly what CC-5 and CC-6 ask for; the one defect is that this node listed reserved after deprecated while DcimDevice, GenericVLAN, LocationRack and IpamIPAddress all put reserved first (4:1). Two nodes in the same file ordered the same dropdown differently. Checklist: CC-5 Co-Authored-By: Claude Fable 5 * fix(ipam): give IpamPrefix.role backbone its own color Packet: IPAM-04 (color half only, the rest is a question to the author). backbone and management both used #AEC6CF, so the two roles were indistinguishable in the UI and the color carried no information. #9678B6 is freed by dropping the v1 technical role. Co-Authored-By: Claude Fable 5 * fix: declare explicit uniqueness constraints behind HFIDs (CC-4) Packets: AGG-01, VLAN-01 (both change). CC-4 forbids relying on the constraint Infrahub derives from the human_friendly_id. IpamAggregate resolved to a derived [[prefix__value]] (namespace-less is correct here) and IpamVLANGroup.name to a derived [[name__value]]; both are now stated in the file. Checklist: CC-4 Co-Authored-By: Claude Fable 5 * fix: align attribute names with CC-2 naming rules Packets: AGG-02, PSU-03, DCIM-CC2 (all change; DCIM-CC2 confirmed by Matej as a rename). CC-2 says Booleans are bare snake_case with no is_ prefix (is_private -> private, 7:1 in the tree) and no run-together words (hotswappable -> hot_swappable, named by the checklist). DCIM-CC2 follows the CC-2 majority count, serial_number 3 against serial 2, so base DcimPhysicalDevice and DcimGenericSFP move to serial_number. The matching object files are renamed in the same commit so the data still loads. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * fix: order uniqueness_constraints to match the namespace-first HFID Packets: IPAM-07 (change), base_ipam consistency note 3, ruling R5 (IpamCVLAN part deferred to the QinQ scoping change). The namespace-first human_friendly_id flip is accepted, but the declared constraints still read value-first, so Infrahub no longer recognises them as the same constraint and adds its derived one on top: the live schema carried two functionally identical constraints on IpamPrefix, IpamIPAddress and DcimCrossConnect. Reordering restores one explicit constraint and no implicit one. Checklist: CC-4 Co-Authored-By: Claude Fable 5 * fix(cable): give DcimCable a human_friendly_id backed by an explicit unique label Packet: CABLE-02 (change). order_by and display_label both point at label, which was optional and non-unique, so unlabelled cables rendered an empty display label and sorted arbitrarily. Making label the node's declared identity fixes both and covers CC-4's HFID-less-node list. Checklist: CC-4 Co-Authored-By: Claude Fable 5 * refactor(cluster): rename ClusterGeneric.location to locations Packet: CLU-01 (change). ClusterGeneric.location is cardinality many with a singular name, and CC-2 makes plural the rule. No identifier is declared on either side and the reverse LocationGeneric.clusters is named independently, so the rename does not have to be mirrored. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * refactor(compute,hosting_cluster): group compute units under a visible ComputeGenericUnit Packets: COMP-03, HOST-03 (both escalated, decision Q6-B). CC-3 says menu placement follows the node's own domain: a Compute server filed under DcimDevice ("Network Device") and a Cluster filed under VirtualizationVirtualMachine both broke that, the latter also inverting containment. ComputeGenericUnit becomes the visible anchor, which is the library's own idiom and yields a real "all compute units" list. CLU-01 stands as the author wrote it: ClusterGeneric stays hidden. Checklist: CC-3, CC-9 Co-Authored-By: Claude Fable 5 * fix(cross_connect): align status with the base mandatory+default+palette convention Packet: XCON-CC6 (change, no packet owns the file). CC-6 names cross_connect as one of the status deviants: status is mandatory with a default_value everywhere else. planned is the safe default, since a cross-connect has to be ordered from a carrier before it is connected. The three colors were still the v1 palette. Checklist: CC-5, CC-6 Co-Authored-By: Claude Fable 5 * fix(device_module): make DcimModuleBay.position a validated Number Packet: MOD-04 (change). Text is the wrong kind: the description documented NetBox's {module} token substitution, which nothing here implements, the sibling DcimPhysicalDevice.position in the same namespace is a Number, and the author's own first version (98a730f) was Number with min_value 1. No uniqueness constraint restored: position is optional. Checklist: CC-2 Note: objects/extensions/device_module/device_module.yml still quotes the three values; unquoting them is the paired objects-file fix. Co-Authored-By: Claude Fable 5 * fix(device_module): give DcimGenericModule.computed_name a default Jinja2 template Packet: MOD-06 (change). The generic declared computed_name as read_only + mandatory with no computed_attribute, so it could be neither set by a client nor computed by the server, and any node inheriting the generic without overriding it could not be created. The generic can compute from module_bay, which it owns; concrete kinds keep their own override. The stale "Overriten at node level" comment goes with it. Checklist: CC-4, CC-8 Co-Authored-By: Claude Fable 5 * fix(device_psu_module): label and validate DcimPSUModuleType.wattage Packet: PSU-02 (change). CC-2 requires units in parentheses in the label, which base does uniformly ("Height (U)", "Weight (kg)"), and wattage carried no label at all. Commit 8eae840 in this PR set the min_value precedent; without it a wattage accepts 0 and negatives. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * fix(dwdm,patch_panel): restore the three connector types dropped by a stale 4096-char FIXME Packets: CONN-01 (change), CONN-02 (ruling R6). The FIXME's premise is false on 1.11.0: the full 28-choice list loads at roughly 3.3 KB against a 4096-char limit. CONN-02 keeps the two lists duplicated, so each now carries a sync comment pointing at the other; a shared generic in a common ancestor is the real deduplication and is a base-tier change for a separate release. The three restored choice names keep the surrounding UPPERCASE form; the case sweep owns all 28 values at once. Checklist: CC-5, CC-8 Co-Authored-By: Claude Fable 5 * fix(dwdm): keep connector_type mandatory, matching every other hardware-type enum in the domain Packet: DWDM-03 (change). The flip to optional was unstated and left one identical 25-choice list with two optionalities inside one domain. DcimGenericSFP.sfp_type, form_factor and DcimGenericPatchPanelInterface.connector_type are all mandatory; CC-6's "no sensible default" exception covers a mandatory connector type, and CONN-01 removed the one argument for optional by restoring the missing choices. Checklist: CC-6 Co-Authored-By: Claude Fable 5 * fix(location,rack): align the retired lifecycle choice to the base deprecated vocabulary Packets: LMIN-03, RACK-02 (both change). CC-2 resolves split vocabulary by majority. Counted across base/ and extensions/, the choice name deprecated wins 5:2 and the label Deprecated 4:3, so both Sites rename. The Rack already used name: deprecated with label: Retired, exactly the name/label split CC-2 exists to close. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * fix(patch_panel): namespace the front/rear interface relationship identifiers Packet: PP-01 (identifier half; the dependency and description halves belong to the metadata commit). CC-7 wants identifiers in subject__object form. DWDM-01 fixed the dwdm half of the v1 collision and left these two bare; v2.0 is the last release that may rename a stored relationship identifier. Checklist: CC-7 Co-Authored-By: Claude Fable 5 * fix(rack): scope rack identity to its site and pair site/racks as Parent/Component Packet: RACK-01 (change). Two defects rode in on the split. CC-4: name was globally unique, so two sites could not each have a rack called R01, and rack names repeat across sites in every real estate; identity is now scoped by site with the uniqueness declared explicitly. CC-7: LocationRack.site was Attribute while its reverse LocationSite.racks is Component, and Parent is what pairs with Component. Deletion behaviour is unchanged, the site side stays Component and site stays mandatory. Checklist: CC-4, CC-7 Co-Authored-By: Claude Fable 5 * refactor(rack): rename facility_id to facility to match LocationSite Packet: RACK-04 (change). CC-2's explicit call: facility beats facility_id 2:1, and the rack either aligns or documents that it is a different concept. The attribute carries no description at all, so nothing in the file distinguishes a rack's local identifier from a site's. The objects file moves with it or the load breaks. Checklist: CC-2 Co-Authored-By: Claude Fable 5 * fix(snmp): peer SnmpCommunity.devices at DcimGenericDevice Packet: SNMP-03 (change). Adding the link is right, the peer was not: concrete DcimDevice silently excludes ComputePhysicalServer, VirtualizationVirtualMachine and DcimPatchPanel, and servers and VMs are the most SNMP-polled things in an estate. TEN-02 in this same diff peers the base generic, and DcimGenericDevice is base, so the change costs no dependency edge. CC-4's explicit uniqueness behind the HFID name folds in here. Checklist: CC-1, CC-4, CC-7 Co-Authored-By: Claude Fable 5 * refactor(snmp): pluralize SnmpClient relationships and make name unique Packet: SNMP-04 (change). CC-2 makes plural the rule on cardinality-many relationships and routes untouched singulars to their own packet; SnmpClient had two, the new ip_address and the pre-existing community. CC-4 lists SnmpClient among the nodes whose HFID name is not explicitly unique. community also had no kind, declared here as Attribute rather than left to the kind sweep. Checklist: CC-2, CC-4 Co-Authored-By: Claude Fable 5 * refactor(tenancy): rename TenancyTenant to OrganizationTenant and place it under Organization Packets: TEN-01, TEN-04 (both change). CC-3 names this node explicitly: a single-node Tenancy namespace whose only node inherits OrganizationGeneric violates one-namespace-per-domain, and the folder keeps the feature name. The missing label and menu_placement ride along, matching the two namespace siblings OrganizationManufacturer and OrganizationProvider. TEN-04: tenant__ipaddress runs two words together where every sibling identifier in the file separates them. Checklist: CC-3, CC-7 Co-Authored-By: Claude Fable 5 * refactor(vlan): fill IpamVLANGroupScope through the extensions mechanism Packet: IPAM-03 (change). The bare stub in base is forced: base loads standalone and first, so it cannot declare vlan_groups without dangling on IpamVLANGroup. What was wrong is the mechanism the extension used to fill it: re-declaring the whole generic under generics: replaces base's definition, duplicates a kind across two files, and hides who fills the stub from a reader of base. extensions: nodes: - kind: is the documented and repo-established mechanism, already used on LocationHosting by three extensions in this tree. The stub also gains the label and description CC-2/CC-8 require. Checklist: CC-1, CC-2, CC-8 Co-Authored-By: Claude Fable 5 * fix: rename GenericVLAN to IpamGenericVLAN and scope VLAN-ID uniqueness per kind Packets: VLAN-03, QINQ-02 (both change; decision Q4-A). CC-2 rejects a literal Generic namespace: the namespace is prepended to form the kind and "Generic" is not a domain, so the convention is Generic, exactly the DcimGenericDevice shape. Separately, [vlan_id__value, vlan_group] on the generic made IpamVLAN, IpamSVLAN and IpamCVLAN share one flat VLAN-ID space per group, so two C-VLANs with the same C-tag under different S-VLANs were rejected at create time. That is the central Q-in-Q case. The constraint moves down to IpamVLAN and IpamSVLAN; IpamCVLAN keeps only its own [vlan_id__value, svlan]. Checklist: CC-2, CC-4 Co-Authored-By: Claude Fable 5 * fix(qinq): order the IpamCVLAN uniqueness constraint to match its HFID Packets: IPAM-07 cross-reference, base_ipam consistency note 3, ruling R5. Third and last of the duplicate-constraint fixes; IpamPrefix, IpamIPAddress and DcimCrossConnect landed earlier. IpamCVLAN's HFID reads [svlan__name__value, vlan_id__value] while the declared constraint read [vlan_id__value, svlan], so Infrahub no longer recognised them as the same constraint and added its derived one on top. Sequenced after the QinQ scoping change so the reorder applies to the final constraint set. Checklist: CC-4 Co-Authored-By: Claude Fable 5 * fix: stop a VRRP virtual IP deletion from cascading into its group Packet: VRRP-02 (change, admitted under ruling R3). Measured: deleting a single virtual IP address deleted the VRRP group and the group's other virtual IP. The cause is kind: Component on IpamIPAddress.vrrp, which implies on_delete: cascade and declares that an IP address owns a VRRP group. Every other Component relationship in the library points container to children. The group to IPs cascade stays: a VIP exists only for its group. A kind change does not touch the derived identifier, so no data migration. Checklist: CC-7 Co-Authored-By: Claude Fable 5 * fix(peering_ixp): do not cascade-delete BGP sessions with their IXP connection Packet: IXP-02 (change). Live-verified: PeeringIXPConnection.bgp_sessions resolves to Component, which defaults to on_delete: cascade, while RoutingBGPSession.ixp_connection is optional. So deleting an IXP connection silently deleted its BGP sessions with their policies and AS links, even though the schema says a session need not have a connection. This is the only Component pair in the repo whose child side is optional by necessity. kind stays Component for the separate-tab UI; on_delete, not the kind, drives deletion. Checklist: CC-7 Co-Authored-By: Claude Fable 5 * fix(snmp): follow the community and device renames in the objects file Packets: SNMP-03, SNMP-04 (objects half). The SNMP-04 verdict states the objects file populates neither renamed relationship; it does populate community on SnmpClient three times, so the load would break on communities. The header comment also still named DcimDevice and ip_address. Split out rather than folded because both schema commits had already landed. Co-Authored-By: Claude Fable 5 * fix(topology): point experimental topology at Ipam kinds Packets: EXP-02 (STRUCT-01) The three IPAM peers name an Infra* namespace that does not exist anywhere in base or extensions, so the schema cannot load. This PR deletes extensions/topology and makes this file the library's only topology model, so the pre-existing breakage is now v2.0's to carry. The missing extensions/vlan dependency edge lands with the merged .metadata.yml dependency commit. Co-Authored-By: Claude Fable 5 * fix(circuit_service): use DcimCircuitEndpoint kind Packets: EXP-03 CircuitEndpoint is not a kind anywhere in the library; the declared dependency extensions/circuit defines DcimCircuitEndpoint. Two tokens stand between this extension and loading, and the declared dependency list is already correct. Co-Authored-By: Claude Fable 5 * fix(location_extended): use name in LocationRack human_friendly_id Packets: EXP-04 Checklist: CC-4 base/location.yml drops shortname from LocationGeneric in this PR and switches the human_friendly_id to name, but LocationRack here still resolves its HFID through shortname__value and defines no shortname of its own, so the schema no longer loads. The break arrives entirely from base, so this PR owns it. Co-Authored-By: Claude Fable 5 * fix(optical_transport): compute module names from the module bay in one hop Packets: EXP-05 (STRUCT-05) Re-pointing these three nodes from the removed DeviceGenericModule to DcimGenericModule left the templates traversing module_bay -> device, and Jinja2 computed attributes only resolve direct relationships, so the schema is rejected. Switch to the one-hop idiom the rest of the library uses, module_bay__computed_name__value, and correct the three description examples: the name now keys off device name plus bay, not the device serial number. Co-Authored-By: Claude Fable 5 * fix(physical_disk): scope disk identity to its device Packets: lead reviewer ruling, 2026-08-31 (new) Checklist: CC-4 Disk names repeat across devices, so a bare name__value human_friendly_id cannot address a disk; the node already declares the matching [device, name__value] uniqueness constraint. Resolving device__name__value needs a name on the DcimDeviceWithPhysicalDisks generic, so add one with allow_override: any, following the precedent base/dcim.yml sets on DcimPhysicalDevice.name for DcimModuleBay. Co-Authored-By: Claude Fable 5 * fix(metadata): declare exactly the dependencies each extension uses Packets: RTG-CC1, BGPC-CC1, IXP-03, STRUCT-11, STRUCT-12, CIRC-05, PP-01, RACK-05, EXP-02 Checklist: CC-1 Every declared edge is now referenced by the extension's YAML and every kind an extension references is owned inside its transitive closure. Twelve entries change: - extensions/circuit: drop extensions/location_minimal (DcimCircuit.location is gone, only LocationHosting from base remains) (CIRC-05) - extensions/patch_panel: add extensions/device_module, and stop promising the removed DcimPatchPanelModule in the description (PP-01) - extensions/rack: re-point extensions/location_minimal to extensions/location_site, the smallest provider of Location.Site, with the either-package note in the description since a flat list cannot say "one of" (RACK-05, ruling 1) - extensions/routing: drop extensions/vlan, add extensions/vrf (RTG-CC1) - extensions/routing_bgp_community: drop extensions/routing, add extensions/routing_policies (BGPC-CC1) - extensions/routing_bgp_rr: drop extensions/routing (RTG-CC1) - extensions/routing_policies_aggregate: drop extensions/routing and extensions/routing_aggregate (RTG-CC1) - extensions/routing_policies_bgp: drop extensions/routing (RTG-CC1) - extensions/routing_policies_ospf: drop extensions/routing (RTG-CC1) - extensions/routing_policies_pim: drop extensions/routing (RTG-CC1) - extensions/peering_ixp: drop extensions/routing and extensions/routing_policies, both unused and both reached transitively (IXP-03, STRUCT-11) - experimental/topology: add extensions/vlan, now that the VLAN peer resolves to IpamVLAN (EXP-02) routing_policies_aggregate.yml gains one comment line so the commented-out extensions block records that uncommenting it needs the dropped extensions/routing_aggregate edge back (RPOL-CC9 bucket b rider). Resolver check after the edit: 57 nodes ordered, no cycle, no dangling edge. Co-Authored-By: Claude Fable 5 * feat(metadata): declare mutual exclusivity between overlapping extensions and honour it in the loader Packets: STRUCT-09, FR-004b, LSITE-01, EXP-06 (STRUCT-08) Checklist: CC-1, CC-8 Two pairs of packages define the same kind and cannot be loaded together: extensions/location_minimal and extensions/location_site both define Location.Site, and experimental/location_extended and extensions/rack both define Location.Rack. Until now co-loading was silent: the hierarchical Site simply won in either order, so a user who picked location_site for a flat model got the hierarchy with no warning, and the rack pair fails outright with "Hierarchy must be provided if either parent or children is defined". - .metadata.yml gains a machine-readable exclusive_with key on all four entries, declared in both directions, and reciprocal prose in every description, which CC-1 requires on both sides. - location_minimal's description also records the constraint that stays invisible until data is loaded: LocationGeneric.name is unique across every location kind, so a single-country deployment enters the hierarchy at Country rather than duplicating a country under several regions (FR-004b field test; generic-level uniqueness itself stays as it is). - Both location YAML files, plus rack and location_extended, carry the same note above their nodes block, and the three READMEs say it too, including the "LocationSite comes from either location package" line rack was missing. - load_all_schemas honours the key through _select_extensions: a member is skipped once its partner is selected, so location_minimal, the superset, is what CI loads. Because the skip only fires after the partner is loaded, the partner always comes first and a dependency on the skipped member is satisfied by it, which is what makes rack's re-point at location_site safe for hierarchy users. An experimental package always yields to the extension it collides with, whatever the load order says, so rack survives a TEST_EXPERIMENTAL run and location_extended is the one skipped. Resolver check: 57 nodes ordered, no cycle. Selection drops location_site without the flag, and location_site plus location_extended with it. Co-Authored-By: Claude Fable 5 * fix(tasks): derive demo schema load order from .metadata.yml Packets: STRUCT-13 Checklist: CC-1 CC-1 makes .metadata.yml the normative dependency graph, and this task hard-codes a second, hand-ordered copy of it that already contradicts it: extensions/circuit sat six positions before its own declared dependency extensions/location_minimal, and only survived because circuit.yml happens to reference no location kind. Route the list through the resolver the file already contains and drop the TEMPORARY marker; the [DEMO] docstring says what the task is. Order produced: base, aggregate, cable, circuit, compute, lag, location_minimal, vlan, vrf, cluster, rack, qinq, hosting_cluster. Every declared edge respected, and the closure of the 13 entries adds nothing. Co-Authored-By: Claude Fable 5 * fix: correct stale and copy-pasted descriptions and comments CC-8 (descriptions and documentation): stale or copy-pasted text is a defect, and every node and generic carries a description. - PIM interface no longer described as an OSPF interface (routing_pim/pim.yml) - RoutingAggregateRoute.destination no longer called a static route - "A routing policiers for X" corrected in the four routing_policies_* files - IXP-level import/export policies and BGP communities described at IXP scope, not session scope (peering_ixp) - "Fully operational and currently in connected" fixed in cable, cross_connect - "Type of WDM (e.g CWDM. DWDM)" fixed three times in dwdm - "Redifine" fixed in lag - DcimModuleBay.device comment now states the real peer, DcimPhysicalDevice - DcimPhysicalDevice.name comment explains why the attribute is duplicated - DcimConnector description records the cost of kind Attribute on many - vrrp.yml computed-name note points at IpamCVLAN.name instead of the old group + ip field names - bucket (b) markers reworded as guidance: base/dcim.yml sub-interface hint, vrf.yml namespace block, the four "TODO: extend if need" markers - IpamPrefixScope drops VRF from its example scopes and gains a label; IpamVLANGroupScope drops Rack - IpamVRF.enforce_unique documented as declarative intent - DcimCircuitEndpoint description no longer points at the removed meet_me_room - grammar on IpamVLAN, IpamVRF, OrganizationGeneric, LocationGeneric - .metadata.yml: firewall_policer copy-paste, qinq and snmp stale text - 13 missing node and generic descriptions added (dwdm x3, lag, mlag, location_minimal x3, location_site, patch_panel x3, vlan) - em dash removed from line 5 of the disclaimer header in all 56 schema files - orphan docs/docs/reference/modules.mdx deleted (STRUCT-04) 58 files. Co-Authored-By: Claude Fable 5 * fix: normalize choice values, labels and status colors CC-5 (dropdown and choice hygiene): choice names are lowercase snake_case, every choice carries a label, and status choices reuse the base palette. - connector_type: 28 UPPERCASE values lowercased in dwdm and patch_panel (URM_P4, URM_P8 and Splice included) - cable_type: mmf-om1..om5, smf-os1/os2, dac-passive, dac-active, mrj21-trunk - cable color: dark-red, dark-purple, light-blue, dark-green, light-green, dark-orange, light-grey, dark-grey - routing_policies policy_type: import-policy, export-policy, import-export-policy - users permissions: read-only - peering_ixp status: pre-maintenance, post-maintenance - snmp security_level: noAuthNoPriv, authNoPriv, authPriv - labels added to the two choice sets that had none: the virtual machine role in compute, permissions in users - status colors aligned to the base palette (#00d25b active): mlag interface, routing protocol, both peering_ixp status sets, physical disk. Non-status colors, including the routing lavender, are untouched. The matching object files are updated in the same commit so the demo data still loads: dwdm, patch_panel, routing_policies_{aggregate,bgp,ospf,pim}, snmp, users. 19 files. Co-Authored-By: Claude Fable 5 * fix: declare relationship kind explicitly everywhere CC-7 asks for kind and cardinality on every relationship. Twelve relationships still relied on the implicit default; each now states the kind it already resolves to at runtime, so nothing changes behaviour. - base/ipam.yml IpamIPAddress.interface gets kind Attribute, matching InterfaceLayer3.ip_addresses on the other end of ip_address__interface (DCIM-15 and IPAM-12 reached the same ruling) - kind Generic written out on: OrganizationProvider.circuits and LocationHosting.circuit_endpoints (circuit), DcimCircuit.contract (circuit_contract), ComputeGenericUnit.worker_in_cluster (cluster), RoutingBGPSession.device and OrganizationGeneric.asn (routing_bgp), InterfacePhysical.plugged_sfp, LocationHosting.spare_sfps and OrganizationManufacturer.sfps (sfp), IpamRouteTarget.import_vrf and .export_vrf (vrf) No Attribute/Generic flips beyond the ip_address__interface pair. SnmpClient.community already gained its kind earlier in the review. 7 files. Co-Authored-By: Claude Fable 5 * fix: normalize order_weight to the base scheme CC-9 asks that every attribute and relationship carry an order_weight on the base scheme: Parent 900, name 1000, description 1100, status 1200, role 1300-1400, tags 2000. After this commit no attribute or relationship in base/ or extensions/ is missing a weight, and no two fields on a resolved node share one (checked with inheritance and extensions: blocks applied, state: absent honoured). - 106 missing weights filled, on attributes and on relationships, including the ones the review commits added: DcimInterface.mtu keeps a slot of its own, DcimDeviceWithPhysicalDisks.name, DcimPhysicalDevice.name, IpamIPAddress.interface, and the four routing_policies_* reverse relationships - scheme slots restored where they had drifted: description 2000 to 1100 in base/dcim.yml, dwdm and patch_panel; description 1200 to 1100 in base/location.yml, base/organization.yml, DcimPlatform, DcimGenericModule and vrf; tags 3000 to 2000 in organization, rack, peering_ixp (twice) and bgp_community; LocationGeneric.name 900 to 1000; status to 1200 on DcimDevice, IpamPrefix, IpamIPAddress, DcimCable, LocationSite (both files), ComputePhysicalServer, ClusterHosting, DcimGenericSFP and RoutingProtocol - Parent relationships moved to 900: DcimInterface.device, MlagInterface, DcimPhysicalDisk.device, RoutingProtocol.device, RoutingOSPFInterface.ospf, and the three new ones on RoutingPIMInterface, PeeringIXPConnection and UserAccount - sibling ties broken: VirtualizationVirtualMachine vcpu/memory/disk (all 1900), DcimPhysicalDevice position/serial_number/location (all 1500, with rack_face at 1515), GenericMlagDomain peer_links/mlag_interfaces, PeeringIXPConnection ipv6_address/router, RoutingOSPFInterface area/interface - the IpamGenericVLAN 900/910/920/930 ladder rebased onto the scheme - IPAM-13 applied to base/ipam.yml: IpamPrefix description 1100, status 1200, role 1300, scope 1500; IpamIPAddress description 1100, status 1200, role 1300, fqdn 1400, primary_of 1500, interface 1600. IpamIPAddress.vrrp moves to 1700 so it clears the pinned interface slot, and tenancy's IpamIPAddress.tenant to 1350 so it clears role Weights only. No attribute, relationship, choice or flag changes. 40 files. Co-Authored-By: Claude Fable 5 * chore: state optional explicitly on every attribute and relationship CC-6 asks for `optional` in writing everywhere, because the default is not the same on both sides: live 1.11.0 treats an omitted `optional` as false on an attribute and true on a relationship, which is easy to read the wrong way in a file. Each of the 98 places that relied on the default now states the value it already resolves to. - 69 attributes gain `optional: false`, 29 relationships gain `optional: true` - the value written is the current effective one, verified field by field: all 406 attributes and relationships in base/ and extensions/ resolve to exactly the same `optional` before and after this commit - `optional: false` stays next to `default_value` rather than being dropped (decision Q1a), and base/dcim.yml and base/ipam.yml each gain one note at their first status definition recording why: Infrahub 1.11 treats an attribute with a default_value as optional at runtime, so `optional: false` is there to document intent - patch_panel connector_type gets its explicit `optional: false`, the second half of DWDM-03 - `state: absent` entries are left alone, and experimental/ is out of scope per the tier rule 31 files. Co-Authored-By: Claude Fable 5 * feat: state menu intent explicitly and give routing nodes a menu path CC-9 has two halves: the menu intent of every node and generic is written in the file, and every concrete node is reachable from the menu. Both land here, because the routing fix is made of the same keys. include_in_menu written out (50 nodes and generics) Every definition in base/ and extensions/ now states include_in_menu. The 50 that relied on the default gain `include_in_menu: true`, the value they already resolve to, so users can read the menu shape out of the files and later move it to a menu.yml. experimental/ is out of scope per the tier rule. Menu placement (CC-3, both live-tested against 1.11.0 on :55000 earlier) - IpamAggregate moves from menu_placement OrganizationRIR to BuiltinIPAM, where an IPAM object belongs - OrganizationRIR gains menu_placement OrganizationGeneric, matching Manufacturer and Provider Routing menu path (RPOL-CC9) Ten concrete routing nodes were hidden with no menu_placement and no visible generic to reach them. Three of them inherit neither routing generic, so making the generics visible is not enough on its own. The fix is this repo's own dominant shape, used by SFP, location, organization, SNMP, patch panel and OADM: a visible generic root plus explicit menu_placement on every concrete node. - RoutingProtocol becomes visible and is relabelled from "Protocol" to "Routing Protocol", which is what a sidebar root has to say - RoutingPolicy becomes visible and gains the label "Routing Policy" it never had - menu_placement RoutingProtocol on RoutingAggregateRoute, RoutingOSPF and RoutingPIM; RoutingOSPFInterface under RoutingOSPF and RoutingPIMInterface under RoutingPIM; RoutingBGPRRCluster under the existing RoutingBGPSession root; the four RoutingPolicy flavours under RoutingPolicy The sidebar grows by two collapsed top-level entries, not by ten. Every placement target sits in the node's own declared dependency closure, so no extension can produce a dangling menu_placement. 35 files. Co-Authored-By: Claude Fable 5 * fix(routing_bgp): make RoutingBGPSession.role optional Packet BGP-* / checklist CC-6: role is optional with no default value, and RoutingBGPSession.role is the attribute the rule was written against. The explicit-optional sweep only recorded the current effective value, so the semantic flip is made here on its own. Co-Authored-By: Claude Fable 5 * fix(objects): unquote DcimModuleBay positions Packet MOD-04 (parked objects finding, review brief item a): the schema commit turned DcimModuleBay.position into a Number with min_value 1, but the mock data still carried "1"/"2"/"3" as quoted strings, which load as Text. The PSU bays already used unquoted 4/5 and are unchanged. Co-Authored-By: Claude Fable 5 * fix(objects): reference cardinality-many peers by HFID list Parked objects finding (review brief item b): on infrahub-sdk 1.17.0 a bare string in a cardinality-many relationship list is sent as a node ID, not as a human_friendly_id, so every one of these references failed to resolve. An HFID is always a list of its parts, so single-part ones are wrapped in a list too. The comments that asserted flat strings were enough are corrected with them. Co-Authored-By: Claude Fable 5 * fix(objects): stop circuit restating the location_minimal region tree Parked objects finding (review brief item c): the circuit mock data re-declared the Americas -> United States -> NYC1/SJC1 hierarchy that objects/extensions/location_minimal already owns, and re-upserting a hierarchical root fails. The endpoints now reference the existing sites by LocationHosting's name__value human_friendly_id instead. Co-Authored-By: Claude Fable 5 * docs: regenerate schema reference pages Output of `uv run invoke docs.generate` after the 56 schema and metadata commits on this branch. Covers the renames (device_types/platforms, OrganizationTenant, serial_number, private, facility, IpamGenericVLAN), the new human_friendly_id and dependency declarations, and the .metadata.yml description rewrites, plus the sweeps' order_weight/optional/include_in_menu. Co-Authored-By: Claude Fable 5 * fix(objects): correct stale PSU bay comment and align duplicated provider descriptions M-TEXT leftovers: the device_psu_module header announced three PSU bays while the file creates two (PSU-01); circuit.yml re-upserts Lumen and Colt with descriptions that drifted from objects/base/01_organization.yml, so whichever file loaded last won. Checklist: CC-8. Co-Authored-By: Claude Fable 5 * fix: keep node and attribute descriptions within the 128 character limit Infrahub caps `description` at 128 characters. Three descriptions added by review commit 351f655 were over the cap, and the first one aborted the whole base load on a fresh 1.11.0 instance before any node was created: base/dcim.yml generic DcimConnector 212 chars extensions/circuit node DcimCircuitEndpoint 208 chars extensions/vrf attribute enforce_unique 146 chars Each description keeps its factual core; the UI-behaviour half moves to a YAML `#` comment above the field, which has no length limit and stays next to the definition it explains. A scan of every `description` and `label` in base/, extensions/ and experimental/ (recursive walk of the parsed YAML) reports zero remaining values over 128 characters, so these three were the only offenders. Verified on a fresh infrahub-testcontainers 1.11.0 instance: `infrahubctl schema load base` now reports "4 schemas processed in 7.106 seconds" where it previously failed with "Unable to load the schema". Reference pages regenerated with `invoke docs.generate`. The three hand-written mutual-exclusion notes in extensions/*/README.md are restored afterwards because the generator overwrites them with the pointer template. Checklist: CC-8. Co-Authored-By: Claude Fable 5 * fix(physical_disk): make the device name resolvable for the disk HFID Review commit 0ffcd60 gave DcimPhysicalDisk a human_friendly_id of [device__name__value, name__value] to match its uniqueness_constraints, but left the peer generic DcimDeviceWithPhysicalDisks with a plain `name`. Infrahub only accepts an HFID that walks a peer when the referenced attribute combination on that peer is unique, so a fresh 1.11.0 instance rejected the extension outright: HFID of DcimPhysicalDisk refers to peer DcimDeviceWithPhysicalDisks with a non-unique combination of attributes ['name__value'] `unique: true` on that attribute closes the gap. The library ships no implementer of this generic (it is documented in .metadata.yml as one you apply to your own device kind), and every device kind here inherits DcimGenericDevice, which already declares name unique, so no shipped node changes behaviour. The existing `allow_override: any` still lets an implementer restate the attribute. This mirrors DcimPhysicalDevice.name in base/dcim.yml, which carries the same unique + allow_override pair and the same explanatory comment. Verified on a fresh infrahub-testcontainers 1.11.0 instance: `infrahubctl schema load extensions/physical_disk` reports "1 schema processed in 4.891 seconds"; it previously aborted on the HFID error above. Checklist: CC-4. Co-Authored-By: Claude Fable 5 * fix(objects): make circuit objects self-sufficient for standalone loads objects/extensions/circuit loads at schema-dependency position 2 but referenced LocationSite NYC1 and SJC1, which objects/extensions/location_minimal only creates at position 7. On a fresh 1.11.0 instance the file aborted with: Unable to find the node NYC1 / LocationHosting DcimCircuitEndpoint.location is mandatory and its peer LocationHosting is a base generic that base itself never implements, so the fixture has to bring its own sites. They are created with name and description only, without a parent: extensions/location_site has no tier above Site and extensions/location_minimal puts sites under Americas -> United States, so restating either tree would tie this file to one of the two mutually exclusive location extensions. Restating location_minimal's is not possible in any case, re-upserting the hierarchy root fails with "Not supported to assign a value to parent for LocationRegion". Declaring extensions/location_site as a dependency in .metadata.yml (the way extensions/rack does, which would move circuit behind the location fixture) was rejected: CC-1 dropped circuit -> location_minimal as a declared-but-unused edge, and circuit.yml still references no LocationSite kind, only the base LocationHosting generic. On the parent question the brief raised: a partial LocationSite upsert does clear `parent`, confirmed directly (load location_minimal, upsert {name: NYC1, description: ...}, parent goes from "United States" to null). It is not a consequence of this change. objects/extensions/sfp, cross_connect, vlan, compute, dwdm and hosting_cluster already carry fifteen nested {kind: LocationSite, data: {name: ...}} blocks that do exactly the same thing, several of them after location_minimal in the load order, so NYC1 and SJC1 end a full ordered load without a parent with or without this commit. This file adds no new exposure: at position 2 it runs before every other file that touches a site. Cleaning up the fifteen pre-existing blocks (a plain HFID scalar resolves against LocationHosting and does not re-save the node) is a separate sweep. Verified on a fresh infrahub-testcontainers 1.11.0 instance: objects/base plus all 34 objects/extensions directories load in resolver order with zero errors, 35/35, where objects/extensions/circuit previously failed. GraphQL then reports DcimCircuit 3 and DcimCircuitEndpoint 4. Checklist: CC-1. Co-Authored-By: Claude Fable 5 * fix(objects): stop later files clearing the MLAG domain membership Mechanism, read out of infrahub-sdk 1.17.0 and then confirmed on a live instance. `infrahubctl object load` builds every record from scratch and saves it with allow_upsert. In InfrahubNodeBase._generate_input_data (node/node.py:213) a relationship that the document leaves out is treated three different ways: cardinality-many is skipped, mandatory cardinality-one is skipped, and OPTIONAL cardinality-one is written into the payload as an explicit None. A partial re-upsert therefore clears exactly the optional cardinality-one links, and `create()` sends that payload unfiltered because allow_upsert never passes exclude_unmodified. DcimDevice.mlag_domain is optional cardinality one and shares the identifier device__mlag_domain with MlagDomain.peers, which is min_count/max_count 2. objects/extensions/mlag wired nyc1-rtr01 and nyc1-rtr02 into NYC1-MLAG-01 at resolver position 16; objects/extensions/rack (17), device_psu_module (18), dwdm (22), routing_ospf (28) and routing_pim (29) each re-upsert nyc1-rtr01 afterwards without it, and all five failed with: ['DcimDeviceUpsert'] Node has 0 peers for device__mlag_domain, no fewer than 2 allowed Restating mlag_domain in those five files was rejected: objects/extensions/rack and four others would then fail whenever extensions/mlag is not loaded, which inverts the layering and contradicts the self-sufficiency rule applied to the circuit fixture. Referencing the device instead of re-declaring it is not available either, DcimModuleBay.device peers with DcimPhysicalDevice, which declares no human_friendly_id, so the nested {kind, data} block that re-saves the device is the only way to express that link. So the fixture owns its own endpoints. The domain is now built on nyc1-rtr02 and a new nyc1-rtr03, and this file is the only one anywhere under objects/ that ever saves either of them; nyc1-rtr01 is left to the files that own it. objects/extensions/routing_bgp and peering_ixp are unaffected, they reference nyc1-rtr02 by human_friendly_id, which does not re-save it. Both peers moved into a single document so the LocationRack block can be shared through a YAML anchor, which does not cross a `---` boundary. The upsert rule is written out once, in this file's header, with the failing error text, so a future file re-declaring a linked node has somewhere to look. objects/extensions/circuit and objects/extensions/vrrp point at it. Verified on a fresh infrahub-testcontainers 1.11.0 instance: all 35 object directories load in resolver order with zero errors, and GraphQL reports NYC1-MLAG-01 with peers nyc1-rtr02 and nyc1-rtr03, two peer_links and MlagInterface 2. Checklist: CC-1, CC-7. Co-Authored-By: Claude Fable 5 * fix(objects): keep the VRRP fixture on interfaces it owns Same defect family as the MLAG one, uncovered once that fix let objects/extensions/rack get past its device upsert. rack then failed on the nested interface instead: ['InterfacePhysicalUpsert'] Node has -1 peers for interfacelayer3__networkvrrpinterface, no fewer than 1 allowed extensions/vrrp adds InterfaceLayer3.vrrp as an optional cardinality-one relationship, and its counterpart NetworkVRRPInterface.interface is mandatory. objects/extensions/vrrp (resolver position 14) put NYC1-CORE-VRRP on GigabitEthernet0/0/0/0, which objects/extensions/rack (17) owns and re-declares afterwards; the re-declaration nulls the optional side and would orphan the NetworkVRRPInterface, so the server refuses the mutation. The group moves to GigabitEthernet0/0/0/3, which nothing else creates or touches, so all three VRRP groups now sit on interfaces this file creates itself (/1, /2, /3). The header records why /0 is off limits and points at the upsert rule in objects/extensions/mlag/mlag.yml. The stale claim that GigabitEthernet0/0/0/0 "already exists (from extensions/rack)" goes with it: rack loads after this file, sfp is what creates that interface earlier. A sweep of the live 1.11.0 schema for the same shape (an optional cardinality-one relationship whose counterpart is mandatory cardinality-one) found only two others: InterfaceLag.vrrp, which no fixture uses, and DcimModuleBay.installed_module, where objects/extensions/device_psu_module creates fresh bays instead of reusing the occupied ones. Verified on a fresh infrahub-testcontainers 1.11.0 instance: objects/base plus all 34 objects/extensions directories load in resolver order with zero errors, 35/35. GraphQL reports three NetworkVRRPInterface records on GigabitEthernet0/0/0/1, /2 and /3. Checklist: CC-7. Co-Authored-By: Claude Fable 5 * fix(docs): keep the trailing newline when generating the home page The markdown lint CI job failed with a single MD047 violation on docs/docs/home.mdx, which is generated from docs/_templates/home_page.j2 by _generate_home_page_documentation(). The template ends with a newline, but the renderer built its environment as jinja2.Environment(trim_blocks=True), and keep_trailing_newline defaults to False, so Jinja stripped the template's final newline from the rendered output. Regenerating the docs therefore reproducibly emits a home page that markdownlint rejects. Set keep_trailing_newline=True and regenerate. The flag only suppresses the lexer's end-of-source newline strip, so the output is the previous output plus one newline, and nothing else changes. Co-Authored-By: Claude Fable 5 * chore: convert remaining TODO markers to issues extensions/vrf/vrf.yml -> #82 tasks/schemas.py (schema-less extension dir) -> #83 tasks/schemas.py (loader return value) -> #84 tasks/docs.py (hardcoded base link, trailing comment only) -> #85 extensions/routing/routing.yml -> #86 Drafts 1 (#81), 7 (#87) and 8 (#88) have no marker to delete. Checklist: CC-8 Co-Authored-By: Claude Fable 5 * fix: drop the default_value optionality note from the base schemas (review suggestion) Review threads: base/dcim.yml:169-170 and base/ipam.yml:53-54 (BaptisteGi). The note claimed Infrahub 1.11 treats an attribute with a default_value as optional at runtime, which is not documented in any release note, and it sat at the top of the attributes block rather than on the attribute it described. The explicit `optional: false` lines it was meant to justify stay as they are (CC-6). Both occurrences in the repository are removed; a grep for the same claim finds no others. Co-Authored-By: Claude Fable 5 * fix: order uniqueness_constraints most selective first (review suggestion) Review threads: base/ipam.yml:51, base/ipam.yml:123 and extensions/cross_connect/cross_connect.yml:26 (BaptisteGi), citing https://docs.infrahub.app/schema/nodes-and-attributes#optimizing-uniqueness-constraints "Order uniqueness constraint elements from most selective (returning fewer matches) to least selective (returning more matches) to optimize database query performance." A prefix value, an IP address and a provider circuit identifier each return far fewer matches than the namespace or the provider they hang off, so they come first. This reverts the ordering criterion used in fc52a80, which ordered the declared constraint to match the namespace-first human_friendly_id instead. Consequence, kept deliberately: because the declared order no longer matches the HFID, Infrahub adds its HFID-derived constraint on top, so the live schema carries two functionally identical constraints on IpamPrefix, IpamIPAddress and DcimCrossConnect. The HFIDs themselves are unchanged (IPAM-07). Packets: IPAM-07, base_ipam consistency note 3. Checklist: CC-4. Co-Authored-By: Claude Fable 5 * fix: apply selective-first uniqueness ordering across the schema files (generalizing review suggestion) Generalizes the review thread on base/ipam.yml:51 (BaptisteGi) to every uniqueness_constraints entry in base/ and extensions/: 24 entries reviewed, 1 more changed. IpamCVLAN was flipped to svlan-first in b26063a under the same rejected criterion (match the human_friendly_id). QinQ has few S-VLANs each encapsulating many C-VLANs, so a C-VLAN id returns fewer matches than an S-VLAN does, and value-first also matches its siblings IpamVLAN and IpamSVLAN, which both read [vlan_id__value, vlan_group]. The remaining parent-first entries stay as they are: they scope a child to a parent that is itself numerous (interfaces per device, ports per patch panel, endpoints per circuit, disks per device), where the parent is the more selective side and the child name repeats across parents. Packets: QINQ-02, base_ipam consistency note 3. Checklist: CC-4. Co-Authored-By: Claude Fable 5 * fix: use >- for every description that does not fit on one line (review suggestion) Review thread: extensions/circuit/circuit.yml:106 (BaptisteGi), "In some places we have `>-` for long YAML string, sometime we don't". Rule adopted, which is the one the repository already follows almost everywhere and the one yamllint can back: a description stays on a single line while it fits inside the 120-character limit from .yamllint.yml, and uses the folded block scalar `>-` when it does not. Swept all 44 schema files in base/ and extensions/ plus objects/ and the .metadata.yml files: 496 descriptions, 492 single-line (longest 119 characters, none over the limit), 4 wrapped. The file Baptiste commented on is already correct, and two deviants needed fixing: - base/ipam.yml:17 wrapped as a plain multi-line scalar (implicit folding) instead of >-. - extensions/dwdm/dwdm.yml:122 used the literal block `|`, which kept a newline inside a prose description that has no meaningful line breaks. Checklist: CC-8. Co-Authored-By: Claude Fable 5 * fix(cable): keep DcimCable.label optional while it backs the HFID (review suggestion) Review thread: extensions/cable/cable.yml:221-225 (BaptisteGi), "I think forcing a label on every cable is quite optimistic, especially if it has to be entered manually by someone. I agree on the other hand not having a HFID is quite annoying when playing with the API". 26280ad made the label mandatory to back the new human_friendly_id. The mandatory half is not needed: the HFID validator requires the attribute to be unique, not mandatory (only relationship components of an HFID must be mandatory, per docs.infrahub.app/schema/nodes-and-attributes#human-friendly-identifier-hfid). So the label goes back to optional, keeps unique: true, and the HFID stays. A cable with no label simply has no HFID until someone labels it. Packets: CABLE-02. Checklist: CC-4. Co-Authored-By: Claude Fable 5 * fix(ipam): drop the supernet prefix role now that aggregates have their own node (review suggestion) Review thread: base/ipam.yml:89-92 (BaptisteGi), suggestion block deleting the choice, "As discussed we now have a dedicated aggregate extension". extensions/aggregate models an RIR-assigned top-level prefix as IpamAggregate, so representing the same thing as a role on a generic prefix is a second way to say it. No objects file uses role: supernet, so no fixture changes. Swept the other four choice lists in base/ (device status and role, interface status and role, prefix and address status, address role): no other choice value duplicates a node kind shipped by an extension. Packets: IPAM-04 (prefix roles), ext_ipam digest Q2. Checklist: CC-5. Co-Authored-By: Claude Fable 5 * docs: regenerate schema reference pages Follows the review fixes in this branch: `uv run invoke docs.generate`, with the three hand-edited extension READMEs (rack, location_minimal, location_site) restored afterwards because the generator overwrites them. Co-Authored-By: Claude Fable 5 * feat(device_module): restore a status on modules Packet MOD-07 flagged that v2's DcimGenericModule lost the status the v1 extension carried, and that with module_bay mandatory there is no way to record a module that has failed other than deleting the object. Baptiste's answer: "Indeed, could be nice having a status field". Restores status on DcimGenericModule, following the conventions: - kind Dropdown, optional written explicitly, mandatory with default_value active (CC-6) - choices snake_case with a label, a description and a color; colors are base-palette values, taken verbatim from DcimDevice.status in base/dcim.yml where the state matches (provisioning #f0ad4e, active #00d25b, maintenance #ff9800) and from the same palette for the two new states (#e04040, #6c757d) (CC-5) - order_weight 1200, the base scheme's slot for status (CC-9) Choice set, against the v1 baseline (extensions/modules/modules.yml on main: provisioning, active, maintenance, disabled, outage): the first three are kept as-is. v1's disabled and outage are replaced by failed and rma, which is the case the packet was actually about: a module that is still recorded against its last known bay while it is out of service or away for replacement. deprecated is deliberately not included, as end-of-life belongs to the module type rather than to an installed instance. Co-Authored-By: Claude Fable 5 * refactor(users): remove the account model pending a field-driven design Packet USER-01 asked what UserAccount is for, given that Infrahub already ships builtin accounts and groups: the extension models device login credentials (password, ssh_key, mfa_enabled, a permissions dropdown) under a name that reads like Infrahub's own user management, and nothing in the library consumes it. Baptiste's answer: "I agree it's confusing, perhaps we could just remove it and provide a new implementation when someone face it on the field (would need to try if reusing builtin account/group is doable/wanted)". Scope executed: the whole extensions/users extension, not UserAccount alone. UserGroup exists only to group accounts (its idle_timeout and permissions describe an account's session on a device), and the OrganizationGeneric.accounts extension block has UserAccount as its peer, so neither has a purpose once the account model is gone. Removing UserAccount alone would leave a group node grouping nothing and a dangling extension block. Nothing else references the two kinds: base/, extensions/ and experimental/ are clean, so there is no cross-extension breakage and no experimental extension left pointing at a missing peer. Removed: - extensions/users/users.yml and its generated README - the extensions/users entry in .metadata.yml - objects/extensions/users/users.yml (its mock data) The generated docs page and home page listing are regenerated separately. Co-Authored-By: Claude Fable 5 * docs: regenerate schema reference pages Runs `invoke docs.generate` for the two schema changes in this series: - device_module.mdx picks up the new DcimGenericModule.status attribute - home.mdx drops the Users row, following the removal of the extensions/users entry from .metadata.yml The generator never prunes, so docs/docs/reference/users.mdx is deleted by hand. The hand-written notes in the rack, location_minimal and location_site READMEs are restored: docs.generate overwrites every extension README with the three-line pointer template, and those three carry exclusivity notes that CC-1 requires. Co-Authored-By: Claude Fable 5 * fix(objects): move the Acme Networks organization into the base mock data Fallout from removing extensions/users, caught by a full object load: objects/extensions/users/users.yml was the only file creating the OrganizationProvider "Acme Networks", as a side effect of upserting the organization its three accounts pointed at. objects/extensions/routing_bgp/routing_bgp.yml uses that record for AS 65000, our own backbone AS, and its header comment already documents it as coming from base. Without it the load fails with "Unable to find the node Acme Networks / OrganizationGeneric in the database", and objects/extensions/peering_ixp fails after it because it needs the AS that never got created. Adds the record to objects/base/01_organization.yml, where routing_bgp already says it lives. OrganizationProvider is the kind extensions/users used and the only concrete OrganizationGeneric kind base ships, so base mock data cannot express it any other way. Co-Authored-By: Claude Fable 5 --------- Co-authored-by: Claude Fable 5 --- .metadata.yml | 71 +++--- base/dcim.yml | 66 ++++-- base/ipam.yml | 42 ++-- base/location.yml | 16 +- base/organization.yml | 15 +- docs/docs/home.mdx | 15 +- docs/docs/reference/aggregate.mdx | 40 ++-- docs/docs/reference/cable.mdx | 69 +++--- docs/docs/reference/circuit.mdx | 79 +++--- docs/docs/reference/circuit_contract.mdx | 20 +- docs/docs/reference/circuit_service.mdx | 8 +- docs/docs/reference/cluster.mdx | 47 ++-- docs/docs/reference/compute.mdx | 35 +-- docs/docs/reference/cross_connect.mdx | 43 ++-- docs/docs/reference/dcim.mdx | 224 +++++++++--------- docs/docs/reference/device_module.mdx | 141 +++++++---- docs/docs/reference/device_psu_module.mdx | 23 +- docs/docs/reference/dwdm.mdx | 218 +++++++++-------- docs/docs/reference/firewall_policer.mdx | 2 +- docs/docs/reference/hosting_cluster.mdx | 18 +- docs/docs/reference/interface_breakout.mdx | 15 +- docs/docs/reference/ipam.mdx | 106 +++++---- docs/docs/reference/lag.mdx | 62 ++--- docs/docs/reference/location.mdx | 24 +- docs/docs/reference/location_extended.mdx | 6 +- docs/docs/reference/location_minimal.mdx | 40 ++-- docs/docs/reference/location_site.mdx | 22 +- docs/docs/reference/mlag.mdx | 102 ++++---- docs/docs/reference/modules.mdx | 206 ---------------- docs/docs/reference/optical_transport.mdx | 18 +- docs/docs/reference/organization.mdx | 39 +-- docs/docs/reference/patch_panel.mdx | 168 +++++++------ docs/docs/reference/peering_ixp.mdx | 154 ++++++------ docs/docs/reference/physical_disk.mdx | 58 +++-- docs/docs/reference/qinq.mdx | 44 ++-- docs/docs/reference/rack.mdx | 56 +++-- docs/docs/reference/routing.mdx | 31 +-- docs/docs/reference/routing_aggregate.mdx | 22 +- docs/docs/reference/routing_bgp.mdx | 132 ++++++----- docs/docs/reference/routing_bgp_community.mdx | 31 ++- docs/docs/reference/routing_bgp_rr.mdx | 31 +-- docs/docs/reference/routing_ospf.mdx | 83 ++++--- docs/docs/reference/routing_pim.mdx | 60 ++--- docs/docs/reference/routing_policies.mdx | 38 +-- .../reference/routing_policies_aggregate.mdx | 9 +- docs/docs/reference/routing_policies_bgp.mdx | 48 ++-- docs/docs/reference/routing_policies_ospf.mdx | 28 ++- docs/docs/reference/routing_policies_pim.mdx | 28 ++- docs/docs/reference/sfp.mdx | 56 +++-- docs/docs/reference/snmp.mdx | 109 +++++---- docs/docs/reference/tenancy.mdx | 80 ++++--- docs/docs/reference/topology.mdx | 13 +- docs/docs/reference/users.mdx | 173 -------------- docs/docs/reference/vlan.mdx | 150 ++++++------ docs/docs/reference/vrf.mdx | 81 ++++--- docs/docs/reference/vrrp.mdx | 84 ++++--- experimental/azure/azure.yml | 2 +- .../circuit_service/circuit_service.yml | 6 +- .../firewall_policer/firewall_policer.yml | 2 +- experimental/infiniband/infiniband.yml | 2 +- .../location_extended/location_extended.yml | 5 +- experimental/modules_linecards/linecard.yml | 2 +- .../modules_routing_engine/routing_engine.yml | 2 +- .../optical_transport/optical_transport.yml | 14 +- experimental/qos/qos.yml | 2 +- experimental/security/security.yml | 2 +- experimental/topology/topology.yml | 8 +- .../vlan-translation/vlan-translation.yml | 2 +- extensions/aggregate/aggregate.yml | 10 +- extensions/cable/cable.yml | 50 ++-- extensions/circuit/circuit.yml | 25 +- .../circuit_contract/circuit_contract.yml | 10 +- extensions/cluster/cluster.yml | 13 +- extensions/compute/compute.yml | 24 +- extensions/cross_connect/cross_connect.yml | 23 +- extensions/device_module/device_module.yml | 55 ++++- .../device_psu_module/device_psu_module.yml | 7 +- extensions/dwdm/dwdm.yml | 114 +++++---- .../hosting_cluster/hosting_cluster.yml | 10 +- .../interface_breakout/interface_breakout.yml | 7 +- extensions/lag/lag.yml | 19 +- extensions/location_minimal/README.md | 2 + .../location_minimal/location_minimal.yml | 19 +- extensions/location_site/README.md | 2 + extensions/location_site/location_site.yml | 15 +- extensions/mlag/mlag.yml | 24 +- extensions/patch_panel/patch_panel.yml | 105 ++++---- extensions/peering_ixp/peering_ixp.yml | 40 +++- extensions/physical_disk/physical_disk.yml | 34 ++- extensions/qinq/qinq.yml | 11 +- extensions/rack/README.md | 2 + extensions/rack/rack.yml | 24 +- extensions/routing/routing.yml | 16 +- extensions/routing_aggregate/aggregate.yml | 16 +- extensions/routing_bgp/bgp.yml | 38 ++- .../routing_bgp_community/bgp_community.yml | 9 +- extensions/routing_bgp_rr/bgp_rr.yml | 10 +- extensions/routing_ospf/ospf.yml | 27 ++- extensions/routing_pim/pim.yml | 14 +- .../routing_policies/routing_policies.yml | 13 +- .../routing_policies_aggregate.yml | 10 +- .../routing_policies_bgp.yml | 17 +- .../routing_policies_ospf.yml | 13 +- .../routing_policies_pim.yml | 13 +- extensions/sfp/sfp.yml | 16 +- extensions/snmp/snmp.yml | 39 ++- extensions/tenancy/tenancy.yml | 31 ++- extensions/users/README.md | 3 - extensions/users/users.yml | 108 --------- extensions/vlan/vlan.yml | 69 +++--- extensions/vrf/vrf.yml | 29 ++- extensions/vrrp/vrrp.yml | 18 +- objects/base/01_organization.yml | 2 + objects/extensions/aggregate/aggregate.yml | 2 +- objects/extensions/circuit/circuit.yml | 88 +++---- .../device_module/device_module.yml | 6 +- .../device_psu_module/device_psu_module.yml | 8 +- objects/extensions/dwdm/dwdm.yml | 16 +- .../hosting_cluster/hosting_cluster.yml | 15 +- objects/extensions/mlag/mlag.yml | 126 ++++++---- .../extensions/patch_panel/patch_panel.yml | 12 +- .../extensions/peering_ixp/peering_ixp.yml | 9 +- objects/extensions/qinq/qinq.yml | 2 +- objects/extensions/rack/rack.yml | 2 +- .../extensions/routing_bgp/routing_bgp.yml | 6 +- .../routing_policies_aggregate.yml | 8 +- .../routing_policies_bgp.yml | 18 +- .../routing_policies_ospf.yml | 16 +- .../routing_policies_pim.yml | 20 +- objects/extensions/sfp/sfp.yml | 10 +- objects/extensions/snmp/snmp.yml | 16 +- objects/extensions/tenancy/tenancy.yml | 2 +- objects/extensions/users/users.yml | 70 ------ objects/extensions/vrf/vrf.yml | 15 +- objects/extensions/vrrp/vrrp.yml | 25 +- tasks/docs.py | 5 +- tasks/schemas.py | 53 ++++- 137 files changed, 2846 insertions(+), 2508 deletions(-) delete mode 100644 docs/docs/reference/modules.mdx delete mode 100644 docs/docs/reference/users.mdx delete mode 100644 extensions/users/README.md delete mode 100644 extensions/users/users.yml delete mode 100644 objects/extensions/users/users.yml diff --git a/.metadata.yml b/.metadata.yml index 71a72600..1f289a51 100644 --- a/.metadata.yml +++ b/.metadata.yml @@ -54,9 +54,12 @@ experimental/optical_transport: experimental/location_extended: dependencies: - base - description: - This schema extension is the most detailed when it comes to location, - you'll find all the layers you can think of. + exclusive_with: + - extensions/rack + description: >- + This schema extension is the most detailed when it comes to location, you'll find all the + layers you can think of. It defines its own hierarchical Location.Rack, incompatible with + the flat one extensions/rack defines, so load one or the other, not both. name: Location Extended experimental/modules_linecards: dependencies: @@ -90,6 +93,7 @@ experimental/security: experimental/topology: dependencies: - base + - extensions/vlan description: A schema for defining and managing network topology, strategies, and services. @@ -119,7 +123,6 @@ extensions/cable: extensions/circuit: dependencies: - base - - extensions/location_minimal description: This schema extension contains Circuits and ways to connect them with your infrastructure! The circuit could be a fiber connecting two sites, you would @@ -167,8 +170,9 @@ experimental/firewall_policer: dependencies: - base description: - This schema extension contains models for VMs. You might consider Cluster - or/and Hypervisor extension to go with! + This schema extension contains models for traffic policers and the classes + and rules that reference them, so you can describe rate limiting alongside + the interfaces it is applied to. name: Firewall Policer extensions/hosting_cluster: dependencies: @@ -199,13 +203,22 @@ extensions/lag: extensions/location_minimal: dependencies: - base - description: - This schema extension is minimal but will provide you with basic items - to store location related data. + exclusive_with: + - extensions/location_site + description: >- + This schema extension is minimal but will provide you with basic items to store location + related data, as a Region -> Country -> Site hierarchy. It defines the same Location.Site + node as extensions/location_site, so load one or the other, not both. Note that + LocationGeneric.name is unique across every location kind, so a name used at one tier + cannot be reused at another; a single-country deployment therefore enters the hierarchy at + Country (with Region as the national node) rather than duplicating a country under several + regions. name: Location Minimal extensions/location_site: dependencies: - base + exclusive_with: + - extensions/location_minimal description: >- This schema extension introduces a standalone Location.Site node (with facility, physical address, timezone, and status). It defines the same Site node as @@ -245,18 +258,17 @@ extensions/device_psu_module: extensions/patch_panel: dependencies: - base + - extensions/device_module description: | - 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. + 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. Cassettes and other inserts are tracked as regular device modules in module bays, through extensions/device_module. NOTE: This extension is compatible with all sort of connectors, meaning you can plug cable, circuits, cross-connect to front & rear interfaces! name: Patch Panel extensions/peering_ixp: dependencies: - base - - 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 @@ -273,24 +285,30 @@ extensions/physical_disk: extensions/rack: dependencies: - base - - extensions/location_minimal - description: + - extensions/location_site + exclusive_with: + - experimental/location_extended + 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. + and other equipment. LocationRack needs a Location.Site: extensions/location_site is + declared above as the smallest provider, but extensions/location_minimal provides the + same node as part of its hierarchy and satisfies the rack equally, load whichever + suits, never both. LocationRack is also defined, hierarchically and incompatibly, by + experimental/location_extended, so load one or the other, not both. name: Rack extensions/qinq: dependencies: - base - extensions/vlan description: - This schema extension brings extensions to VLAN model in order to support - QinQ. + This schema extension adds the Service VLAN and Customer VLAN nodes needed + to model QinQ on top of the VLAN extension. name: QinQ extensions/routing: dependencies: - base - - extensions/vlan + - extensions/vrf description: This schema extension contains generics to create Routing Protocol "Instance". The idea is to create one Routing Protocol instance per IpamVRF + @@ -313,13 +331,12 @@ extensions/routing_bgp: extensions/routing_bgp_community: dependencies: - base - - extensions/routing + - extensions/routing_policies description: This schema extension adds the BGP Communities models. name: Routing BGP Community extensions/routing_bgp_rr: dependencies: - base - - extensions/routing - extensions/routing_bgp description: This schema extension extend the BGP extension to add BGP Route Reflector @@ -349,9 +366,7 @@ extensions/routing_policies: extensions/routing_policies_aggregate: dependencies: - base - - extensions/routing - extensions/routing_policies - - extensions/routing_aggregate description: This extension is using the Routing Policies extensions and the Routing Aggregate one together. @@ -359,7 +374,6 @@ extensions/routing_policies_aggregate: extensions/routing_policies_bgp: dependencies: - base - - extensions/routing - extensions/routing_policies - extensions/routing_bgp description: @@ -369,7 +383,6 @@ extensions/routing_policies_bgp: extensions/routing_policies_ospf: dependencies: - base - - extensions/routing - extensions/routing_policies - extensions/routing_ospf description: @@ -379,7 +392,6 @@ extensions/routing_policies_ospf: extensions/routing_policies_pim: dependencies: - base - - extensions/routing - extensions/routing_policies - extensions/routing_pim description: @@ -406,8 +418,8 @@ extensions/snmp: - base description: 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. + Clients. A community links to the devices it is configured on; any further + wiring, to a tenant for instance, is left to you. name: SNMP extensions/tenancy: dependencies: @@ -418,11 +430,6 @@ extensions/tenancy: `tenancy.yml` for an example of how to extend tenancy onto optional extension nodes such as `DcimCircuit`. name: Tenancy -extensions/users: - dependencies: - - base - description: This schema extension contains models for account management. - name: Users extensions/vlan: dependencies: - base diff --git a/base/dcim.yml b/base/dcim.yml index 7a3d0aa6..74edd0b9 100644 --- a/base/dcim.yml +++ b/base/dcim.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -23,11 +23,12 @@ generics: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 relationships: - name: interfaces peer: DcimInterface @@ -35,6 +36,7 @@ generics: cardinality: many optional: true identifier: device__interface + order_weight: 1650 - name: tags peer: BuiltinTag kind: Attribute @@ -61,20 +63,26 @@ generics: description: Generic holding attributes and relationships relevant for physical device. include_in_menu: false attributes: - - name: name # Here for computed attribute + # Duplicated from DcimGenericDevice because generics cannot inherit generics. + # DcimModuleBay.computed_name (extensions/device_module) renders + # {{ device__name__value }} against peer DcimPhysicalDevice, so name must resolve here. + # allow_override lets DcimPatchPanel and DcimOpticalMultiplexer restate it. + - name: name kind: Text unique: true allow_override: any + optional: false + order_weight: 1000 - name: position kind: Number label: Position (U) optional: true description: Lowest unit. - order_weight: 1500 - - name: serial + order_weight: 1550 + - name: serial_number kind: Text optional: true - order_weight: 1500 + order_weight: 1400 - name: rack_face kind: Dropdown label: Rack Face @@ -88,14 +96,14 @@ generics: 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 + order_weight: 1600 relationships: - name: device_type peer: DcimDeviceType kind: Attribute cardinality: one optional: true - order_weight: 1200 + order_weight: 1150 - name: location peer: LocationHosting label: Location @@ -115,7 +123,9 @@ generics: cardinality: one optional: true identifier: connector__endpoint - order_weight: 1500 + order_weight: 1600 + # connected_endpoints is kind Attribute so both ends render inline on the connector form. + # A high-fan-out connector kind should override the relationship back to Generic. - name: Connector namespace: Dcim description: Generic Connector to link two endpoints together. @@ -148,6 +158,7 @@ generics: attributes: - name: name kind: Text + optional: false description: "Name of the interface" order_weight: 1000 - name: description @@ -211,7 +222,14 @@ generics: color: "#B2D4E6" optional: true description: "The role of the interface in the network" - order_weight: 1250 + order_weight: 1300 + - name: mtu + kind: Number + label: MTU + default_value: 1500 + optional: true + description: "Maximum transmission unit, in bytes (IP payload, not frame size)." + order_weight: 1350 relationships: - name: device peer: DcimGenericDevice @@ -219,7 +237,7 @@ generics: cardinality: one optional: false identifier: device__interface - order_weight: 1025 + order_weight: 900 - name: Layer2 namespace: Interface @@ -247,7 +265,7 @@ generics: description: "Trunk all mode" optional: true description: "Layer 2 mode of the interface" - order_weight: 1500 + order_weight: 1450 - name: Layer3 namespace: Interface @@ -286,6 +304,7 @@ nodes: description: A model of device label: Device Type icon: mdi:poll + include_in_menu: true menu_placement: DcimDevice human_friendly_id: - name__value @@ -297,6 +316,7 @@ nodes: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: description kind: Text @@ -317,6 +337,7 @@ nodes: kind: Boolean label: Full Depth default_value: true + optional: false order_weight: 1500 - name: weight kind: Number @@ -336,6 +357,7 @@ nodes: description: A Platform represent the type of software running on a device. label: Platform icon: mdi:application-cog-outline + include_in_menu: true menu_placement: DcimDevice human_friendly_id: - name__value @@ -347,11 +369,12 @@ nodes: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 1200 + order_weight: 1100 relationships: - name: devices peer: DcimGenericDevice @@ -365,12 +388,14 @@ nodes: kind: Attribute cardinality: one identifier: manufacturer__platform + optional: true order_weight: 1300 - name: Device namespace: Dcim description: A configurable network device including routers, switches... label: Network Device icon: clarity:network-switch-solid + include_in_menu: true inherit_from: - CoreArtifactTarget - DcimGenericDevice @@ -402,7 +427,7 @@ nodes: description: No longer in use and scheduled for removal. color: "#e04040" optional: false - order_weight: 1100 + order_weight: 1200 - name: role kind: Dropdown choices: @@ -431,7 +456,7 @@ nodes: description: Tor switch part of a Fabric. color: "#e8e7fd" optional: true - order_weight: 1400 + order_weight: 1300 - name: Physical namespace: Interface description: "Physical network port on a device" @@ -443,12 +468,6 @@ nodes: - InterfaceLayer3 - DcimEndpoint - InterfaceHasSubInterface - attributes: - - name: mtu - kind: Number - label: MTU - default_value: 1500 - order_weight: 1300 - name: Virtual namespace: Interface @@ -459,11 +478,14 @@ nodes: - DcimInterface - InterfaceLayer2 - InterfaceLayer3 - # - InterfaceHasSubInterface # Depending if you want your virtual interfaces to have sub interface + # Uncomment if your virtual interfaces should be able to carry sub-interfaces. + # - InterfaceHasSubInterface relationships: - name: parent_interface peer: InterfaceHasSubInterface kind: Attribute cardinality: one identifier: "sub__interface" + optional: true description: "Parent interface to which this sub-interface belongs" + order_weight: 1600 diff --git a/base/ipam.yml b/base/ipam.yml index 95e47977..bdd6cbf8 100644 --- a/base/ipam.yml +++ b/base/ipam.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,11 +13,16 @@ generics: # them without requiring users to modify their schema manually. - name: VLANGroupScope namespace: Ipam + label: VLAN Group Scope + description: >- + Mixin for objects that can scope a VLAN group (e.g. Region, Site). The reverse + relationship is added by extensions/vlan. include_in_menu: false - name: PrefixScope namespace: Ipam - description: Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). + label: Prefix Scope + description: Mixin for objects that can scope IP prefixes (e.g. Region, Site). include_in_menu: false relationships: - name: prefixes @@ -26,6 +31,7 @@ generics: cardinality: many optional: true identifier: prefix__prefix_scope + order_weight: 1550 nodes: - name: Prefix @@ -52,18 +58,18 @@ nodes: - name: active label: Active color: "#00d25b" - - name: deprecated - label: Deprecated - color: "#e04040" - name: reserved label: Reserved color: "#4d90fe" + - name: deprecated + label: Deprecated + color: "#e04040" optional: false - order_weight: 1100 + order_weight: 1200 - name: description kind: Text optional: true - order_weight: 1150 + order_weight: 1100 - name: role kind: Dropdown choices: @@ -79,16 +85,12 @@ nodes: 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" + color: "#9678B6" optional: true - order_weight: 1200 + order_weight: 1300 relationships: - name: scope peer: IpamPrefixScope @@ -96,7 +98,7 @@ nodes: cardinality: one optional: true identifier: prefix__prefix_scope - order_weight: 1300 + order_weight: 1500 - name: IPAddress namespace: Ipam @@ -118,7 +120,7 @@ nodes: - name: description kind: Text optional: true - order_weight: 1050 + order_weight: 1100 - name: status kind: Dropdown default_value: active @@ -133,7 +135,7 @@ nodes: label: Deprecated color: "#e04040" optional: false - order_weight: 1100 + order_weight: 1200 - name: role kind: Dropdown choices: @@ -147,13 +149,13 @@ nodes: label: Anycast color: "#FDFD96" optional: true - order_weight: 1150 + order_weight: 1300 - name: fqdn kind: Text label: FQDN regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Country -> Site hierarchy. It defines the same Location.Site node as extensions/location_site, so load one or the other, not both. Note that LocationGeneric.name is unique across every location kind, so a name used at one tier cannot be reused at another; a single-country deployment therefore enters the hierarchy at Country (with Region as the national node) rather than duplicating a country under several regions. | | **[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 | -| **[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! | +| **[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. Cassettes and other inserts are tracked as regular device modules in module bays, through extensions/device_module. 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. | +| **[QinQ](./reference/qinq.mdx)** | This schema extension adds the Service VLAN and Customer VLAN nodes needed to model QinQ on top of the VLAN extension. | +| **[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. LocationRack needs a Location.Site: extensions/location_site is declared above as the smallest provider, but extensions/location_minimal provides the same node as part of its hierarchy and satisfies the rack equally, load whichever suits, never both. LocationRack is also defined, hierarchically and incompatibly, by experimental/location_extended, so load one or the other, not both. | | **[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. | @@ -143,9 +143,8 @@ This list provides an overview of the schemas available in this repository. Each | **[Routing Policies BGP](./reference/routing_policies_bgp.mdx)** | This extension is using the Routing Policies extensions and the Routing BGP one together. | | **[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. | +| **[SNMP](./reference/snmp.mdx)** | This schema extension contains models for SNMP Communities and SNMP Clients. A community links to the devices it is configured on; any further wiring, to a tenant for instance, is left to you. | | **[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. | | **[VRRP](./reference/vrrp.mdx)** | This schema extension contains models for VRRP. | diff --git a/docs/docs/reference/aggregate.mdx b/docs/docs/reference/aggregate.mdx index d776ea9b..5b9ce714 100644 --- a/docs/docs/reference/aggregate.mdx +++ b/docs/docs/reference/aggregate.mdx @@ -17,6 +17,8 @@ This schema extension contains models to capture IP aggregates assigned by a Reg - **Description:** An aggregate is a top-level IPv4 or IPv6 prefix assigned by a RIR. - **Namespace:** Ipam - **Icon:** mdi:ip-network +- **Uniqueness Constraints:** + - prefix__value - **Human Friendly ID:** prefix__value - **Inherit From:** BuiltinIPPrefix @@ -45,7 +47,7 @@ This schema extension contains models to capture IP aggregates assigned by a Reg | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| is_private | Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. | Boolean | | False | | +| private | Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. | Boolean | False | False | | #### Relationships @@ -63,33 +65,35 @@ 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: BuiltinIPAM + inherit_from: + - BuiltinIPPrefix + human_friendly_id: + - prefix__value order_by: - prefix__value display_label: prefix__value - human_friendly_id: - - prefix__value - inherit_from: - - BuiltinIPPrefix + uniqueness_constraints: + - - prefix__value 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 namespace: Organization @@ -98,23 +102,25 @@ nodes: label: RIR icon: mdi:certificate include_in_menu: true + menu_placement: OrganizationGeneric inherit_from: - OrganizationGeneric attributes: - - name: is_private + - name: private + kind: Boolean label: Private + default_value: false + optional: false 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 + cardinality: many + optional: true + identifier: aggregate__rir order_weight: 1400 ``` \ No newline at end of file diff --git a/docs/docs/reference/cable.mdx b/docs/docs/reference/cable.mdx index 5d17f721..fc414626 100644 --- a/docs/docs/reference/cable.mdx +++ b/docs/docs/reference/cable.mdx @@ -17,6 +17,7 @@ This schema extension contains a basic Cable model allowing you to connect two e - **Description:** Physical cable connecting two endpoints - **Namespace:** Dcim - **Icon:** mdi:cable-data +- **Human Friendly ID:** label__value - **Inherit From:** DcimConnector #### Attributes @@ -24,8 +25,8 @@ This schema extension contains a basic Cable model allowing you to connect two e | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | 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 | +| 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 | | | | length | | Number | True | | | @@ -39,31 +40,32 @@ nodes: description: Physical cable connecting two endpoints label: Cable icon: mdi:cable-data - display_label: label__value + include_in_menu: true menu_placement: DcimDevice - order_by: - - label__value inherit_from: - DcimConnector + human_friendly_id: + - label__value + 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 - description: Fully operational and currently in connected + description: Fully operational and currently connected color: '#00d25b' - name: planned label: Planned description: In the process of being set up color: '#2196f3' + optional: false + order_weight: 1200 - name: cable_type kind: Dropdown - optional: true - order_weight: 1100 choices: - name: cat3 label: CAT3 @@ -97,39 +99,39 @@ nodes: label: CAT8 description: Category 8 twisted pair cable. color: '#99ccff' - - name: mmf-om1 + - name: mmf_om1 label: Multimode Fiber OM1 description: "Multimode fiber (62.5/125 \xB5m)." color: '#ff9933' - - name: mmf-om2 + - name: mmf_om2 label: Multimode Fiber OM2 description: "Multimode fiber (50/125 \xB5m)." color: '#ff9933' - - name: mmf-om3 + - name: mmf_om3 label: Multimode Fiber OM3 description: "Optimized multimode fiber (50/125 \xB5m)." color: '#ff9933' - - name: mmf-om4 + - name: mmf_om4 label: Multimode Fiber OM4 description: "Enhanced multimode fiber (50/125 \xB5m)." color: '#ff9933' - - name: mmf-om5 + - name: mmf_om5 label: Multimode Fiber OM5 description: "Wideband multimode fiber (50/125 \xB5m)." color: '#ff9933' - - name: smf-os1 + - name: smf_os1 label: Singlemode Fiber OS1 description: Standard singlemode fiber. color: '#ffcc00' - - name: smf-os2 + - name: smf_os2 label: Singlemode Fiber OS2 description: Improved singlemode fiber. color: '#ffcc00' - - name: dac-passive + - name: dac_passive label: Passive DAC description: Direct Attach Copper (Passive). color: '#a0a0a0' - - name: dac-active + - name: dac_active label: Active DAC description: Direct Attach Copper (Active). color: '#a0a0a0' @@ -141,7 +143,7 @@ nodes: label: Coaxial description: Coaxial cable for broadband. color: '#000000' - - name: mrj21-trunk + - name: mrj21_trunk label: MRJ21 Trunk description: High-density copper cable. color: '#000000' @@ -153,12 +155,12 @@ nodes: label: USB description: Universal Serial Bus cable. color: '#000000' + optional: true + order_weight: 1100 - name: color kind: Dropdown - optional: true - order_weight: 1300 choices: - - name: dark-red + - name: dark_red label: Dark Red color: '#aa1409' - name: red @@ -176,7 +178,7 @@ nodes: - name: purple label: Purple color: '#9c27b0' - - name: dark-purple + - name: dark_purple label: Dark Purple color: '#673ab7' - name: indigo @@ -185,7 +187,7 @@ nodes: - name: blue label: Blue color: '#2196f3' - - name: light-blue + - name: light_blue label: Light Blue color: '#03a9f4' - name: cyan @@ -197,13 +199,13 @@ nodes: - name: aqua label: Aqua color: '#00ffff' - - name: dark-green + - name: dark_green label: Dark Green color: '#2f6a31' - name: green label: Green color: '#4caf50' - - name: light-green + - name: light_green label: Light Green color: '#8bc34a' - name: lime @@ -218,31 +220,34 @@ nodes: - name: orange label: Orange color: '#ff9800' - - name: dark-orange + - name: dark_orange label: Dark Orange color: '#ff5722' - name: brown label: Brown color: '#795548' - - name: light-grey + - name: light_grey label: Light Grey color: '#c0c0c0' - name: grey label: Grey color: '#9e9e9e' - - name: dark-grey + - name: dark_grey label: Dark Grey color: '#607d8b' - name: black label: Black color: '#111111' + optional: true + order_weight: 1300 - name: label kind: Text + unique: true optional: true - order_weight: 1200 + order_weight: 1000 - name: length - label: Length (in cm) kind: Number + label: Length (in cm) optional: true order_weight: 1350 diff --git a/docs/docs/reference/circuit.mdx b/docs/docs/reference/circuit.mdx index 3cb59c39..50014182 100644 --- a/docs/docs/reference/circuit.mdx +++ b/docs/docs/reference/circuit.mdx @@ -8,7 +8,6 @@ This schema extension contains Circuits and ways to connect them with your infra - **Dependencies:** - [base](dcim) - - [extensions/location_minimal](location_minimal) ## Nodes @@ -24,7 +23,7 @@ This schema extension contains Circuits and ways to connect them with your infra | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| circuit_id | | Text | | | | +| circuit_id | | Text | False | | | | description | | Text | True | | | | commit_rate | | Number | True | | | | circuit_type | Specifies the type of circuit. | Dropdown | True | | internet_access, point_to_point, peering, dark_fiber, mpls | @@ -40,7 +39,7 @@ This schema extension contains Circuits and ways to connect them with your infra ### CircuitEndpoint - **Label:** Circuit Endpoint -- **Description:** A circuit endpoint, could be a position in a MMR... +- **Description:** One of the two terminations (A or Z) of a circuit, at the location where the provider hands the circuit off. - **Namespace:** Dcim - **Icon:** mdi:ethernet - **Uniqueness Constraints:** @@ -78,7 +77,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| circuits | DcimCircuit | True | many | | +| circuits | DcimCircuit | True | many | Generic | ### LocationHosting @@ -86,7 +85,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| circuit_endpoints | DcimCircuitEndpoint | True | many | | +| circuit_endpoints | DcimCircuitEndpoint | True | many | Generic | ## Code @@ -98,6 +97,7 @@ nodes: description: A Circuit represent service operated by a provider. label: Circuit icon: mdi:cable-data + include_in_menu: true human_friendly_id: - circuit_id__value order_by: @@ -107,18 +107,19 @@ nodes: - name: circuit_id kind: Text unique: true + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 - name: commit_rate - label: Commit Rate (Kbps) kind: Number + label: Commit Rate (Kbps) optional: true - order_weight: 1100 + order_weight: 1400 - name: circuit_type kind: Dropdown - optional: true - description: Specifies the type of circuit. choices: - name: internet_access label: Internet Access @@ -140,9 +141,11 @@ nodes: label: MPLS description: Multi-Protocol Label Switching circuit for QoS-based routing. color: '#7f00ff' + optional: true + description: Specifies the type of circuit. + order_weight: 1300 - name: status kind: Dropdown - optional: false default_value: active choices: - name: active @@ -161,42 +164,46 @@ nodes: label: Drained description: Temporarily taken out of service. color: '#9e9e9e' + optional: false + order_weight: 1200 relationships: - name: provider peer: OrganizationProvider - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false identifier: circuit__provider + order_weight: 1500 - name: endpoints peer: DcimCircuitEndpoint - optional: true - cardinality: many kind: Component + cardinality: many + optional: true identifier: circuit__endpoint + order_weight: 1600 - name: CircuitEndpoint namespace: Dcim - description: A circuit endpoint, could be a position in a MMR... + description: One of the two terminations (A or Z) of a circuit, at the location + where the provider hands the circuit off. label: Circuit Endpoint - inherit_from: - - DcimEndpoint icon: mdi:ethernet + include_in_menu: true 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 @@ -204,17 +211,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 @@ -233,40 +241,47 @@ nodes: label: Drained description: Temporarily taken out of service. color: '#9e9e9e' + optional: false + order_weight: 1200 - name: description kind: Text optional: true + order_weight: 1100 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 relationships: - name: circuits peer: DcimCircuit + kind: Generic cardinality: many optional: true identifier: circuit__provider + order_weight: 1300 - kind: LocationHosting relationships: - name: circuit_endpoints peer: DcimCircuitEndpoint + kind: Generic cardinality: many optional: true identifier: circuit_endpoint__location + order_weight: 1700 ``` \ No newline at end of file diff --git a/docs/docs/reference/circuit_contract.mdx b/docs/docs/reference/circuit_contract.mdx index c1dc7291..aa9c421a 100644 --- a/docs/docs/reference/circuit_contract.mdx +++ b/docs/docs/reference/circuit_contract.mdx @@ -51,7 +51,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| contract | DcimCircuitContract | True | one | | +| contract | DcimCircuitContract | True | one | Generic | ## Code @@ -60,13 +60,14 @@ 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 + include_in_menu: true menu_placement: DcimCircuit + inherit_from: + - CoreFileObject human_friendly_id: - name__value order_by: @@ -75,23 +76,26 @@ nodes: attributes: - name: name kind: Text + read_only: true computed_attribute: kind: Jinja2 jinja2_template: contract_{{ circuit__circuit_id__value }} - read_only: true optional: false + order_weight: 1000 - name: contract_start kind: DateTime optional: false + order_weight: 1200 - name: contract_end kind: DateTime optional: false + order_weight: 1300 - name: monthly_cost kind: Number optional: true + order_weight: 1400 - name: currency kind: Dropdown - optional: true choices: - name: usd label: USD @@ -102,22 +106,26 @@ nodes: - name: gbp label: GBP description: British Pound Sterling + optional: true + order_weight: 1450 relationships: - name: circuit peer: DcimCircuit kind: Attribute cardinality: one optional: false - order_weight: 950 identifier: circuit__contract + order_weight: 950 extensions: nodes: - kind: DcimCircuit relationships: - name: contract peer: DcimCircuitContract + kind: Generic cardinality: one optional: true identifier: circuit__contract + order_weight: 1550 ``` \ No newline at end of file diff --git a/docs/docs/reference/circuit_service.mdx b/docs/docs/reference/circuit_service.mdx index b2b0aaeb..fe04d595 100644 --- a/docs/docs/reference/circuit_service.mdx +++ b/docs/docs/reference/circuit_service.mdx @@ -36,7 +36,7 @@ For example you have a MPLS network supported by a provider connecting multiple | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | provider | OrganizationProvider | False | one | Attribute | -| circuit_endpoints | CircuitEndpoint | True | many | Component | +| circuit_endpoints | DcimCircuitEndpoint | True | many | Component | ## Extensions @@ -54,7 +54,7 @@ In this context "extensions" refer to modifications or additions to the existing | ---- | ---- | -------- | ----------- | ---- | | circuit_services | CircuitService | True | many | | -### CircuitEndpoint +### DcimCircuitEndpoint #### Relationships @@ -96,7 +96,7 @@ nodes: cardinality: one kind: Attribute - name: circuit_endpoints - peer: CircuitEndpoint + peer: DcimCircuitEndpoint optional: true cardinality: many kind: Component @@ -108,7 +108,7 @@ extensions: peer: CircuitService cardinality: many optional: true - - kind: CircuitEndpoint + - kind: DcimCircuitEndpoint relationships: - name: circuit_service peer: CircuitService diff --git a/docs/docs/reference/cluster.mdx b/docs/docs/reference/cluster.mdx index 40a64d47..047eb08d 100644 --- a/docs/docs/reference/cluster.mdx +++ b/docs/docs/reference/cluster.mdx @@ -23,14 +23,14 @@ This schema extension contains the foundations to capture clusters. With this on | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the cluster. | Text | | | | +| name | Name of the cluster. | Text | False | | | | description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| location | LocationGeneric | False | many | Attribute | +| locations | LocationGeneric | False | many | Attribute | | tags | BuiltinTag | True | many | Attribute | ### GenericComputeUnitNodes @@ -42,7 +42,7 @@ This schema extension contains the foundations to capture clusters. With this on | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| nodes | ComputeGenericUnit | | many | Component | +| nodes | ComputeGenericUnit | True | many | Component | ## Extensions @@ -58,7 +58,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| worker_in_cluster | ClusterGenericComputeUnitNodes | True | one | | +| worker_in_cluster | ClusterGenericComputeUnitNodes | True | one | Generic | ### LocationGeneric @@ -86,25 +86,27 @@ generics: attributes: - name: name kind: Text - description: Name of the cluster. unique: true + optional: false + description: Name of the cluster. order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 relationships: - - name: location - label: Location + - name: locations peer: LocationGeneric - optional: false - cardinality: many + label: Locations 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 namespace: Cluster @@ -113,30 +115,35 @@ 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 + optional: true + order_weight: 1500 extensions: nodes: - kind: ComputeGenericUnit relationships: - name: worker_in_cluster - identifier: worker_in_cluster - label: Worker in cluster peer: ClusterGenericComputeUnitNodes + kind: Generic + 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. + order_weight: 1900 - 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. + order_weight: 1650 ``` \ No newline at end of file diff --git a/docs/docs/reference/compute.mdx b/docs/docs/reference/compute.mdx index e003eac6..50a770b7 100644 --- a/docs/docs/reference/compute.mdx +++ b/docs/docs/reference/compute.mdx @@ -52,6 +52,7 @@ With this schema extension in place you will be able to capture all your physica ### GenericUnit +- **Label:** Compute - **Description:** A generic unit that can compute (e.g. server, vm ...). - **Namespace:** Compute @@ -74,25 +75,28 @@ generics: - name: GenericUnit namespace: Compute description: A generic unit that can compute (e.g. server, vm ...). - include_in_menu: false + label: Compute + include_in_menu: true - 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 + cardinality: many optional: true identifier: host__virtual_machine + order_weight: 1450 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 + include_in_menu: true + menu_placement: ComputeGenericUnit inherit_from: - ComputeGenericUnit - DcimGenericDevice @@ -101,9 +105,7 @@ nodes: attributes: - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -121,11 +123,14 @@ nodes: label: Drained description: Temporarily taken out of service. color: '#9e9e9e' + optional: false + order_weight: 1200 - name: VirtualMachine namespace: Virtualization description: A virtual machine hosted on a server or a cluster. label: Virtual Machine icon: carbon:virtual-machine + menu_placement: ComputeGenericUnit include_in_menu: true inherit_from: - ComputeGenericUnit @@ -133,36 +138,38 @@ nodes: attributes: - name: role kind: Dropdown - optional: true - description: Role of the virtual machine. - order_weight: 1400 choices: - name: application + label: Application color: '#7f7fff' - name: storage + label: Storage color: '#bf7fbf' + optional: true + description: Role of the virtual machine. + order_weight: 1300 - name: vcpu kind: Number optional: true - order_weight: 1900 description: Number of CPU cores assigned to the VM. + order_weight: 1400 - name: memory kind: Number optional: true - order_weight: 1900 description: Amount of memory (in GB) assigned to the VM. + order_weight: 1450 - name: disk kind: Number optional: true - order_weight: 1900 description: Disk space (in GB) assigned to the VM. + order_weight: 1500 relationships: - name: host peer: VirtualizationHostVirtualMachine - optional: false - cardinality: one kind: Attribute - order_weight: 1500 + cardinality: one + optional: false identifier: host__virtual_machine + order_weight: 1350 ``` \ No newline at end of file diff --git a/docs/docs/reference/cross_connect.mdx b/docs/docs/reference/cross_connect.mdx index 5ae365af..3ef6e933 100644 --- a/docs/docs/reference/cross_connect.mdx +++ b/docs/docs/reference/cross_connect.mdx @@ -26,9 +26,9 @@ This extension contains schema to capture Cross Connect. You can see it as "a ca | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| identifier | | Text | | | | +| identifier | | Text | False | | | | description | | Text | True | | | -| status | | Dropdown | True | | connected, planned, reserved | +| status | | Dropdown | False | planned | connected, planned, reserved | #### Relationships @@ -47,55 +47,58 @@ nodes: description: Cross-connect between different endpoints within a datacenter. label: Cross-Connect icon: streamline:arrow-crossover-right-solid + include_in_menu: true 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: - name: identifier kind: Text - order_weight: 900 + optional: false + order_weight: 1000 - name: description kind: Text optional: true - order_weight: 1300 + order_weight: 1100 - name: status kind: Dropdown - optional: true - order_weight: 1200 + default_value: planned choices: - name: connected label: Connected - description: Fully operational and currently in connected - color: '#7fbf7f' + description: Fully operational and currently connected + color: '#00d25b' - name: planned label: Planned description: In the process of being set up - color: '#ffff7f' + color: '#2196f3' - name: reserved label: Reserved description: Fully connected and reserved for a future use - color: '#9090de' + color: '#4d90fe' + optional: false + order_weight: 1200 relationships: - name: location - label: Location peer: LocationHosting - optional: false - cardinality: one + label: Location kind: Attribute - order_weight: 1100 + cardinality: one + optional: false + order_weight: 1400 - name: provider peer: OrganizationProvider - optional: false - cardinality: one kind: Attribute - order_weight: 1000 + cardinality: one + optional: false + order_weight: 1300 ``` \ No newline at end of file diff --git a/docs/docs/reference/dcim.mdx b/docs/docs/reference/dcim.mdx index 0b8ed0c3..49d628a4 100644 --- a/docs/docs/reference/dcim.mdx +++ b/docs/docs/reference/dcim.mdx @@ -22,11 +22,11 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | | part_number | | Text | True | | | | height | | Number | False | 1 | | -| full_depth | | Boolean | | True | | +| full_depth | | Boolean | False | True | | | weight | | Number | True | | | #### Relationships @@ -47,7 +47,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships @@ -55,7 +55,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | devices | DcimGenericDevice | True | many | Generic | -| manufacturer | OrganizationManufacturer | | one | Attribute | +| manufacturer | OrganizationManufacturer | True | one | Attribute | ### Device @@ -79,12 +79,6 @@ 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 @@ -96,7 +90,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| parent_interface | InterfaceHasSubInterface | | one | Attribute | +| parent_interface | InterfaceHasSubInterface | True | one | Attribute | ## Generics @@ -112,7 +106,7 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships @@ -133,9 +127,9 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | position | Lowest unit. | Number | True | | | -| serial | | Text | True | | | +| serial_number | | Text | True | | | | rack_face | On which face of the rack the device is mounted. | Dropdown | False | front | front, rear | #### Relationships @@ -181,10 +175,11 @@ Basic DCIM schema to capture devices, racks, interfaces, and related information | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the interface | Text | | | | +| name | Name of the interface | Text | False | | | | description | A brief description of the interface | Text | True | | | | 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 | +| mtu | Maximum transmission unit, in bytes (IP payload, not frame size). | Number | True | 1500 | | #### Relationships @@ -248,39 +243,41 @@ generics: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 relationships: - name: interfaces peer: DcimInterface - optional: true + kind: Component cardinality: many + optional: true identifier: device__interface - kind: Component + order_weight: 1650 - 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 @@ -291,23 +288,22 @@ generics: kind: Text unique: true allow_override: any + optional: false + order_weight: 1000 - name: position - label: Position (U) - description: Lowest unit. kind: Number + label: Position (U) optional: true - order_weight: 1500 - - name: serial + description: Lowest unit. + order_weight: 1550 + - name: serial_number kind: Text optional: true - order_weight: 1500 + order_weight: 1400 - 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 @@ -315,21 +311,24 @@ 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: 1600 relationships: - name: device_type peer: DcimDeviceType - optional: true - cardinality: one kind: Attribute - order_weight: 1200 + cardinality: one + optional: true + order_weight: 1150 - 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. @@ -337,11 +336,11 @@ generics: relationships: - name: connector peer: DcimConnector - optional: true - cardinality: one - order_weight: 1500 kind: Attribute + cardinality: one + optional: true identifier: connector__endpoint + order_weight: 1600 - name: Connector namespace: Dcim description: Generic Connector to link two endpoints together. @@ -349,11 +348,11 @@ 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 @@ -361,19 +360,20 @@ 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 + optional: false description: Name of the interface order_weight: 1000 - name: description @@ -383,8 +383,6 @@ generics: order_weight: 1100 - name: status kind: Dropdown - description: The status of the interface - optional: false default_value: active choices: - name: provisioning @@ -407,11 +405,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 @@ -437,30 +435,38 @@ generics: label: Upstream Interface description: Interface dedicated to upstream traffic between networks. color: '#B2D4E6' - order_weight: 1250 + optional: true + description: The role of the interface in the network + order_weight: 1300 + - name: mtu + kind: Number + label: MTU + default_value: 1500 + optional: true + description: Maximum transmission unit, in bytes (IP payload, not frame size). + order_weight: 1350 relationships: - name: device peer: DcimGenericDevice - identifier: device__interface - optional: false - cardinality: one kind: Parent - order_weight: 1025 + cardinality: one + optional: false + identifier: device__interface + order_weight: 900 - 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 @@ -471,21 +477,22 @@ generics: - name: trunk_all label: Trunk (All) description: Trunk all mode + optional: true description: Layer 2 mode of the interface - order_weight: 1500 + order_weight: 1450 - 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 - name: HasSubInterface @@ -494,12 +501,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 nodes: @@ -508,102 +515,107 @@ nodes: description: A model of device label: Device Type icon: mdi:poll + include_in_menu: true 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 unique: true + optional: false order_weight: 1000 - name: description kind: Text 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 + optional: false 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. label: Platform icon: mdi:application-cog-outline + include_in_menu: true 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 unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 1200 + order_weight: 1100 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 + optional: true + 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 + include_in_menu: true 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 @@ -625,10 +637,10 @@ nodes: label: Deprecated description: No longer in use and scheduled for removal. color: '#e04040' + optional: false + order_weight: 1200 - name: role kind: Dropdown - optional: true - order_weight: 1400 choices: - name: core label: Core Router @@ -654,38 +666,36 @@ nodes: label: Tor Switch description: Tor switch part of a Fabric. color: '#e8e7fd' + optional: true + order_weight: 1300 - 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 - 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 - include_in_menu: false relationships: - name: parent_interface peer: InterfaceHasSubInterface - cardinality: one kind: Attribute + cardinality: one identifier: sub__interface + optional: true description: Parent interface to which this sub-interface belongs + order_weight: 1600 ``` \ No newline at end of file diff --git a/docs/docs/reference/device_module.mdx b/docs/docs/reference/device_module.mdx index 43bc6799..8c00ec82 100644 --- a/docs/docs/reference/device_module.mdx +++ b/docs/docs/reference/device_module.mdx @@ -21,7 +21,6 @@ NOTE: This extension ships a standard Module/ModuleType node pair ready to use, - **Icon:** mdi:tray - **Uniqueness Constraints:** - device, name__value - - device, position__value - **Human Friendly ID:** computed_name__value #### Attributes @@ -29,9 +28,10 @@ NOTE: This extension ships a standard Module/ModuleType node pair ready to use, | 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 | | | +| name | Name of the bay, e.g. 'slot 1' or 'psu 1'. | Text | False | | | +| position | Numeric position of the bay within the device (e.g. slot 1, 2, 3). | Number | True | | | | description | | Text | True | | | +| role | The role of the module bay, indicating the type of module it is intended to receive. | Dropdown | True | | supervisor, line_card, power_supply, fan | #### Relationships @@ -82,9 +82,10 @@ NOTE: This extension ships a standard Module/ModuleType node pair ready to use, | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| computed_name | | Text | False | | | +| computed_name | Name computed from the module bay; concrete module kinds may refine it. | Text | False | | | | serial_number | Serial number of the module, if known. | Text | True | | | | description | | Text | True | | | +| status | Operational status of the module. | Dropdown | False | active | provisioning, active, maintenance, failed, rma | #### Relationships @@ -106,7 +107,7 @@ NOTE: This extension ships a standard Module/ModuleType node pair ready to use, | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the module type. | Text | | | | +| name | Name of the module type. | Text | False | | | | description | Description of the module type. | Text | True | | | | part_number | Part number of the module. | Text | True | | | @@ -143,34 +144,67 @@ generics: a module bay. label: Module icon: mdi:expansion-card + include_in_menu: true human_friendly_id: - computed_name__value display_label: computed_name__value attributes: - name: computed_name kind: Text + unique: true read_only: true optional: false - unique: true allow_override: any + computed_attribute: + kind: Jinja2 + jinja2_template: '{{ module_bay__computed_name__value }}' + description: Name computed from the module bay; concrete module kinds may refine + it. order_weight: 1000 - name: serial_number kind: Text optional: true description: Serial number of the module, if known. - order_weight: 1100 + order_weight: 1400 - name: description kind: Text optional: true + order_weight: 1100 + - name: status + kind: Dropdown + default_value: active + choices: + - name: provisioning + label: Provisioning + description: Module is being installed and provisioned. + color: '#f0ad4e' + - name: active + label: Active + description: Module is installed and operational. + color: '#00d25b' + - name: maintenance + label: Maintenance + description: Module is under maintenance. + color: '#ff9800' + - name: failed + label: Failed + description: Module is still installed but is not operational. + color: '#e04040' + - name: rma + label: RMA + description: Module has failed and is being returned to the manufacturer. + color: '#6c757d' + optional: false + description: Operational status of the module. order_weight: 1200 relationships: - name: module_bay - label: Module Bay peer: DcimModuleBay - identifier: module_bay__module - optional: false - cardinality: one + label: Module Bay kind: Attribute + cardinality: one + optional: false + identifier: module_bay__module order_weight: 900 - name: GenericModuleType namespace: Dcim @@ -178,20 +212,22 @@ generics: and manufacturer. label: Module Type icon: mdi:database-cog + include_in_menu: true 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 unique: true + optional: false description: Name of the module type. order_weight: 1000 - name: description @@ -200,18 +236,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 nodes: @@ -220,61 +256,83 @@ nodes: description: A physical bay on a device that can receive a module. label: Module Bay icon: mdi:tray + include_in_menu: true 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 kind: Text + optional: false 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 + optional: true parameters: min_value: 1 + description: Numeric position of the bay within the device (e.g. slot 1, 2, 3). order_weight: 1050 - name: description kind: Text optional: true order_weight: 1100 + - name: role + kind: Dropdown + optional: true + description: The role of the module bay, indicating the type of module it is intended + to receive. + order_weight: 1300 + choices: + - name: supervisor + label: Supervisor + description: Bay intended for a supervisor / routing engine module. + color: '#A9CCE3' + - name: line_card + label: Line Card + description: Bay intended for a line card module. + color: '#B4E0DC' + - name: power_supply + label: Power Supply + description: Bay intended for a power supply module. + color: '#E3DAC9' + - name: fan + label: Fan + description: Bay intended for a fan module. + color: '#D2B4DE' relationships: - name: device - label: Device peer: DcimPhysicalDevice - identifier: device__module_bays - optional: false - cardinality: one + label: Device 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 namespace: Dcim @@ -287,21 +345,21 @@ 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 namespace: Dcim @@ -316,12 +374,13 @@ 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. + order_weight: 1750 ``` \ No newline at end of file diff --git a/docs/docs/reference/device_psu_module.mdx b/docs/docs/reference/device_psu_module.mdx index 3ce6d53a..71c3a897 100644 --- a/docs/docs/reference/device_psu_module.mdx +++ b/docs/docs/reference/device_psu_module.mdx @@ -45,7 +45,7 @@ This schema extension adds a PSU (Power Supply Unit) flavor on top of the generi | 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 | | +| hot_swappable | Whether the PSU can be replaced without powering down the device. | Boolean | False | False | | ## Code @@ -63,21 +63,21 @@ 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 namespace: Dcim @@ -90,16 +90,19 @@ nodes: - DcimGenericModuleType attributes: - name: wattage - description: Wattage in watts. kind: Number + label: Wattage (W) optional: true + parameters: + min_value: 1 + description: Wattage in watts. order_weight: 1300 - - name: hotswappable - label: Hot-Swappable - description: Whether the PSU can be replaced without powering down the device. + - name: hot_swappable 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 ``` \ No newline at end of file diff --git a/docs/docs/reference/dwdm.mdx b/docs/docs/reference/dwdm.mdx index 81c9cff6..60718db8 100644 --- a/docs/docs/reference/dwdm.mdx +++ b/docs/docs/reference/dwdm.mdx @@ -25,8 +25,8 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | -| wdm_type | Type of WDM (e.g CWDM. DWDM) | Dropdown | False | dwdm | cwdm, dwdm | +| name | | Text | False | | | +| wdm_type | Type of WDM technology (e.g. CWDM, DWDM) | Dropdown | False | dwdm | cwdm, dwdm | | description | | Text | True | | | #### Relationships @@ -39,6 +39,7 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su ### OadmFrontInterface - **Label:** Optical Multiplexer Front Interfaces +- **Description:** Client-side interface of an optical add-drop multiplexer, carrying a single channel. - **Namespace:** Dcim - **Uniqueness Constraints:** - optical_multiplexer, name__value @@ -55,6 +56,7 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su ### OadmRearInterface - **Label:** Optical Multiplexer Rear Interfaces +- **Description:** Line-side interface of an optical add-drop multiplexer, carrying the multiplexed signal. - **Namespace:** Dcim - **Uniqueness Constraints:** - optical_multiplexer, name__value @@ -82,10 +84,10 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| channel | WDM channel number. | Number | | | | -| wdm_type | Type of WDM (e.g CWDM. DWDM) | Dropdown | False | dwdm | cwdm, dwdm | -| wavelength | Wavelength of the channel in nm. | Text | | | | -| frequency | Frequency of the channel in GHz. | Text | | | | +| channel | WDM channel number. | Number | False | | | +| wdm_type | Type of WDM technology (e.g. CWDM, DWDM) | Dropdown | False | dwdm | cwdm, dwdm | +| wavelength | Wavelength of the channel in nm. | Text | False | | | +| frequency | Frequency of the channel in GHz. | Text | False | | | ### WdmSFP @@ -99,7 +101,7 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| wdm_type | Type of WDM (e.g CWDM. DWDM) | Dropdown | False | dwdm | cwdm, dwdm | +| wdm_type | Type of WDM technology (e.g. CWDM, DWDM) | Dropdown | False | dwdm | cwdm, dwdm | #### Relationships @@ -112,6 +114,7 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su ### GenericOadmInterface - **Label:** Optical Multiplexer Interfaces +- **Description:** Generic interface of an optical add-drop multiplexer, front or rear. - **Namespace:** Dcim - **Icon:** mdi:ethernet @@ -119,9 +122,9 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | -| 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 | +| connector_type | | Dropdown | False | | 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, urm_p4, urm_p8, splice | ## Code @@ -129,131 +132,143 @@ This schema extension contains models for OADM (Optical Add Drop Multiplexer) su version: '1.0' generics: - name: GenericOadmInterface - label: Optical Multiplexer Interfaces - menu_placement: DcimOpticalMultiplexer namespace: Dcim + description: Generic interface of an optical add-drop multiplexer, front or rear. + label: Optical Multiplexer Interfaces icon: mdi:ethernet + include_in_menu: true + menu_placement: DcimOpticalMultiplexer attributes: - name: name kind: Text + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 - name: connector_type kind: Dropdown - optional: true - order_weight: 1100 choices: - - name: FC + - name: fc label: FC description: Standardized fiber optic connector used primarily in datacom and telecom applications. - - name: LC + - name: lc label: LC description: Compact fiber optic connector with a push-pull mechanism. - - name: LC_PC + - name: lc_pc label: LC/PC description: Polished LC connector providing physical contact (PC). - - name: LC_UPC + - name: lc_upc label: LC/UPC description: Ultra-Physical Contact (UPC) variant of the LC connector with enhanced polish. - - name: LC_APC + - name: lc_apc label: LC/APC description: Angled Physical Contact (APC) version of the LC connector with a slanted fiber end-face. - - name: LSH + - name: lsh label: LSH description: European fiber optic connector offering high durability. - - name: LSH_PC + - name: lsh_pc label: LSH/PC description: Physical Contact version of LSH with standard polish. - - name: LSH_UPC + - name: lsh_upc label: LSH/UPC description: Ultra-Physical Contact variant of LSH, minimizing return loss with a superior polish. - - name: LSH_APC + - name: lsh_apc label: LSH/APC description: Angled Physical Contact version of LSH, designed to reduce back reflections. - - name: LX_5 + - name: lx_5 label: LX.5 description: Miniaturized fiber optic connector similar to LC but with an additional shutter mechanism. - - name: LX_5_PC + - name: lx_5_pc label: LX.5/PC description: Physical Contact version of LX.5. - - name: LX_5_UPC + - name: lx_5_upc label: LX.5/UPC description: Ultra-Physical Contact variant of LX.5. - - name: LX_5_APC + - name: lx_5_apc label: LX.5/APC description: Angled Physical Contact version of LX.5. - - name: MPO + - name: mpo label: MPO description: Multi-fiber Push-On connector typically used in data centers for high-speed applications. - - name: MTRJ + - name: mtrj label: MTRJ description: Male-to-female fiber optic connector with two fibers. - - name: SC + - name: sc label: SC description: Square fiber optic connector with push-pull lock. - - name: SC_PC + - name: sc_pc label: SC/PC description: Physical Contact SC connector with a polished end-face. - - name: SC_UPC + - name: sc_upc label: SC/UPC description: Ultra-Physical Contact variant of SC. - - name: SC_APC + - name: sc_apc label: SC/APC description: Angled Physical Contact version of SC. - - name: ST + - name: st label: ST description: Bayonet-style fiber optic connector primarily used in industrial and military applications. - - name: CS + - name: cs label: CS description: Compact connector with a high-density duplex configuration. - - name: SN + - name: sn label: SN description: Small-form connector with dual fibers. - - name: SMA_905 + - name: sma_905 label: SMA 905 description: Stainless steel fiber optic connector. - - name: SMA_906 + - name: sma_906 label: SMA 906 description: Variant of SMA 905 with similar durability, frequently used in high-vibration settings. - - name: URM_P2 + - name: urm_p2 label: URM-P2 description: Specialized fiber optic connector for industrial and harsh environments. + - name: urm_p4 + label: URM-P4 + description: Similar to URM-P2 but designed for higher performance. + - name: urm_p8 + label: URM-P8 + description: Enhanced version of URM connectors with higher protection. + - name: splice + label: Splice + description: Permanent fiber connection method where two fiber ends are fused. + optional: false + order_weight: 1200 nodes: - name: OpticalMultiplexer - label: Optical Multiplexer + namespace: Dcim description: An OADM (Optical Add Drop Multiplexer) supporting various WDM (Wavelength Division Multiplexing) technologies. + label: Optical Multiplexer icon: mdi:transit-connection-variant - namespace: Dcim + include_in_menu: true + 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 + optional: false 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) @@ -264,86 +279,100 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: '#9933cc' - default_value: dwdm + optional: false + description: Type of WDM technology (e.g. CWDM, DWDM) + order_weight: 1300 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 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 + order_weight: 1350 - 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 + order_weight: 1450 - name: OadmFrontInterface + namespace: Dcim + description: Client-side interface of an optical add-drop multiplexer, carrying + a single channel. label: Optical Multiplexer Front Interfaces + include_in_menu: true 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: 1300 - name: OadmRearInterface + namespace: Dcim + description: Line-side interface of an optical add-drop multiplexer, carrying the + multiplexed signal. label: Optical Multiplexer Rear Interfaces + include_in_menu: true 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 + include_in_menu: true + human_friendly_id: + - wdm_type__value + - channel__value order_by: - wdm_type__value - channel__value @@ -355,19 +384,15 @@ nodes: - wdm_type__value - - channel__value - wdm_type__value - human_friendly_id: - - wdm_type__value - - channel__value attributes: - name: channel kind: Number + optional: false description: WDM channel number. 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) @@ -378,31 +403,34 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: '#9933cc' - default_value: dwdm + optional: false + description: Type of WDM technology (e.g. CWDM, DWDM) + order_weight: 1100 - name: wavelength - label: Wavelength (nm) kind: Text + label: Wavelength (nm) + optional: false description: Wavelength of the channel in nm. order_weight: 1200 - name: frequency - label: Frequency (GHz) kind: Text + label: Frequency (GHz) + optional: false 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 + include_in_menu: true 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) @@ -413,15 +441,17 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: '#9933cc' - default_value: dwdm + optional: false + description: Type of WDM technology (e.g. CWDM, DWDM) + order_weight: 1150 relationships: - name: wdm_channel - label: WDM Channel peer: DcimWdmChannel - identifier: wdm_sfp__channel + label: WDM Channel kind: Attribute cardinality: one optional: false - order_weight: 1150 + identifier: wdm_sfp__channel + order_weight: 1250 ``` \ No newline at end of file diff --git a/docs/docs/reference/firewall_policer.mdx b/docs/docs/reference/firewall_policer.mdx index da563f61..426dfc6a 100644 --- a/docs/docs/reference/firewall_policer.mdx +++ b/docs/docs/reference/firewall_policer.mdx @@ -2,7 +2,7 @@ title: Firewall Policer --- -This schema extension contains models for VMs. You might consider Cluster or/and Hypervisor extension to go with! +This schema extension contains models for traffic policers and the classes and rules that reference them, so you can describe rate limiting alongside the interfaces it is applied to. ## Details diff --git a/docs/docs/reference/hosting_cluster.mdx b/docs/docs/reference/hosting_cluster.mdx index 3155fd5e..adc3f831 100644 --- a/docs/docs/reference/hosting_cluster.mdx +++ b/docs/docs/reference/hosting_cluster.mdx @@ -25,7 +25,7 @@ A rather generic cluster built with compute units (e.g. servers) and able to hos | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| technology | Underlying virtualisation or clustering technology. | Dropdown | | | vmware, kvm, hyper_v, xen, nutanix, openstack, kubernetes, public_cloud | +| technology | Underlying virtualisation or clustering technology. | Dropdown | False | | vmware, kvm, hyper_v, xen, nutanix, openstack, kubernetes, public_cloud | | status | | Dropdown | False | active | active, provisioning, maintenance, drained | ## Code @@ -35,20 +35,19 @@ 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 + include_in_menu: true + menu_placement: ComputeGenericUnit inherit_from: - ClusterGeneric - VirtualizationHostVirtualMachine - ClusterGenericComputeUnitNodes attributes: - name: technology - label: Technology kind: Dropdown - order_weight: 1200 - description: Underlying virtualisation or clustering technology. + label: Technology choices: - name: vmware label: VMware vSphere @@ -74,11 +73,12 @@ nodes: - name: public_cloud label: Public Cloud color: '#888888' + optional: false + description: Underlying virtualisation or clustering technology. + order_weight: 1300 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1300 choices: - name: active label: Active @@ -96,5 +96,7 @@ nodes: label: Drained description: Temporarily taken out of service. color: '#9e9e9e' + optional: false + order_weight: 1200 ``` \ No newline at end of file diff --git a/docs/docs/reference/interface_breakout.mdx b/docs/docs/reference/interface_breakout.mdx index 0de9a759..7985a9f3 100644 --- a/docs/docs/reference/interface_breakout.mdx +++ b/docs/docs/reference/interface_breakout.mdx @@ -42,29 +42,30 @@ extensions: attributes: - name: breakout_capability kind: Boolean - optional: false default_value: false + optional: false description: Indicates if the port supports breakout capability + order_weight: 1800 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 - order_weight: 1650 + order_weight: 1850 - 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 - order_weight: 1700 + order_weight: 1900 ``` \ No newline at end of file diff --git a/docs/docs/reference/ipam.mdx b/docs/docs/reference/ipam.mdx index 29c5022d..2faab193 100644 --- a/docs/docs/reference/ipam.mdx +++ b/docs/docs/reference/ipam.mdx @@ -25,9 +25,9 @@ Basic IPAM schema to capture IP addresses, subnets, and related information. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | False | active | active, deprecated, reserved | +| status | | Dropdown | False | active | active, reserved, deprecated | | description | | Text | True | | | -| role | | Dropdown | True | | management, link, customer, supernet, backbone | +| role | | Dropdown | True | | management, link, customer, backbone | #### Relationships @@ -60,17 +60,20 @@ Basic IPAM schema to capture IP addresses, subnets, and related information. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | primary_of | DcimGenericDevice | True | many | Attribute | -| interface | InterfaceLayer3 | True | one | | +| interface | InterfaceLayer3 | True | one | Attribute | ## Generics ### VLANGroupScope +- **Label:** VLAN Group Scope +- **Description:** Mixin for objects that can scope a VLAN group (e.g. Region, Site). The reverse relationship is added by extensions/vlan. - **Namespace:** Ipam ### PrefixScope -- **Description:** Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). +- **Label:** Prefix Scope +- **Description:** Mixin for objects that can scope IP prefixes (e.g. Region, Site). - **Namespace:** Ipam #### Relationships @@ -86,60 +89,63 @@ version: '1.0' generics: - name: VLANGroupScope namespace: Ipam + label: VLAN Group Scope + description: Mixin for objects that can scope a VLAN group (e.g. Region, Site). + The reverse relationship is added by extensions/vlan. include_in_menu: false - name: PrefixScope namespace: Ipam - description: Mixin for objects that can scope IP prefixes (e.g. Region, Site, VRF). + label: Prefix Scope + description: Mixin for objects that can scope IP prefixes (e.g. Region, Site). include_in_menu: false relationships: - name: prefixes peer: IpamPrefix - identifier: prefix__prefix_scope + kind: Generic cardinality: many optional: true - kind: Generic + identifier: prefix__prefix_scope + order_weight: 1550 nodes: - name: Prefix namespace: Ipam description: IPv4 or IPv6 network (with mask) - include_in_menu: false - icon: mdi:ip-network label: Prefix + icon: mdi:ip-network + include_in_menu: false + inherit_from: + - BuiltinIPPrefix + human_friendly_id: + - ip_namespace__name__value + - prefix__value 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: deprecated + label: Deprecated + color: '#e04040' + optional: false + order_weight: 1200 - name: description kind: Text optional: true - order_weight: 1150 + order_weight: 1100 - name: role kind: Dropdown - optional: true - order_weight: 1200 choices: - name: management label: Management @@ -153,49 +159,45 @@ nodes: 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' + color: '#9678B6' + optional: true + order_weight: 1300 relationships: - name: scope peer: IpamPrefixScope + kind: Attribute + cardinality: one optional: true identifier: prefix__prefix_scope - cardinality: one - kind: Attribute - order_weight: 1300 + order_weight: 1500 - name: IPAddress namespace: Ipam description: IP Address - include_in_menu: false label: IP Address icon: mdi:ip + include_in_menu: false + inherit_from: + - BuiltinIPAddress + human_friendly_id: + - ip_namespace__name__value + - address__value 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 + order_weight: 1100 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1100 choices: - name: active label: Active @@ -206,10 +208,10 @@ nodes: - name: deprecated label: Deprecated color: '#e04040' + optional: false + order_weight: 1200 - name: role kind: Dropdown - optional: true - order_weight: 1150 choices: - name: loopback label: Loopback @@ -220,25 +222,29 @@ nodes: - name: anycast label: Anycast color: '#FDFD96' + optional: true + order_weight: 1300 - name: fqdn - label: FQDN kind: Text - optional: true - order_weight: 1200 + label: FQDN regex: (?=^.{1,253}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(? Country -> Site hierarchy. It defines the same Location.Site node as extensions/location_site, so load one or the other, not both. Note that LocationGeneric.name is unique across every location kind, so a name used at one tier cannot be reused at another; a single-country deployment therefore enters the hierarchy at Country (with Region as the national node) rather than duplicating a country under several regions. ## Details @@ -14,6 +14,7 @@ This schema extension is minimal but will provide you with basic items to store ### Region - **Label:** Region +- **Description:** A geographical region grouping countries and sites. - **Namespace:** Location - **Icon:** carbon:cics-region-target - **Inherit From:** LocationGeneric, IpamPrefixScope @@ -21,6 +22,7 @@ This schema extension is minimal but will provide you with basic items to store ### Country - **Label:** Country +- **Description:** A country, sitting between a region and the sites it contains. - **Namespace:** Location - **Icon:** gis:search-country - **Inherit From:** LocationGeneric @@ -28,6 +30,7 @@ This schema extension is minimal but will provide you with basic items to store ### Site - **Label:** Site +- **Description:** A physical location hosting equipment, such as a data center or an office. - **Namespace:** Location - **Icon:** ri:building-line - **Inherit From:** LocationGeneric, LocationHosting, IpamPrefixScope, IpamVLANGroupScope @@ -36,7 +39,7 @@ This schema extension is minimal but will provide you with basic items to store | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | False | active | active, planned, staging, decommissioning, retired | +| status | | Dropdown | False | active | active, planned, staging, decommissioning, deprecated | | facility | | Text | True | | | | physical_address | | Text | True | | | | timezone | | Text | True | | | @@ -48,41 +51,46 @@ version: '1.0' nodes: - name: Region namespace: Location + description: A geographical region grouping countries and sites. label: Region + icon: carbon:cics-region-target + include_in_menu: true + menu_placement: LocationGeneric inherit_from: - LocationGeneric - IpamPrefixScope - menu_placement: LocationGeneric parent: '' children: LocationCountry - icon: carbon:cics-region-target - name: Country namespace: Location + description: A country, sitting between a region and the sites it contains. label: Country + icon: gis:search-country + include_in_menu: true + menu_placement: LocationGeneric inherit_from: - LocationGeneric - menu_placement: LocationGeneric parent: LocationRegion children: LocationSite - icon: gis:search-country - name: Site namespace: Location + description: A physical location hosting equipment, such as a data center or an + office. label: Site + icon: ri:building-line + include_in_menu: true + 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 @@ -96,19 +104,21 @@ nodes: - name: decommissioning label: Decommissioning color: '#ff9800' - - name: retired - label: Retired + - name: deprecated + label: Deprecated color: '#6c757d' + optional: false + order_weight: 1200 - name: facility kind: Text unique: false optional: true - order_weight: 1100 + order_weight: 1150 - name: physical_address kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1400 - name: timezone kind: Text optional: true diff --git a/docs/docs/reference/location_site.mdx b/docs/docs/reference/location_site.mdx index 03d40dab..52c81d32 100644 --- a/docs/docs/reference/location_site.mdx +++ b/docs/docs/reference/location_site.mdx @@ -14,6 +14,7 @@ This schema extension introduces a standalone Location.Site node (with facility, ### Site - **Label:** Site +- **Description:** A physical location hosting equipment, such as a data center or an office. - **Namespace:** Location - **Icon:** ri:building-line - **Inherit From:** LocationGeneric, LocationHosting, IpamPrefixScope, IpamVLANGroupScope @@ -22,7 +23,7 @@ This schema extension introduces a standalone Location.Site node (with facility, | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| status | | Dropdown | False | active | active, planned, staging, decommissioning, retired | +| status | | Dropdown | False | active | active, planned, staging, decommissioning, deprecated | | facility | | Text | True | | | | physical_address | | Text | True | | | | timezone | | Text | True | | | @@ -34,21 +35,22 @@ version: '1.0' nodes: - name: Site namespace: Location + description: A physical location hosting equipment, such as a data center or an + office. label: Site + icon: ri:building-line + include_in_menu: true + 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 @@ -62,19 +64,21 @@ nodes: - name: decommissioning label: Decommissioning color: '#ff9800' - - name: retired - label: Retired + - name: deprecated + label: Deprecated color: '#6c757d' + optional: false + order_weight: 1200 - name: facility kind: Text unique: false optional: true - order_weight: 1100 + order_weight: 1150 - name: physical_address kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1400 - name: timezone kind: Text optional: true diff --git a/docs/docs/reference/mlag.mdx b/docs/docs/reference/mlag.mdx index cb0b7800..725c21aa 100644 --- a/docs/docs/reference/mlag.mdx +++ b/docs/docs/reference/mlag.mdx @@ -35,9 +35,9 @@ Next steps: | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the interface | Text | | | | +| name | Name of the interface | Text | False | | | | description | A brief description of the interface | Text | True | | | -| status | The status of the interface | Dropdown | | active | provisioning, free, active, maintenance, disabled, deleted, outage | +| status | The status of the interface | Dropdown | False | active | provisioning, free, active, maintenance, disabled, deleted, outage | | role | The role of the interface in the network | Dropdown | True | | server, router | #### Relationships @@ -65,6 +65,7 @@ Next steps: ### MlagDomain - **Label:** MLAG Domain +- **Description:** Generic holding the peer links and interfaces shared by the members of an MLAG domain. - **Namespace:** Generic - **Human Friendly ID:** domain_id__value @@ -72,15 +73,15 @@ Next steps: | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| domain_id | Identifier for the MLAG domain | Text | | | | -| reload_delay | Time in seconds to wait before bringing up the MLAG after a reload | Number | | 300 | | +| domain_id | Identifier for the MLAG domain | Text | False | | | +| reload_delay | Time in seconds to wait before bringing up the MLAG after a reload | Number | False | 300 | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| peer_links | InterfaceLag | | many | Attribute | -| mlag_interfaces | MlagInterface | | many | Component | +| peer_links | InterfaceLag | True | many | Attribute | +| mlag_interfaces | MlagInterface | True | many | Component | ## Extensions @@ -113,61 +114,68 @@ version: '1.0' generics: - name: MlagDomain namespace: Generic - include_in_menu: false + description: Generic holding the peer links and interfaces shared by the members + of an MLAG domain. 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 + optional: false description: Identifier for the MLAG domain - order_weight: 900 + order_weight: 1000 - 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 + optional: false + 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 + optional: true + description: LAG interfaces used as peer-links between the MLAG peers order_weight: 1500 - name: mlag_interfaces - label: MLAG Interface(s) peer: MlagInterface - cardinality: many + label: MLAG Interface(s) kind: Component + cardinality: many + optional: true description: Bundle interfaces that are spread across all devices in this MLAG domain. - order_weight: 1500 + order_weight: 1550 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 + optional: false description: Name of the interface order_weight: 1000 - name: description @@ -177,7 +185,7 @@ nodes: order_weight: 1100 - name: status kind: Dropdown - description: The status of the interface + default_value: active choices: - name: provisioning label: Provisioning @@ -190,7 +198,7 @@ nodes: - name: active label: Active description: Interface is active and operational. - color: '#A9CCE3' + color: '#00d25b' - name: maintenance label: Maintenance description: Interface is under maintenance. @@ -207,12 +215,11 @@ nodes: label: Outage description: Interface is currently experiencing an outage. color: '#F4CCCC' - default_value: active + 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: server label: Server Interface @@ -222,55 +229,58 @@ nodes: label: Router Interface description: Interface connecting routers color: '#B2D4E6' - order_weight: 1250 + optional: true + description: The role of the interface in the network + order_weight: 1300 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 + order_weight: 900 - name: Domain namespace: Mlag - label: MLAG Domain description: MLAG (Multi-Chassis Link Aggregation Group) Domain + label: MLAG Domain icon: mingcute:cloud-line + include_in_menu: true inherit_from: - GenericMlagDomain relationships: - name: peers peer: DcimDevice - optional: false - cardinality: many kind: Generic + cardinality: many + optional: false identifier: device__mlag_domain - max_count: 2 min_count: 2 + max_count: 2 order_weight: 950 extensions: nodes: - 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 + order_weight: 1950 - kind: DcimDevice relationships: - name: mlag_domain - label: MLAG Domain peer: MlagDomain - optional: true - cardinality: one + label: MLAG Domain kind: Attribute - description: MLAG Domain this device belongs to - order_weight: 1800 + cardinality: one + optional: true identifier: device__mlag_domain + description: MLAG Domain this device belongs to + order_weight: 1900 ``` \ No newline at end of file diff --git a/docs/docs/reference/modules.mdx b/docs/docs/reference/modules.mdx deleted file mode 100644 index 615d48d5..00000000 --- a/docs/docs/reference/modules.mdx +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: Modules ---- - -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 - -## Details - -- **Dependencies:** - - [base](dcim) - -## Generics - -### GenericModule - -- **Label:** Module -- **Description:** A generic module, such as a Linecard or Routing Engine, installed in a device. -- **Namespace:** Device -- **Icon:** mdi:expansion-card -- **Human Friendly ID:** serial_number__value - -#### Attributes - -| name | description | kind | optional | default_value | choices | -| ---- | ----------- | ---- | -------- | ------------- | ------- | -| serial_number | Unique serial number of the module. | Text | | | | -| description | | Text | True | | | -| status | | Dropdown | | active | provisioning, active, maintenance, disabled, outage | - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| module_type | DeviceGenericModuleType | False | one | Attribute | -| device | DcimPhysicalDevice | True | one | Attribute | - -### GenericModuleType - -- **Label:** Module Type -- **Description:** A generic module type, with common specifications like part number and manufacturer. -- **Namespace:** Device -- **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 | -| 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. - -::: - -### DcimPhysicalDevice - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| modules | DeviceGenericModule | | many | Component | - -## Code - -```yaml -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' - - name: active - label: Active - description: Linecard is active and operational. - color: '#A9CCE3' - - name: maintenance - label: Maintenance - description: Linecard is under maintenance. - color: '#FFF2CC' - - name: disabled - label: Disabled - description: Linecard has been disabled. - color: '#D3D3D3' - - name: outage - label: Outage - description: Linecard is currently experiencing an outage. - color: '#F4CCCC' - 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 - optional: true - cardinality: one - kind: Attribute - 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: - - kind: DcimPhysicalDevice - relationships: - - name: modules - peer: DeviceGenericModule - identifier: device__modules - cardinality: many - kind: Component - -``` \ No newline at end of file diff --git a/docs/docs/reference/optical_transport.mdx b/docs/docs/reference/optical_transport.mdx index 7f6d330f..e95b27fd 100644 --- a/docs/docs/reference/optical_transport.mdx +++ b/docs/docs/reference/optical_transport.mdx @@ -261,7 +261,7 @@ Comprehensive optical transport network schemas for DWDM/WDM systems (ADVA FSP 3 | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| computed_name | Computed module name (e.g., ABC123-TPD-1/1) | Text | False | | | +| computed_name | Computed module name (e.g., dc1-leaf1 > slot 1-TPD-1/1) | Text | False | | | | slot_number | Slot number in chassis (e.g., '1/1', '1/2', '2/1') | Text | False | | | | capacity_gbps | Line rate capacity in Gbps (e.g., 100, 200, 400) | Number | False | | | | modulation_format | Modulation format for optical transmission | Dropdown | False | | dp_qpsk, dp_16qam, dp_8qam, dp_64qam | @@ -290,7 +290,7 @@ Comprehensive optical transport network schemas for DWDM/WDM systems (ADVA FSP 3 | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| computed_name | Computed module name (e.g., ABC123-MUX-1/3) | Text | False | | | +| computed_name | Computed module name (e.g., dc1-leaf1 > slot 1-MUX-1/3) | Text | False | | | | slot_number | Slot number in chassis (e.g., '1/3', '1/4', '2/3') | Text | False | | | | mux_type | Type of multiplexer technology | Dropdown | False | | passive_mux, passive_demux, oadm, roadm, wss | | channel_capacity | Number of supported DWDM channels (e.g., 40, 80, 96) | Number | False | | | @@ -399,7 +399,7 @@ Comprehensive optical transport network schemas for DWDM/WDM systems (ADVA FSP 3 | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| computed_name | Computed module name (e.g., ABC123-AMP-1/5) | Text | False | | | +| computed_name | Computed module name (e.g., dc1-leaf1 > slot 1-AMP-1/5) | Text | False | | | | slot_number | Slot number in chassis (e.g., '1/5', '1/6', '2/5') | Text | False | | | | amplifier_type | Type of optical amplifier | Dropdown | False | | edfa, raman, soa, vgc, hybrid | | stage | Amplifier stage position | Dropdown | False | | booster, inline, preamplifier | @@ -1195,9 +1195,9 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: '{{ module_bay__device__serial__value }}-TPD-{{ slot_number__value + jinja2_template: '{{ module_bay__computed_name__value }}-TPD-{{ slot_number__value }}' - description: Computed module name (e.g., ABC123-TPD-1/1) + description: Computed module name (e.g., dc1-leaf1 > slot 1-TPD-1/1) - name: slot_number kind: Text optional: false @@ -1307,9 +1307,9 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: '{{ module_bay__device__serial__value }}-MUX-{{ slot_number__value + jinja2_template: '{{ module_bay__computed_name__value }}-MUX-{{ slot_number__value }}' - description: Computed module name (e.g., ABC123-MUX-1/3) + description: Computed module name (e.g., dc1-leaf1 > slot 1-MUX-1/3) - name: slot_number kind: Text optional: false @@ -1598,9 +1598,9 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: '{{ module_bay__device__serial__value }}-AMP-{{ slot_number__value + jinja2_template: '{{ module_bay__computed_name__value }}-AMP-{{ slot_number__value }}' - description: Computed module name (e.g., ABC123-AMP-1/5) + description: Computed module name (e.g., dc1-leaf1 > slot 1-AMP-1/5) - name: slot_number kind: Text optional: false diff --git a/docs/docs/reference/organization.mdx b/docs/docs/reference/organization.mdx index 8674376e..3a8fe468 100644 --- a/docs/docs/reference/organization.mdx +++ b/docs/docs/reference/organization.mdx @@ -21,8 +21,8 @@ Basic Organization schema to capture organizations, vendors, and related informa | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| device_type | DcimDeviceType | True | many | Attribute | -| platform | DcimPlatform | True | many | Attribute | +| device_types | DcimDeviceType | True | many | Attribute | +| platforms | DcimPlatform | True | many | Attribute | ### Provider @@ -36,7 +36,7 @@ Basic Organization schema to capture organizations, vendors, and related informa ### Generic - **Label:** Organization -- **Description:** An organization represent a legal entity, a company. +- **Description:** An organization represents a legal entity, such as a company. - **Namespace:** Organization - **Icon:** mdi:domain - **Human Friendly ID:** name__value @@ -45,7 +45,7 @@ Basic Organization schema to capture organizations, vendors, and related informa | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships @@ -61,60 +61,63 @@ version: '1.0' generics: - name: Generic namespace: Organization + description: An organization represents a legal entity, such as a company. label: Organization - description: An organization represent a legal entity, a company. + icon: mdi:domain + include_in_menu: true human_friendly_id: - name__value order_by: - name__value display_label: name__value - icon: mdi:domain - include_in_menu: true attributes: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 1200 + order_weight: 1100 relationships: - name: tags peer: BuiltinTag - cardinality: many kind: Attribute + cardinality: many optional: true - order_weight: 3000 + order_weight: 2000 nodes: - name: Manufacturer namespace: Organization description: Device Manufacturer icon: mdi:domain - inherit_from: - - OrganizationGeneric include_in_menu: true menu_placement: OrganizationGeneric + inherit_from: + - OrganizationGeneric relationships: - - name: device_type + - name: device_types peer: DcimDeviceType + kind: Attribute cardinality: many optional: true - kind: Attribute identifier: manufacturer__device_type - - name: platform + order_weight: 1300 + - name: platforms peer: DcimPlatform + kind: Attribute cardinality: many optional: true - kind: Attribute identifier: manufacturer__platform + order_weight: 1400 - name: Provider namespace: Organization description: Circuit or Location Provider icon: mdi:domain - inherit_from: - - OrganizationGeneric include_in_menu: true menu_placement: OrganizationGeneric + inherit_from: + - OrganizationGeneric ``` \ No newline at end of file diff --git a/docs/docs/reference/patch_panel.mdx b/docs/docs/reference/patch_panel.mdx index caf7c67e..f794338a 100644 --- a/docs/docs/reference/patch_panel.mdx +++ b/docs/docs/reference/patch_panel.mdx @@ -2,7 +2,7 @@ title: Patch Panel --- -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. +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. Cassettes and other inserts are tracked as regular device modules in module bays, through extensions/device_module. NOTE: This extension is compatible with all sort of connectors, meaning you can plug cable, circuits, cross-connect to front & rear interfaces! @@ -10,6 +10,7 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can - **Dependencies:** - [base](dcim) + - [extensions/device_module](device_module) ## Nodes @@ -26,7 +27,7 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | module_capacity | The maximum number of modules that can be housed within this patch panel. | Number | True | | | | description | | Text | True | | | @@ -40,6 +41,7 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can ### FrontPatchPanelInterface - **Label:** Patch Panel Front Interfaces +- **Description:** Front interface of a patch panel, where equipment is patched in. - **Namespace:** Dcim - **Uniqueness Constraints:** - patch_panel, name__value @@ -56,6 +58,7 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can ### RearPatchPanelInterface - **Label:** Patch Panel Rear Interfaces +- **Description:** Rear interface of a patch panel, terminating the permanent cabling. - **Namespace:** Dcim - **Uniqueness Constraints:** - patch_panel, name__value @@ -74,6 +77,7 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can ### GenericPatchPanelInterface - **Label:** Patch Panel Interfaces +- **Description:** Generic interface of a patch panel, front or rear. - **Namespace:** Dcim - **Icon:** mdi:ethernet @@ -81,9 +85,9 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | 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 | False | | 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, urm_p4, urm_p8, splice | ## Code @@ -91,211 +95,233 @@ NOTE: This extension is compatible with all sort of connectors, meaning you can version: '1.0' generics: - name: GenericPatchPanelInterface - label: Patch Panel Interfaces - menu_placement: DcimPatchPanel namespace: Dcim + description: Generic interface of a patch panel, front or rear. + label: Patch Panel Interfaces icon: mdi:ethernet + include_in_menu: true + menu_placement: DcimPatchPanel attributes: - name: name kind: Text + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 - name: connector_type kind: Dropdown - order_weight: 1100 choices: - - name: FC + - name: fc label: FC description: Standardized fiber optic connector used primarily in datacom and telecom applications. - - name: LC + - name: lc label: LC description: Compact fiber optic connector with a push-pull mechanism. - - name: LC_PC + - name: lc_pc label: LC/PC description: Polished LC connector providing physical contact (PC). - - name: LC_UPC + - name: lc_upc label: LC/UPC description: Ultra-Physical Contact (UPC) variant of the LC connector with enhanced polish. - - name: LC_APC + - name: lc_apc label: LC/APC description: Angled Physical Contact (APC) version of the LC connector with a slanted fiber end-face. - - name: LSH + - name: lsh label: LSH description: European fiber optic connector offering high durability. - - name: LSH_PC + - name: lsh_pc label: LSH/PC description: Physical Contact version of LSH with standard polish. - - name: LSH_UPC + - name: lsh_upc label: LSH/UPC description: Ultra-Physical Contact variant of LSH, minimizing return loss with a superior polish. - - name: LSH_APC + - name: lsh_apc label: LSH/APC description: Angled Physical Contact version of LSH, designed to reduce back reflections. - - name: LX_5 + - name: lx_5 label: LX.5 description: Miniaturized fiber optic connector similar to LC but with an additional shutter mechanism. - - name: LX_5_PC + - name: lx_5_pc label: LX.5/PC description: Physical Contact version of LX.5. - - name: LX_5_UPC + - name: lx_5_upc label: LX.5/UPC description: Ultra-Physical Contact variant of LX.5. - - name: LX_5_APC + - name: lx_5_apc label: LX.5/APC description: Angled Physical Contact version of LX.5. - - name: MPO + - name: mpo label: MPO description: Multi-fiber Push-On connector typically used in data centers for high-speed applications. - - name: MTRJ + - name: mtrj label: MTRJ description: Male-to-female fiber optic connector with two fibers. - - name: SC + - name: sc label: SC description: Square fiber optic connector with push-pull lock. - - name: SC_PC + - name: sc_pc label: SC/PC description: Physical Contact SC connector with a polished end-face. - - name: SC_UPC + - name: sc_upc label: SC/UPC description: Ultra-Physical Contact variant of SC. - - name: SC_APC + - name: sc_apc label: SC/APC description: Angled Physical Contact version of SC. - - name: ST + - name: st label: ST description: Bayonet-style fiber optic connector primarily used in industrial and military applications. - - name: CS + - name: cs label: CS description: Compact connector with a high-density duplex configuration. - - name: SN + - name: sn label: SN description: Small-form connector with dual fibers. - - name: SMA_905 + - name: sma_905 label: SMA 905 description: Stainless steel fiber optic connector. - - name: SMA_906 + - name: sma_906 label: SMA 906 description: Variant of SMA 905 with similar durability, frequently used in high-vibration settings. - - name: URM_P2 + - name: urm_p2 label: URM-P2 description: Specialized fiber optic connector for industrial and harsh environments. + - name: urm_p4 + label: URM-P4 + description: Similar to URM-P2 but designed for higher performance. + - name: urm_p8 + label: URM-P8 + description: Enhanced version of URM connectors with higher protection. + - name: splice + label: Splice + description: Permanent fiber connection method where two fiber ends are fused. + optional: false + order_weight: 1200 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 + include_in_menu: true + 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 + optional: false 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. + order_weight: 1300 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 relationships: - name: front_interfaces peer: DcimFrontPatchPanelInterface - identifier: front_interfaces - optional: true - cardinality: many kind: Component + cardinality: many + optional: true + identifier: patch_panel__front_interfaces + order_weight: 1350 - name: rear_interfaces peer: DcimRearPatchPanelInterface - identifier: rear_interfaces - optional: true - cardinality: many kind: Component + cardinality: many + optional: true + identifier: patch_panel__rear_interfaces + order_weight: 1450 - name: FrontPatchPanelInterface + namespace: Dcim + description: Front interface of a patch panel, where equipment is patched in. label: Patch Panel Front Interfaces + include_in_menu: true 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: 1300 - name: patch_panel peer: DcimPatchPanel - order_weight: 900 - identifier: front_interfaces - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: patch_panel__front_interfaces + order_weight: 900 - name: RearPatchPanelInterface + namespace: Dcim + description: Rear interface of a patch panel, terminating the permanent cabling. label: Patch Panel Rear Interfaces + include_in_menu: true 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: 1300 - name: patch_panel peer: DcimPatchPanel - order_weight: 900 - identifier: rear_interfaces - optional: false - cardinality: one kind: Parent + cardinality: one + optional: false + identifier: patch_panel__rear_interfaces + order_weight: 900 ``` \ No newline at end of file diff --git a/docs/docs/reference/peering_ixp.mdx b/docs/docs/reference/peering_ixp.mdx index f143d815..8151f6dc 100644 --- a/docs/docs/reference/peering_ixp.mdx +++ b/docs/docs/reference/peering_ixp.mdx @@ -8,10 +8,8 @@ This schema extension contains all you need to model anything revolving around i - **Dependencies:** - [base](dcim) - - [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 @@ -28,9 +26,9 @@ This schema extension contains all you need to model anything revolving around i | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the Internet Exchange | Text | | | | +| name | Name of the Internet Exchange | Text | False | | | | description | An optional description of the Internet Exchange | Text | True | | | -| status | | Dropdown | | enabled | enabled, disabled | +| status | | Dropdown | False | enabled | enabled, disabled | #### Relationships @@ -57,10 +55,10 @@ This schema extension contains all you need to model anything revolving around i | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the IXP Connection | Text | | | | +| name | Name of the IXP Connection | Text | False | | | | description | Description of the IXP Connection | Text | True | | | | peeringdb_netixlan | PeeringDB ID for the IXP connection | Number | True | | | -| status | | Dropdown | True | enabled | enabled, pre-maintenance, maintenance, post-maintenance, disabled | +| status | | Dropdown | True | enabled | enabled, pre_maintenance, maintenance, post_maintenance, disabled | | vlan | VLAN ID for the connection | Number | True | | | | mac_address | MAC address associated with the connection | MacAddress | True | | | @@ -68,12 +66,12 @@ This schema extension contains all you need to model anything revolving around i | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| ipv6_address | IpamIPAddress | | one | Attribute | -| ipv4_address | IpamIPAddress | | one | Attribute | +| ipv6_address | IpamIPAddress | True | one | Attribute | +| ipv4_address | IpamIPAddress | True | one | Attribute | | internet_exchange_point | PeeringIXP | False | one | Parent | -| router | DcimDevice | | one | Attribute | +| router | DcimDevice | True | one | Attribute | | bgp_sessions | RoutingBGPSession | True | many | Component | -| tags | BuiltinTag | | many | Attribute | +| tags | BuiltinTag | True | many | Attribute | ## Extensions @@ -89,7 +87,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| ixp_connection | PeeringIXPConnection | True | one | Parent | +| ixp_connection | PeeringIXPConnection | True | one | Attribute | ## Code @@ -101,6 +99,7 @@ nodes: description: An Internet Exchange Point (IXP) for peering label: Internet Exchange icon: mdi:network + include_in_menu: true human_friendly_id: - name__value order_by: @@ -110,85 +109,95 @@ nodes: - name: name kind: Text unique: true + optional: false description: Name of the Internet Exchange 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 description: Internet Exchange is active and operational - color: '#a8dadc' + color: '#00d25b' - name: disabled label: Disabled description: Internet Exchange is not operational color: '#b0bec5' - default_value: enabled + optional: false 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 + order_weight: 1500 - 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 - description: Import routing policies applied to the session + cardinality: many + optional: true + identifier: ixp__import_bgppolicies + description: Import routing policies applied to every session on this internet + exchange point + order_weight: 1600 - name: export_policies - label: Export Routing Policies peer: RoutingPolicyBGP - identifier: ixp__export_bgppolicies - optional: true - cardinality: many + label: Export Routing Policies kind: Generic - description: Export routing policies applied to the session + cardinality: many + optional: true + identifier: ixp__export_bgppolicies + description: Export routing policies applied to every session on this internet + exchange point + order_weight: 1650 - name: bgp_communities - label: BGP Communities peer: RoutingBGPCommunity - optional: true - cardinality: many + label: BGP Communities kind: Generic - description: BGP communities associated with the session + cardinality: many + optional: true + description: BGP communities associated with this internet exchange point + order_weight: 1700 - name: tags peer: BuiltinTag - optional: true - cardinality: many kind: Attribute - order_weight: 3000 + cardinality: many + optional: true + order_weight: 2000 - name: IXPConnection namespace: Peering description: A connection to an Internet Exchange Point (IXP) label: IXP Connection icon: mdi:lan-connect + include_in_menu: true 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 unique: true + optional: false description: Name of the IXP Connection order_weight: 1000 - name: description @@ -197,20 +206,20 @@ 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 description: The system is fully operational and functioning as expected. - color: '#a8dadc' - - name: pre-maintenance + color: '#00d25b' + - name: pre_maintenance label: Pre-Maintenance description: Preparation stage before performing maintenance tasks. color: '#f4a261' @@ -218,7 +227,7 @@ nodes: label: Maintenance description: Currently undergoing maintenance tasks. color: '#e9c46a' - - name: post-maintenance + - name: post_maintenance label: Post-Maintenance description: Final checks and verifications after maintenance tasks. color: '#f0e5de' @@ -226,12 +235,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 @@ -241,59 +250,66 @@ 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 + optional: true + 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 + optional: true + 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 + order_weight: 900 - name: router peer: DcimDevice - cardinality: one kind: Attribute + cardinality: one + optional: true description: The router this IXP connection is connected to - order_weight: 1400 + order_weight: 1500 - name: bgp_sessions - label: BGP Sessions peer: RoutingBGPSession - identifier: ixpconn__bgpsessions - optional: true - cardinality: many + label: BGP Sessions kind: Component + cardinality: many + optional: true + on_delete: no-action + identifier: ixpconn__bgpsessions description: BGP sessions established over this IXP connection - order_weight: 1450 + order_weight: 1550 - name: tags peer: BuiltinTag - cardinality: many kind: Attribute - order_weight: 3000 + cardinality: many + optional: true + order_weight: 2000 extensions: nodes: - kind: RoutingBGPSession relationships: - name: ixp_connection - label: IXP Connection peer: PeeringIXPConnection - identifier: ixpconn__bgpsessions - optional: true + label: IXP Connection + kind: Attribute cardinality: one - kind: Parent - description: The IXP connection (port) this BGP session is established over + optional: true + identifier: ixpconn__bgpsessions + description: The IXP connection this BGP session is established over + order_weight: 1800 ``` \ No newline at end of file diff --git a/docs/docs/reference/physical_disk.mdx b/docs/docs/reference/physical_disk.mdx index bab45609..e2bcad3f 100644 --- a/docs/docs/reference/physical_disk.mdx +++ b/docs/docs/reference/physical_disk.mdx @@ -21,7 +21,7 @@ NOTE: This extension is compatible with all sort of device. You can apply the ge - **Icon:** carbon:vmdk-disk - **Uniqueness Constraints:** - device, name__value -- **Human Friendly ID:** name__value +- **Human Friendly ID:** device__name__value, name__value #### Attributes @@ -29,7 +29,7 @@ NOTE: This extension is compatible with all sort of device. You can apply the ge | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | False | | | | disk_type | Specifies the type of disk | Dropdown | True | | ssd, nvme, hdd, hybrid | -| status | Lifecycle status of the hardware component. | Dropdown | | | in_inventory, active, decommissioned, disposed | +| status | Lifecycle status of the hardware component. | Dropdown | False | | in_inventory, active, decommissioned, disposed | | size | Disk capacity (in GB). | Number | False | | | | serial_number | Serial number of the disk | Text | True | | | | description | | Text | True | | | @@ -47,6 +47,12 @@ NOTE: This extension is compatible with all sort of device. You can apply the ge - **Description:** Generic that hold relationship toward physical disks. To apply on device that can have physical disks. - **Namespace:** Dcim +#### Attributes + +| name | description | kind | optional | default_value | choices | +| ---- | ----------- | ---- | -------- | ------------- | ------- | +| name | | Text | False | | | + #### Relationships | name | peer | optional | cardinality | kind | @@ -63,23 +69,33 @@ generics: description: Generic that hold relationship toward physical disks. To apply on device that can have physical disks. include_in_menu: false + attributes: + - name: name + kind: Text + unique: true + allow_override: any + optional: false + order_weight: 1000 relationships: - name: physical_disks - cardinality: many peer: DcimPhysicalDisk - optional: true kind: Component + cardinality: many + optional: true + order_weight: 1950 nodes: - name: PhysicalDisk namespace: Dcim description: Physical Disk label: Physical Disk icon: carbon:vmdk-disk + include_in_menu: true + human_friendly_id: + - device__name__value + - name__value order_by: - name__value display_label: name__value - human_friendly_id: - - name__value uniqueness_constraints: - - device - name__value @@ -87,12 +103,9 @@ nodes: - name: name kind: Text optional: false - order_weight: 900 + order_weight: 1000 - name: disk_type kind: Dropdown - description: Specifies the type of disk - order_weight: 950 - optional: true choices: - name: ssd label: SSD @@ -110,9 +123,11 @@ nodes: label: Hybrid description: Hybrid Drive color: '#ffcc80' + optional: true + description: Specifies the type of disk + order_weight: 1300 - name: status kind: Dropdown - description: Lifecycle status of the hardware component. choices: - name: in_inventory label: In Inventory @@ -121,7 +136,7 @@ nodes: - name: active label: Active description: The disk is currently in use within the infrastructure. - color: '#28a745' + color: '#00d25b' - name: decommissioned label: Decommissioned description: The disk is retired from active use but still stored for potential @@ -131,29 +146,32 @@ nodes: label: Disposed description: The disk has been securely erased and disposed of. color: '#dc3545' + optional: false + description: Lifecycle status of the hardware component. + order_weight: 1200 - name: size - label: Size (GB) kind: Number + label: Size (GB) optional: false - order_weight: 1000 description: Disk capacity (in GB). + order_weight: 1400 - 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: 1450 - name: description kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1100 relationships: - name: device peer: DcimDeviceWithPhysicalDisks - optional: false - cardinality: one kind: Parent - order_weight: 800 + cardinality: one + optional: false + order_weight: 900 ``` \ No newline at end of file diff --git a/docs/docs/reference/qinq.mdx b/docs/docs/reference/qinq.mdx index 9a2306eb..9d951acb 100644 --- a/docs/docs/reference/qinq.mdx +++ b/docs/docs/reference/qinq.mdx @@ -2,7 +2,7 @@ title: QinQ --- -This schema extension brings extensions to VLAN model in order to support QinQ. +This schema extension adds the Service VLAN and Customer VLAN nodes needed to model QinQ on top of the VLAN extension. ## Details @@ -17,7 +17,9 @@ This schema extension brings extensions to VLAN model in order to support QinQ. - **Label:** S-VLAN - **Description:** A VLAN used to encapsulate multiple CVLANs. - **Namespace:** Ipam -- **Inherit From:** GenericVLAN +- **Uniqueness Constraints:** + - vlan_id__value, vlan_group +- **Inherit From:** IpamGenericVLAN #### Relationships @@ -33,7 +35,7 @@ This schema extension brings extensions to VLAN model in order to support QinQ. - **Uniqueness Constraints:** - vlan_id__value, svlan - **Human Friendly ID:** svlan__name__value, vlan_id__value -- **Inherit From:** GenericVLAN +- **Inherit From:** IpamGenericVLAN #### Attributes @@ -54,50 +56,56 @@ 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 + - IpamGenericVLAN + uniqueness_constraints: + - - vlan_id__value + - vlan_group relationships: - name: cvlan - label: Customer vlan(s) peer: IpamCVLAN + label: Customer vlan(s) + kind: Attribute + cardinality: many optional: true - direction: outbound identifier: vlan__qinq - cardinality: many - kind: Attribute + direction: outbound + order_weight: 1600 - 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: + - IpamGenericVLAN 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 + order_weight: 1000 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 + order_weight: 1600 ``` \ No newline at end of file diff --git a/docs/docs/reference/rack.mdx b/docs/docs/reference/rack.mdx index 90d6116b..2f94c1b3 100644 --- a/docs/docs/reference/rack.mdx +++ b/docs/docs/reference/rack.mdx @@ -2,13 +2,13 @@ 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. +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. LocationRack needs a Location.Site: extensions/location_site is declared above as the smallest provider, but extensions/location_minimal provides the same node as part of its hierarchy and satisfies the rack equally, load whichever suits, never both. LocationRack is also defined, hierarchically and incompatibly, by experimental/location_extended, so load one or the other, not both. ## Details - **Dependencies:** - [base](dcim) - - [extensions/location_minimal](location_minimal) + - [extensions/location_site](location_site) ## Nodes @@ -18,7 +18,9 @@ This schema extension introduces a Rack model representing a physical equipment - **Description:** A physical equipment rack installed at a site. - **Namespace:** Location - **Icon:** clarity:rack-server-line -- **Human Friendly ID:** name__value +- **Uniqueness Constraints:** + - site, name__value +- **Human Friendly ID:** site__name__value, name__value - **Inherit From:** LocationHosting #### Attributes @@ -26,7 +28,7 @@ This schema extension introduces a Rack model representing a physical equipment | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | False | | | -| facility_id | | Text | True | | | +| facility | | Text | True | | | | status | | Dropdown | False | active | active, available, reserved, planned, decommissioning, deprecated | | height | | Number | False | 42 | | | serial_number | | Text | True | | | @@ -36,7 +38,7 @@ This schema extension introduces a Rack model representing a physical equipment | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| site | LocationSite | False | one | Attribute | +| site | LocationSite | False | one | Parent | | tags | BuiltinTag | True | many | Attribute | ## Extensions @@ -62,32 +64,35 @@ 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 + include_in_menu: true menu_placement: LocationGeneric + inherit_from: + - LocationHosting human_friendly_id: + - site__name__value - name__value order_by: - name__value display_label: name__value - inherit_from: - - LocationHosting + uniqueness_constraints: + - - site + - name__value attributes: - name: name kind: Text - unique: true + unique: false optional: false order_weight: 1000 - - name: facility_id + - name: facility kind: Text optional: true - order_weight: 1100 + order_weight: 1150 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 1200 choices: - name: active label: Active @@ -110,46 +115,49 @@ nodes: description: Rack is being phased out and emptied. color: '#ff9800' - name: deprecated - label: Retired + label: Deprecated 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 optional: true - order_weight: 1400 + order_weight: 1350 - name: asset_tag kind: Text optional: true - order_weight: 1500 + order_weight: 1400 relationships: - name: site peer: LocationSite - optional: false + kind: Parent cardinality: one - kind: Attribute - order_weight: 900 + optional: false identifier: site__racks + order_weight: 900 - name: tags peer: BuiltinTag - cardinality: many kind: Attribute + cardinality: many optional: true - order_weight: 3000 + order_weight: 2000 extensions: nodes: - kind: LocationSite relationships: - name: racks peer: LocationRack + kind: Component cardinality: many optional: true - kind: Component identifier: site__racks + order_weight: 1850 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing.mdx b/docs/docs/reference/routing.mdx index cd51945c..0e8f8c08 100644 --- a/docs/docs/reference/routing.mdx +++ b/docs/docs/reference/routing.mdx @@ -8,13 +8,13 @@ This schema extension contains generics to create Routing Protocol "Instance". T - **Dependencies:** - [base](dcim) - - [extensions/vlan](vlan) + - [extensions/vrf](vrf) ## Generics ### Protocol -- **Label:** Protocol +- **Label:** Routing Protocol - **Description:** Generic protocol model for routing protocols - **Namespace:** Routing - **Icon:** carbon:router @@ -24,7 +24,7 @@ This schema extension contains generics to create Routing Protocol "Instance". T | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | description | Description of the protocol | Text | False | | | -| status | Status of the Protocol Configuration. | Dropdown | | | active, disabled, deleted | +| status | Status of the Protocol Configuration. | Dropdown | False | | active, disabled, deleted | #### Relationships @@ -41,14 +41,14 @@ generics: - name: Protocol namespace: Routing description: Generic protocol model for routing protocols - label: Protocol + label: Routing Protocol icon: carbon:router - include_in_menu: false + include_in_menu: true attributes: - name: description kind: Text - optional: false unique: true + optional: false description: Description of the protocol order_weight: 1100 - name: status @@ -57,7 +57,7 @@ generics: - name: active label: Active description: Configuration is active and operational. - color: '#A9CCE3' + color: '#00d25b' - name: disabled label: Disabled description: Configuration has been disabled. @@ -66,21 +66,22 @@ generics: label: Deleted description: Configuration has been deleted. color: '#FAD7A0' + optional: false description: Status of the Protocol Configuration. - order_weight: 1150 + order_weight: 1200 relationships: - name: device peer: DcimDevice - optional: false - cardinality: one kind: Parent - order_weight: 1050 + cardinality: one + optional: false + order_weight: 900 - name: vrf - label: VRF peer: IpamVRF - optional: false - cardinality: one + label: VRF kind: Attribute - order_weight: 1075 + cardinality: one + optional: false + order_weight: 1050 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_aggregate.mdx b/docs/docs/reference/routing_aggregate.mdx index d3acd23c..780cef8c 100644 --- a/docs/docs/reference/routing_aggregate.mdx +++ b/docs/docs/reference/routing_aggregate.mdx @@ -32,7 +32,7 @@ This schema extension contains all you need to model the Aggregate Routing Proto | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| destination | IpamPrefix | | | Attribute | +| destination | IpamPrefix | True | | Attribute | ## Code @@ -43,30 +43,32 @@ 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: true + menu_placement: RoutingProtocol inherit_from: - RoutingProtocol attributes: - name: discard - label: Discard kind: Boolean - optional: true + label: Discard default_value: false - order_weight: 1275 + optional: true + order_weight: 1350 - name: import_policies kind: Text optional: true - order_weight: 1300 + order_weight: 1400 - name: export_policies kind: Text optional: true - order_weight: 1350 + order_weight: 1450 relationships: - name: destination - kind: Attribute peer: IpamPrefix - description: Destination network for the static route. - order_weight: 1200 + kind: Attribute + optional: true + description: Destination network aggregated by this route. + order_weight: 1300 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_bgp.mdx b/docs/docs/reference/routing_bgp.mdx index c185934d..d16ac0ad 100644 --- a/docs/docs/reference/routing_bgp.mdx +++ b/docs/docs/reference/routing_bgp.mdx @@ -24,8 +24,8 @@ This schema extension contains all you need to model your BGP platform. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the Autonomous System | Text | | | | -| asn | Autonomous System Number | Number | | | | +| name | Name of the Autonomous System | Text | False | | | +| asn | Autonomous System Number | Number | False | | | | description | Description of the Autonomous System | Text | True | | | #### Relationships @@ -55,7 +55,7 @@ This schema extension contains all you need to model your BGP platform. | maximum_routes | Maximum routes for the BGP Group. | Number | True | | | | local_pref | Force Local Pref for this BGP Peer Group. | Number | True | | | | send_community | Whether to send community attributes. | Checkbox | True | | | -| address_family | The address family for the routing policy indicating the type of IP address. | Dropdown | | ipv4 | ipv4, ipv6 | +| address_family | The address family for the routing policy indicating the type of IP address. | Dropdown | False | ipv4 | ipv4, ipv6 | #### Relationships @@ -78,8 +78,8 @@ 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 | Dropdown | | | external, internal | -| role | Role of the BGP Session | Dropdown | | | backbone, upstream, peering | +| session_type | Type of BGP Session | Dropdown | False | | external, internal | +| role | Role of the BGP Session | Dropdown | True | | backbone, upstream, peering | | local_pref | Force Local Pref for this BGP Peer Session. | Number | True | | | #### Relationships @@ -90,7 +90,7 @@ This schema extension contains all you need to model your BGP platform. | remote_as | RoutingAutonomousSystem | True | one | Attribute | | local_ip | IpamIPAddress | True | one | Attribute | | remote_ip | IpamIPAddress | True | one | Attribute | -| device | DcimDevice | True | one | | +| device | DcimDevice | True | one | Generic | | peer_group | RoutingBGPPeerGroup | True | one | Attribute | | peer_session | RoutingBGPSession | True | one | Attribute | @@ -116,7 +116,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| asn | RoutingAutonomousSystem | True | many | | +| asn | RoutingAutonomousSystem | True | many | Generic | ## Code @@ -129,6 +129,7 @@ nodes: belonging to a network label: Autonomous System icon: mdi:bank-circle-outline + include_in_menu: true menu_placement: RoutingBGPSession human_friendly_id: - asn__value @@ -140,14 +141,16 @@ nodes: attributes: - name: name kind: Text + unique: true + optional: false description: Name of the Autonomous System order_weight: 1000 - unique: true - name: asn kind: Number + unique: true + optional: false description: Autonomous System Number order_weight: 1050 - unique: true - name: description kind: Text optional: true @@ -156,25 +159,29 @@ nodes: relationships: - name: organization peer: OrganizationGeneric - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false + order_weight: 1200 - name: location peer: LocationGeneric - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + order_weight: 1300 - name: devices peer: DcimDevice - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true + order_weight: 1400 - name: BGPPeerGroup namespace: Routing description: A BGP Peer Group is used to regroup parameters that are shared across multiple peers label: BGP Peer Group icon: mdi:view-grid-plus-outline + include_in_menu: true menu_placement: RoutingBGPSession inherit_from: - RoutingProtocol @@ -187,8 +194,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 @@ -201,16 +208,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 @@ -219,9 +226,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 @@ -231,26 +237,31 @@ nodes: label: IPv6 description: Policy applies to IPv6 addresses. color: '#E6E6FA' - default_value: ipv4 - order_weight: 1150 + optional: false + description: The address family for the routing policy indicating the type of + IP address. + order_weight: 1250 relationships: - name: local_as - identifier: bgppeergroup__local_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgppeergroup__local_as + order_weight: 1550 - name: remote_as - identifier: bgppeergroup__remote_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgppeergroup__remote_as + order_weight: 1600 - name: BGPSession namespace: Routing description: A BGP Session represent a point to point connection between two routers label: BGP Session icon: mdi:router + include_in_menu: true inherit_from: - RoutingProtocol order_by: @@ -260,9 +271,11 @@ nodes: - name: import_policies kind: Text optional: true + order_weight: 1700 - name: export_policies kind: Text optional: true + order_weight: 1750 - name: session_type kind: Dropdown choices: @@ -272,8 +285,9 @@ nodes: - name: internal label: Internal description: Session established with a router in the same autonomous system. + optional: false description: Type of BGP Session - order_weight: 1200 + order_weight: 1250 - name: role kind: Dropdown choices: @@ -289,71 +303,81 @@ nodes: label: Peering description: Connect with other networks via IX. color: '#E6E6FA' + optional: true description: Role of the BGP Session - order_weight: 1600 + order_weight: 1300 - 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 + order_weight: 1650 relationships: - name: local_as - identifier: bgpsession__local_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__local_as + order_weight: 1350 - name: remote_as - identifier: bgpsession__remote_as peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__remote_as + order_weight: 1400 - name: local_ip - identifier: bgpsession__local_ip peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__local_ip + order_weight: 1450 - name: remote_ip - identifier: bgpsession__remote_ip peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + identifier: bgpsession__remote_ip + order_weight: 1500 - name: device peer: DcimDevice - optional: true + kind: Generic cardinality: one + optional: true + order_weight: 900 - name: peer_group peer: RoutingBGPPeerGroup - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + order_weight: 1550 - name: peer_session peer: RoutingBGPSession - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + order_weight: 1600 extensions: nodes: - kind: DcimGenericDevice relationships: - name: asn peer: RoutingAutonomousSystem - optional: true - cardinality: one kind: Attribute - order_weight: 1600 + cardinality: one + optional: true + order_weight: 1800 - kind: OrganizationGeneric relationships: - name: asn + peer: RoutingAutonomousSystem label: Autonomous System + kind: Generic cardinality: many optional: true - peer: RoutingAutonomousSystem - order_weight: 2000 + order_weight: 1700 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_bgp_community.mdx b/docs/docs/reference/routing_bgp_community.mdx index c8796875..5fe5b430 100644 --- a/docs/docs/reference/routing_bgp_community.mdx +++ b/docs/docs/reference/routing_bgp_community.mdx @@ -8,7 +8,7 @@ This schema extension adds the BGP Communities models. - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) + - [extensions/routing_policies](routing_policies) ## Nodes @@ -24,15 +24,15 @@ This schema extension adds the BGP Communities models. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | The name of the BGP community. | Text | | | | +| name | The name of the BGP community. | Text | False | | | | description | An optional description of the BGP community. | Text | True | | | -| community | The value of the BGP community (RFC1997, RFC4360, RFC8092). | Text | | | | +| community | The value of the BGP community (RFC1997, RFC4360, RFC8092). | Text | False | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| routing_policy | RoutingPolicy | | many | Generic | +| routing_policy | RoutingPolicy | True | many | Generic | | tags | BuiltinTag | True | many | Attribute | ## Code @@ -42,9 +42,10 @@ 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 + include_in_menu: true human_friendly_id: - name__value order_by: @@ -53,31 +54,35 @@ nodes: attributes: - name: name kind: Text + unique: true + optional: false 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 + optional: false 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 + optional: true + description: The BGP Policies using this BGP Community. + order_weight: 1300 - name: tags peer: BuiltinTag kind: Attribute - optional: true cardinality: many - order_weight: 3000 + optional: true + order_weight: 2000 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_bgp_rr.mdx b/docs/docs/reference/routing_bgp_rr.mdx index 8d006aff..8cf1f598 100644 --- a/docs/docs/reference/routing_bgp_rr.mdx +++ b/docs/docs/reference/routing_bgp_rr.mdx @@ -8,7 +8,6 @@ This schema extension extend the BGP extension to add BGP Route Reflector Cluste - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) - [extensions/routing_bgp](routing_bgp) ## Nodes @@ -25,7 +24,7 @@ This schema extension extend the BGP extension to add BGP Route Reflector Cluste | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Name of the Route Reflector Cluster | Text | | | | +| name | Name of the Route Reflector Cluster | Text | False | | | | description | Optional description of the Route Reflector Cluster | Text | True | | | #### Relationships @@ -49,7 +48,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| rr_cluster | RoutingBGPRRCluster | | one | Attribute | +| rr_cluster | RoutingBGPRRCluster | True | one | Attribute | ## Code @@ -61,45 +60,49 @@ nodes: description: A Route Reflector (RR) Cluster used for grouping internal peers label: Route Reflector Cluster icon: mdi:router-network - include_in_menu: false + include_in_menu: true + menu_placement: RoutingBGPSession human_friendly_id: - name__value display_label: name__value attributes: - name: name kind: Text + unique: true + optional: false 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 + order_weight: 1300 extensions: nodes: - kind: RoutingBGPPeerGroup relationships: - name: rr_cluster - label: RR Cluster peer: RoutingBGPRRCluster - cardinality: one + label: RR Cluster kind: Attribute - order_weight: 1600 + cardinality: one + optional: true + order_weight: 1700 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_ospf.mdx b/docs/docs/reference/routing_ospf.mdx index ff7079c6..b4d5d47a 100644 --- a/docs/docs/reference/routing_ospf.mdx +++ b/docs/docs/reference/routing_ospf.mdx @@ -28,7 +28,7 @@ This schema extension contains all you need to model the OSPF Routing Protocol. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | | reference_bandwidth | Reference bandwidth for OSPF instance (in Mbps). | Number | True | 1000 | | -| version | Version of the OSPF protocol. | Dropdown | | ospf | ospf, ospfv3 | +| version | Version of the OSPF protocol. | Dropdown | False | ospf | ospf, ospfv3 | | import_policies | | Text | True | | | | export_policies | | Text | True | | | @@ -55,10 +55,10 @@ This schema extension contains all you need to model the OSPF Routing Protocol. | ---- | ----------- | ---- | -------- | ------------- | ------- | | description | Description of the OSPF interface. | Text | False | | | | metric | OSPF metric for the interface. | Number | True | | | -| mode | Mode of the OSPF interface. | Dropdown | | normal | normal, passive, peer_to_peer | +| mode | Mode of the OSPF interface. | Dropdown | False | normal | normal, passive, peer_to_peer | | authentication_key | Shared secret used to authenticate and secure routing messages between neighboring routers. | Password | True | | | | authentication_mode | | Dropdown | True | | md5, sha1 | -| area | OSPF area associated with the interface. | Text | | | | +| area | OSPF area associated with the interface. | Text | False | | | #### Relationships @@ -77,31 +77,33 @@ nodes: description: OSPF (Open Shortest Path First) instance on a Virtual Router. label: OSPF icon: mdi:network-outline - include_in_menu: false + include_in_menu: true + menu_placement: RoutingProtocol + 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 + order_weight: 1350 - name: version kind: Dropdown + default_value: ospf choices: - name: ospf label: OSPFv2 @@ -111,51 +113,54 @@ nodes: label: OSPFv3 description: Open Shortest Path First version 3. color: '#E6E6FA' - default_value: ospf + optional: false description: Version of the OSPF protocol. - order_weight: 1100 + order_weight: 1300 - name: import_policies kind: Text optional: true - order_weight: 1300 + order_weight: 1450 - name: export_policies kind: Text optional: true - order_weight: 1350 + order_weight: 1500 relationships: - name: router_id peer: IpamIPAddress - optional: true - cardinality: one kind: Attribute + cardinality: one + optional: true + order_weight: 1400 - 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 + order_weight: 1550 - name: OSPFInterface namespace: Routing description: Pivot table linking OSPF configuration to an interface. label: OSPF Interface icon: mdi:ethernet - include_in_menu: false + include_in_menu: true + menu_placement: RoutingOSPF + human_friendly_id: + - description__value order_by: - description__value display_label: description__value uniqueness_constraints: - - ospf - interface - human_friendly_id: - - description__value attributes: - name: description kind: Text - optional: false unique: true + optional: false description: Description of the OSPF interface. - order_weight: 1500 + order_weight: 1100 - name: metric kind: Number optional: true @@ -163,6 +168,7 @@ nodes: order_weight: 1400 - name: mode kind: Dropdown + default_value: normal choices: - name: normal label: Normal @@ -176,14 +182,14 @@ nodes: label: Peer-to-Peer description: OSPF peer-to-peer interface mode. color: '#E6E6FA' - default_value: normal + optional: false description: Mode of the OSPF interface. order_weight: 1300 - name: authentication_key kind: Password + optional: true description: Shared secret used to authenticate and secure routing messages between neighboring routers. - optional: true order_weight: 1250 - name: authentication_mode kind: Dropdown @@ -198,22 +204,23 @@ nodes: order_weight: 1225 - name: area kind: Text + optional: false description: OSPF area associated with the interface. order_weight: 1200 relationships: - name: ospf - label: OSPF peer: RoutingOSPF - identifier: ospf__ospfinterfaces - optional: false - cardinality: one + label: OSPF kind: Parent - order_weight: 1100 + cardinality: one + optional: false + identifier: ospf__ospfinterfaces + order_weight: 900 - name: interface peer: InterfaceLayer3 - optional: false - cardinality: one kind: Attribute - order_weight: 1200 + cardinality: one + optional: false + order_weight: 1500 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_pim.mdx b/docs/docs/reference/routing_pim.mdx index c9893322..17ee5cc3 100644 --- a/docs/docs/reference/routing_pim.mdx +++ b/docs/docs/reference/routing_pim.mdx @@ -52,8 +52,8 @@ This schema extension contains all you need to model the PIM Protocol. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| description | Description of the OSPF interface. | Text | False | | | -| pim_mode | PIM mode used for multicast routing on this interface. | Dropdown | | | sparse, dense, bidirectional | +| description | Description of the PIM interface. | Text | False | | | +| pim_mode | PIM mode used for multicast routing on this interface. | Dropdown | False | | sparse, dense, bidirectional | | hello_interval | Interval for PIM hello messages (in seconds). | Number | True | 30 | | | dr_priority | Designated Router priority on the interface. | Number | True | 1 | | @@ -74,24 +74,25 @@ nodes: description: Protocol Independent Multicast (PIM) instance on a Virtual Router. label: PIM icon: mdi:network-outline - include_in_menu: false + include_in_menu: true + menu_placement: RoutingProtocol 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 @@ -105,37 +106,40 @@ nodes: relationships: - name: rp_address peer: IpamIPAddress + kind: Attribute + cardinality: one optional: true description: Rendezvous Point (RP) address for PIM. - cardinality: one - kind: Attribute + order_weight: 1400 - 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 + order_weight: 1450 - name: PIMInterface namespace: Routing description: Interface configuration for PIM. label: PIM Interface icon: mdi:ethernet - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPIM + human_friendly_id: + - description__value order_by: - description__value display_label: description__value uniqueness_constraints: - - pim - interface - human_friendly_id: - - description__value attributes: - name: description kind: Text - optional: false unique: true - description: Description of the OSPF interface. + optional: false + description: Description of the PIM interface. order_weight: 1100 - name: pim_mode kind: Dropdown @@ -152,33 +156,35 @@ nodes: label: Bidirectional Mode description: Bidirectional PIM for efficient traffic forwarding. color: '#E6E6FA' + optional: false description: PIM mode used for multicast routing on this interface. 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 + order_weight: 900 - name: interface peer: InterfaceLayer3 - optional: false - cardinality: one kind: Attribute + cardinality: one + optional: false order_weight: 1200 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_policies.mdx b/docs/docs/reference/routing_policies.mdx index c2dbe9a9..77f8749a 100644 --- a/docs/docs/reference/routing_policies.mdx +++ b/docs/docs/reference/routing_policies.mdx @@ -13,6 +13,7 @@ This schema extension contains a generic to create Routing Policies. This Generi ### Policy +- **Label:** Routing Policy - **Description:** Policy defining the rules for routing traffic in a network. - **Namespace:** Routing - **Icon:** carbon:deployment-policy @@ -24,9 +25,9 @@ This schema extension contains a generic to create Routing Policies. This Generi | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | The name of the routing policy. | Text | False | | | | description | An optional description of the routing policy. | Text | True | | | -| policy_type | The type of routing policy which specifies the direction of route advertisement. | Dropdown | | | import-policy, export-policy, import-export-policy | +| policy_type | The type of routing policy which specifies the direction of route advertisement. | Dropdown | False | | import_policy, export_policy, import_export_policy | | weight | Priority of the routing policy. The higher the number, the higher the priority. | Number | True | 1000 | | -| address_family | The address family for the routing policy indicating the type of IP address. | Dropdown | | all | ipv4, ipv6, all | +| address_family | The address family for the routing policy indicating the type of IP address. | Dropdown | False | all | ipv4, ipv6, all | ## Code @@ -35,9 +36,10 @@ version: '1.0' generics: - name: Policy namespace: Routing - icon: carbon:deployment-policy - include_in_menu: false description: Policy defining the rules for routing traffic in a network. + label: Routing Policy + icon: carbon:deployment-policy + include_in_menu: true human_friendly_id: - name__value order_by: @@ -46,45 +48,45 @@ 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 + - name: import_policy label: Import description: Policy for incoming routes. color: '#E6E6FA' - - name: export-policy + - name: export_policy label: Export description: Policy for outgoing routes. color: '#E6E6FA' - - name: import-export-policy + - name: import_export_policy label: Import + Export description: Policy for both incoming and outgoing routes. color: '#E6E6FA' + optional: false + description: The type of routing policy which specifies the direction of route + advertisement. order_weight: 1200 - name: weight kind: Number + default_value: 1000 + optional: true description: Priority of the routing policy. The higher the number, the higher the priority. - optional: true - default_value: 1000 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 @@ -98,7 +100,9 @@ generics: label: All description: Policy applies to both IPv4 and IPv6 addresses. color: '#E6E6FA' - default_value: all + optional: false + description: The address family for the routing policy indicating the type of + IP address. order_weight: 1150 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_policies_aggregate.mdx b/docs/docs/reference/routing_policies_aggregate.mdx index 863bac25..7d50551d 100644 --- a/docs/docs/reference/routing_policies_aggregate.mdx +++ b/docs/docs/reference/routing_policies_aggregate.mdx @@ -8,16 +8,14 @@ This extension is using the Routing Policies extensions and the Routing Aggregat - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) - [extensions/routing_policies](routing_policies) - - [extensions/routing_aggregate](routing_aggregate) ## Nodes ### PolicyAggregate - **Label:** Aggregate Routing Policies -- **Description:** A routing policiers for Aggregate +- **Description:** A routing policy for Aggregate. - **Namespace:** Routing - **Icon:** carbon:deployment-policy - **Inherit From:** RoutingPolicy @@ -29,10 +27,11 @@ version: '1.0' nodes: - name: PolicyAggregate namespace: Routing - description: A routing policiers for Aggregate + description: A routing policy for Aggregate. label: Aggregate Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - RoutingPolicy diff --git a/docs/docs/reference/routing_policies_bgp.mdx b/docs/docs/reference/routing_policies_bgp.mdx index 4884f0c9..a4a06679 100644 --- a/docs/docs/reference/routing_policies_bgp.mdx +++ b/docs/docs/reference/routing_policies_bgp.mdx @@ -8,7 +8,6 @@ This extension is using the Routing Policies extensions and the Routing BGP one - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) - [extensions/routing_policies](routing_policies) - [extensions/routing_bgp](routing_bgp) @@ -17,7 +16,7 @@ This extension is using the Routing Policies extensions and the Routing BGP one ### PolicyBGP - **Label:** BGP Routing Policies -- **Description:** A routing policiers for BGP +- **Description:** A routing policy for BGP. - **Namespace:** Routing - **Icon:** carbon:deployment-policy - **Inherit From:** RoutingPolicy @@ -43,8 +42,8 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_routing_policies | RoutingPolicyBGP | | many | Generic | -| export_routing_policies | RoutingPolicyBGP | | many | Generic | +| import_routing_policies | RoutingPolicyBGP | True | many | Generic | +| export_routing_policies | RoutingPolicyBGP | True | many | Generic | ### RoutingBGPSession @@ -59,8 +58,8 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_routing_policies | RoutingPolicyBGP | | many | Generic | -| export_routing_policies | RoutingPolicyBGP | | many | Generic | +| import_routing_policies | RoutingPolicyBGP | True | many | Generic | +| export_routing_policies | RoutingPolicyBGP | True | many | Generic | ## Code @@ -69,10 +68,11 @@ version: '1.0' nodes: - name: PolicyBGP namespace: Routing - description: A routing policiers for BGP + description: A routing policy for BGP. label: BGP Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - RoutingPolicy extensions: @@ -87,19 +87,23 @@ 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 + optional: true + description: The routing-policies used by this instance for import. + order_weight: 1750 - 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 + optional: true + description: The routing-policies used by this instance for export. + order_weight: 1800 - kind: RoutingBGPSession attributes: - name: import_policies @@ -110,18 +114,22 @@ 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 + optional: true + description: The routing-policies used by this instance for import. + order_weight: 1850 - 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 + optional: true + description: The routing-policies used by this instance for export. + order_weight: 1900 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_policies_ospf.mdx b/docs/docs/reference/routing_policies_ospf.mdx index c2896b56..119aff6d 100644 --- a/docs/docs/reference/routing_policies_ospf.mdx +++ b/docs/docs/reference/routing_policies_ospf.mdx @@ -8,7 +8,6 @@ This extension is using the Routing Policies extensions and the Routing OSPF one - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) - [extensions/routing_policies](routing_policies) - [extensions/routing_ospf](routing_ospf) @@ -17,7 +16,7 @@ This extension is using the Routing Policies extensions and the Routing OSPF one ### PolicyOSPF - **Label:** OSPF Routing Policies -- **Description:** A routing policiers for OSPF +- **Description:** A routing policy for OSPF. - **Namespace:** Routing - **Icon:** carbon:deployment-policy - **Inherit From:** RoutingPolicy @@ -43,8 +42,8 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_routing_policies | RoutingPolicyOSPF | | many | Generic | -| export_routing_policies | RoutingPolicyOSPF | | many | Generic | +| import_routing_policies | RoutingPolicyOSPF | True | many | Generic | +| export_routing_policies | RoutingPolicyOSPF | True | many | Generic | ## Code @@ -53,10 +52,11 @@ version: '1.0' nodes: - name: PolicyOSPF namespace: Routing - description: A routing policiers for OSPF + description: A routing policy for OSPF. label: OSPF Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - RoutingPolicy extensions: @@ -71,18 +71,22 @@ 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 + optional: true + description: The routing-policies used by this instance for import. + order_weight: 1600 - 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 + optional: true + description: The routing-policies used by this instance for export. + order_weight: 1650 ``` \ No newline at end of file diff --git a/docs/docs/reference/routing_policies_pim.mdx b/docs/docs/reference/routing_policies_pim.mdx index 189a6c77..ae1e6791 100644 --- a/docs/docs/reference/routing_policies_pim.mdx +++ b/docs/docs/reference/routing_policies_pim.mdx @@ -8,7 +8,6 @@ This schema inherits the `RoutingPolicy` schema and removes `import_policies` an - **Dependencies:** - [base](dcim) - - [extensions/routing](routing) - [extensions/routing_policies](routing_policies) - [extensions/routing_pim](routing_pim) @@ -17,7 +16,7 @@ This schema inherits the `RoutingPolicy` schema and removes `import_policies` an ### PolicyPIM - **Label:** PIM Routing Policies -- **Description:** A routing policiers for PIM +- **Description:** A routing policy for PIM. - **Namespace:** Routing - **Icon:** carbon:deployment-policy - **Inherit From:** RoutingPolicy @@ -43,8 +42,8 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_routing_policies | RoutingPolicyPIM | | many | Generic | -| export_routing_policies | RoutingPolicyPIM | | many | Generic | +| import_routing_policies | RoutingPolicyPIM | True | many | Generic | +| export_routing_policies | RoutingPolicyPIM | True | many | Generic | ## Code @@ -53,10 +52,11 @@ version: '1.0' nodes: - name: PolicyPIM namespace: Routing - description: A routing policiers for PIM + description: A routing policy for PIM. label: PIM Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - RoutingPolicy extensions: @@ -71,18 +71,22 @@ 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 + optional: true + description: The routing-policies used by this instance for import. + order_weight: 1500 - 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 + optional: true + description: The routing-policies used by this instance for export. + order_weight: 1550 ``` \ No newline at end of file diff --git a/docs/docs/reference/sfp.mdx b/docs/docs/reference/sfp.mdx index 816bac97..c903639e 100644 --- a/docs/docs/reference/sfp.mdx +++ b/docs/docs/reference/sfp.mdx @@ -55,7 +55,7 @@ Improvements: | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| serial | | Text | True | | | +| serial_number | | Text | True | | | | sfp_type | Type of SFP, such as LR, SR, T. | Dropdown | False | | lr, sr, lrm, t, sr4, lr4, zr, er, dac, aoc | | status | | Dropdown | False | plugged | plugged, spare, decommissioned | | form_factor | The physical form factor of the SFP module. | Dropdown | False | | sfp, sfp_plus, qsfp, qsfp_plus, qsfp28, qsfp_dd, cfp, cfp2, cfp4, xfp, sfp56, qsfp56, osfp | @@ -82,7 +82,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| plugged_sfp | DcimGenericSFP | True | one | | +| plugged_sfp | DcimGenericSFP | True | one | Generic | ### LocationHosting @@ -90,7 +90,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| spare_sfps | DcimGenericSFP | True | many | | +| spare_sfps | DcimGenericSFP | True | many | Generic | ### OrganizationManufacturer @@ -98,7 +98,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| sfps | DcimGenericSFP | True | many | | +| sfps | DcimGenericSFP | True | many | Generic | ## Code @@ -113,15 +113,12 @@ generics: include_in_menu: true display_label: '{{ form_factor__value }} {{ sfp_type__value }}' attributes: - - name: serial + - name: serial_number kind: Text optional: true 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) @@ -164,10 +161,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 @@ -182,11 +180,10 @@ generics: label: Decommissioned description: Decommissioned might be broken or not used anymore. color: '#ffd27f' + optional: false + order_weight: 1200 - name: form_factor kind: Dropdown - description: The physical form factor of the SFP module. - order_weight: 1000 - optional: false choices: - name: sfp label: SFP @@ -227,53 +224,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: 1300 - 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 + include_in_menu: true 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 + include_in_menu: true 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 @@ -283,21 +285,27 @@ extensions: relationships: - name: plugged_sfp peer: DcimGenericSFP + kind: Generic cardinality: one optional: true identifier: sfp__interface + order_weight: 1700 - kind: LocationHosting relationships: - name: spare_sfps peer: DcimGenericSFP + kind: Generic cardinality: many optional: true + order_weight: 1750 - kind: OrganizationManufacturer relationships: - name: sfps - label: SFPs peer: DcimGenericSFP + kind: Generic + label: SFPs cardinality: many optional: true + order_weight: 1500 ``` \ No newline at end of file diff --git a/docs/docs/reference/snmp.mdx b/docs/docs/reference/snmp.mdx index d14bea59..93f2009a 100644 --- a/docs/docs/reference/snmp.mdx +++ b/docs/docs/reference/snmp.mdx @@ -2,7 +2,7 @@ title: SNMP --- -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. +This schema extension contains models for SNMP Communities and SNMP Clients. A community links to the devices it is configured on; any further wiring, to a tenant for instance, is left to you. ## Details @@ -24,8 +24,8 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| community_string | | Password | | | | -| access | | Dropdown | | | read_only, read_write | +| community_string | | Password | False | | | +| access | | Dropdown | False | | read_only, read_write | ### CommunityV3 @@ -40,12 +40,12 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| username | | Text | | | | -| auth_protocol | | Dropdown | | | none, md5, sha | +| username | | Text | False | | | +| auth_protocol | | Dropdown | False | | none, md5, sha | | auth_password | | Password | True | | | -| privacy_protocol | | Dropdown | | | none, des, aes | +| privacy_protocol | | Dropdown | False | | none, des, aes | | privacy_password | | Password | True | | | -| security_level | | Dropdown | | | noAuthNoPriv, authNoPriv, authPriv | +| security_level | | Dropdown | False | | no_auth_no_priv, auth_no_priv, auth_priv | ### Client @@ -59,15 +59,15 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | client_description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| ip_address | IpamIPAddress | | many | Attribute | -| community | SnmpCommunity | | many | | +| ip_addresses | IpamIPAddress | True | many | Attribute | +| communities | SnmpCommunity | True | many | Attribute | ## Generics @@ -83,15 +83,15 @@ This schema extension contains models for SNMP Communities and SNMP Clients. As | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| clients | SnmpClient | | many | Component | -| devices | DcimDevice | | many | Attribute | +| clients | SnmpClient | True | many | Component | +| devices | DcimGenericDevice | True | many | Attribute | ## Code @@ -103,48 +103,57 @@ generics: description: Generic model for SNMP community configurations. label: SNMP Community icon: iconoir:community + include_in_menu: true human_friendly_id: - name__value - display_label: name__value order_by: - name__value + display_label: name__value attributes: - name: name kind: Text + unique: true + optional: false 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 + optional: true + order_weight: 1900 - name: devices + peer: DcimGenericDevice label: Devices - description: Devices this community is configured on. - peer: DcimDevice - cardinality: many kind: Attribute - order_weight: 1200 + cardinality: many + optional: true + identifier: snmp_community__device + description: Devices this community is configured on. + order_weight: 1800 nodes: - name: CommunityV2 namespace: Snmp description: SNMP v1/v2c community configuration. label: SNMP v1/v2c icon: iconoir:community + include_in_menu: true 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 + optional: false order_weight: 1300 - name: access kind: Dropdown @@ -155,27 +164,30 @@ nodes: - name: read_write label: Read-Write description: Read-write access. + optional: false order_weight: 1200 - name: CommunityV3 namespace: Snmp description: SNMP version 3 configuration with enhanced security. label: SNMP v3 icon: iconoir:community + include_in_menu: true 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 + optional: false order_weight: 1300 - name: auth_protocol - label: Authentication Protocol kind: Dropdown + label: Authentication Protocol choices: - name: none label: None @@ -186,15 +198,16 @@ nodes: - name: sha label: SHA description: SHA authentication. + optional: false 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 @@ -205,57 +218,65 @@ nodes: - name: aes label: AES description: AES encryption. + optional: false 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 + - name: no_auth_no_priv label: NoAuthNoPriv description: No authentication and no privacy. - - name: authNoPriv + - name: auth_no_priv label: AuthNoPriv description: Authentication but no privacy. - - name: authPriv + - name: auth_priv label: AuthPriv description: Both authentication and privacy. + optional: false order_weight: 1200 - name: Client namespace: Snmp description: Represents an SNMP client that interacts with SNMP Community. label: SNMP Client icon: ph:user-list-light + include_in_menu: true 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 + unique: true + optional: false 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. + - name: ip_addresses peer: IpamIPAddress - cardinality: many + label: IP Addresses kind: Attribute + cardinality: many + optional: true + description: Authorized SNMP client address. order_weight: 1150 - - name: community + - name: communities peer: SnmpCommunity + kind: Attribute cardinality: many + optional: true order_weight: 1200 ``` \ No newline at end of file diff --git a/docs/docs/reference/tenancy.mdx b/docs/docs/reference/tenancy.mdx index d8d96796..b6d01eb6 100644 --- a/docs/docs/reference/tenancy.mdx +++ b/docs/docs/reference/tenancy.mdx @@ -13,8 +13,9 @@ This schema extension introduces a Tenant node that can own devices, IP prefixes ### Tenant +- **Label:** Tenant - **Description:** A tenant is the owner of the corresponding devices, addressing, and locations. -- **Namespace:** Tenancy +- **Namespace:** Organization - **Icon:** mdi:domain - **Inherit From:** OrganizationGeneric @@ -41,7 +42,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| tenant | TenancyTenant | True | one | Attribute | +| tenant | OrganizationTenant | True | one | Attribute | ### IpamPrefix @@ -49,7 +50,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| tenant | TenancyTenant | True | one | Attribute | +| tenant | OrganizationTenant | True | one | Attribute | ### IpamIPAddress @@ -57,7 +58,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| tenant | TenancyTenant | True | one | Attribute | +| tenant | OrganizationTenant | True | one | Attribute | ### LocationHosting @@ -65,7 +66,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| tenant | TenancyTenant | True | one | Attribute | +| tenant | OrganizationTenant | True | one | Attribute | ## Code @@ -73,78 +74,85 @@ In this context "extensions" refer to modifications or additions to the existing version: '1.0' nodes: - name: Tenant - namespace: Tenancy + namespace: Organization description: A tenant is the owner of the corresponding devices, addressing, and locations. + label: Tenant icon: mdi:domain include_in_menu: true + menu_placement: OrganizationGeneric inherit_from: - OrganizationGeneric relationships: - name: devices - label: Devices peer: DcimGenericDevice - identifier: tenant__device + label: Devices + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__device + order_weight: 1300 - name: prefixes - label: Prefixes peer: IpamPrefix - identifier: tenant__prefix + label: Prefixes + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__prefix + order_weight: 1350 - name: addresses - label: Addresses peer: IpamIPAddress - identifier: tenant__ipaddress + label: Addresses + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__ip_address + order_weight: 1400 - name: locations - label: Locations peer: LocationHosting - identifier: tenant__location + label: Locations + kind: Generic cardinality: many optional: true - kind: Generic + identifier: tenant__location + order_weight: 1450 extensions: nodes: - kind: DcimGenericDevice relationships: - name: tenant - peer: TenancyTenant - identifier: tenant__device - optional: true - cardinality: one + peer: OrganizationTenant kind: Attribute - order_weight: 1800 + cardinality: one + optional: true + identifier: tenant__device + order_weight: 1850 - kind: IpamPrefix relationships: - name: tenant - peer: TenancyTenant - identifier: tenant__prefix - optional: true - cardinality: one + peer: OrganizationTenant 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 + peer: OrganizationTenant kind: Attribute - order_weight: 1300 + cardinality: one + optional: true + identifier: tenant__ip_address + order_weight: 1350 - kind: LocationHosting relationships: - name: tenant - peer: TenancyTenant - identifier: tenant__location - optional: true - cardinality: one + peer: OrganizationTenant kind: Attribute + cardinality: one + optional: true + identifier: tenant__location + order_weight: 1800 ``` \ No newline at end of file diff --git a/docs/docs/reference/topology.mdx b/docs/docs/reference/topology.mdx index 4d490b56..26ef0676 100644 --- a/docs/docs/reference/topology.mdx +++ b/docs/docs/reference/topology.mdx @@ -8,6 +8,7 @@ A schema for defining and managing network topology, strategies, and services. - **Dependencies:** - [base](dcim) + - [extensions/vlan](vlan) ## Nodes @@ -191,8 +192,8 @@ A schema for defining and managing network topology, strategies, and services. | ---- | ---- | -------- | ----------- | ---- | | identifier | TopologyNetworkServiceIdentifier | False | one | Attribute | | topology | TopologyTopology | False | one | Parent | -| vlan | InfraVLAN | True | one | Component | -| prefix | InfraPrefix | True | one | Component | +| vlan | IpamVLAN | True | one | Component | +| prefix | IpamPrefix | True | one | Component | ## Generics @@ -216,7 +217,7 @@ A schema for defining and managing network topology, strategies, and services. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | location | LocationGeneric | True | many | | -| ip_addresses | InfraIPAddress | True | many | Component | +| ip_addresses | IpamIPAddress | True | many | Component | ### GenericElement @@ -333,7 +334,7 @@ generics: optional: true cardinality: many - name: ip_addresses - peer: InfraIPAddress + peer: IpamIPAddress optional: true cardinality: many kind: Component @@ -690,13 +691,13 @@ nodes: kind: Parent optional: false - name: vlan - peer: InfraVLAN + peer: IpamVLAN optional: true cardinality: one kind: Component order_weight: 1500 - name: prefix - peer: InfraPrefix + peer: IpamPrefix optional: true cardinality: one kind: Component diff --git a/docs/docs/reference/users.mdx b/docs/docs/reference/users.mdx deleted file mode 100644 index b2fc6162..00000000 --- a/docs/docs/reference/users.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: Users ---- - -This schema extension contains models for account management. - -## Details - -- **Dependencies:** - - [base](dcim) - -## Nodes - -### Group - -- **Label:** User Groups -- **Description:** User Group -- **Namespace:** User -- **Icon:** iconoir:group -- **Human Friendly ID:** name__value - -#### Attributes - -| name | description | kind | optional | default_value | choices | -| ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | -| description | | Text | True | | | -| idle_timeout | | Number | | | | -| permissions | | Dropdown | False | | admin, operator, read-only | - -### Account - -- **Label:** User Account -- **Description:** User login and authentication -- **Namespace:** User -- **Icon:** mdi:account-key -- **Human Friendly ID:** name__value - -#### Attributes - -| name | description | kind | optional | default_value | choices | -| ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | The login username | Text | | | | -| full_name | Full name of the account | Text | True | | | -| ssh_key | SSH key for secure access | Password | True | | | -| password | Password for login (alternative to SSH key) | Password | True | | | -| mfa_enabled | Whether multi-factor authentication is enabled | Boolean | | False | | - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| user_group | UserGroup | False | one | Attribute | -| organization | OrganizationGeneric | False | one | Parent | - -## 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. - -::: - -### OrganizationGeneric - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| accounts | UserAccount | | many | Component | - -## Code - -```yaml -version: '1.0' -nodes: -- name: Group - namespace: User - description: User Group - label: User Groups - icon: iconoir:group - display_label: name__value - order_by: - - name__value - human_friendly_id: - - name__value - attributes: - - name: name - kind: Text - order_weight: 1000 - unique: true - - name: description - kind: Text - optional: true - order_weight: 1100 - - name: idle_timeout - label: Idle Timeout (s) - kind: Number - order_weight: 1300 - - name: permissions - kind: Dropdown - optional: false - choices: - - name: admin - description: All rights on device. - color: '#E6E6FA' - - name: operator - description: Operator right on configuration. - color: '#E6E6FA' - - name: read-only - description: Read only right on configuration. - color: '#E6E6FA' - order_weight: 1200 -- name: Account - namespace: User - 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 - attributes: - - name: name - label: Username - kind: Text - description: The login username - order_weight: 1000 - unique: true - - name: full_name - kind: Text - optional: true - description: Full name of the account - order_weight: 1100 - - name: ssh_key - kind: Password - optional: true - description: SSH key for secure access - order_weight: 1300 - - name: password - kind: Password - optional: true - description: Password for login (alternative to SSH key) - order_weight: 1400 - - name: mfa_enabled - kind: Boolean - default_value: false - description: Whether multi-factor authentication is enabled - order_weight: 1500 - relationships: - - name: user_group - peer: UserGroup - cardinality: one - optional: false - kind: Attribute - order_weight: 1200 - - name: organization - peer: OrganizationGeneric - optional: false - cardinality: one - kind: Parent -extensions: - nodes: - - kind: OrganizationGeneric - relationships: - - name: accounts - kind: Component - peer: UserAccount - description: List of Accounts under this organization - cardinality: many - -``` \ No newline at end of file diff --git a/docs/docs/reference/vlan.mdx b/docs/docs/reference/vlan.mdx index 394bda37..14437cbb 100644 --- a/docs/docs/reference/vlan.mdx +++ b/docs/docs/reference/vlan.mdx @@ -14,8 +14,11 @@ This schema extension contains models to support VLANs in you network. ### VLAN - **Label:** VLAN +- **Description:** A plain VLAN, with no QinQ role of its own. - **Namespace:** Ipam -- **Inherit From:** GenericVLAN +- **Uniqueness Constraints:** + - vlan_id__value, vlan_group +- **Inherit From:** IpamGenericVLAN ### VLANGroup @@ -29,7 +32,7 @@ This schema extension contains models to support VLANs in you network. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships @@ -37,38 +40,25 @@ This schema extension contains models to support VLANs in you network. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | scope | IpamVLANGroupScope | True | one | Attribute | -| vlans | GenericVLAN | True | many | Component | +| vlans | IpamGenericVLAN | True | many | Component | ## Generics -### VLANGroupScope - -- **Description:** Mixin for objects that can scope a VLAN group (e.g. Region, Site, Rack). -- **Namespace:** Ipam - -#### Relationships - -| name | peer | optional | cardinality | kind | -| ---- | ---- | -------- | ----------- | ---- | -| vlan_groups | IpamVLANGroup | True | many | Attribute | - -### VLAN +### GenericVLAN - **Label:** VLAN -- **Description:** A VLAN is isolated layer two domain -- **Namespace:** Generic +- **Description:** A VLAN is an isolated layer two domain. +- **Namespace:** Ipam - **Icon:** mdi:lan-pending -- **Uniqueness Constraints:** - - vlan_id__value, vlan_group - **Human Friendly ID:** name__value #### Attributes | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | -| vlan_id | | Number | | | | +| vlan_id | | Number | False | | | | status | | Dropdown | False | active | active, reserved, provisioning, maintenance, deprecated | | role | | Dropdown | True | | server, management, user | @@ -87,13 +77,21 @@ In this context "extensions" refer to modifications or additions to the existing ::: +### IpamVLANGroupScope + +#### Relationships + +| name | peer | optional | cardinality | kind | +| ---- | ---- | -------- | ----------- | ---- | +| vlan_groups | IpamVLANGroup | True | many | Attribute | + ### IpamPrefix #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vlan | GenericVLAN | True | one | Attribute | +| vlan | IpamGenericVLAN | True | one | Attribute | ### InterfaceLayer2 @@ -101,34 +99,20 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| untagged_vlan | GenericVLAN | True | one | Generic | -| tagged_vlan | GenericVLAN | True | many | Generic | +| untagged_vlan | IpamGenericVLAN | True | one | Generic | +| tagged_vlan | IpamGenericVLAN | True | many | Generic | ## Code ```yaml version: '1.0' generics: -- name: VLANGroupScope +- name: GenericVLAN 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 + description: A VLAN is an isolated layer two domain. label: VLAN icon: mdi:lan-pending - uniqueness_constraints: - - - vlan_id__value - - vlan_group + include_in_menu: true human_friendly_id: - name__value order_by: @@ -137,18 +121,19 @@ generics: attributes: - name: name kind: Text - order_weight: 910 + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 - name: vlan_id kind: Number - order_weight: 900 + optional: false + order_weight: 1050 - name: status kind: Dropdown - optional: false default_value: active - order_weight: 920 choices: - name: active label: Active @@ -170,9 +155,10 @@ generics: label: Deprecated description: No longer in use and scheduled for removal. color: '#e04040' + optional: false + order_weight: 1200 - name: role kind: Dropdown - optional: true choices: - name: server label: Server @@ -186,84 +172,108 @@ generics: label: User description: Segments designed for end-user access and activities. color: '#a0b78d' + optional: true + order_weight: 1300 relationships: - name: prefixes peer: IpamPrefix - optional: true - cardinality: many kind: Attribute + cardinality: many + optional: true identifier: vlan__prefix + order_weight: 1500 - 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: 1400 nodes: - name: VLAN namespace: Ipam + description: A plain VLAN, with no QinQ role of its own. label: VLAN include_in_menu: false inherit_from: - - GenericVLAN + - IpamGenericVLAN + uniqueness_constraints: + - - vlan_id__value + - vlan_group - 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 + include_in_menu: true + menu_placement: IpamGenericVLAN human_friendly_id: - name__value display_label: name__value attributes: - name: name kind: Text + unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 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 + peer: IpamGenericVLAN kind: Component + cardinality: many + optional: true identifier: vlan_group__vlan + order_weight: 1500 extensions: nodes: + - kind: IpamVLANGroupScope + relationships: + - name: vlan_groups + peer: IpamVLANGroup + label: VLAN Groups + kind: Attribute + cardinality: many + optional: true + identifier: vlan_group__scope + order_weight: 1600 - kind: IpamPrefix relationships: - name: vlan - peer: GenericVLAN - optional: true - cardinality: one + peer: IpamGenericVLAN kind: Attribute - order_weight: 1400 + cardinality: one + optional: true identifier: vlan__prefix + order_weight: 1450 - kind: InterfaceLayer2 relationships: - name: untagged_vlan + peer: IpamGenericVLAN label: Untagged VLAN - peer: GenericVLAN - optional: true - cardinality: one kind: Generic + cardinality: one + optional: true identifier: interface_l2__untagged_vlan + order_weight: 1500 - name: tagged_vlan + peer: IpamGenericVLAN label: Tagged VLANs - peer: GenericVLAN - optional: true - cardinality: many kind: Generic + cardinality: many + optional: true identifier: interface_l2__tagged_vlan + order_weight: 1550 ``` \ No newline at end of file diff --git a/docs/docs/reference/vrf.mdx b/docs/docs/reference/vrf.mdx index 03db3d9a..603c1b89 100644 --- a/docs/docs/reference/vrf.mdx +++ b/docs/docs/reference/vrf.mdx @@ -14,7 +14,7 @@ This schema extension contains models to support VRF in your network. ### VRF - **Label:** VRF -- **Description:** A VRF is isolated layer three domain +- **Description:** A VRF is an isolated layer three domain. - **Namespace:** Ipam - **Icon:** mdi:router - **Human Friendly ID:** name__value @@ -25,7 +25,7 @@ This schema extension contains models to support VRF in your network. | ---- | ----------- | ---- | -------- | ------------- | ------- | | name | | Text | False | | | | vrf_rd | | Text | True | | | -| enforce_unique | | Boolean | True | True | | +| enforce_unique | Declares the intent that prefixes and addresses be unique in this VRF. Infrahub does not enforce it; use a check or generator. | Boolean | True | True | | | description | | Text | True | | | #### Relationships @@ -47,15 +47,15 @@ This schema extension contains models to support VRF in your network. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | | Text | | | | +| name | | Text | False | | | | description | | Text | True | | | #### Relationships | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| import_vrf | IpamVRF | True | many | | -| export_vrf | IpamVRF | True | many | | +| import_vrf | IpamVRF | True | many | Generic | +| export_vrf | IpamVRF | True | many | Generic | ## Extensions @@ -88,9 +88,10 @@ version: '1.0' nodes: - name: VRF namespace: Ipam - description: A VRF is isolated layer three domain + description: A VRF is an isolated layer three domain. label: VRF icon: mdi:router + include_in_menu: true human_friendly_id: - name__value order_by: @@ -99,42 +100,49 @@ nodes: attributes: - name: name kind: Text - optional: false unique: true + optional: false + order_weight: 1000 - name: vrf_rd - label: Route Distinguisher kind: Text + label: Route Distinguisher optional: true + order_weight: 1050 - name: enforce_unique - label: Enforce Unique kind: Boolean + label: Enforce Unique + description: Declares the intent that prefixes and addresses be unique in this + VRF. Infrahub does not enforce it; use a check or generator. default_value: true optional: true - order_weight: 1100 + order_weight: 1200 - name: description kind: Text optional: true - order_weight: 1200 + order_weight: 1100 relationships: - 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 + order_weight: 1300 - 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 + order_weight: 1350 - name: RouteTarget namespace: Ipam description: Route Target (RFC 4360) label: Route Target icon: mdi:target + include_in_menu: true menu_placement: IpamVRF human_friendly_id: - name__value @@ -145,43 +153,50 @@ nodes: - name: name kind: Text unique: true + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 relationships: - name: import_vrf - label: Imported by VRFs - identifier: vrf__import peer: IpamVRF - optional: true + kind: Generic + label: Imported by VRFs cardinality: many + optional: true + identifier: vrf__import + order_weight: 1300 - name: export_vrf - label: Exported by VRFs - identifier: vrf__export peer: IpamVRF - optional: true + kind: Generic + label: Exported by VRFs cardinality: many + optional: true + identifier: vrf__export + order_weight: 1350 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 ``` \ No newline at end of file diff --git a/docs/docs/reference/vrrp.mdx b/docs/docs/reference/vrrp.mdx index 120d9479..cf0407b9 100644 --- a/docs/docs/reference/vrrp.mdx +++ b/docs/docs/reference/vrrp.mdx @@ -23,8 +23,8 @@ This schema extension contains models for VRRP. | name | description | kind | optional | default_value | choices | | ---- | ----------- | ---- | -------- | ------------- | ------- | -| name | Unique name of the entry | Text | | | | -| vrid | Virtual Router ID (VRID, should be between 1 and 255) | Number | | | | +| name | Unique name of the entry | Text | False | | | +| vrid | Virtual Router ID (VRID, should be between 1 and 255) | Number | False | | | | password | VRRP Password/Key | HashedPassword | True | | | #### Relationships @@ -32,7 +32,7 @@ This schema extension contains models for VRRP. | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | | ip_addresses | IpamIPAddress | True | many | Attribute | -| vrrp_interfaces | NetworkVRRPInterface | | many | Component | +| vrrp_interfaces | NetworkVRRPInterface | True | 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 1 and 255) | Number | | 100 | | +| priority | VRRP Priority (Should be between 1 and 255) | Number | False | 100 | | #### Relationships @@ -70,7 +70,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vrrp | NetworkVRRPInterface | | one | Component | +| vrrp | NetworkVRRPInterface | True | one | Component | ### IpamIPAddress @@ -78,7 +78,7 @@ In this context "extensions" refer to modifications or additions to the existing | name | peer | optional | cardinality | kind | | ---- | ---- | -------- | ----------- | ---- | -| vrrp | NetworkVRRPGroup | | one | Component | +| vrrp | NetworkVRRPGroup | True | one | Attribute | ## Code @@ -87,58 +87,63 @@ 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 + include_in_menu: true human_friendly_id: - name__value + order_by: + - name__value + display_label: name__value attributes: - name: name kind: Text label: Name unique: true + optional: false description: Unique name of the entry order_weight: 1000 - name: vrid kind: Number + label: VRID parameters: min_value: 1 max_value: 255 + optional: false 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 + optional: true order_weight: 1300 - name: VRRPInterface namespace: Network + description: VRRP Interface configuration label: VRRP Interface icon: carbon:interface-usage + include_in_menu: true menu_placement: NetworkVRRPGroup - description: VRRP Interface configuration order_by: - priority__value uniqueness_constraints: @@ -148,48 +153,51 @@ nodes: - name: priority kind: Number label: VRRP Priority + default_value: 100 parameters: min_value: 1 max_value: 255 + optional: false 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: nodes: - kind: InterfaceLayer3 relationships: - name: vrrp - kind: Component peer: NetworkVRRPInterface - description: VRRP Interface Configuration - cardinality: one label: VRRP - order_weight: 1500 + kind: Component + cardinality: one + optional: true + description: VRRP Interface Configuration + order_weight: 1650 - kind: IpamIPAddress relationships: - name: vrrp - kind: Component peer: NetworkVRRPGroup - description: Part of VRRP Group - cardinality: one label: VRRP Group - order_weight: 1600 + kind: Attribute + cardinality: one + optional: true + description: Part of VRRP Group + order_weight: 1700 ``` \ No newline at end of file diff --git a/experimental/azure/azure.yml b/experimental/azure/azure.yml index 6b7fe33c..f52ca423 100644 --- a/experimental/azure/azure.yml +++ b/experimental/azure/azure.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- diff --git a/experimental/circuit_service/circuit_service.yml b/experimental/circuit_service/circuit_service.yml index ba541817..4f16c599 100644 --- a/experimental/circuit_service/circuit_service.yml +++ b/experimental/circuit_service/circuit_service.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- @@ -35,7 +35,7 @@ nodes: cardinality: one kind: Attribute - name: circuit_endpoints - peer: CircuitEndpoint + peer: DcimCircuitEndpoint optional: true cardinality: many kind: Component @@ -48,7 +48,7 @@ extensions: peer: CircuitService cardinality: many optional: true - - kind: CircuitEndpoint + - kind: DcimCircuitEndpoint relationships: - name: circuit_service peer: CircuitService diff --git a/experimental/firewall_policer/firewall_policer.yml b/experimental/firewall_policer/firewall_policer.yml index 730d1a7d..d330a396 100644 --- a/experimental/firewall_policer/firewall_policer.yml +++ b/experimental/firewall_policer/firewall_policer.yml @@ -2,7 +2,7 @@ # 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 +# 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/infiniband/infiniband.yml b/experimental/infiniband/infiniband.yml index aa180b9a..300e948b 100644 --- a/experimental/infiniband/infiniband.yml +++ b/experimental/infiniband/infiniband.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- diff --git a/experimental/location_extended/location_extended.yml b/experimental/location_extended/location_extended.yml index 4ce118d5..fe010d94 100644 --- a/experimental/location_extended/location_extended.yml +++ b/experimental/location_extended/location_extended.yml @@ -1,12 +1,13 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- version: "1.0" +# Defines Location.Rack. Mutually exclusive with extensions/rack, load one, not both. nodes: # -------------------- Locations -------------------- - name: Continent @@ -114,7 +115,7 @@ nodes: label: Rack display_label: name__value human_friendly_id: - - shortname__value + - name__value parent: "LocationSuite" children: "" icon: "clarity:rack-server-line" diff --git a/experimental/modules_linecards/linecard.yml b/experimental/modules_linecards/linecard.yml index 281509fd..dfa4ce06 100644 --- a/experimental/modules_linecards/linecard.yml +++ b/experimental/modules_linecards/linecard.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- diff --git a/experimental/modules_routing_engine/routing_engine.yml b/experimental/modules_routing_engine/routing_engine.yml index 48fb8267..4d93dd86 100644 --- a/experimental/modules_routing_engine/routing_engine.yml +++ b/experimental/modules_routing_engine/routing_engine.yml @@ -2,7 +2,7 @@ # 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 +# 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/optical_transport/optical_transport.yml b/experimental/optical_transport/optical_transport.yml index 42bad3bb..0ecb9e65 100644 --- a/experimental/optical_transport/optical_transport.yml +++ b/experimental/optical_transport/optical_transport.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- @@ -712,8 +712,8 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ module_bay__device__serial__value }}-TPD-{{ slot_number__value }}" - description: "Computed module name (e.g., ABC123-TPD-1/1)" + jinja2_template: "{{ module_bay__computed_name__value }}-TPD-{{ slot_number__value }}" + description: "Computed module name (e.g., dc1-leaf1 > slot 1-TPD-1/1)" - name: slot_number kind: Text optional: false @@ -826,8 +826,8 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ module_bay__device__serial__value }}-MUX-{{ slot_number__value }}" - description: "Computed module name (e.g., ABC123-MUX-1/3)" + jinja2_template: "{{ module_bay__computed_name__value }}-MUX-{{ slot_number__value }}" + description: "Computed module name (e.g., dc1-leaf1 > slot 1-MUX-1/3)" - name: slot_number kind: Text optional: false @@ -1130,8 +1130,8 @@ nodes: optional: false computed_attribute: kind: Jinja2 - jinja2_template: "{{ module_bay__device__serial__value }}-AMP-{{ slot_number__value }}" - description: "Computed module name (e.g., ABC123-AMP-1/5)" + jinja2_template: "{{ module_bay__computed_name__value }}-AMP-{{ slot_number__value }}" + description: "Computed module name (e.g., dc1-leaf1 > slot 1-AMP-1/5)" - name: slot_number kind: Text optional: false diff --git a/experimental/qos/qos.yml b/experimental/qos/qos.yml index 823f06b7..120651ee 100644 --- a/experimental/qos/qos.yml +++ b/experimental/qos/qos.yml @@ -2,7 +2,7 @@ # 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 +# 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/security/security.yml b/experimental/security/security.yml index e6178b79..a727c25e 100644 --- a/experimental/security/security.yml +++ b/experimental/security/security.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- diff --git a/experimental/topology/topology.yml b/experimental/topology/topology.yml index b2c1d8d3..54bedfbc 100644 --- a/experimental/topology/topology.yml +++ b/experimental/topology/topology.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- @@ -49,7 +49,7 @@ generics: optional: true cardinality: many - name: ip_addresses - peer: InfraIPAddress + peer: IpamIPAddress optional: true cardinality: many kind: Component @@ -404,13 +404,13 @@ nodes: kind: Parent optional: false - name: vlan - peer: InfraVLAN + peer: IpamVLAN optional: true cardinality: one kind: Component order_weight: 1500 - name: prefix - peer: InfraPrefix + peer: IpamPrefix optional: true cardinality: one kind: Component diff --git a/experimental/vlan-translation/vlan-translation.yml b/experimental/vlan-translation/vlan-translation.yml index 9666425a..ee4cb430 100644 --- a/experimental/vlan-translation/vlan-translation.yml +++ b/experimental/vlan-translation/vlan-translation.yml @@ -1,7 +1,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- --- diff --git a/extensions/aggregate/aggregate.yml b/extensions/aggregate/aggregate.yml index 2b1513c0..9a8b4d5a 100644 --- a/extensions/aggregate/aggregate.yml +++ b/extensions/aggregate/aggregate.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -14,7 +14,7 @@ nodes: label: Aggregate icon: mdi:ip-network include_in_menu: true - menu_placement: OrganizationRIR + menu_placement: BuiltinIPAM inherit_from: - BuiltinIPPrefix human_friendly_id: @@ -22,6 +22,8 @@ nodes: order_by: - prefix__value display_label: prefix__value + uniqueness_constraints: + - [prefix__value] attributes: - name: description kind: Text @@ -50,13 +52,15 @@ nodes: label: RIR icon: mdi:certificate include_in_menu: true + menu_placement: OrganizationGeneric inherit_from: - OrganizationGeneric attributes: - - name: is_private + - name: private kind: Boolean label: Private default_value: false + optional: false description: Indicates this RIR manages private (RFC 1918 / RFC 4193) address space. order_weight: 1300 relationships: diff --git a/extensions/cable/cable.yml b/extensions/cable/cable.yml index 9a13dcbb..c51b593d 100644 --- a/extensions/cable/cable.yml +++ b/extensions/cable/cable.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,9 +13,12 @@ nodes: description: Physical cable connecting two endpoints label: Cable icon: mdi:cable-data + include_in_menu: true menu_placement: DcimDevice inherit_from: - DcimConnector + human_friendly_id: + - label__value order_by: - label__value display_label: label__value @@ -26,14 +29,14 @@ nodes: choices: - name: connected label: Connected - description: Fully operational and currently in connected + description: Fully operational and currently connected color: "#00d25b" - name: planned label: Planned description: In the process of being set up color: "#2196f3" optional: false - order_weight: 1000 + order_weight: 1200 - name: cable_type kind: Dropdown choices: @@ -71,41 +74,41 @@ nodes: description: "Category 8 twisted pair cable." color: "#99ccff" # Light Blue # Fiber Cables (Multi-mode) - - name: mmf-om1 + - name: mmf_om1 label: Multimode Fiber OM1 description: "Multimode fiber (62.5/125 µm)." color: "#ff9933" # Dark Orange - - name: mmf-om2 + - name: mmf_om2 label: Multimode Fiber OM2 description: "Multimode fiber (50/125 µm)." color: "#ff9933" # Dark Orange - - name: mmf-om3 + - name: mmf_om3 label: Multimode Fiber OM3 description: "Optimized multimode fiber (50/125 µm)." color: "#ff9933" # Dark Orange - - name: mmf-om4 + - name: mmf_om4 label: Multimode Fiber OM4 description: "Enhanced multimode fiber (50/125 µm)." color: "#ff9933" # Dark Orange - - name: mmf-om5 + - 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 + - name: smf_os1 label: Singlemode Fiber OS1 description: "Standard singlemode fiber." color: "#ffcc00" # Yellow - - name: smf-os2 + - name: smf_os2 label: Singlemode Fiber OS2 description: "Improved singlemode fiber." color: "#ffcc00" # Yellow # Direct Attach and Active Optical Cables - - name: dac-passive + - name: dac_passive label: Passive DAC description: "Direct Attach Copper (Passive)." color: "#a0a0a0" # Grey - - name: dac-active + - name: dac_active label: Active DAC description: "Direct Attach Copper (Active)." color: "#a0a0a0" # Grey @@ -118,7 +121,7 @@ nodes: label: Coaxial description: "Coaxial cable for broadband." color: "#000000" # Black - - name: mrj21-trunk + - name: mrj21_trunk label: MRJ21 Trunk description: "High-density copper cable." color: "#000000" # Black @@ -135,7 +138,7 @@ nodes: - name: color kind: Dropdown choices: - - name: dark-red + - name: dark_red label: Dark Red color: "#aa1409" - name: red @@ -153,7 +156,7 @@ nodes: - name: purple label: Purple color: "#9c27b0" - - name: dark-purple + - name: dark_purple label: Dark Purple color: "#673ab7" - name: indigo @@ -162,7 +165,7 @@ nodes: - name: blue label: Blue color: "#2196f3" - - name: light-blue + - name: light_blue label: Light Blue color: "#03a9f4" - name: cyan @@ -174,13 +177,13 @@ nodes: - name: aqua label: Aqua color: "#00ffff" - - name: dark-green + - name: dark_green label: Dark Green color: "#2f6a31" - name: green label: Green color: "#4caf50" - - name: light-green + - name: light_green label: Light Green color: "#8bc34a" - name: lime @@ -195,19 +198,19 @@ nodes: - name: orange label: Orange color: "#ff9800" - - name: dark-orange + - name: dark_orange label: Dark Orange color: "#ff5722" - name: brown label: Brown color: "#795548" - - name: light-grey + - name: light_grey label: Light Grey color: "#c0c0c0" - name: grey label: Grey color: "#9e9e9e" - - name: dark-grey + - name: dark_grey label: Dark Grey color: "#607d8b" - name: black @@ -215,10 +218,13 @@ nodes: color: "#111111" optional: true order_weight: 1300 + # Optional so a cable can be recorded before anyone labels it in the field, unique + # so a labelled cable still resolves through the human_friendly_id. - name: label kind: Text + unique: true optional: true - order_weight: 1200 + order_weight: 1000 # As we can't put float in Number "forcing" length in cm - name: length kind: Number diff --git a/extensions/circuit/circuit.yml b/extensions/circuit/circuit.yml index 99aca00e..984265a0 100644 --- a/extensions/circuit/circuit.yml +++ b/extensions/circuit/circuit.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -14,6 +14,7 @@ nodes: description: A Circuit represent service operated by a provider. label: Circuit icon: mdi:cable-data + include_in_menu: true human_friendly_id: - circuit_id__value order_by: @@ -23,14 +24,17 @@ nodes: - name: circuit_id kind: Text unique: true + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 - name: commit_rate kind: Number label: Commit Rate (Kbps) optional: true - order_weight: 1100 + order_weight: 1400 - name: circuit_type kind: Dropdown choices: @@ -56,6 +60,7 @@ nodes: color: "#7f00ff" optional: true description: Specifies the type of circuit. + order_weight: 1300 - name: status kind: Dropdown default_value: active @@ -77,6 +82,7 @@ nodes: description: Temporarily taken out of service. color: "#9e9e9e" optional: false + order_weight: 1200 relationships: - name: provider peer: OrganizationProvider @@ -84,18 +90,25 @@ nodes: cardinality: one optional: false identifier: circuit__provider + order_weight: 1500 - name: endpoints peer: DcimCircuitEndpoint kind: Component cardinality: many optional: true identifier: circuit__endpoint + order_weight: 1600 + # The description field carries the provider-side reference for the termination, + # for example a patch panel position or a cross-connect ID. - name: CircuitEndpoint namespace: Dcim - description: A circuit endpoint, could be a position in a MMR... + description: >- + One of the two terminations (A or Z) of a circuit, at the location where the provider hands + the circuit off. label: Circuit Endpoint icon: mdi:ethernet + include_in_menu: true menu_placement: DcimCircuit inherit_from: - DcimEndpoint @@ -149,9 +162,11 @@ nodes: description: Temporarily taken out of service. color: "#9e9e9e" optional: false + order_weight: 1200 - name: description kind: Text optional: true + order_weight: 1100 relationships: - name: circuit peer: DcimCircuit @@ -174,13 +189,17 @@ extensions: relationships: - name: circuits peer: DcimCircuit + kind: Generic cardinality: many optional: true identifier: circuit__provider + order_weight: 1300 - kind: LocationHosting relationships: - name: circuit_endpoints peer: DcimCircuitEndpoint + kind: Generic cardinality: many optional: true identifier: circuit_endpoint__location + order_weight: 1700 diff --git a/extensions/circuit_contract/circuit_contract.yml b/extensions/circuit_contract/circuit_contract.yml index e7df138f..e9baf67d 100644 --- a/extensions/circuit_contract/circuit_contract.yml +++ b/extensions/circuit_contract/circuit_contract.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -12,6 +12,7 @@ nodes: description: A contract document associated with a circuit service, including terms, costs, and validity period. label: Circuit Contract icon: mdi:file-sign + include_in_menu: true menu_placement: DcimCircuit inherit_from: - CoreFileObject @@ -28,15 +29,19 @@ nodes: kind: Jinja2 jinja2_template: "contract_{{ circuit__circuit_id__value }}" optional: false # As it's a Jinja2 kind of attribute you can make it mandatory + order_weight: 1000 - name: contract_start kind: DateTime optional: false + order_weight: 1200 - name: contract_end kind: DateTime optional: false + order_weight: 1300 - name: monthly_cost kind: Number optional: true + order_weight: 1400 - name: currency kind: Dropdown choices: @@ -50,6 +55,7 @@ nodes: label: GBP description: British Pound Sterling optional: true + order_weight: 1450 relationships: # Example of a relationship to capture the account that signed the contract # - name: signed_by @@ -70,6 +76,8 @@ extensions: relationships: - name: contract peer: DcimCircuitContract + kind: Generic cardinality: one optional: true identifier: circuit__contract + order_weight: 1550 diff --git a/extensions/cluster/cluster.yml b/extensions/cluster/cluster.yml index 6788d7da..5d1192c1 100644 --- a/extensions/cluster/cluster.yml +++ b/extensions/cluster/cluster.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -22,15 +22,17 @@ generics: - name: name kind: Text unique: true + optional: false description: Name of the cluster. order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 relationships: - - name: location + - name: locations peer: LocationGeneric - label: Location + label: Locations kind: Attribute cardinality: many optional: false @@ -53,17 +55,21 @@ generics: kind: Component cardinality: many identifier: worker_in_cluster + optional: true + order_weight: 1500 extensions: nodes: - kind: ComputeGenericUnit relationships: - name: worker_in_cluster peer: ClusterGenericComputeUnitNodes + kind: Generic label: Worker in cluster cardinality: one optional: true identifier: worker_in_cluster description: This device is a worker node of the specified cluster. + order_weight: 1900 - kind: LocationGeneric relationships: - name: clusters @@ -73,3 +79,4 @@ extensions: cardinality: many optional: true description: All clusters available on that location. + order_weight: 1650 diff --git a/extensions/compute/compute.yml b/extensions/compute/compute.yml index c773ff96..709babf9 100644 --- a/extensions/compute/compute.yml +++ b/extensions/compute/compute.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -11,7 +11,8 @@ generics: - name: GenericUnit namespace: Compute description: A generic unit that can compute (e.g. server, vm ...). - include_in_menu: false + label: Compute + include_in_menu: true - name: HostVirtualMachine namespace: Virtualization @@ -24,6 +25,7 @@ generics: cardinality: many optional: true identifier: host__virtual_machine + order_weight: 1450 nodes: - name: PhysicalServer @@ -31,7 +33,8 @@ nodes: description: A physical server with fixed resources and specific hardware characteristics. label: Physical Server icon: mdi:server - menu_placement: DcimDevice + include_in_menu: true + menu_placement: ComputeGenericUnit inherit_from: - ComputeGenericUnit - DcimGenericDevice @@ -60,13 +63,14 @@ nodes: description: Temporarily taken out of service. color: "#9e9e9e" optional: false - order_weight: 1100 + order_weight: 1200 - name: VirtualMachine namespace: Virtualization description: A virtual machine hosted on a server or a cluster. label: Virtual Machine icon: carbon:virtual-machine + menu_placement: ComputeGenericUnit include_in_menu: true inherit_from: - ComputeGenericUnit @@ -76,27 +80,29 @@ nodes: kind: Dropdown choices: - name: application + label: Application color: "#7f7fff" - name: storage + label: Storage color: "#bf7fbf" optional: true description: Role of the virtual machine. - order_weight: 1400 + order_weight: 1300 - name: vcpu kind: Number optional: true description: Number of CPU cores assigned to the VM. - order_weight: 1900 + order_weight: 1400 - name: memory kind: Number optional: true description: Amount of memory (in GB) assigned to the VM. - order_weight: 1900 + order_weight: 1450 - name: disk kind: Number optional: true description: Disk space (in GB) assigned to the VM. - order_weight: 1900 + order_weight: 1500 relationships: - name: host peer: VirtualizationHostVirtualMachine @@ -104,4 +110,4 @@ nodes: cardinality: one optional: false identifier: host__virtual_machine - order_weight: 1500 + order_weight: 1350 diff --git a/extensions/cross_connect/cross_connect.yml b/extensions/cross_connect/cross_connect.yml index 539a1f69..d7675992 100644 --- a/extensions/cross_connect/cross_connect.yml +++ b/extensions/cross_connect/cross_connect.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,6 +13,7 @@ nodes: description: Cross-connect between different endpoints within a datacenter. label: Cross-Connect icon: streamline:arrow-crossover-right-solid + include_in_menu: true inherit_from: - DcimConnector human_friendly_id: @@ -26,27 +27,29 @@ nodes: attributes: - name: identifier kind: Text - order_weight: 900 + optional: false + order_weight: 1000 - name: description kind: Text optional: true - order_weight: 1300 + order_weight: 1100 - name: status kind: Dropdown + default_value: planned choices: - name: connected label: Connected - description: "Fully operational and currently in connected" - color: "#7fbf7f" + description: "Fully operational and currently connected" + color: "#00d25b" - name: planned label: Planned description: "In the process of being set up" - color: "#ffff7f" + color: "#2196f3" - name: reserved label: Reserved description: "Fully connected and reserved for a future use" - color: "#9090de" - optional: true + color: "#4d90fe" + optional: false order_weight: 1200 relationships: - name: location @@ -55,10 +58,10 @@ nodes: kind: Attribute cardinality: one optional: false - order_weight: 1100 + order_weight: 1400 - name: provider peer: OrganizationProvider kind: Attribute cardinality: one optional: false - order_weight: 1000 + order_weight: 1300 diff --git a/extensions/device_module/device_module.yml b/extensions/device_module/device_module.yml index 5f18ed63..06e8073b 100644 --- a/extensions/device_module/device_module.yml +++ b/extensions/device_module/device_module.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- @@ -14,26 +14,57 @@ generics: description: "A generic module, such as a Linecard or Routing Engine, installed in a module bay." label: "Module" icon: mdi:expansion-card + include_in_menu: true human_friendly_id: - computed_name__value display_label: computed_name__value attributes: - # Overriten at node level - name: computed_name kind: Text unique: true read_only: true optional: false allow_override: any + computed_attribute: + kind: Jinja2 + jinja2_template: "{{ module_bay__computed_name__value }}" + description: "Name computed from the module bay; concrete module kinds may refine it." order_weight: 1000 - name: serial_number kind: Text optional: true description: "Serial number of the module, if known." - order_weight: 1100 + order_weight: 1400 - name: description kind: Text optional: true + order_weight: 1100 + - name: status + kind: Dropdown + default_value: active + choices: + - name: provisioning + label: Provisioning + description: "Module is being installed and provisioned." + color: "#f0ad4e" + - name: active + label: Active + description: "Module is installed and operational." + color: "#00d25b" + - name: maintenance + label: Maintenance + description: "Module is under maintenance." + color: "#ff9800" + - name: failed + label: Failed + description: "Module is still installed but is not operational." + color: "#e04040" + - name: rma + label: RMA + description: "Module has failed and is being returned to the manufacturer." + color: "#6c757d" + optional: false + description: "Operational status of the module." order_weight: 1200 relationships: - name: module_bay @@ -52,6 +83,7 @@ generics: description: "A generic module type, with common specifications like part number and manufacturer." label: "Module Type" icon: mdi:database-cog + include_in_menu: true menu_placement: DcimGenericModule human_friendly_id: - name__value @@ -65,6 +97,7 @@ generics: - name: name kind: Text unique: true + optional: false description: "Name of the module type." order_weight: 1000 - name: description @@ -94,6 +127,7 @@ nodes: description: "A physical bay on a device that can receive a module." label: "Module Bay" icon: mdi:tray + include_in_menu: true menu_placement: DcimDevice human_friendly_id: - computed_name__value @@ -116,12 +150,16 @@ nodes: order_weight: 800 - name: name kind: Text + optional: false description: "Name of the bay, e.g. 'slot 1' or 'psu 1'." order_weight: 1000 - name: position - kind: Text + kind: Number optional: true - description: "Position identifier, substituted into a module's token." + parameters: + min_value: 1 + description: "Numeric position of the bay within the device (e.g. slot 1, 2, 3)." + order_weight: 1050 - name: description kind: Text optional: true @@ -130,7 +168,7 @@ nodes: kind: Dropdown optional: true description: "The role of the module bay, indicating the type of module it is intended to receive." - order_weight: 1150 + order_weight: 1300 choices: - name: supervisor label: Supervisor @@ -152,8 +190,8 @@ nodes: - name: device peer: DcimPhysicalDevice label: Device - # DcimGenericDevice (not DcimPhysicalDevice) so `name` is resolvable in computed_name above - - # PhysicalDevice itself carries no identifying attribute. + # Peer is DcimPhysicalDevice; base/dcim.yml adds `name` to that generic so + # `device__name__value` resolves in computed_name above. kind: Parent cardinality: one optional: false @@ -217,3 +255,4 @@ extensions: optional: true identifier: device__module_bays description: "Module bays available on this device." + order_weight: 1750 diff --git a/extensions/device_psu_module/device_psu_module.yml b/extensions/device_psu_module/device_psu_module.yml index 6c199315..28b5d220 100644 --- a/extensions/device_psu_module/device_psu_module.yml +++ b/extensions/device_psu_module/device_psu_module.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- @@ -47,10 +47,13 @@ nodes: attributes: - name: wattage kind: Number + label: Wattage (W) optional: true + parameters: + min_value: 1 description: "Wattage in watts." order_weight: 1300 - - name: hotswappable + - name: hot_swappable kind: Boolean label: Hot-Swappable default_value: false diff --git a/extensions/dwdm/dwdm.yml b/extensions/dwdm/dwdm.yml index c3ad93fc..c8dcdd32 100644 --- a/extensions/dwdm/dwdm.yml +++ b/extensions/dwdm/dwdm.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,115 +10,121 @@ version: "1.0" generics: - name: GenericOadmInterface namespace: Dcim + description: Generic interface of an optical add-drop multiplexer, front or rear. label: Optical Multiplexer Interfaces icon: mdi:ethernet + include_in_menu: true menu_placement: DcimOpticalMultiplexer attributes: - name: name kind: Text + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 + # NOTE: this choice list is duplicated in extensions/patch_panel and the two must be + # kept in sync. Infrahub cannot share a choice list across extension files without a + # shared generic in a common ancestor, which is a base-tier change. - name: connector_type kind: Dropdown choices: - - name: FC + - name: fc label: FC description: "Standardized fiber optic connector used primarily in datacom and telecom applications." - - name: LC + - name: lc label: LC description: "Compact fiber optic connector with a push-pull mechanism." - - name: LC_PC + - name: lc_pc label: LC/PC description: "Polished LC connector providing physical contact (PC)." - - name: LC_UPC + - name: lc_upc label: LC/UPC description: "Ultra-Physical Contact (UPC) variant of the LC connector with enhanced polish." - - name: LC_APC + - name: lc_apc label: LC/APC description: "Angled Physical Contact (APC) version of the LC connector with a slanted fiber end-face." - - name: LSH + - name: lsh label: LSH description: "European fiber optic connector offering high durability." - - name: LSH_PC + - name: lsh_pc label: LSH/PC description: "Physical Contact version of LSH with standard polish." - - name: LSH_UPC + - name: lsh_upc label: LSH/UPC description: "Ultra-Physical Contact variant of LSH, minimizing return loss with a superior polish." - - name: LSH_APC + - name: lsh_apc label: LSH/APC description: "Angled Physical Contact version of LSH, designed to reduce back reflections." - - name: LX_5 + - name: lx_5 label: LX.5 description: "Miniaturized fiber optic connector similar to LC but with an additional shutter mechanism." - - name: LX_5_PC + - name: lx_5_pc label: LX.5/PC description: "Physical Contact version of LX.5." - - name: LX_5_UPC + - name: lx_5_upc label: LX.5/UPC description: "Ultra-Physical Contact variant of LX.5." - - name: LX_5_APC + - name: lx_5_apc label: LX.5/APC description: "Angled Physical Contact version of LX.5." - - name: MPO + - name: mpo label: MPO description: "Multi-fiber Push-On connector typically used in data centers for high-speed applications." - - name: MTRJ + - name: mtrj label: MTRJ description: "Male-to-female fiber optic connector with two fibers." - - name: SC + - name: sc label: SC description: "Square fiber optic connector with push-pull lock." - - name: SC_PC + - name: sc_pc label: SC/PC description: "Physical Contact SC connector with a polished end-face." - - name: SC_UPC + - name: sc_upc label: SC/UPC description: "Ultra-Physical Contact variant of SC." - - name: SC_APC + - name: sc_apc label: SC/APC description: "Angled Physical Contact version of SC." - - name: ST + - name: st label: ST description: "Bayonet-style fiber optic connector primarily used in industrial and military applications." - - name: CS + - name: cs label: CS description: "Compact connector with a high-density duplex configuration." - - name: SN + - name: sn label: SN description: "Small-form connector with dual fibers." - - name: SMA_905 + - name: sma_905 label: SMA 905 description: "Stainless steel fiber optic connector." - - name: SMA_906 + - name: sma_906 label: SMA 906 description: "Variant of SMA 905 with similar durability, frequently used in high-vibration settings." - - name: URM_P2 + - name: urm_p2 label: URM-P2 description: "Specialized fiber optic connector for industrial and harsh environments." - # FIXME: Commenting out otherwise I'm facing a Text attribute length should be less than 4096 characters. - # - name: URM_P4 - # label: URM-P4 - # description: "Similar to URM-P2 but designed for higher performance." - # - name: URM_P8 - # label: URM-P8 - # description: "Enhanced version of URM connectors with higher protection." - # - name: Splice - # label: Splice - # description: "Permanent fiber connection method where two fiber ends are fused." - optional: true - order_weight: 1100 + - name: urm_p4 + label: URM-P4 + description: "Similar to URM-P2 but designed for higher performance." + - name: urm_p8 + label: URM-P8 + description: "Enhanced version of URM connectors with higher protection." + - name: splice + label: Splice + description: "Permanent fiber connection method where two fiber ends are fused." + optional: false + order_weight: 1200 nodes: - name: OpticalMultiplexer namespace: Dcim - description: | + description: >- An OADM (Optical Add Drop Multiplexer) supporting various WDM (Wavelength Division Multiplexing) technologies. label: Optical Multiplexer icon: mdi:transit-connection-variant + include_in_menu: true inherit_from: - DcimPhysicalDevice human_friendly_id: @@ -130,6 +136,7 @@ nodes: - name: name kind: Text unique: true + optional: false order_weight: 1000 - name: wdm_type kind: Dropdown @@ -144,12 +151,12 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" optional: false - description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1100 + description: Type of WDM technology (e.g. CWDM, DWDM) + order_weight: 1300 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 relationships: - name: front_interfaces peer: DcimOadmFrontInterface @@ -157,16 +164,20 @@ nodes: cardinality: many optional: true identifier: optical_multiplexer__front_interfaces + order_weight: 1350 - name: rear_interface peer: DcimOadmRearInterface kind: Component cardinality: one optional: true identifier: optical_multiplexer__rear_interface + order_weight: 1450 - name: OadmFrontInterface namespace: Dcim + description: Client-side interface of an optical add-drop multiplexer, carrying a single channel. label: Optical Multiplexer Front Interfaces + include_in_menu: true menu_placement: DcimGenericOadmInterface inherit_from: - DcimEndpoint @@ -194,11 +205,13 @@ nodes: cardinality: many optional: true identifier: oadm_interface__channels - order_weight: 1200 + order_weight: 1300 - name: OadmRearInterface namespace: Dcim + description: Line-side interface of an optical add-drop multiplexer, carrying the multiplexed signal. label: Optical Multiplexer Rear Interfaces + include_in_menu: true menu_placement: DcimGenericOadmInterface inherit_from: - DcimEndpoint @@ -226,6 +239,7 @@ nodes: description: A WDM channel with its wavelength and frequency. label: WDM Channel icon: game-icons:laser-warning + include_in_menu: true human_friendly_id: - wdm_type__value - channel__value @@ -242,6 +256,7 @@ nodes: attributes: - name: channel kind: Number + optional: false description: WDM channel number. order_weight: 1000 - name: wdm_type @@ -257,16 +272,18 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" optional: false - description: Type of WDM (e.g CWDM. DWDM) + description: Type of WDM technology (e.g. CWDM, DWDM) order_weight: 1100 - name: wavelength kind: Text # Text until float possible in Number Kind label: Wavelength (nm) + optional: false description: Wavelength of the channel in nm. order_weight: 1200 - name: frequency kind: Text # Text until float possible in Number Kind label: Frequency (GHz) + optional: false description: Frequency of the channel in GHz. order_weight: 1300 @@ -275,6 +292,7 @@ nodes: description: SFP with configuration for Wavelength Division Multiplexing. label: WDM SFP icon: mdi:laser-pointer + include_in_menu: true menu_placement: DcimGenericSFP inherit_from: - DcimGenericSFP @@ -292,8 +310,8 @@ nodes: description: Supports dense wavelengths and amplification for long-distance communication. color: "#9933cc" optional: false - description: Type of WDM (e.g CWDM. DWDM) - order_weight: 1100 + description: Type of WDM technology (e.g. CWDM, DWDM) + order_weight: 1150 relationships: - name: wdm_channel peer: DcimWdmChannel @@ -302,4 +320,4 @@ nodes: cardinality: one optional: false identifier: wdm_sfp__channel - order_weight: 1150 + order_weight: 1250 diff --git a/extensions/hosting_cluster/hosting_cluster.yml b/extensions/hosting_cluster/hosting_cluster.yml index 18d41e90..1c8b4c03 100644 --- a/extensions/hosting_cluster/hosting_cluster.yml +++ b/extensions/hosting_cluster/hosting_cluster.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,7 +13,8 @@ nodes: description: A cluster hosting virtual machines. label: Hosting Cluster icon: mdi:dots-hexagon - menu_placement: VirtualizationVirtualMachine + include_in_menu: true + menu_placement: ComputeGenericUnit inherit_from: - ClusterGeneric - VirtualizationHostVirtualMachine # Means we can get VM running on this one @@ -47,8 +48,9 @@ nodes: - name: public_cloud label: Public Cloud color: "#888888" + optional: false description: Underlying virtualisation or clustering technology. - order_weight: 1200 + order_weight: 1300 - name: status kind: Dropdown default_value: active @@ -70,4 +72,4 @@ nodes: description: Temporarily taken out of service. color: "#9e9e9e" optional: false - order_weight: 1300 + order_weight: 1200 diff --git a/extensions/interface_breakout/interface_breakout.yml b/extensions/interface_breakout/interface_breakout.yml index f48aa8e1..49160039 100644 --- a/extensions/interface_breakout/interface_breakout.yml +++ b/extensions/interface_breakout/interface_breakout.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -16,6 +16,7 @@ extensions: default_value: false optional: false description: "Indicates if the port supports breakout capability" + order_weight: 1800 relationships: - name: breakout_child_interfaces peer: InterfacePhysical @@ -26,7 +27,7 @@ extensions: identifier: "physical__breakout" direction: outbound description: "Interfaces resulting from the breakout" - order_weight: 1650 + order_weight: 1850 - name: breakout_parent_interface peer: InterfacePhysical label: "Breakout parent interface" @@ -36,4 +37,4 @@ extensions: identifier: "physical__breakout" direction: inbound description: "Interface from which breakout is created" - order_weight: 1700 + order_weight: 1900 diff --git a/extensions/lag/lag.yml b/extensions/lag/lag.yml index cfc55e2f..53f8a7af 100644 --- a/extensions/lag/lag.yml +++ b/extensions/lag/lag.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,17 +10,20 @@ version: "1.0" generics: - name: InterfaceBundle namespace: Generic + description: Generic holding the members of an interface bundle such as a LAG. label: Generic Interface Bundle include_in_menu: false attributes: - name: name kind: Text + optional: false description: "Name of the interface" order_weight: 1000 - name: bundle_number kind: Number + optional: false description: "Bundle number for the aggregated interface" - order_weight: 1100 + order_weight: 1250 relationships: - name: bundle_members peer: InterfacePhysical @@ -28,6 +31,7 @@ generics: kind: Attribute cardinality: many identifier: interface__bundle + optional: true description: "Physical Interfaces that are members of this aggregate" order_weight: 1800 @@ -55,8 +59,9 @@ nodes: - name: fast label: Fast color: "#E6E6FA" # lavender + optional: false description: "LACP rate for the aggregated interface" - order_weight: 1700 + order_weight: 1850 - name: lacp_mode kind: Dropdown label: LACP Mode @@ -71,10 +76,11 @@ nodes: - name: disabled label: Disabled color: "#E6E6FA" # lavender + optional: false description: "LACP mode for the aggregated interface" - order_weight: 1750 + order_weight: 1900 relationships: - # Redifine the relationship here to add common_parent constraint + # Redefine the relationship here to add the common_parent constraint - name: bundle_members peer: InterfacePhysical label: "Member(s)" @@ -82,6 +88,7 @@ nodes: cardinality: many identifier: interface__bundle common_parent: device + optional: true description: "Physical Interfaces that are members of this aggregate" order_weight: 1800 @@ -97,4 +104,4 @@ extensions: optional: true identifier: interface__bundle description: "Interface Bundle using this Physical Interface" - order_weight: 1800 + order_weight: 1950 diff --git a/extensions/location_minimal/README.md b/extensions/location_minimal/README.md index 428e0ee8..af0126d5 100644 --- a/extensions/location_minimal/README.md +++ b/extensions/location_minimal/README.md @@ -1,3 +1,5 @@ # location_minimal Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/location_minimal) for the corresponding documentation. + +This extension defines `Location.Site`, the same node as `extensions/location_site`. Load one or the other, never both. diff --git a/extensions/location_minimal/location_minimal.yml b/extensions/location_minimal/location_minimal.yml index dc36906c..0805fe12 100644 --- a/extensions/location_minimal/location_minimal.yml +++ b/extensions/location_minimal/location_minimal.yml @@ -2,16 +2,19 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" +# Defines Location.Site. Mutually exclusive with extensions/location_site, load one, not both. nodes: - name: Region namespace: Location + description: A geographical region grouping countries and sites. label: Region icon: carbon:cics-region-target + include_in_menu: true menu_placement: LocationGeneric inherit_from: - LocationGeneric @@ -21,8 +24,10 @@ nodes: - name: Country namespace: Location + description: A country, sitting between a region and the sites it contains. label: Country icon: gis:search-country + include_in_menu: true menu_placement: LocationGeneric inherit_from: - LocationGeneric @@ -31,8 +36,10 @@ nodes: - name: Site namespace: Location + description: A physical location hosting equipment, such as a data center or an office. label: Site icon: ri:building-line + include_in_menu: true menu_placement: LocationGeneric inherit_from: - LocationGeneric @@ -58,21 +65,21 @@ nodes: - name: decommissioning label: Decommissioning color: "#ff9800" - - name: retired - label: Retired + - name: deprecated + label: Deprecated color: "#6c757d" optional: false - order_weight: 1250 + order_weight: 1200 - name: facility kind: Text unique: false optional: true - order_weight: 1100 + order_weight: 1150 - name: physical_address kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1400 - name: timezone kind: Text optional: true diff --git a/extensions/location_site/README.md b/extensions/location_site/README.md index 437e14e5..822016ce 100644 --- a/extensions/location_site/README.md +++ b/extensions/location_site/README.md @@ -1,3 +1,5 @@ # location_site Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/location_site) for the corresponding documentation. + +This extension defines `Location.Site`, the same node as `extensions/location_minimal`. Load one or the other, never both. diff --git a/extensions/location_site/location_site.yml b/extensions/location_site/location_site.yml index 9f3c93f7..b6709dd8 100644 --- a/extensions/location_site/location_site.yml +++ b/extensions/location_site/location_site.yml @@ -2,16 +2,19 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" +# Defines Location.Site. Mutually exclusive with extensions/location_minimal, load one, not both. nodes: - name: Site namespace: Location + description: A physical location hosting equipment, such as a data center or an office. label: Site icon: ri:building-line + include_in_menu: true menu_placement: LocationGeneric inherit_from: - LocationGeneric @@ -36,21 +39,21 @@ nodes: - name: decommissioning label: Decommissioning color: "#ff9800" - - name: retired - label: Retired + - name: deprecated + label: Deprecated color: "#6c757d" optional: false - order_weight: 1250 + order_weight: 1200 - name: facility kind: Text unique: false optional: true - order_weight: 1100 + order_weight: 1150 - name: physical_address kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1400 - name: timezone kind: Text optional: true diff --git a/extensions/mlag/mlag.yml b/extensions/mlag/mlag.yml index 397b922c..749c74d9 100644 --- a/extensions/mlag/mlag.yml +++ b/extensions/mlag/mlag.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -15,6 +15,7 @@ generics: # and add the necessary relationships/attributes to it following MlagDomain node example below - name: MlagDomain namespace: Generic + description: Generic holding the peer links and interfaces shared by the members of an MLAG domain. label: MLAG Domain include_in_menu: false human_friendly_id: @@ -25,12 +26,14 @@ generics: kind: Text label: "MLAG Domain ID" unique: true # TODO: This one could be a mess to make unique... + optional: false description: "Identifier for the MLAG domain" - order_weight: 900 + order_weight: 1000 - name: reload_delay kind: Number label: "Reload Delay" default_value: 300 + optional: false description: "Time in seconds to wait before bringing up the MLAG after a reload" order_weight: 1650 relationships: @@ -39,6 +42,7 @@ generics: label: "Peer Links" kind: Attribute cardinality: many + optional: true 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 @@ -54,8 +58,9 @@ generics: label: "MLAG Interface(s)" kind: Component cardinality: many + optional: true description: "Bundle interfaces that are spread across all devices in this MLAG domain." - order_weight: 1500 + order_weight: 1550 nodes: - name: Interface @@ -77,6 +82,7 @@ nodes: attributes: - name: name kind: Text + optional: false description: "Name of the interface" order_weight: 1000 - name: description @@ -99,7 +105,7 @@ nodes: - 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." @@ -116,6 +122,7 @@ nodes: label: Outage description: "Interface is currently experiencing an outage." color: "#F4CCCC" # pastel red + optional: false description: "The status of the interface" order_weight: 1200 - name: role @@ -131,7 +138,7 @@ nodes: color: "#B2D4E6" # pastel sky blue optional: true description: "The role of the interface in the network" - order_weight: 1250 + order_weight: 1300 relationships: - name: mlag_domain peer: GenericMlagDomain @@ -140,7 +147,7 @@ nodes: cardinality: one optional: false description: "MLAG Domain this MLAG Interface belongs to" - order_weight: 1750 + order_weight: 900 # Placeholder node implementation of MLAG domain - name: Domain @@ -148,6 +155,7 @@ nodes: description: "MLAG (Multi-Chassis Link Aggregation Group) Domain" label: MLAG Domain icon: mingcute:cloud-line + include_in_menu: true inherit_from: - GenericMlagDomain relationships: @@ -173,7 +181,7 @@ extensions: cardinality: one optional: true description: "MLAG Domain this LAG is used as peer link" - order_weight: 1800 + order_weight: 1950 - kind: DcimDevice relationships: - name: mlag_domain @@ -184,4 +192,4 @@ extensions: optional: true identifier: device__mlag_domain description: "MLAG Domain this device belongs to" - order_weight: 1800 + order_weight: 1900 diff --git a/extensions/patch_panel/patch_panel.yml b/extensions/patch_panel/patch_panel.yml index 7253ba43..09ff5f76 100644 --- a/extensions/patch_panel/patch_panel.yml +++ b/extensions/patch_panel/patch_panel.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,106 +10,112 @@ version: "1.0" generics: - name: GenericPatchPanelInterface namespace: Dcim + description: Generic interface of a patch panel, front or rear. label: Patch Panel Interfaces icon: mdi:ethernet + include_in_menu: true menu_placement: DcimPatchPanel attributes: - name: name kind: Text + optional: false order_weight: 1000 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 + # NOTE: this choice list is duplicated in extensions/dwdm and the two must be + # kept in sync. Infrahub cannot share a choice list across extension files without a + # shared generic in a common ancestor, which is a base-tier change. - name: connector_type kind: Dropdown choices: - - name: FC + - name: fc label: FC description: "Standardized fiber optic connector used primarily in datacom and telecom applications." - - name: LC + - name: lc label: LC description: "Compact fiber optic connector with a push-pull mechanism." - - name: LC_PC + - name: lc_pc label: LC/PC description: "Polished LC connector providing physical contact (PC)." - - name: LC_UPC + - name: lc_upc label: LC/UPC description: "Ultra-Physical Contact (UPC) variant of the LC connector with enhanced polish." - - name: LC_APC + - name: lc_apc label: LC/APC description: "Angled Physical Contact (APC) version of the LC connector with a slanted fiber end-face." - - name: LSH + - name: lsh label: LSH description: "European fiber optic connector offering high durability." - - name: LSH_PC + - name: lsh_pc label: LSH/PC description: "Physical Contact version of LSH with standard polish." - - name: LSH_UPC + - name: lsh_upc label: LSH/UPC description: "Ultra-Physical Contact variant of LSH, minimizing return loss with a superior polish." - - name: LSH_APC + - name: lsh_apc label: LSH/APC description: "Angled Physical Contact version of LSH, designed to reduce back reflections." - - name: LX_5 + - name: lx_5 label: LX.5 description: "Miniaturized fiber optic connector similar to LC but with an additional shutter mechanism." - - name: LX_5_PC + - name: lx_5_pc label: LX.5/PC description: "Physical Contact version of LX.5." - - name: LX_5_UPC + - name: lx_5_upc label: LX.5/UPC description: "Ultra-Physical Contact variant of LX.5." - - name: LX_5_APC + - name: lx_5_apc label: LX.5/APC description: "Angled Physical Contact version of LX.5." - - name: MPO + - name: mpo label: MPO description: "Multi-fiber Push-On connector typically used in data centers for high-speed applications." - - name: MTRJ + - name: mtrj label: MTRJ description: "Male-to-female fiber optic connector with two fibers." - - name: SC + - name: sc label: SC description: "Square fiber optic connector with push-pull lock." - - name: SC_PC + - name: sc_pc label: SC/PC description: "Physical Contact SC connector with a polished end-face." - - name: SC_UPC + - name: sc_upc label: SC/UPC description: "Ultra-Physical Contact variant of SC." - - name: SC_APC + - name: sc_apc label: SC/APC description: "Angled Physical Contact version of SC." - - name: ST + - name: st label: ST description: "Bayonet-style fiber optic connector primarily used in industrial and military applications." - - name: CS + - name: cs label: CS description: "Compact connector with a high-density duplex configuration." - - name: SN + - name: sn label: SN description: "Small-form connector with dual fibers." - - name: SMA_905 + - name: sma_905 label: SMA 905 description: "Stainless steel fiber optic connector." - - name: SMA_906 + - name: sma_906 label: SMA 906 description: "Variant of SMA 905 with similar durability, frequently used in high-vibration settings." - - name: URM_P2 + - name: urm_p2 label: URM-P2 description: "Specialized fiber optic connector for industrial and harsh environments." - # FIXME: Commenting out otherwise I'm facing a Text attribute length should be less than 4096 characters. - # - name: URM_P4 - # label: URM-P4 - # description: "Similar to URM-P2 but designed for higher performance." - # - name: URM_P8 - # label: URM-P8 - # description: "Enhanced version of URM connectors with higher protection." - # - name: Splice - # label: Splice - # description: "Permanent fiber connection method where two fiber ends are fused." - order_weight: 1100 + - name: urm_p4 + label: URM-P4 + description: "Similar to URM-P2 but designed for higher performance." + - name: urm_p8 + label: URM-P8 + description: "Enhanced version of URM connectors with higher protection." + - name: splice + label: Splice + description: "Permanent fiber connection method where two fiber ends are fused." + optional: false + order_weight: 1200 nodes: - name: PatchPanel @@ -117,6 +123,7 @@ nodes: 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 + include_in_menu: true inherit_from: - DcimPhysicalDevice human_friendly_id: @@ -128,33 +135,39 @@ nodes: - name: name kind: Text unique: true # TODO: maybe combine location / name + optional: false order_weight: 1000 - name: module_capacity kind: Number label: Module Capacity optional: true description: The maximum number of modules that can be housed within this patch panel. + order_weight: 1300 - name: description kind: Text optional: true - order_weight: 2000 + order_weight: 1100 relationships: - name: front_interfaces peer: DcimFrontPatchPanelInterface kind: Component cardinality: many optional: true - identifier: front_interfaces + identifier: patch_panel__front_interfaces + order_weight: 1350 - name: rear_interfaces peer: DcimRearPatchPanelInterface kind: Component cardinality: many optional: true - identifier: rear_interfaces + identifier: patch_panel__rear_interfaces + order_weight: 1450 - name: FrontPatchPanelInterface namespace: Dcim + description: Front interface of a patch panel, where equipment is patched in. label: Patch Panel Front Interfaces + include_in_menu: true menu_placement: DcimGenericPatchPanelInterface inherit_from: - DcimEndpoint @@ -175,18 +188,20 @@ nodes: kind: Attribute cardinality: one optional: true - order_weight: 1200 + order_weight: 1300 - name: patch_panel peer: DcimPatchPanel kind: Parent cardinality: one optional: false - identifier: front_interfaces + identifier: patch_panel__front_interfaces order_weight: 900 - name: RearPatchPanelInterface namespace: Dcim + description: Rear interface of a patch panel, terminating the permanent cabling. label: Patch Panel Rear Interfaces + include_in_menu: true menu_placement: DcimGenericPatchPanelInterface inherit_from: - DcimEndpoint @@ -207,11 +222,11 @@ nodes: kind: Attribute cardinality: many optional: true - order_weight: 1200 + order_weight: 1300 - name: patch_panel peer: DcimPatchPanel kind: Parent cardinality: one optional: false - identifier: rear_interfaces + identifier: patch_panel__rear_interfaces order_weight: 900 diff --git a/extensions/peering_ixp/peering_ixp.yml b/extensions/peering_ixp/peering_ixp.yml index 477d210e..39386dca 100644 --- a/extensions/peering_ixp/peering_ixp.yml +++ b/extensions/peering_ixp/peering_ixp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -12,6 +12,7 @@ nodes: description: "An Internet Exchange Point (IXP) for peering" label: "Internet Exchange" icon: "mdi:network" + include_in_menu: true human_friendly_id: - "name__value" order_by: @@ -21,6 +22,7 @@ nodes: - name: name kind: Text unique: true + optional: false description: "Name of the Internet Exchange" order_weight: 1000 - name: description @@ -35,11 +37,12 @@ nodes: - name: enabled label: Enabled description: "Internet Exchange is active and operational" - color: "#a8dadc" + color: "#00d25b" - name: disabled label: Disabled description: "Internet Exchange is not operational" color: "#b0bec5" + optional: false order_weight: 1200 relationships: - name: connections @@ -48,6 +51,7 @@ nodes: cardinality: many optional: true description: "IXP connections associated with this Internet Exchange" + order_weight: 1500 - name: local_as peer: RoutingAutonomousSystem kind: Attribute @@ -61,7 +65,8 @@ nodes: cardinality: many optional: true identifier: ixp__import_bgppolicies - description: "Import routing policies applied to the session" + description: "Import routing policies applied to every session on this internet exchange point" + order_weight: 1600 - name: export_policies peer: RoutingPolicyBGP label: Export Routing Policies @@ -69,26 +74,29 @@ nodes: cardinality: many optional: true identifier: ixp__export_bgppolicies - description: "Export routing policies applied to the session" + description: "Export routing policies applied to every session on this internet exchange point" + order_weight: 1650 - name: bgp_communities peer: RoutingBGPCommunity label: "BGP Communities" kind: Generic cardinality: many optional: true - description: "BGP communities associated with the session" + description: "BGP communities associated with this internet exchange point" + order_weight: 1700 - name: tags peer: BuiltinTag kind: Attribute cardinality: many optional: true - order_weight: 3000 + order_weight: 2000 - name: IXPConnection namespace: Peering description: "A connection to an Internet Exchange Point (IXP)" label: "IXP Connection" icon: "mdi:lan-connect" + include_in_menu: true menu_placement: PeeringIXP human_friendly_id: - "name__value" @@ -101,6 +109,7 @@ nodes: - name: name kind: Text unique: true + optional: false description: "Name of the IXP Connection" order_weight: 1000 - name: description @@ -121,8 +130,8 @@ nodes: - name: enabled label: Enabled description: "The system is fully operational and functioning as expected." - color: "#a8dadc" - - name: pre-maintenance + color: "#00d25b" + - name: pre_maintenance label: Pre-Maintenance description: "Preparation stage before performing maintenance tasks." color: "#f4a261" @@ -130,7 +139,7 @@ nodes: label: Maintenance description: "Currently undergoing maintenance tasks." color: "#e9c46a" - - name: post-maintenance + - name: post_maintenance label: Post-Maintenance description: "Final checks and verifications after maintenance tasks." color: "#f0e5de" @@ -158,6 +167,7 @@ nodes: kind: Attribute cardinality: one identifier: ixpconn__ipv6_address + optional: true description: "IPv6 address assigned to the connection" order_weight: 1400 - name: ipv4_address @@ -166,6 +176,7 @@ nodes: kind: Attribute cardinality: one identifier: ixpconn__ipv4_address + optional: true description: "IPv4 address assigned to the connection" order_weight: 1375 - name: internet_exchange_point @@ -175,26 +186,30 @@ nodes: cardinality: one optional: false description: "The Internet Exchange Point this connection is part of" + order_weight: 900 - name: router peer: DcimDevice kind: Attribute cardinality: one + optional: true description: "The router this IXP connection is connected to" - order_weight: 1400 + order_weight: 1500 - name: bgp_sessions peer: RoutingBGPSession label: BGP Sessions kind: Component cardinality: many optional: true + on_delete: no-action # a session outlives its IXP connection; it is owned by its device identifier: ixpconn__bgpsessions description: "BGP sessions established over this IXP connection" - order_weight: 1450 + order_weight: 1550 - name: tags peer: BuiltinTag kind: Attribute cardinality: many - order_weight: 3000 + optional: true + order_weight: 2000 extensions: nodes: @@ -208,3 +223,4 @@ extensions: optional: true identifier: ixpconn__bgpsessions description: "The IXP connection this BGP session is established over" + order_weight: 1800 diff --git a/extensions/physical_disk/physical_disk.yml b/extensions/physical_disk/physical_disk.yml index c805d842..39a35133 100644 --- a/extensions/physical_disk/physical_disk.yml +++ b/extensions/physical_disk/physical_disk.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -12,12 +12,26 @@ generics: namespace: Dcim description: Generic that hold relationship toward physical disks. To apply on device that can have physical disks. include_in_menu: false + attributes: + # Here so HFIDs and computed names can resolve, see DcimPhysicalDevice.name. + # unique is required because DcimPhysicalDisk.human_friendly_id walks + # device__name__value, and Infrahub only accepts a peer attribute combination that is + # unique. Every device kind this generic is meant to be applied to already inherits + # DcimGenericDevice, which declares name unique, so nothing changes for them; + # allow_override lets an implementer restate the attribute either way. + - name: name + kind: Text + unique: true + allow_override: any + optional: false + order_weight: 1000 relationships: - name: physical_disks peer: DcimPhysicalDisk kind: Component cardinality: many optional: true + order_weight: 1950 nodes: - name: PhysicalDisk @@ -25,7 +39,9 @@ nodes: description: Physical Disk label: Physical Disk icon: carbon:vmdk-disk + include_in_menu: true human_friendly_id: + - device__name__value - name__value order_by: - name__value @@ -36,7 +52,7 @@ nodes: - name: name kind: Text optional: false - order_weight: 900 + order_weight: 1000 - name: disk_type kind: Dropdown choices: @@ -58,7 +74,7 @@ nodes: color: "#ffcc80" optional: true description: Specifies the type of disk - order_weight: 950 + order_weight: 1300 - name: status kind: Dropdown choices: @@ -69,7 +85,7 @@ nodes: - name: active label: Active description: The disk is currently in use within the infrastructure. - color: "#28a745" + color: "#00d25b" - name: decommissioned label: Decommissioned description: The disk is retired from active use but still stored for potential reuse or auditing. @@ -78,28 +94,30 @@ nodes: label: Disposed description: The disk has been securely erased and disposed of. color: "#dc3545" + optional: false description: Lifecycle status of the hardware component. + order_weight: 1200 - name: size kind: Number label: Size (GB) optional: false description: Disk capacity (in GB). - order_weight: 1000 + order_weight: 1400 - name: serial_number kind: Text unique: true optional: true description: Serial number of the disk - order_weight: 1100 + order_weight: 1450 - name: description kind: Text unique: false optional: true - order_weight: 1500 + order_weight: 1100 relationships: - name: device peer: DcimDeviceWithPhysicalDisks kind: Parent cardinality: one optional: false - order_weight: 800 + order_weight: 900 diff --git a/extensions/qinq/qinq.yml b/extensions/qinq/qinq.yml index b49de73f..147dcf61 100644 --- a/extensions/qinq/qinq.yml +++ b/extensions/qinq/qinq.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -14,7 +14,9 @@ nodes: label: S-VLAN include_in_menu: false inherit_from: - - GenericVLAN + - IpamGenericVLAN + uniqueness_constraints: + - [vlan_id__value, vlan_group] relationships: - name: cvlan peer: IpamCVLAN @@ -24,6 +26,7 @@ nodes: optional: true identifier: vlan__qinq direction: outbound + order_weight: 1600 - name: CVLAN namespace: Ipam @@ -31,7 +34,7 @@ nodes: label: C-VLAN include_in_menu: false inherit_from: - - GenericVLAN + - IpamGenericVLAN human_friendly_id: - svlan__name__value - vlan_id__value @@ -46,6 +49,7 @@ nodes: kind: Jinja2 jinja2_template: "{{ svlan__name__value }}-{{ vlan_id__value }}" optional: true + order_weight: 1000 relationships: - name: svlan peer: IpamSVLAN @@ -55,3 +59,4 @@ nodes: optional: false identifier: vlan__qinq direction: inbound + order_weight: 1600 diff --git a/extensions/rack/README.md b/extensions/rack/README.md index f67fd702..41ec0165 100644 --- a/extensions/rack/README.md +++ b/extensions/rack/README.md @@ -1,3 +1,5 @@ # rack Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/rack) for the corresponding documentation. + +`LocationSite` comes from either `extensions/location_minimal` or `extensions/location_site`. `LocationRack` is also defined, hierarchically and incompatibly, by `experimental/location_extended`, so load one or the other, never both. diff --git a/extensions/rack/rack.yml b/extensions/rack/rack.yml index 43130b9f..1249a6a8 100644 --- a/extensions/rack/rack.yml +++ b/extensions/rack/rack.yml @@ -2,35 +2,40 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" +# Defines Location.Rack. Mutually exclusive with experimental/location_extended, load one, not both. nodes: - name: Rack namespace: Location description: A physical equipment rack installed at a site. label: Rack icon: clarity:rack-server-line + include_in_menu: true menu_placement: LocationGeneric inherit_from: - LocationHosting human_friendly_id: + - site__name__value - name__value order_by: - name__value display_label: name__value + uniqueness_constraints: + - [site, name__value] attributes: - name: name kind: Text - unique: true + unique: false optional: false order_weight: 1000 - - name: facility_id + - name: facility kind: Text optional: true - order_weight: 1100 + order_weight: 1150 - name: status kind: Dropdown default_value: active @@ -56,7 +61,7 @@ nodes: description: Rack is being phased out and emptied. color: "#ff9800" - name: deprecated - label: Retired + label: Deprecated description: Rack has been removed from service. color: "#6c757d" optional: false @@ -70,15 +75,15 @@ nodes: - name: serial_number kind: Text optional: true - order_weight: 1400 + order_weight: 1350 - name: asset_tag kind: Text optional: true - order_weight: 1500 + order_weight: 1400 relationships: - name: site peer: LocationSite - kind: Attribute + kind: Parent cardinality: one optional: false identifier: site__racks @@ -88,7 +93,7 @@ nodes: kind: Attribute cardinality: many optional: true - order_weight: 3000 + order_weight: 2000 extensions: nodes: @@ -100,3 +105,4 @@ extensions: cardinality: many optional: true identifier: site__racks + order_weight: 1850 diff --git a/extensions/routing/routing.yml b/extensions/routing/routing.yml index bf4594e6..e2b209a7 100644 --- a/extensions/routing/routing.yml +++ b/extensions/routing/routing.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -11,11 +11,10 @@ generics: - name: Protocol namespace: Routing description: "Generic protocol model for routing protocols" - label: "Protocol" + label: "Routing Protocol" icon: "carbon:router" - include_in_menu: false + include_in_menu: true attributes: - # TODO: Should be computed later - name: description kind: Text unique: true @@ -28,7 +27,7 @@ generics: - name: active label: Active description: "Configuration is active and operational." - color: "#A9CCE3" # pastel blue + color: "#00d25b" - name: disabled label: Disabled description: "Configuration has been disabled." @@ -37,19 +36,20 @@ generics: label: Deleted description: "Configuration has been deleted." color: "#FAD7A0" # pastel orange + optional: false description: "Status of the Protocol Configuration." - order_weight: 1150 + order_weight: 1200 relationships: - name: device peer: DcimDevice kind: Parent cardinality: one optional: false - order_weight: 1050 + order_weight: 900 - name: vrf peer: IpamVRF label: VRF kind: Attribute cardinality: one optional: false - order_weight: 1075 + order_weight: 1050 diff --git a/extensions/routing_aggregate/aggregate.yml b/extensions/routing_aggregate/aggregate.yml index 629cb3c4..62ea3c8f 100644 --- a/extensions/routing_aggregate/aggregate.yml +++ b/extensions/routing_aggregate/aggregate.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,7 +13,8 @@ nodes: description: "Aggregate Protocol with action and BGP communities" label: "Aggregate Routes" icon: "grommet-icons:aggregate" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingProtocol inherit_from: - "RoutingProtocol" attributes: @@ -22,18 +23,19 @@ nodes: label: Discard default_value: false optional: true - order_weight: 1275 + order_weight: 1350 - name: import_policies kind: Text optional: true - order_weight: 1300 + order_weight: 1400 - name: export_policies kind: Text optional: true - order_weight: 1350 + order_weight: 1450 relationships: - name: destination peer: IpamPrefix kind: Attribute - description: "Destination network for the static route." - order_weight: 1200 + optional: true + description: "Destination network aggregated by this route." + order_weight: 1300 diff --git a/extensions/routing_bgp/bgp.yml b/extensions/routing_bgp/bgp.yml index ca76fe6b..3517c614 100644 --- a/extensions/routing_bgp/bgp.yml +++ b/extensions/routing_bgp/bgp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,6 +13,7 @@ nodes: description: An Autonomous System (AS) is a set of Internet routable IP prefixes belonging to a network label: Autonomous System icon: mdi:bank-circle-outline + include_in_menu: true menu_placement: RoutingBGPSession human_friendly_id: - "asn__value" @@ -25,11 +26,13 @@ nodes: - name: name kind: Text unique: true + optional: false description: "Name of the Autonomous System" order_weight: 1000 - name: asn kind: Number unique: true + optional: false description: "Autonomous System Number" order_weight: 1050 - name: description @@ -43,22 +46,26 @@ nodes: kind: Attribute cardinality: one optional: false + order_weight: 1200 - name: location peer: LocationGeneric kind: Attribute cardinality: one optional: true + order_weight: 1300 - name: devices peer: DcimDevice kind: Attribute cardinality: many optional: true + order_weight: 1400 - name: BGPPeerGroup namespace: Routing description: A BGP Peer Group is used to regroup parameters that are shared across multiple peers label: BGP Peer Group icon: mdi:view-grid-plus-outline + include_in_menu: true menu_placement: RoutingBGPSession inherit_from: - "RoutingProtocol" @@ -114,8 +121,9 @@ nodes: label: IPv6 description: "Policy applies to IPv6 addresses." color: "#E6E6FA" # lavender + optional: false description: "The address family for the routing policy indicating the type of IP address." - order_weight: 1150 + order_weight: 1250 relationships: - name: local_as peer: RoutingAutonomousSystem @@ -123,18 +131,21 @@ nodes: cardinality: one optional: true identifier: bgppeergroup__local_as + order_weight: 1550 - name: remote_as peer: RoutingAutonomousSystem kind: Attribute cardinality: one optional: true identifier: bgppeergroup__remote_as + order_weight: 1600 - name: BGPSession namespace: Routing description: A BGP Session represent a point to point connection between two routers label: BGP Session icon: mdi:router + include_in_menu: true inherit_from: - "RoutingProtocol" order_by: @@ -144,9 +155,11 @@ nodes: - name: import_policies kind: Text optional: true + order_weight: 1700 - name: export_policies kind: Text optional: true + order_weight: 1750 - name: session_type kind: Dropdown choices: @@ -156,8 +169,9 @@ nodes: - name: internal label: Internal description: "Session established with a router in the same autonomous system." + optional: false description: "Type of BGP Session" - order_weight: 1200 + order_weight: 1250 - name: role kind: Dropdown choices: @@ -173,15 +187,16 @@ nodes: label: Peering description: "Connect with other networks via IX." color: "#E6E6FA" # lavender + optional: true description: "Role of the BGP Session" - order_weight: 1600 + order_weight: 1300 - name: local_pref kind: Number parameters: min_value: 0 optional: true description: "Force Local Pref for this BGP Peer Session." - order_weight: 1450 + order_weight: 1650 relationships: - name: local_as peer: RoutingAutonomousSystem @@ -189,38 +204,46 @@ nodes: cardinality: one optional: true identifier: bgpsession__local_as + order_weight: 1350 - name: remote_as peer: RoutingAutonomousSystem kind: Attribute cardinality: one optional: true identifier: bgpsession__remote_as + order_weight: 1400 - name: local_ip peer: IpamIPAddress kind: Attribute cardinality: one optional: true identifier: bgpsession__local_ip + order_weight: 1450 - name: remote_ip peer: IpamIPAddress kind: Attribute cardinality: one optional: true identifier: bgpsession__remote_ip + order_weight: 1500 - name: device peer: DcimDevice + kind: Generic cardinality: one optional: true + order_weight: 900 - name: peer_group peer: RoutingBGPPeerGroup kind: Attribute cardinality: one optional: true + order_weight: 1550 - name: peer_session peer: RoutingBGPSession kind: Attribute cardinality: one optional: true + order_weight: 1600 extensions: nodes: @@ -231,12 +254,13 @@ extensions: kind: Attribute cardinality: one optional: true - order_weight: 1600 + order_weight: 1800 - kind: OrganizationGeneric relationships: - name: asn peer: RoutingAutonomousSystem label: Autonomous System + kind: Generic cardinality: many optional: true - order_weight: 2000 + order_weight: 1700 diff --git a/extensions/routing_bgp_community/bgp_community.yml b/extensions/routing_bgp_community/bgp_community.yml index ed6f7044..458e4f7a 100644 --- a/extensions/routing_bgp_community/bgp_community.yml +++ b/extensions/routing_bgp_community/bgp_community.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,6 +13,7 @@ nodes: description: "Defines a BGP community." label: "BGP Community" icon: iconoir:community + include_in_menu: true human_friendly_id: - name__value order_by: @@ -22,6 +23,7 @@ nodes: - name: name kind: Text unique: true + optional: false description: "The name of the BGP community." order_weight: 1000 - name: description @@ -32,6 +34,7 @@ nodes: - name: community kind: Text unique: true + optional: false description: "The value of the BGP community (RFC1997, RFC4360, RFC8092)." order_weight: 1200 relationships: @@ -40,10 +43,12 @@ nodes: label: Routing Policies kind: Generic cardinality: many + optional: true description: "The BGP Policies using this BGP Community." + order_weight: 1300 - name: tags peer: BuiltinTag kind: Attribute cardinality: many optional: true - order_weight: 3000 + order_weight: 2000 diff --git a/extensions/routing_bgp_rr/bgp_rr.yml b/extensions/routing_bgp_rr/bgp_rr.yml index 4ea8c482..408e4e63 100644 --- a/extensions/routing_bgp_rr/bgp_rr.yml +++ b/extensions/routing_bgp_rr/bgp_rr.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,7 +13,8 @@ nodes: description: "A Route Reflector (RR) Cluster used for grouping internal peers" label: "Route Reflector Cluster" icon: "mdi:router-network" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingBGPSession human_friendly_id: - name__value display_label: name__value @@ -21,6 +22,7 @@ nodes: - name: name kind: Text unique: true + optional: false description: "Name of the Route Reflector Cluster" order_weight: 1000 - name: description @@ -43,6 +45,7 @@ nodes: kind: Generic cardinality: many optional: true + order_weight: 1300 extensions: nodes: @@ -53,4 +56,5 @@ extensions: label: "RR Cluster" kind: Attribute cardinality: one - order_weight: 1600 + optional: true + order_weight: 1700 diff --git a/extensions/routing_ospf/ospf.yml b/extensions/routing_ospf/ospf.yml index 2d8213d2..c73efe02 100644 --- a/extensions/routing_ospf/ospf.yml +++ b/extensions/routing_ospf/ospf.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,7 +13,8 @@ nodes: description: "OSPF (Open Shortest Path First) instance on a Virtual Router." label: "OSPF" icon: "mdi:network-outline" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingProtocol inherit_from: - "RoutingProtocol" human_friendly_id: @@ -33,7 +34,7 @@ nodes: default_value: 1000 optional: true description: "Reference bandwidth for OSPF instance (in Mbps)." - order_weight: 1150 + order_weight: 1350 - name: version kind: Dropdown default_value: ospf @@ -46,22 +47,24 @@ nodes: label: OSPFv3 description: "Open Shortest Path First version 3." color: "#E6E6FA" # lavender + optional: false description: "Version of the OSPF protocol." - order_weight: 1100 + order_weight: 1300 - name: import_policies kind: Text optional: true - order_weight: 1300 + order_weight: 1450 - name: export_policies kind: Text optional: true - order_weight: 1350 + order_weight: 1500 relationships: - name: router_id peer: IpamIPAddress kind: Attribute cardinality: one optional: true + order_weight: 1400 - name: ospf_interfaces peer: RoutingOSPFInterface label: OSPF Interfaces @@ -69,13 +72,15 @@ nodes: cardinality: many optional: true identifier: ospf__ospfinterfaces + order_weight: 1550 - name: OSPFInterface namespace: Routing description: "Pivot table linking OSPF configuration to an interface." label: "OSPF Interface" icon: "mdi:ethernet" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingOSPF human_friendly_id: - "description__value" order_by: @@ -90,7 +95,7 @@ nodes: unique: true optional: false description: "Description of the OSPF interface." - order_weight: 1500 + order_weight: 1100 - name: metric kind: Number optional: true @@ -112,6 +117,7 @@ nodes: label: Peer-to-Peer description: "OSPF peer-to-peer interface mode." color: "#E6E6FA" # lavender + optional: false description: "Mode of the OSPF interface." order_weight: 1300 - name: authentication_key @@ -132,6 +138,7 @@ nodes: order_weight: 1225 - name: area kind: Text + optional: false description: "OSPF area associated with the interface." order_weight: 1200 relationships: @@ -142,10 +149,10 @@ nodes: cardinality: one optional: false identifier: ospf__ospfinterfaces - order_weight: 1100 + order_weight: 900 - name: interface peer: InterfaceLayer3 kind: Attribute cardinality: one optional: false - order_weight: 1200 + order_weight: 1500 diff --git a/extensions/routing_pim/pim.yml b/extensions/routing_pim/pim.yml index 9076c6e6..1af43801 100644 --- a/extensions/routing_pim/pim.yml +++ b/extensions/routing_pim/pim.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,7 +13,8 @@ nodes: description: "Protocol Independent Multicast (PIM) instance on a Virtual Router." label: "PIM" icon: "mdi:network-outline" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingProtocol inherit_from: - "RoutingProtocol" human_friendly_id: @@ -47,6 +48,7 @@ nodes: cardinality: one optional: true description: "Rendezvous Point (RP) address for PIM." + order_weight: 1400 - name: pim_interfaces peer: RoutingPIMInterface label: PIM Interfaces @@ -54,13 +56,15 @@ nodes: cardinality: many optional: true identifier: pim__piminterfaces + order_weight: 1450 - name: PIMInterface namespace: Routing description: "Interface configuration for PIM." label: "PIM Interface" icon: "mdi:ethernet" - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPIM human_friendly_id: - "description__value" order_by: @@ -74,7 +78,7 @@ nodes: kind: Text unique: true optional: false - description: "Description of the OSPF interface." + description: "Description of the PIM interface." order_weight: 1100 - name: pim_mode kind: Dropdown @@ -91,6 +95,7 @@ nodes: label: Bidirectional Mode description: "Bidirectional PIM for efficient traffic forwarding." color: "#E6E6FA" # lavender + optional: false description: "PIM mode used for multicast routing on this interface." order_weight: 1150 - name: hello_interval @@ -113,6 +118,7 @@ nodes: cardinality: one optional: false identifier: pim__piminterfaces + order_weight: 900 - name: interface peer: InterfaceLayer3 kind: Attribute diff --git a/extensions/routing_policies/routing_policies.yml b/extensions/routing_policies/routing_policies.yml index 9f5310fc..953c598e 100644 --- a/extensions/routing_policies/routing_policies.yml +++ b/extensions/routing_policies/routing_policies.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -11,8 +11,9 @@ generics: - name: Policy namespace: Routing description: "Policy defining the rules for routing traffic in a network." + label: "Routing Policy" icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true human_friendly_id: - "name__value" order_by: @@ -34,18 +35,19 @@ generics: kind: Dropdown label: Type choices: - - name: import-policy + - name: import_policy label: Import description: "Policy for incoming routes." color: "#E6E6FA" # lavender - - name: export-policy + - name: export_policy label: Export description: "Policy for outgoing routes." color: "#E6E6FA" # lavender - - name: import-export-policy + - name: import_export_policy label: Import + Export description: "Policy for both incoming and outgoing routes." color: "#E6E6FA" # lavender + optional: false description: "The type of routing policy which specifies the direction of route advertisement." order_weight: 1200 - name: weight @@ -70,5 +72,6 @@ generics: label: All description: "Policy applies to both IPv4 and IPv6 addresses." color: "#E6E6FA" # lavender + optional: false 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 57dce38e..f3bf5a78 100644 --- a/extensions/routing_policies_aggregate/routing_policies_aggregate.yml +++ b/extensions/routing_policies_aggregate/routing_policies_aggregate.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,13 +10,15 @@ version: "1.0" nodes: - name: PolicyAggregate namespace: Routing - description: A routing policiers for Aggregate + description: A routing policy for Aggregate. label: Aggregate Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - "RoutingPolicy" - # TODO: extend if need + # Add attributes here if this policy flavour needs more than the generic RoutingPolicy provides. +# Uncommenting this block also requires adding extensions/routing_aggregate back to .metadata.yml. # extensions: # nodes: # - kind: RoutingAggregate diff --git a/extensions/routing_policies_bgp/routing_policies_bgp.yml b/extensions/routing_policies_bgp/routing_policies_bgp.yml index 8c550a5d..599228ca 100644 --- a/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,13 +10,14 @@ version: "1.0" nodes: - name: PolicyBGP namespace: Routing - description: A routing policiers for BGP + description: A routing policy for BGP. label: BGP Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - "RoutingPolicy" - # TODO: extend if need + # Add attributes here if this policy flavour needs more than the generic RoutingPolicy provides. extensions: nodes: @@ -35,14 +36,18 @@ extensions: kind: Generic cardinality: many identifier: bgppeergroup__import_policies + optional: true description: "The routing-policies used by this instance for import." + order_weight: 1750 - name: export_routing_policies peer: RoutingPolicyBGP label: Export Routing Policies kind: Generic cardinality: many identifier: bgppeergroup__export_policies + optional: true description: "The routing-policies used by this instance for export." + order_weight: 1800 - kind: RoutingBGPSession attributes: - name: import_policies @@ -58,11 +63,15 @@ extensions: kind: Generic cardinality: many identifier: bgpsession__import_policies + optional: true description: "The routing-policies used by this instance for import." + order_weight: 1850 - name: export_routing_policies peer: RoutingPolicyBGP label: Export Routing Policies kind: Generic cardinality: many identifier: bgpsession__export_policies + optional: true description: "The routing-policies used by this instance for export." + order_weight: 1900 diff --git a/extensions/routing_policies_ospf/routing_policies_ospf.yml b/extensions/routing_policies_ospf/routing_policies_ospf.yml index 04158556..40e85183 100644 --- a/extensions/routing_policies_ospf/routing_policies_ospf.yml +++ b/extensions/routing_policies_ospf/routing_policies_ospf.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,13 +10,14 @@ version: "1.0" nodes: - name: PolicyOSPF namespace: Routing - description: A routing policiers for OSPF + description: A routing policy for OSPF. label: OSPF Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - "RoutingPolicy" - # TODO: extend if need + # Add attributes here if this policy flavour needs more than the generic RoutingPolicy provides. extensions: nodes: @@ -35,11 +36,15 @@ extensions: kind: Generic cardinality: many identifier: ospf__import_policies + optional: true description: "The routing-policies used by this instance for import." + order_weight: 1600 - name: export_routing_policies peer: RoutingPolicyOSPF label: Export Routing Policies kind: Generic cardinality: many identifier: ospf__export_policies + optional: true description: "The routing-policies used by this instance for export." + order_weight: 1650 diff --git a/extensions/routing_policies_pim/routing_policies_pim.yml b/extensions/routing_policies_pim/routing_policies_pim.yml index fab427ab..91df60be 100644 --- a/extensions/routing_policies_pim/routing_policies_pim.yml +++ b/extensions/routing_policies_pim/routing_policies_pim.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,13 +10,14 @@ version: "1.0" nodes: - name: PolicyPIM namespace: Routing - description: A routing policiers for PIM + description: A routing policy for PIM. label: PIM Routing Policies icon: carbon:deployment-policy - include_in_menu: false + include_in_menu: true + menu_placement: RoutingPolicy inherit_from: - "RoutingPolicy" - # TODO: extend if need + # Add attributes here if this policy flavour needs more than the generic RoutingPolicy provides. extensions: nodes: @@ -35,11 +36,15 @@ extensions: kind: Generic cardinality: many identifier: pim__import_policies + optional: true description: "The routing-policies used by this instance for import." + order_weight: 1500 - name: export_routing_policies peer: RoutingPolicyPIM label: Export Routing Policies kind: Generic cardinality: many identifier: pim__export_policies + optional: true description: "The routing-policies used by this instance for export." + order_weight: 1550 diff --git a/extensions/sfp/sfp.yml b/extensions/sfp/sfp.yml index 04bdbf8c..c5f6befa 100644 --- a/extensions/sfp/sfp.yml +++ b/extensions/sfp/sfp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -16,7 +16,7 @@ generics: include_in_menu: true display_label: "{{ form_factor__value }} {{ sfp_type__value }}" attributes: - - name: serial + - name: serial_number kind: Text optional: true order_weight: 1400 @@ -83,7 +83,7 @@ generics: description: Decommissioned might be broken or not used anymore. color: "#ffd27f" optional: false - order_weight: 1300 + order_weight: 1200 - name: form_factor kind: Dropdown choices: @@ -136,7 +136,7 @@ generics: cardinality: one optional: true identifier: sfp__interface - order_weight: 1200 + order_weight: 1300 - name: spare_location peer: LocationHosting kind: Attribute @@ -156,6 +156,7 @@ nodes: description: Standard SFP module for various types (e.g., LR, SR, T). label: Standard SFP icon: mdi:gpu + include_in_menu: true menu_placement: DcimGenericSFP inherit_from: - DcimGenericSFP @@ -165,6 +166,7 @@ nodes: description: "Bidirectional SFP supporting two wavelengths for single-fiber operation." label: Bidirectional SFP icon: lineicons:arrow-both-direction-vertical-1 + include_in_menu: true menu_placement: DcimGenericSFP inherit_from: - DcimGenericSFP @@ -188,19 +190,25 @@ extensions: relationships: - name: plugged_sfp peer: DcimGenericSFP + kind: Generic cardinality: one optional: true identifier: sfp__interface + order_weight: 1700 - kind: LocationHosting relationships: - name: spare_sfps peer: DcimGenericSFP + kind: Generic cardinality: many optional: true + order_weight: 1750 - kind: OrganizationManufacturer relationships: - name: sfps peer: DcimGenericSFP + kind: Generic label: SFPs cardinality: many optional: true + order_weight: 1500 diff --git a/extensions/snmp/snmp.yml b/extensions/snmp/snmp.yml index 2b81405f..f3da930a 100644 --- a/extensions/snmp/snmp.yml +++ b/extensions/snmp/snmp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,6 +13,7 @@ generics: description: Generic model for SNMP community configurations. label: SNMP Community icon: iconoir:community + include_in_menu: true human_friendly_id: - name__value order_by: @@ -21,6 +22,8 @@ generics: attributes: - name: name kind: Text + unique: true + optional: false order_weight: 1000 - name: description kind: Text @@ -31,13 +34,17 @@ generics: peer: SnmpClient kind: Component cardinality: many + optional: true + order_weight: 1900 - name: devices - peer: DcimDevice + peer: DcimGenericDevice label: Devices kind: Attribute cardinality: many + optional: true + identifier: snmp_community__device description: Devices this community is configured on. - order_weight: 1200 + order_weight: 1800 nodes: # -------------------- Snmp Community -------------------- @@ -46,6 +53,7 @@ nodes: description: SNMP v1/v2c community configuration. label: SNMP v1/v2c icon: iconoir:community + include_in_menu: true menu_placement: SnmpCommunity inherit_from: - SnmpCommunity @@ -57,6 +65,7 @@ nodes: attributes: - name: community_string kind: Password + optional: false order_weight: 1300 - name: access kind: Dropdown @@ -67,6 +76,7 @@ nodes: - name: read_write label: Read-Write description: Read-write access. + optional: false order_weight: 1200 - name: CommunityV3 @@ -74,6 +84,7 @@ nodes: description: SNMP version 3 configuration with enhanced security. label: SNMP v3 icon: iconoir:community + include_in_menu: true menu_placement: SnmpCommunity inherit_from: - SnmpCommunity @@ -85,6 +96,7 @@ nodes: attributes: - name: username kind: Text + optional: false order_weight: 1300 - name: auth_protocol kind: Dropdown @@ -99,6 +111,7 @@ nodes: - name: sha label: SHA description: SHA authentication. + optional: false order_weight: 1400 - name: auth_password kind: Password @@ -118,6 +131,7 @@ nodes: - name: aes label: AES description: AES encryption. + optional: false order_weight: 1600 - name: privacy_password kind: Password @@ -128,15 +142,16 @@ nodes: kind: Dropdown label: Security Level choices: - - name: noAuthNoPriv + - name: no_auth_no_priv label: NoAuthNoPriv description: No authentication and no privacy. - - name: authNoPriv + - name: auth_no_priv label: AuthNoPriv description: Authentication but no privacy. - - name: authPriv + - name: auth_priv label: AuthPriv description: Both authentication and privacy. + optional: false order_weight: 1200 - name: Client @@ -144,6 +159,7 @@ nodes: description: Represents an SNMP client that interacts with SNMP Community. label: SNMP Client icon: ph:user-list-light + include_in_menu: true menu_placement: SnmpCommunity human_friendly_id: - name__value @@ -153,6 +169,8 @@ nodes: attributes: - name: name kind: Text + unique: true + optional: false order_weight: 1000 - name: client_description kind: Text @@ -160,14 +178,17 @@ nodes: optional: true order_weight: 1100 relationships: - - name: ip_address + - name: ip_addresses peer: IpamIPAddress - label: IP Address + label: IP Addresses kind: Attribute cardinality: many + optional: true description: Authorized SNMP client address. order_weight: 1150 - - name: community + - name: communities peer: SnmpCommunity + kind: Attribute cardinality: many + optional: true order_weight: 1200 diff --git a/extensions/tenancy/tenancy.yml b/extensions/tenancy/tenancy.yml index eb128ee4..e54f165b 100644 --- a/extensions/tenancy/tenancy.yml +++ b/extensions/tenancy/tenancy.yml @@ -2,17 +2,19 @@ # 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 +# 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 + namespace: Organization description: A tenant is the owner of the corresponding devices, addressing, and locations. + label: Tenant icon: mdi:domain include_in_menu: true + menu_placement: OrganizationGeneric inherit_from: - OrganizationGeneric relationships: @@ -23,6 +25,7 @@ nodes: cardinality: many optional: true identifier: tenant__device + order_weight: 1300 - name: prefixes peer: IpamPrefix label: Prefixes @@ -30,13 +33,15 @@ nodes: cardinality: many optional: true identifier: tenant__prefix + order_weight: 1350 - name: addresses peer: IpamIPAddress label: Addresses kind: Generic cardinality: many optional: true - identifier: tenant__ipaddress + identifier: tenant__ip_address + order_weight: 1400 - name: locations peer: LocationHosting label: Locations @@ -44,22 +49,23 @@ nodes: cardinality: many optional: true identifier: tenant__location + order_weight: 1450 extensions: nodes: - kind: DcimGenericDevice relationships: - name: tenant - peer: TenancyTenant + peer: OrganizationTenant kind: Attribute cardinality: one optional: true identifier: tenant__device - order_weight: 1800 + order_weight: 1850 - kind: IpamPrefix relationships: - name: tenant - peer: TenancyTenant + peer: OrganizationTenant kind: Attribute cardinality: one optional: true @@ -68,16 +74,16 @@ extensions: - kind: IpamIPAddress relationships: - name: tenant - peer: TenancyTenant + peer: OrganizationTenant kind: Attribute cardinality: one optional: true - identifier: tenant__ipaddress - order_weight: 1300 + identifier: tenant__ip_address + order_weight: 1350 - kind: LocationHosting relationships: - name: tenant - peer: TenancyTenant + peer: OrganizationTenant kind: Attribute cardinality: one optional: true @@ -102,12 +108,12 @@ extensions: # - kind: DcimCircuit # relationships: # - name: tenant -# peer: TenancyTenant +# peer: OrganizationTenant # identifier: tenant__circuit # optional: true # cardinality: one # kind: Attribute -# - kind: TenancyTenant +# - kind: OrganizationTenant # relationships: # - name: circuits # peer: DcimCircuit @@ -117,3 +123,4 @@ extensions: # kind: Generic # # The same pattern applies to any other optional extension node you want tenancy on. + order_weight: 1800 diff --git a/extensions/users/README.md b/extensions/users/README.md deleted file mode 100644 index ccecd1f1..00000000 --- a/extensions/users/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# users - -Please refer to the [reference page](https://docs.infrahub.app/schema-library/reference/users) for the corresponding documentation. diff --git a/extensions/users/users.yml b/extensions/users/users.yml deleted file mode 100644 index 53df453d..00000000 --- a/extensions/users/users.yml +++ /dev/null @@ -1,108 +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" - -nodes: - - name: Group - namespace: User - description: "User Group" - label: "User Groups" - icon: "iconoir:group" - 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: 1100 - - name: idle_timeout - kind: Number - label: Idle Timeout (s) - order_weight: 1300 - - name: permissions - kind: Dropdown - choices: - - name: admin - description: "All rights on device." - color: "#E6E6FA" # lavender - - name: operator - description: "Operator right on configuration." - color: "#E6E6FA" # lavender - - name: read-only - description: "Read only right on configuration." - color: "#E6E6FA" # lavender - optional: false - order_weight: 1200 - - - name: Account - namespace: User - description: "User login and authentication" - label: "User Account" - icon: "mdi:account-key" - human_friendly_id: - - "name__value" - order_by: - - name__value - display_label: name__value - attributes: - - name: name - kind: Text - label: Username - unique: true - description: "The login username" - order_weight: 1000 - - name: full_name - kind: Text - optional: true - description: "Full name of the account" - order_weight: 1100 - - name: ssh_key - kind: Password - optional: true - description: "SSH key for secure access" - order_weight: 1300 - - name: password - kind: Password - optional: true - description: "Password for login (alternative to SSH key)" - order_weight: 1400 - - name: mfa_enabled - kind: Boolean - default_value: false - description: "Whether multi-factor authentication is enabled" - order_weight: 1500 - relationships: - - name: user_group - peer: UserGroup - kind: Attribute - cardinality: one - optional: false - order_weight: 1200 - - name: organization - peer: OrganizationGeneric - kind: Parent - cardinality: one - optional: false - -extensions: - nodes: - # Organization Extensions - - kind: OrganizationGeneric - relationships: - - name: accounts - peer: UserAccount - kind: Component - cardinality: many - description: "List of Accounts under this organization" diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index 4a9a75e5..29d6d15e 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -2,47 +2,36 @@ # 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 +# 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: VLANGroupScope + - name: GenericVLAN 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 - peer: IpamVLANGroup - 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 + description: A VLAN is an isolated layer two domain. label: VLAN icon: mdi:lan-pending + include_in_menu: true 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 - order_weight: 910 + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 - name: vlan_id kind: Number - order_weight: 900 + optional: false + order_weight: 1050 - name: status kind: Dropdown default_value: active @@ -68,7 +57,7 @@ generics: description: No longer in use and scheduled for removal. color: "#e04040" optional: false - order_weight: 920 + order_weight: 1200 - name: role kind: Dropdown choices: @@ -85,6 +74,7 @@ generics: description: Segments designed for end-user access and activities. color: "#a0b78d" optional: true + order_weight: 1300 relationships: - name: prefixes peer: IpamPrefix @@ -92,6 +82,7 @@ generics: cardinality: many optional: true identifier: vlan__prefix + order_weight: 1500 - name: vlan_group peer: IpamVLANGroup label: VLAN Group @@ -99,32 +90,39 @@ generics: cardinality: one optional: false identifier: vlan_group__vlan - order_weight: 930 + order_weight: 1400 nodes: - name: VLAN namespace: Ipam + description: A plain VLAN, with no QinQ role of its own. label: VLAN include_in_menu: false inherit_from: - - GenericVLAN + - IpamGenericVLAN + uniqueness_constraints: + - [vlan_id__value, vlan_group] - 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 + include_in_menu: true + menu_placement: IpamGenericVLAN human_friendly_id: - name__value display_label: name__value attributes: - name: name kind: Text + unique: true + optional: false order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 relationships: - name: scope peer: IpamVLANGroupScope @@ -134,36 +132,49 @@ nodes: identifier: vlan_group__scope order_weight: 900 - name: vlans - peer: GenericVLAN + peer: IpamGenericVLAN kind: Component cardinality: many optional: true identifier: vlan_group__vlan + order_weight: 1500 extensions: nodes: + - kind: IpamVLANGroupScope + relationships: + - name: vlan_groups + peer: IpamVLANGroup + label: VLAN Groups + kind: Attribute + cardinality: many + optional: true + identifier: vlan_group__scope + order_weight: 1600 - kind: IpamPrefix relationships: - name: vlan - peer: GenericVLAN + peer: IpamGenericVLAN kind: Attribute cardinality: one optional: true identifier: vlan__prefix - order_weight: 1400 + order_weight: 1450 - kind: InterfaceLayer2 relationships: - name: untagged_vlan - peer: GenericVLAN + peer: IpamGenericVLAN label: Untagged VLAN kind: Generic cardinality: one optional: true identifier: interface_l2__untagged_vlan + order_weight: 1500 - name: tagged_vlan - peer: GenericVLAN + peer: IpamGenericVLAN label: Tagged VLANs kind: Generic cardinality: many optional: true identifier: interface_l2__tagged_vlan + order_weight: 1550 diff --git a/extensions/vrf/vrf.yml b/extensions/vrf/vrf.yml index d3ef4c72..3c9977ab 100644 --- a/extensions/vrf/vrf.yml +++ b/extensions/vrf/vrf.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -10,9 +10,10 @@ version: "1.0" nodes: - name: VRF namespace: Ipam - description: A VRF is isolated layer three domain + description: A VRF is an isolated layer three domain. label: VRF icon: mdi:router + include_in_menu: true human_friendly_id: - name__value order_by: @@ -23,23 +24,28 @@ nodes: kind: Text unique: true optional: false + order_weight: 1000 - name: vrf_rd kind: Text label: Route Distinguisher optional: true + order_weight: 1050 - name: enforce_unique kind: Boolean label: Enforce Unique + description: >- + Declares the intent that prefixes and addresses be unique in this VRF. Infrahub does + not enforce it; use a check or generator. default_value: true optional: true - order_weight: 1100 + order_weight: 1200 - name: description kind: Text optional: true - order_weight: 1200 + order_weight: 1100 relationships: - # TODO: Perhaps add namespace here at some point? - # Perhaps would make sense to have multiple flavors of namespace? + # Uncomment to pin each VRF to its own IP namespace; the library leaves VRFs + # namespace-agnostic by default. # - name: namespace # peer: BuiltinIPNamespace # identifier: vrf__namespace @@ -53,6 +59,7 @@ nodes: cardinality: many optional: true identifier: vrf__import + order_weight: 1300 - name: export_rt peer: IpamRouteTarget label: Export Targets @@ -60,12 +67,14 @@ nodes: cardinality: many optional: true identifier: vrf__export + order_weight: 1350 - name: RouteTarget namespace: Ipam description: Route Target (RFC 4360) label: Route Target icon: mdi:target + include_in_menu: true menu_placement: IpamVRF human_friendly_id: - name__value @@ -73,26 +82,32 @@ nodes: - name__value display_label: name__value attributes: - # TODO: regex to comply with RFC 4360 (nautobot doesn't enforce that) - name: name kind: Text unique: true + optional: false + order_weight: 1000 - name: description kind: Text optional: true + order_weight: 1100 relationships: - name: import_vrf peer: IpamVRF + kind: Generic label: Imported by VRFs cardinality: many optional: true identifier: vrf__import + order_weight: 1300 - name: export_vrf peer: IpamVRF + kind: Generic label: Exported by VRFs cardinality: many optional: true identifier: vrf__export + order_weight: 1350 extensions: nodes: - kind: IpamPrefix diff --git a/extensions/vrrp/vrrp.yml b/extensions/vrrp/vrrp.yml index 54f9d171..f274ee85 100644 --- a/extensions/vrrp/vrrp.yml +++ b/extensions/vrrp/vrrp.yml @@ -2,7 +2,7 @@ # 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 +# Adapting it for your environment typically requires architectural review, see # docs.infrahub.app, or reach out to OpsMill for help. # --------------------------------------------------------------------------- version: "1.0" @@ -13,17 +13,19 @@ nodes: description: VRRP Group configuration label: VRRP Group icon: fluent:virtual-network-20-filled + include_in_menu: true human_friendly_id: - name__value order_by: - name__value display_label: name__value attributes: - # Could become a 'computed field' based on group + ip + # Could become a computed attribute from vrid + ip_addresses, as IpamCVLAN.name does. - name: name kind: Text label: Name unique: true + optional: false description: Unique name of the entry order_weight: 1000 - name: vrid @@ -32,6 +34,7 @@ nodes: parameters: min_value: 1 max_value: 255 + optional: false description: Virtual Router ID (VRID, should be between 1 and 255) order_weight: 1100 - name: password @@ -56,6 +59,7 @@ nodes: kind: Component cardinality: many on_delete: cascade + optional: true order_weight: 1300 - name: VRRPInterface @@ -63,6 +67,7 @@ nodes: description: VRRP Interface configuration label: VRRP Interface icon: carbon:interface-usage + include_in_menu: true menu_placement: NetworkVRRPGroup order_by: - priority__value @@ -76,6 +81,7 @@ nodes: parameters: min_value: 1 max_value: 255 + optional: false description: VRRP Priority (Should be between 1 and 255) order_weight: 1100 relationships: @@ -105,14 +111,16 @@ extensions: label: VRRP kind: Component cardinality: one + optional: true description: VRRP Interface Configuration - order_weight: 1500 + order_weight: 1650 - kind: IpamIPAddress relationships: - name: vrrp peer: NetworkVRRPGroup label: VRRP Group - kind: Component + kind: Attribute cardinality: one + optional: true description: Part of VRRP Group - order_weight: 1600 + order_weight: 1700 diff --git a/objects/base/01_organization.yml b/objects/base/01_organization.yml index f5aa5c6a..26bcb621 100644 --- a/objects/base/01_organization.yml +++ b/objects/base/01_organization.yml @@ -21,6 +21,8 @@ kind: Object spec: kind: OrganizationProvider data: + - name: Acme Networks + description: Acme Networks -- the operator this mock data belongs to. - name: Lumen description: Lumen Technologies -- transit and dark fiber provider. - name: Colt diff --git a/objects/extensions/aggregate/aggregate.yml b/objects/extensions/aggregate/aggregate.yml index 9e0de295..6e7848a4 100644 --- a/objects/extensions/aggregate/aggregate.yml +++ b/objects/extensions/aggregate/aggregate.yml @@ -20,7 +20,7 @@ spec: description: Réseau IP Européens Network Coordination Centre. - name: Private (RFC 1918) description: Internal registry for RFC 1918 / RFC 4193 private address space. - is_private: true + private: true --- apiVersion: infrahub.app/v1 diff --git a/objects/extensions/circuit/circuit.yml b/objects/extensions/circuit/circuit.yml index ce2c70d9..495ff2fe 100644 --- a/objects/extensions/circuit/circuit.yml +++ b/objects/extensions/circuit/circuit.yml @@ -1,39 +1,42 @@ # --------------------------------------------------------------------------- # Mock data for extensions/circuit. -# Depends on: base. +# Self-sufficient: it creates every record it references, so it can be loaded +# on its own on top of base + any extension that provides a concrete +# LocationSite (extensions/location_minimal or extensions/location_site). # -# NOTE: this file also creates the minimal LocationSite (from -# extensions/location_minimal) and OrganizationProvider (from base) fixtures -# it needs. If those extensions' own object files have already loaded the -# same records (e.g. NYC1, SJC1, Lumen, Colt), this upserts/matches them -# instead of duplicating -- see rule in AGENTS notes about repeating -# mandatory fields for an existing target. +# DcimCircuitEndpoint.location is mandatory and its peer LocationHosting is a +# base generic that base itself never implements, so the endpoints need a Site +# to exist. The sites are created below with their name only, deliberately +# without a parent: extensions/location_site has no tier above Site, and +# extensions/location_minimal puts them under Americas -> United States, so +# restating either tree here would tie this file to one of the two mutually +# exclusive location extensions. Restating location_minimal's tree is not an +# option anyway, since re-upserting the hierarchy root fails with "Not +# supported to assign a value to parent for LocationRegion". +# +# ORDER: load this file BEFORE your location fixture. In the .metadata.yml +# resolver order that is what happens (circuit sorts ahead of +# location_minimal), and location_minimal's fuller definition then adopts NYC1 +# and SJC1 into its hierarchy. Loading it the other way round leaves the two +# sites without a parent, because `infrahubctl object load` sends an explicit +# null for every optional cardinality-one relationship a document omits -- see +# the note at the top of objects/extensions/mlag/mlag.yml. +# +# NOTE: this file also creates the OrganizationProvider (from base) fixtures it +# needs. If base's own object file has already loaded the same records (Lumen, +# Colt), this upserts/matches them instead of duplicating -- see rule in AGENTS +# notes about repeating mandatory fields for an existing target. # --------------------------------------------------------------------------- --- apiVersion: infrahub.app/v1 kind: Object spec: - kind: LocationRegion + kind: LocationSite data: - - name: Americas - description: North & South America. - children: - kind: LocationCountry - data: - - name: United States - children: - kind: LocationSite - data: - - name: NYC1 - status: active - facility: Equinix NY5 - physical_address: "755 Secaucus Rd, Secaucus, NJ 07094" - timezone: America/New_York - - name: SJC1 - status: active - facility: Equinix SV1 - physical_address: "2001 Ryan Ave, San Jose, CA 95131" - timezone: America/Los_Angeles + - name: NYC1 + description: "Circuit hand-off site, New York metro." + - name: SJC1 + description: "Circuit hand-off site, San Jose metro." --- apiVersion: infrahub.app/v1 @@ -42,9 +45,9 @@ spec: kind: OrganizationProvider data: - name: Lumen - description: Lumen Technologies, circuit provider. + description: Lumen Technologies -- transit and dark fiber provider. - name: Colt - description: Colt Technology Services, circuit provider. + description: Colt Technology Services -- transit and cross connects. --- apiVersion: infrahub.app/v1 @@ -67,21 +70,14 @@ spec: - side: a status: active description: "NYC1 hand-off" - # location is cardinality one, peer LocationHosting (a Generic), - # so it needs a nested kind+data block naming the concrete kind. - # LocationSite's only mandatory field is `name`; this upserts - # against the site created above. - location: - kind: LocationSite - data: - name: NYC1 + # location is cardinality one, peer LocationHosting (a Generic) + # whose human_friendly_id is the single field name__value, so the + # already-created site is referenced by that scalar. + location: NYC1 - side: z status: active description: "SJC1 hand-off" - location: - kind: LocationSite - data: - name: SJC1 + location: SJC1 - circuit_id: "COLT-00456" description: "NYC1 internet access circuit" @@ -95,10 +91,7 @@ spec: - side: a status: active description: "NYC1 hand-off" - location: - kind: LocationSite - data: - name: NYC1 + location: NYC1 - circuit_id: "LUMEN-00789" description: "SJC1 dark fiber segment" @@ -111,7 +104,4 @@ spec: - side: a status: provisioning description: "SJC1 hand-off" - location: - kind: LocationSite - data: - name: SJC1 + location: SJC1 diff --git a/objects/extensions/device_module/device_module.yml b/objects/extensions/device_module/device_module.yml index 0d81463e..7dee2553 100644 --- a/objects/extensions/device_module/device_module.yml +++ b/objects/extensions/device_module/device_module.yml @@ -41,7 +41,7 @@ spec: # match the existing nyc1-rtr01 fixture exactly, so this upserts/matches # it instead of creating a duplicate. - name: "slot 1" - position: "1" + position: 1 description: "Primary route processor slot." device: &nyc1_rtr01 kind: DcimDevice @@ -54,12 +54,12 @@ spec: site: NYC1 - name: "slot 2" - position: "2" + position: 2 description: "Secondary route processor slot." device: *nyc1_rtr01 - name: "fan tray 1" - position: "3" + position: 3 description: "Fan tray slot." device: *nyc1_rtr01 diff --git a/objects/extensions/device_psu_module/device_psu_module.yml b/objects/extensions/device_psu_module/device_psu_module.yml index ca5be2bc..0f22cced 100644 --- a/objects/extensions/device_psu_module/device_psu_module.yml +++ b/objects/extensions/device_psu_module/device_psu_module.yml @@ -7,7 +7,7 @@ # Module<->ModuleBay is a strict 1:1 relationship, and nyc1-rtr01's existing # bays ("slot 1", "slot 2", "fan tray 1") are already occupied by DcimModule # instances from extensions/device_module -- so this file creates brand new -# bays ("PSU slot 1"/"PSU slot 2"/"PSU slot 3") to install the PSU modules +# bays ("PSU slot 1"/"PSU slot 2") to install the PSU modules # into, instead of reusing the existing ones. # # Order: DcimPSUModuleType -> DcimModuleBay (new PSU bays) -> DcimPSUModule @@ -25,21 +25,21 @@ spec: part_number: "A9K-PSU" manufacturer: Cisco wattage: 3000 - hotswappable: true + hot_swappable: true - name: MX204-PSU description: "AC power supply module for the MX204." part_number: "PSU-MX204" manufacturer: Juniper wattage: 650 - hotswappable: true + hot_swappable: true - name: PowerEdge-PSU description: "Redundant power supply module for the PowerEdge R660." part_number: "PWR-R660" manufacturer: Dell wattage: 800 - hotswappable: true + hot_swappable: true --- apiVersion: infrahub.app/v1 diff --git a/objects/extensions/dwdm/dwdm.yml b/objects/extensions/dwdm/dwdm.yml index c407e5da..e9909012 100644 --- a/objects/extensions/dwdm/dwdm.yml +++ b/objects/extensions/dwdm/dwdm.yml @@ -59,7 +59,7 @@ spec: kind: DcimOadmFrontInterface data: - name: "CH1" - connector_type: LC + connector_type: lc # `channels` peer (DcimWdmChannel) is a CONCRETE kind whose # human_friendly_id has two components ([wdm_type__value, # channel__value]) and the relationship is cardinality many, so @@ -68,7 +68,7 @@ spec: channels: - [dwdm, "1"] - name: "CH2" - connector_type: LC + connector_type: lc channels: - [dwdm, "2"] # rear_interface is a Component relationship of cardinality one -- @@ -77,7 +77,7 @@ spec: kind: DcimOadmRearInterface data: name: "COM" - connector_type: LC + connector_type: lc - name: NYC1-MUX02 wdm_type: cwdm @@ -93,14 +93,14 @@ spec: kind: DcimOadmFrontInterface data: - name: "CH1" - connector_type: LC + connector_type: lc channels: - [cwdm, "20"] rear_interface: kind: DcimOadmRearInterface data: name: "COM" - connector_type: LC + connector_type: lc --- apiVersion: infrahub.app/v1 @@ -134,7 +134,7 @@ spec: form_factor: sfp_plus status: plugged wdm_type: dwdm - serial: "SFP-WDM-0001" + serial_number: "SFP-WDM-0001" manufacturer: Cisco # `interface` peer (InterfacePhysical) is a CONCRETE kind with a # composite human_friendly_id ([device__name__value, name__value]). @@ -148,7 +148,7 @@ spec: form_factor: sfp_plus status: spare wdm_type: dwdm - serial: "SFP-WDM-0002" + serial_number: "SFP-WDM-0002" manufacturer: Cisco spare_location: kind: LocationSite @@ -160,7 +160,7 @@ spec: form_factor: qsfp28 status: spare wdm_type: cwdm - serial: "SFP-WDM-0003" + serial_number: "SFP-WDM-0003" manufacturer: Cisco spare_location: kind: LocationRack diff --git a/objects/extensions/hosting_cluster/hosting_cluster.yml b/objects/extensions/hosting_cluster/hosting_cluster.yml index b25e1f46..494f6f87 100644 --- a/objects/extensions/hosting_cluster/hosting_cluster.yml +++ b/objects/extensions/hosting_cluster/hosting_cluster.yml @@ -48,11 +48,12 @@ spec: description: VMware vSphere cluster at SJC1 built from physical servers. technology: vmware status: active - # `location` is cardinality many (a cluster can span locations), and - # LocationGeneric is a Generic -- a flat list of HFID strings works - # against the existing LocationSite. - location: - - SJC1 + # `locations` is cardinality many (a cluster can span locations), and + # LocationGeneric is a Generic -- each entry is a human_friendly_id, and + # an HFID is always a list of its parts, so the single-part site name is + # wrapped in a list. A bare string there is read as a node ID. + locations: + - [SJC1] # `nodes` is cardinality many, and ComputeGenericUnit is a Generic -- # a flat list of HFID strings is not enough (the peer schema can't be # resolved), so specify the concrete kind with a list of upsert specs. @@ -73,8 +74,8 @@ spec: description: KVM/QEMU cluster at NYC1 built from physical servers. technology: kvm status: active - location: - - NYC1 + locations: + - [NYC1] nodes: kind: ComputePhysicalServer data: diff --git a/objects/extensions/mlag/mlag.yml b/objects/extensions/mlag/mlag.yml index faa538a4..99857226 100644 --- a/objects/extensions/mlag/mlag.yml +++ b/objects/extensions/mlag/mlag.yml @@ -1,20 +1,46 @@ # --------------------------------------------------------------------------- # Mock data for extensions/mlag. -# Depends on: base, extensions/lag (DcimDevice: nyc1-rtr01, in NYC1-RACK-01, -# with interfaces TenGigE0/0/0/1 and /2 bundled into InterfaceLag -# "Bundle-Ether1"). +# Depends on: base, extensions/lag (InterfaceLag, GenericInterfaceBundle), +# extensions/location_minimal (LocationSite: NYC1), extensions/rack +# (LocationRack: NYC1-RACK-01). +# +# UPSERT RULE FOR EVERY FILE UNDER objects/ -- documented once, here. +# +# `infrahubctl object load` builds each record from scratch and saves it with +# allow_upsert, and infrahub-sdk fills in every optional cardinality-one +# relationship the document leaves out with an explicit null. Re-declaring a +# node another file has already linked therefore CLEARS those links. Where the +# link is guarded by a constraint the load fails outright, as here: +# +# ['DcimDeviceUpsert'] Node has 0 peers for device__mlag_domain, +# no fewer than 2 allowed +# +# MlagDomain.peers is min_count/max_count 2 and shares the identifier +# device__mlag_domain with the optional DcimDevice.mlag_domain added by this +# extension, so ANY later document that re-upserts a member device without +# restating mlag_domain breaks the domain. Restating it is not an option +# either: it would make objects/extensions/rack (and four other files) depend +# on this extension's schema, inverting the layering. +# +# So a fixture that owns a relationship owns its endpoints too. This file +# creates, and is the only file anywhere under objects/ that ever saves, +# nyc1-rtr02 and nyc1-rtr03. It deliberately does not build the domain on +# nyc1-rtr01: objects/extensions/rack, device_psu_module, dwdm, routing_ospf +# and routing_pim all re-upsert that device after this file has run. +# objects/extensions/routing_bgp and peering_ixp only reference nyc1-rtr02 by +# human_friendly_id, which does not save it and so is safe. # # A MlagDomain regroups exactly 2 devices (peers, min_count/max_count = 2) -# built over LAG interfaces used as peer-links. So we add a second device, -# nyc1-rtr02, in the same rack/site, with its own pair of physical interfaces -# bundled into its own "Bundle-Ether1" LAG -- mirroring nyc1-rtr01's peer-link -# LAG. Both LAGs then become the domain's peer_links. +# built over LAG interfaces used as peer-links, so both peers are created here +# in the same rack/site, each with its own pair of physical interfaces bundled +# into its own "Bundle-Ether1" LAG. Both LAGs then become the domain's +# peer_links. # # MlagInterface inherits GenericInterfaceBundle (bundle_members, cardinality # many, peer InterfacePhysical) but NOT DcimInterface -- it has no single # "device" of its own. Instead it is "spread across devices in the domain" -# by bundling physical interfaces that live on different peer devices. We -# add TenGigE0/0/0/3 and /4 on both devices to serve as those members. +# by bundling physical interfaces that live on different peer devices. +# TenGigE0/0/0/3 and /4 on both devices serve as those members. # # MlagInterface.mlag_domain is a Parent relationship (mandatory, cardinality # one) paired with MlagDomain.mlag_interfaces (Component, cardinality many), @@ -23,10 +49,11 @@ # extensions/rack nests InterfacePhysical under DcimDevice.interfaces. # # peer_links (peer InterfaceLag, concrete kind, cardinality many) and peers -# (peer DcimDevice, concrete kind, cardinality many) both use flat lists of -# human_friendly_id refs -- InterfaceLag's HFID is a 2-part -# [device__name__value, name__value] list, DcimDevice's HFID is just -# name__value. +# (peer DcimDevice, concrete kind, cardinality many) are both lists of +# human_friendly_id refs, and every HFID is itself a list of its parts: +# InterfaceLag's is the 2-part [device__name__value, name__value], DcimDevice's +# is the 1-part [name__value]. A bare string there is read as a node ID, so the +# single-part HFID is wrapped in a list too. # --------------------------------------------------------------------------- --- apiVersion: infrahub.app/v1 @@ -34,18 +61,31 @@ kind: Object spec: kind: DcimDevice data: - # Upsert against the existing nyc1-rtr01 (created by extensions/rack, - # extended by extensions/lag) -- add the two physical interfaces that - # will become MLAG interface members toward downstream access switches. - - name: nyc1-rtr01 + # First peer of the MLAG domain, with a peer-link LAG over + # TenGigE0/0/0/1-2 and a pair of MLAG-facing interfaces on /3 and /4. + - name: nyc1-rtr02 + status: active + role: edge device_type: ASR9001 platform: Cisco IOS-XR - location: + position: 41 + rack_face: front + location: &nyc1_rack_01 kind: LocationRack data: name: NYC1-RACK-01 site: NYC1 interfaces: + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/1 + status: active + role: core + - kind: InterfacePhysical + data: + name: TenGigE0/0/0/2 + status: active + role: core - kind: InterfacePhysical data: name: TenGigE0/0/0/3 @@ -56,27 +96,31 @@ spec: name: TenGigE0/0/0/4 status: active role: core + - kind: InterfaceLag + data: + name: Bundle-Ether1 + description: MLAG peer-link toward nyc1-rtr03. + status: active + role: core + bundle_number: 1 + lacp_mode: active + lacp_rate: fast + bundle_members: + - ["nyc1-rtr02", "TenGigE0/0/0/1"] + - ["nyc1-rtr02", "TenGigE0/0/0/2"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: DcimDevice - data: - # Second peer of the MLAG domain -- same rack/site as nyc1-rtr01, with a - # mirrored peer-link LAG and its own pair of MLAG-facing interfaces. - - name: nyc1-rtr02 + # Second peer of the MLAG domain -- same rack/site as nyc1-rtr02, with a + # mirrored peer-link LAG and its own pair of MLAG-facing interfaces. Both + # peers live in one document so the LocationRack anchor above can be + # reused: a YAML anchor does not cross a `---` document boundary. + - name: nyc1-rtr03 status: active role: edge device_type: ASR9001 platform: Cisco IOS-XR - position: 41 + position: 42 rack_face: front - location: - kind: LocationRack - data: - name: NYC1-RACK-01 - site: NYC1 + location: *nyc1_rack_01 interfaces: - kind: InterfacePhysical data: @@ -101,15 +145,15 @@ spec: - kind: InterfaceLag data: name: Bundle-Ether1 - description: MLAG peer-link toward nyc1-rtr01. + description: MLAG peer-link toward nyc1-rtr02. status: active role: core bundle_number: 1 lacp_mode: active lacp_rate: fast bundle_members: - - ["nyc1-rtr02", "TenGigE0/0/0/1"] - - ["nyc1-rtr02", "TenGigE0/0/0/2"] + - ["nyc1-rtr03", "TenGigE0/0/0/1"] + - ["nyc1-rtr03", "TenGigE0/0/0/2"] --- apiVersion: infrahub.app/v1 @@ -120,11 +164,11 @@ spec: - domain_id: "NYC1-MLAG-01" reload_delay: 300 peers: - - "nyc1-rtr01" - - "nyc1-rtr02" + - ["nyc1-rtr02"] + - ["nyc1-rtr03"] peer_links: - - ["nyc1-rtr01", "Bundle-Ether1"] - ["nyc1-rtr02", "Bundle-Ether1"] + - ["nyc1-rtr03", "Bundle-Ether1"] mlag_interfaces: kind: MlagInterface data: @@ -134,13 +178,13 @@ spec: role: router bundle_number: 100 bundle_members: - - ["nyc1-rtr01", "TenGigE0/0/0/3"] - ["nyc1-rtr02", "TenGigE0/0/0/3"] + - ["nyc1-rtr03", "TenGigE0/0/0/3"] - name: Bundle-Ether101 description: MLAG port-channel toward nyc1-acc-sw02. status: active role: router bundle_number: 101 bundle_members: - - ["nyc1-rtr01", "TenGigE0/0/0/4"] - ["nyc1-rtr02", "TenGigE0/0/0/4"] + - ["nyc1-rtr03", "TenGigE0/0/0/4"] diff --git a/objects/extensions/patch_panel/patch_panel.yml b/objects/extensions/patch_panel/patch_panel.yml index 39c6bae3..865e730b 100644 --- a/objects/extensions/patch_panel/patch_panel.yml +++ b/objects/extensions/patch_panel/patch_panel.yml @@ -30,9 +30,9 @@ spec: kind: DcimRearPatchPanelInterface data: - name: RJ1 - connector_type: LC + connector_type: lc - name: RJ2 - connector_type: LC + connector_type: lc - name: NYC1-PP-02 description: 12-port SC fiber patch panel. @@ -48,7 +48,7 @@ spec: kind: DcimRearPatchPanelInterface data: - name: RJ1 - connector_type: SC + connector_type: sc --- # Front interfaces are created as their own top-level documents (rather than @@ -61,7 +61,7 @@ spec: kind: DcimFrontPatchPanelInterface data: - name: FR1 - connector_type: LC + connector_type: lc # patch_panel peer (DcimPatchPanel) is a CONCRETE kind with a # single-field human_friendly_id (name), so a plain scalar works. patch_panel: NYC1-PP-01 @@ -73,11 +73,11 @@ spec: corresponding_front_rear: [NYC1-PP-01, RJ1] - name: FR2 - connector_type: LC + connector_type: lc patch_panel: NYC1-PP-01 corresponding_front_rear: [NYC1-PP-01, RJ2] - name: FR1 - connector_type: SC + connector_type: sc patch_panel: NYC1-PP-02 corresponding_front_rear: [NYC1-PP-02, RJ1] diff --git a/objects/extensions/peering_ixp/peering_ixp.yml b/objects/extensions/peering_ixp/peering_ixp.yml index 056f0ee8..a2b58073 100644 --- a/objects/extensions/peering_ixp/peering_ixp.yml +++ b/objects/extensions/peering_ixp/peering_ixp.yml @@ -18,7 +18,8 @@ # string. import_policies/export_policies (cardinality many, peer # RoutingPolicyBGP -- concrete, HFID name__value) and bgp_communities # (cardinality many, peer RoutingBGPCommunity -- concrete, HFID name__value) -# are flat lists of HFID scalars. +# are lists of HFIDs, and an HFID is always a list of its parts -- so each +# single-part entry is itself a one-element list, not a bare string. # # PeeringIXPConnection's human_friendly_id is also just `name__value`. # internet_exchange_point (Parent, cardinality one, mandatory) references @@ -47,11 +48,11 @@ spec: - "65000" - NYC1-BACKBONE-AS import_policies: - - CUST-A-IMPORT-PREFER-CUSTOMER + - [CUST-A-IMPORT-PREFER-CUSTOMER] export_policies: - - CUST-A-EXPORT-DEFAULT-ROUTE + - [CUST-A-EXPORT-DEFAULT-ROUTE] bgp_communities: - - NO-EXPORT + - [NO-EXPORT] - name: SJC1-IX description: "San Jose area internet exchange point serving the SJC1 site." diff --git a/objects/extensions/qinq/qinq.yml b/objects/extensions/qinq/qinq.yml index 473e0f2c..5abbdce1 100644 --- a/objects/extensions/qinq/qinq.yml +++ b/objects/extensions/qinq/qinq.yml @@ -2,7 +2,7 @@ # Mock data for extensions/qinq. # Depends on: base, extensions/location_minimal, extensions/vlan # (IpamVLANGroup: NYC1-VLANs). -# IpamSVLAN and IpamCVLAN both inherit from GenericVLAN, so each needs its own +# IpamSVLAN and IpamCVLAN both inherit from IpamGenericVLAN, so each needs its own # vlan_id/vlan_group. IpamCVLAN's `name` attribute is a read-only computed # attribute (Jinja2 from svlan + vlan_id), so it is never set here. # --------------------------------------------------------------------------- diff --git a/objects/extensions/rack/rack.yml b/objects/extensions/rack/rack.yml index 4255e0d1..39ebd68a 100644 --- a/objects/extensions/rack/rack.yml +++ b/objects/extensions/rack/rack.yml @@ -12,7 +12,7 @@ spec: site: NYC1 status: active height: 42 - facility_id: "R101" + facility: "R101" --- apiVersion: infrahub.app/v1 diff --git a/objects/extensions/routing_bgp/routing_bgp.yml b/objects/extensions/routing_bgp/routing_bgp.yml index 22e5f184..208d904d 100644 --- a/objects/extensions/routing_bgp/routing_bgp.yml +++ b/objects/extensions/routing_bgp/routing_bgp.yml @@ -17,7 +17,7 @@ # relationships to Generic peers (OrganizationGeneric / LocationGeneric). # Per convention, a plain human_friendly_id scalar is tried first since the # target records already exist (OrganizationProvider "Acme Networks"/"Lumen" -# from base, TenancyTenant "Globex Corp" from extensions/tenancy, LocationSite +# from base, OrganizationTenant "Globex Corp" from extensions/tenancy, LocationSite # "NYC1" from extensions/location_minimal). # # RoutingBGPSession's human_friendly_id is just `description__value` (the @@ -50,8 +50,8 @@ spec: organization: "Acme Networks" location: "NYC1" devices: - - nyc1-rtr01 - - nyc1-rtr02 + - ["nyc1-rtr01"] + - ["nyc1-rtr02"] - asn: 65001 name: CUSTOMER-A-AS diff --git a/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml b/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml index d42e5222..cfb1e19e 100644 --- a/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml +++ b/objects/extensions/routing_policies_aggregate/routing_policies_aggregate.yml @@ -5,7 +5,7 @@ # # RoutingPolicyAggregate inherits RoutingPolicy: name (Text, unique, the # human_friendly_id), description (Text, optional), policy_type (Dropdown: -# import-policy / export-policy / import-export-policy), weight (Number, +# import_policy / export_policy / import_export_policy), weight (Number, # default 1000), address_family (Dropdown: ipv4 / ipv6 / all, default all). # # The `extensions: nodes:` block in @@ -37,17 +37,17 @@ spec: Export policy controlling advertisement of the Customer A summary aggregate route. Referenced by name from the RoutingAggregateRoute.import_policies free-text field on nyc1-rtr01. - policy_type: "export-policy" + policy_type: "export_policy" weight: 500 address_family: "ipv4" - name: "CUST-B-DISCARD-EXPORT" description: "Export policy suppressing advertisement of the discarded Customer B subnet aggregate." - policy_type: "export-policy" + policy_type: "export_policy" weight: 200 address_family: "ipv4" - name: "MGMT-DEFAULT-IMPORT" description: "Import policy accepting the default route learned on management-VRF aggregates." - policy_type: "import-policy" + policy_type: "import_policy" address_family: "all" diff --git a/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml b/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml index d2a19a34..54d0da44 100644 --- a/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml +++ b/objects/extensions/routing_policies_bgp/routing_policies_bgp.yml @@ -15,8 +15,10 @@ # the RoutingPolicy generic), so it's referenced as a plain scalar string. # # import_routing_policies / export_routing_policies are cardinality-many -# relationships whose peer (RoutingPolicyBGP) is a concrete kind, so they use -# a flat list of HFID scalars rather than the nested kind+data form. +# relationships whose peer (RoutingPolicyBGP) is a concrete kind, so they take +# a list of HFIDs rather than the nested kind+data form. An HFID is always a +# list of its parts, so each single-part entry is a one-element list -- a bare +# string there is read as a node ID. # # The RoutingBGPPeerGroup/RoutingBGPSession upserts below repeat only their # mandatory fields (per convention -- see objects/extensions/routing_bgp for @@ -34,13 +36,13 @@ spec: data: - name: CUST-A-IMPORT-PREFER-CUSTOMER description: "Import routes learned from Customer A, setting local preference for backbone selection." - policy_type: import-policy + policy_type: import_policy weight: 100 address_family: ipv4 - name: CUST-A-EXPORT-DEFAULT-ROUTE description: "Export a default route and backbone summaries to Customer A." - policy_type: export-policy + policy_type: export_policy weight: 100 address_family: ipv4 @@ -48,7 +50,7 @@ spec: description: >- Export only our own backbone prefixes to the upstream transit provider, filtering out customer routes. - policy_type: export-policy + policy_type: export_policy weight: 500 address_family: all @@ -64,9 +66,9 @@ spec: device: nyc1-rtr01 vrf: CUST-A import_routing_policies: - - CUST-A-IMPORT-PREFER-CUSTOMER + - [CUST-A-IMPORT-PREFER-CUSTOMER] export_routing_policies: - - CUST-A-EXPORT-DEFAULT-ROUTE + - [CUST-A-EXPORT-DEFAULT-ROUTE] --- apiVersion: infrahub.app/v1 @@ -80,4 +82,4 @@ spec: role: upstream vrf: TRANSIT-VRF export_routing_policies: - - TRANSIT-EXPORT-NO-CUSTOMER-ROUTES + - [TRANSIT-EXPORT-NO-CUSTOMER-ROUTES] diff --git a/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml b/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml index 62c8a9ab..214a36df 100644 --- a/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml +++ b/objects/extensions/routing_policies_ospf/routing_policies_ospf.yml @@ -24,7 +24,9 @@ # RoutingBGPPeerGroup. This upserts the existing record rather than # creating a duplicate, and adds import_routing_policies/ # export_routing_policies -- both cardinality many with a CONCRETE peer -# (RoutingPolicyOSPF), so they're flat lists of HFID scalars. +# (RoutingPolicyOSPF), so they're lists of HFIDs. An HFID is always a list of +# its parts, so each single-part entry is a one-element list; a bare string +# there is read as a node ID. # --------------------------------------------------------------------------- --- apiVersion: infrahub.app/v1 @@ -34,19 +36,19 @@ spec: data: - name: CUST-A-OSPF-IMPORT description: "Import policy applied to OSPF routes learned in Customer A's VRF on nyc1-rtr01." - policy_type: import-policy + policy_type: import_policy address_family: ipv4 weight: 100 - name: CUST-A-OSPF-EXPORT description: "Export policy applied to OSPF routes advertised in Customer A's VRF on nyc1-rtr01." - policy_type: export-policy + policy_type: export_policy address_family: ipv4 weight: 100 - name: OSPF-DEFAULT-METRIC description: "Default metric adjustment policy applied to both imported and exported OSPF routes." - policy_type: import-export-policy + policy_type: import_export_policy address_family: all weight: 500 @@ -62,7 +64,7 @@ spec: vrf: CUST-A version: ospf import_routing_policies: - - CUST-A-OSPF-IMPORT + - [CUST-A-OSPF-IMPORT] export_routing_policies: - - CUST-A-OSPF-EXPORT - - OSPF-DEFAULT-METRIC + - [CUST-A-OSPF-EXPORT] + - [OSPF-DEFAULT-METRIC] diff --git a/objects/extensions/routing_policies_pim/routing_policies_pim.yml b/objects/extensions/routing_policies_pim/routing_policies_pim.yml index 94c1f446..4bfb8abc 100644 --- a/objects/extensions/routing_policies_pim/routing_policies_pim.yml +++ b/objects/extensions/routing_policies_pim/routing_policies_pim.yml @@ -10,7 +10,7 @@ # inheriting RoutingPolicy with no extra attributes of its own. Live # schema confirms it adds nothing beyond the generic's fields: name # (Text, unique, mandatory), description (Text, optional), policy_type -# (Dropdown: import-policy/export-policy/import-export-policy, +# (Dropdown: import_policy/export_policy/import_export_policy, # mandatory), weight (Number, optional, default 1000), address_family # (Dropdown: ipv4/ipv6/all, optional, default "all"). Its # human_friendly_id is the single field name__value. @@ -29,8 +29,10 @@ # mandatory fields it already has (description, status, device, vrf, # dr_priority) plus the two new relationship lists pointing at the policies # below. Peer RoutingPolicyPIM is a CONCRETE kind with a human_friendly_id -# (name__value), so a flat list of name strings is enough for these -# cardinality-many relationships -- no nested kind+data block needed. +# (name__value), so these cardinality-many relationships take a list of HFIDs +# and need no nested kind+data block. An HFID is always a list of its parts, so +# each single-part entry is a one-element list; a bare string is read as a +# node ID instead. # --------------------------------------------------------------------------- --- apiVersion: infrahub.app/v1 @@ -40,19 +42,19 @@ spec: data: - name: PIM-ALLOW-CUSTOMER-A-SOURCES description: "Permit PIM joins toward known multicast sources in VRF CUSTOMER-A" - policy_type: import-policy + policy_type: import_policy weight: 100 address_family: ipv4 - name: PIM-ALLOW-CUSTOMER-A-RECEIVERS description: "Permit PIM joins/prunes toward known receiver interfaces in VRF CUSTOMER-A" - policy_type: export-policy + policy_type: export_policy weight: 100 address_family: ipv4 - name: PIM-DENY-DEFAULT description: "Default deny-all fallback PIM policy applied to both import and export" - policy_type: import-export-policy + policy_type: import_export_policy weight: 10 address_family: all @@ -72,7 +74,7 @@ spec: vrf: CUSTOMER-A dr_priority: 100 import_routing_policies: - - PIM-ALLOW-CUSTOMER-A-SOURCES + - [PIM-ALLOW-CUSTOMER-A-SOURCES] export_routing_policies: - - PIM-ALLOW-CUSTOMER-A-RECEIVERS - - PIM-DENY-DEFAULT + - [PIM-ALLOW-CUSTOMER-A-RECEIVERS] + - [PIM-DENY-DEFAULT] diff --git a/objects/extensions/sfp/sfp.yml b/objects/extensions/sfp/sfp.yml index c4c22363..ad994970 100644 --- a/objects/extensions/sfp/sfp.yml +++ b/objects/extensions/sfp/sfp.yml @@ -38,7 +38,7 @@ kind: Object spec: kind: DcimStandardSFP data: - - serial: "SFP-STD-0001" + - serial_number: "SFP-STD-0001" sfp_type: lr form_factor: sfp_plus status: plugged @@ -49,7 +49,7 @@ spec: # kind+data block -- this upserts against the existing interface. interface: [nyc1-rtr01, GigabitEthernet0/0/0/0] - - serial: "SFP-STD-0002" + - serial_number: "SFP-STD-0002" sfp_type: sr form_factor: sfp_plus status: spare @@ -63,7 +63,7 @@ spec: data: name: NYC1 - - serial: "SFP-STD-0003" + - serial_number: "SFP-STD-0003" sfp_type: t form_factor: sfp status: spare @@ -81,7 +81,7 @@ kind: Object spec: kind: DcimBidiSFP data: - - serial: "SFP-BIDI-0001" + - serial_number: "SFP-BIDI-0001" sfp_type: zr form_factor: sfp_plus status: plugged @@ -90,7 +90,7 @@ spec: manufacturer: Cisco interface: [nyc1-rtr01, GigabitEthernet0/0/0/1] - - serial: "SFP-BIDI-0002" + - serial_number: "SFP-BIDI-0002" sfp_type: zr form_factor: sfp_plus status: spare diff --git a/objects/extensions/snmp/snmp.yml b/objects/extensions/snmp/snmp.yml index 59f2f7fd..66b7b496 100644 --- a/objects/extensions/snmp/snmp.yml +++ b/objects/extensions/snmp/snmp.yml @@ -1,7 +1,7 @@ # --------------------------------------------------------------------------- # Mock data for extensions/snmp. # Standalone extension -- no fixture dependencies. The `devices` relationship -# on SnmpCommunity (-> DcimDevice) and `ip_address` on SnmpClient +# on SnmpCommunity (-> DcimGenericDevice) and `ip_addresses` on SnmpClient # (-> IpamIPAddress) are optional and intentionally left unset here. # --------------------------------------------------------------------------- --- @@ -32,14 +32,14 @@ spec: auth_password: AuthPass123! privacy_protocol: aes privacy_password: PrivPass123! - security_level: authPriv + security_level: auth_priv - name: readonly-v3 description: SNMPv3 user with authentication only, no privacy. username: svc-readonly auth_protocol: md5 auth_password: ReadOnlyAuth1 privacy_protocol: none - security_level: authNoPriv + security_level: auth_no_priv --- apiVersion: infrahub.app/v1 @@ -49,19 +49,19 @@ spec: data: - name: nms-poller-01 client_description: Primary NMS polling server. - # SnmpCommunity is a Generic -- specify the concrete kind. `community` is + # SnmpCommunity is a Generic -- specify the concrete kind. `communities` is # cardinality many, so `data` is a list under the single kind mapping. - community: + communities: kind: SnmpCommunityV3 data: - name: monitoring-v3 username: svc-monitoring auth_protocol: sha privacy_protocol: aes - security_level: authPriv + security_level: auth_priv - name: legacy-monitor-01 client_description: Legacy monitoring host polling via SNMPv2c. - community: + communities: kind: SnmpCommunityV2 data: - name: public-ro @@ -69,7 +69,7 @@ spec: access: read_only - name: netops-workstation client_description: NetOps engineer workstation with read-write access. - community: + communities: kind: SnmpCommunityV2 data: - name: private-rw diff --git a/objects/extensions/tenancy/tenancy.yml b/objects/extensions/tenancy/tenancy.yml index 90bdda72..26db2f1f 100644 --- a/objects/extensions/tenancy/tenancy.yml +++ b/objects/extensions/tenancy/tenancy.yml @@ -9,7 +9,7 @@ apiVersion: infrahub.app/v1 kind: Object spec: - kind: TenancyTenant + kind: OrganizationTenant data: - name: Acme Corp description: Primary tenant for the NYC1 backbone. diff --git a/objects/extensions/users/users.yml b/objects/extensions/users/users.yml deleted file mode 100644 index 8acbef88..00000000 --- a/objects/extensions/users/users.yml +++ /dev/null @@ -1,70 +0,0 @@ -# --------------------------------------------------------------------------- -# Mock data for extensions/users. -# Depends on: base only (OrganizationProvider, a concrete OrganizationGeneric -# kind defined in base/organization.yml). -# -# UserGroup is created before UserAccount because UserAccount.user_group -# references it (cardinality one, concrete peer -> plain scalar HFID string). -# -# UserAccount.organization is cardinality one but its peer (OrganizationGeneric) -# is a Generic, so it must use a nested kind+data block where data is a single -# mapping (not a list) repeating all of the target's own mandatory fields -# (name). All three accounts point at the same organization, so this upserts -# the same OrganizationProvider record each time instead of duplicating it. -# -# ssh_key/password are obviously-fake placeholder values, not real secrets. -# --------------------------------------------------------------------------- ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: UserGroup - data: - - name: Administrators - description: Full administrative access to all managed devices. - idle_timeout: 900 - permissions: admin - - name: Operators - description: Day-to-day operational access for configuration changes. - idle_timeout: 1800 - permissions: operator - - name: Auditors - description: Read-only access for compliance and auditing. - idle_timeout: 3600 - permissions: read-only - ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: UserAccount - data: - - name: jdoe - full_name: Jane Doe - password: "CHANGEME-placeholder-1!" - mfa_enabled: true - user_group: Administrators - organization: - kind: OrganizationProvider - data: - name: Acme Networks - - - name: bsmith - full_name: Bob Smith - ssh_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFAKEPLACEHOLDERKEYDONOTUSE bsmith@example.com" - mfa_enabled: false - user_group: Operators - organization: - kind: OrganizationProvider - data: - name: Acme Networks - - - name: agarcia - full_name: Ana Garcia - password: "CHANGEME-placeholder-2!" - mfa_enabled: true - user_group: Auditors - organization: - kind: OrganizationProvider - data: - name: Acme Networks diff --git a/objects/extensions/vrf/vrf.yml b/objects/extensions/vrf/vrf.yml index 2c3e58e7..b97a4f74 100644 --- a/objects/extensions/vrf/vrf.yml +++ b/objects/extensions/vrf/vrf.yml @@ -27,21 +27,22 @@ spec: description: Customer A dedicated VRF. enforce_unique: true # import_rt/export_rt are cardinality many with a CONCRETE peer - # (IpamRouteTarget), so a flat list of human_friendly_id strings is - # enough -- no nested kind/data block needed. + # (IpamRouteTarget). Every entry is a human_friendly_id, and an HFID is + # always a list of its parts: a bare string is read as a node ID, so even + # a single-part HFID is wrapped in a list of its own. import_rt: - - "65000:100" + - ["65000:100"] export_rt: - - "65000:100" + - ["65000:100"] - name: CUSTOMER-B vrf_rd: "65000:200" description: Customer B VRF, also imports the shared services route target. enforce_unique: true import_rt: - - "65000:100" - - "65000:200" + - ["65000:100"] + - ["65000:200"] export_rt: - - "65000:200" + - ["65000:200"] - name: MGMT-VRF vrf_rd: "65000:999" description: Out-of-band management VRF, isolated with no route targets. diff --git a/objects/extensions/vrrp/vrrp.yml b/objects/extensions/vrrp/vrrp.yml index d79d3ab3..859f1fe4 100644 --- a/objects/extensions/vrrp/vrrp.yml +++ b/objects/extensions/vrrp/vrrp.yml @@ -1,7 +1,6 @@ # --------------------------------------------------------------------------- # Mock data for extensions/vrrp. -# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01, -# with interface GigabitEthernet0/0/0/0). +# Depends on: base, extensions/rack (DcimDevice: nyc1-rtr01, in NYC1-RACK-01). # # NetworkVRRPGroup.vrrp_interfaces is a Component relationship of cardinality # many with a CONCRETE peer (NetworkVRRPInterface), so we point it at the @@ -19,11 +18,19 @@ # - LocationRack: name, site (site's peer LocationSite is CONCRETE, so a # plain HFID string is enough there) # This upserts against the existing nyc1-rtr01 / NYC1-RACK-01 fixtures rather -# than duplicating them. GigabitEthernet0/0/0/0 already exists (from -# extensions/rack); GigabitEthernet0/0/0/1 and /2 are fresh interfaces added -# here, created inline the same way. All three VRRP groups live on the single -# available fixture device -- a real deployment would spread group members -# across two physical routers for actual first-hop redundancy. +# than duplicating them. GigabitEthernet0/0/0/1, /2 and /3 are fresh +# interfaces added here, created inline the same way. All three VRRP groups +# live on the single available fixture device -- a real deployment would +# spread group members across two physical routers for actual first-hop +# redundancy. +# +# The groups deliberately stay off GigabitEthernet0/0/0/0. That interface +# belongs to objects/extensions/rack, which re-declares it after this file has +# run, and a re-declaration clears the optional cardinality-one +# InterfaceLayer3.vrrp link this file created -- the load then fails with +# "['InterfacePhysicalUpsert'] Node has -1 peers for +# interfacelayer3__networkvrrpinterface, no fewer than 1 allowed". See the +# upsert rule at the top of objects/extensions/mlag/mlag.yml. # # NOTE: NetworkVRRPInterface has no human_friendly_id of its own (only # order_by + uniqueness_constraints on [vrrp_group, interface]), so @@ -53,7 +60,9 @@ spec: interface: kind: InterfacePhysical data: - name: GigabitEthernet0/0/0/0 + name: GigabitEthernet0/0/0/3 + status: active + role: core device: kind: DcimDevice data: diff --git a/tasks/docs.py b/tasks/docs.py index cd91d581..e5a00c8e 100644 --- a/tasks/docs.py +++ b/tasks/docs.py @@ -59,7 +59,7 @@ def _generate_schema_reference_content(schema_key: str, schema_metadata: dict) - if "dependencies" in schema_metadata: for dep in schema_metadata["dependencies"]: if dep == "base": - link = "dcim" # TODO: This is a hack, should be improved ... maybe merging all base references + link = "dcim" else: link = dep.split("/")[1] schema_data["dependencies"].append({"name": dep, "link": link}) @@ -122,7 +122,8 @@ def _generate_home_page_documentation() -> None: template_text = template_file.read_text(encoding="utf-8") # Render the template - environment = jinja2.Environment(trim_blocks=True) + # keep_trailing_newline keeps the template's final newline, which markdownlint (MD047) requires. + environment = jinja2.Environment(trim_blocks=True, keep_trailing_newline=True) template = environment.from_string(template_text) rendered_file = template.render(toc=toc_content) diff --git a/tasks/schemas.py b/tasks/schemas.py index 27f18cbc..80188fc1 100644 --- a/tasks/schemas.py +++ b/tasks/schemas.py @@ -13,13 +13,11 @@ def _load_extension(context: Context, path: Path) -> None: # Make sure it's a dir - # TODO: here if in extensions folder we have a dir without schema it will fail if os.path.isdir(path): print("#" * 80) print(f"🏗️ Loading `{path}`") # Load extensions - # TODO: Maybe improve what we return here... context.run(f"infrahubctl schema load {path}") print("#" * 80) @@ -75,6 +73,39 @@ def _resolve_load_order(graph, all_extensions): return load_order +# Drop the extensions we must not load: the experimental ones unless the flag is set, +# and one member of every `exclusive_with` pair (two extensions defining the same kind). +# A member is only skipped once its partner is selected, so the partner is always loaded +# first and anything depending on the skipped member is satisfied by the partner instead. +def _select_extensions(metadata, load_order): + selected = [] # Extensions we keep, in load order + for extension in load_order: + # If it's experimental extension and flag is false we skip + if extension.startswith("experimental/") and not TEST_EXPERIMENTAL: + continue + + # An experimental extension always yields to the extension it collides with, + # even when the load order puts the experimental one first + blocking = [ + other + for other in metadata.get(extension, {}).get("exclusive_with") or [] + if other in selected + or ( + extension.startswith("experimental/") + and not other.startswith("experimental/") + ) + ] + if blocking: + print( + f"⏭ Skipping `{extension}`: mutually exclusive with {', '.join(blocking)}" + ) + continue + + selected.append(extension) + + return selected + + @task def load_all_schemas(context: Context) -> None: # Parse metadata file @@ -87,21 +118,16 @@ def load_all_schemas(context: Context) -> None: load_order = _resolve_load_order(graph, all_extensions) # Load each extension respecting dependencies - for extension in load_order: - # If it's experimental extension and flag is false we skip - if extension.startswith("experimental/") and not TEST_EXPERIMENTAL: - continue - + for extension in _select_extensions(metadata, load_order): _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 = [ + schemas_to_load = { "base", "extensions/aggregate", "extensions/cable", @@ -115,6 +141,11 @@ def load_demo_ipam_dcim(context: Context) -> None: "extensions/qinq", "extensions/rack", "extensions/vrf", - ] - for path in schemas_to_load: + } + + # `.metadata.yml` is the normative dependency graph, so the demo order comes from it + metadata = _load_yaml_metadata() + load_order = _resolve_load_order(*_build_dependency_graph(metadata)) + + for path in (p for p in load_order if p in schemas_to_load): _load_extension(context, Path(path))