Skip to content

Commit

Permalink
Resolves #37: Add command to generate docs (#38)
Browse files Browse the repository at this point in the history
* Resolves #37: Add command to generate docs

* Fix blank tables

* Add more invoke commands

* Sort Metadata File

* Add sort to lint command
  • Loading branch information
minitriga authored Jan 14, 2025
1 parent ca94eb4 commit d1141d4
Show file tree
Hide file tree
Showing 51 changed files with 3,861 additions and 413 deletions.
327 changes: 327 additions & 0 deletions .metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
---
base:
description: That's the foundation for every single schema extension you might want
to use afterward. This one is mandatory and will unlock access to the extensions
section.
name: Base Schemas
experimental/azure:
dependencies:
- base
description: This schema extension introduces cloud support for Microsoft Azure.
name: Azure
experimental/circuit_service:
dependencies:
- extensions.circuit
description: |
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
name: Circuit Service
experimental/infiniband:
dependencies:
- base
- extensions.compute
description: This schema extension adds support for InfiniBand switches.
name: Infiniband
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.
name: Location Extended
experimental/qos:
description: This schema extension contains models for Quality of Service (QoS)
name: Quality of Service (QoS)
experimental/security:
dependencies:
- base
description: This schema extension contains models for implementing detailed security.
name: Security
experimental/tenancy:
dependencies:
- base
- extensions.circuit
- experimental.location_extended
description: This schema extension introduces tenancy for some of the schema nodes
(circuits...)
name: Tenancy
experimental/topology:
dependencies:
- base
description: A schema for defining and managing network topology, strategies, and
services.
name: Topology
experimental/vlan-translation:
dependencies:
- base.dcim
description: This schema extension is based on Juniper VLAN MAP, and not yet test
out for other vendors.
name: VLAN Translation
extensions/cable:
dependencies:
- base
description: This schema extension contains a basic Cable model allowing you to
connect two endpoints.
name: Cable
extensions/circuit:
dependencies:
- base
- extentions.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
then have two endpoints, one on each site.
name: Circuit
extensions/cluster:
dependencies:
- base
- extensions.compute
description: 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 ...)
name: Cluster
extensions/compute:
dependencies:
- base
description: 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!
name: Compute
extensions/cross_connect:
dependencies:
- base
description: 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 ...)
name: Cross Connect
extensions/dwdm:
dependencies:
- base
- extensions.sfp
description: 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.
name: DWDM
extensions/firewall_policer:
description: This schema extension contains models for VMs. You might consider Cluster
or/and Hypervisor extension to go with!
name: Firewall Policer
extensions/hosting_cluster:
dependencies:
- base
- extensions.cluster
- extensions.compute
description: A rather generic cluster built with compute units (e.g. servers) and
able to host VMs.
name: Hosting Cluster
extensions/location_minimal:
dependencies:
- base
description: This schema extension is minimal but will provide you with basic items
to store location related data.
name: Location Minimal
extensions/modules:
dependencies:
- base
description: |
This schema extension allows you to capture Device Modules related information like the serial number or the satus. You can insert the Module into a Dcim Physcial Device.
> [!NOTE]
> This extension doesn't contain any Node, you can use the extension module_linecards or modules_routing_engine to use it
name: Modules
extensions/modules_linecards:
dependencies:
- base
- extensions.modules
description: This schema extension allows you to capture Linecard related information
like the version. You can insert the Linecard into a Dcim Physcial Device and
leverage the Linecard type model. The Linecard can accept PIC to help configure
PORT informations like breakout-capabilities and configurations.
name: Linecards
extensions/modules_routing_engine:
dependencies:
- base
- extensions.modules
description: This schema extension allows you to capture Routing Engine related
information like the version. You can insert the Routing Engine into a Dcim Physcial
Device and leverage the Routing Engine type model.
name: Routing Engine
extensions/patch_panel:
description: |
This schema extension allows you to capture patch pannel 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 informations 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!
name: Patch Panel
extensions/peering_ixp:
dependencies:
- base
- extensions.routing
- extensions.routing_bgp
- extensions.routing_bgp_community
description: This schema extension contains all you need to model anything revolving
around internet peering (Exchange points ...)!
name: Exchange Points (IXP)
extensions/physical_disk:
dependencies:
- base
description: |
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.
name: Physical Disks
extensions/qinq:
dependencies:
- base
- extensions.vlan
description: This schema extension brings extensions to VLAN model in order to support
QinQ.
name: QinQ
extensions/routing:
dependencies:
- base
- extensions.vlan
description: This schema extension contains generics to create Routing Protocol
"Instance". The idea is to create one Routing Protocol instance per IpamVRF +
DcimDevice pair.
name: Routing
extensions/routing_aggregate:
dependencies:
- base
- extensions.routing
description: This schema extension contains all you need to model the Aggregate
Routing Protocol.
name: Aggregate
extensions/routing_bgp:
dependencies:
- base
- extensions.routing
description: This schema extension contains all you need to model your BGP platform.
name: BGP
extensions/routing_bgp_community:
dependencies:
- base
- extensions.routing
description: This schema extension adds the BGP Communities models.
name: BGP Communities
extensions/routing_bgp_rr:
dependencies:
- base
- extensions.routing
- extensions.routing_bgp
description: This schema extension extemd the BGP extension to add BGP Route Reflector
Clustering.
name: BGP Route Reflector
extensions/routing_ospf:
dependencies:
- base
- extensions.routing
description: This schema extension contains all you need to model the OSPF Routing
Protocol.
name: OSPF
extensions/routing_pim:
dependencies:
- base
- extensions.routing
description: This schema extension contains all you need to model the PIM Protocol.
name: PIM
extensions/routing_policies:
dependencies:
- base
description: |
This schema extension contains a generic to create Routing Policies.
This Generic can be extend for each Routing Protocols you may want to use.
name: 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.
name: Routing Policies Aggregate
extensions/routing_policies_bgp:
dependencies:
- base
- extensions.routing
- extensions.routing_policies
- extensions.routing_bgp
description: This extension is using the Routing Policies extensions and the Routing
BGP one together.
name: Routing Policies BGP
extensions/routing_policies_ospf:
dependencies:
- base
- extensions.routing
- extensions.routing_policies
- extensions.routing_ospf
description: This extension is using the Routing Policies extensions and the Routing
OSPF one together.
name: Routing Policies OSPF
extensions/routing_policies_pim:
dependencies:
- base
- extensions.routing
- extensions.routing_policies
- extensions.routing_pim
description: This schema inherits the `RoutingPolicy` schema and removes `import_policies`
and `export_policies` attributes. However it adds a number of relatopnships to
`RoutingPIM`.
name: Routing Policies (PIM)
extensions/sfp:
dependencies:
- base
description: |
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 ...
name: SFP
extensions/snmp:
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.
name: SNMP
extensions/topology:
dependencies:
- base
description: This schema extension introduces abstract network pods and services
running in the pods, such as MPLS and EVPN.
name: Topology
extensions/users:
dependencies:
- base
description: This schema extension contains models for Accounts management.
name: Accounts Management
extensions/vlan:
dependencies:
- base
description: This schema extension contains models to support VLANs in you network.
name: VLAN
extensions/vrf:
dependencies:
- base
description: This schema extension contains models to support VRF in your network.
name: VRF
extensions/vrrp:
dependencies:
- base
- base.dcim
- base.ipam
description: This schema extension contains models for VRRP.
name: VRRP
5 changes: 1 addition & 4 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ rules:
# Changed this to stop a mess between linters from Prettier (vscode) to yamllint
# See https://github.com/prettier/prettier/pull/10926 or https://github.com/redhat-developer/vscode-yaml/issues/433
min-spaces-from-content: 1
line-length:
max: 120
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: false
line-length: disable
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ This project is divided into three main parts:

## Contributing

We welcome contributions and feedback! Feel free to open an issue or submit a pull request to suggest improvements or report bugs.
We welcome contributions and feedback! Feel free to open an issue or submit a pull request to suggest additions, improvements or to report bugs.

To add a new example, follow these steps:

- Create a directory in `experimental` with the name of the schema example
- Create a `<example_name>.yml` file using the [Infrahub schema format](https://docs.infrahub.app/reference/schema)
- Update `.metadata.yml` file to include the schema you have created with a `name`, `descriptions` and `dependencies`.
- `invoke build` will then generate a `README.md` file for the schema.
Loading

0 comments on commit d1141d4

Please sign in to comment.