diff --git a/extensions/qinq/qinq.yaml b/extensions/qinq/qinq.yaml index 5ca4652e..53c10dec 100644 --- a/extensions/qinq/qinq.yaml +++ b/extensions/qinq/qinq.yaml @@ -3,34 +3,37 @@ version: "1.0" # TODO: Override L2 interface to add tunnel option for l2 mode -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 + inherit_from: + - GenericVLAN + relationships: + - name: svlan + label: Supplier vlan + peer: IpamSVLAN + optional: false + direction: inbound + identifier: vlan__qinq + cardinality: one + kind: Attribute diff --git a/extensions/vlan/vlan.yml b/extensions/vlan/vlan.yml index cef7c31e..b668202f 100644 --- a/extensions/vlan/vlan.yml +++ b/extensions/vlan/vlan.yml @@ -2,9 +2,9 @@ # yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json version: "1.0" -nodes: +generics: - name: VLAN - namespace: Ipam + namespace: Generic description: A VLAN is isolated layer two domain label: VLAN icon: mdi:lan-pending @@ -19,13 +19,17 @@ 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 + default_value: active + order_weight: 920 choices: - name: active label: Active @@ -60,7 +64,7 @@ nodes: description: Segments designed for end-user access and activities. color: "#a0b78d" relationships: - - name: location + - name: location # TODO: Eventually this might go away, l2domain could have the relationship to location peer: LocationHosting optional: true cardinality: many @@ -73,7 +77,15 @@ nodes: optional: false cardinality: one kind: Attribute - order_weight: 1200 + order_weight: 930 + +nodes: + - name: VLAN + namespace: Ipam + label: VLAN + include_in_menu: false + inherit_from: + - GenericVLAN - name: L2Domain namespace: Ipam @@ -89,7 +101,7 @@ nodes: order_weight: 1000 relationships: - name: vlans - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: many kind: Component @@ -99,7 +111,7 @@ extensions: - kind: IpamPrefix relationships: - name: vlan - peer: IpamVLAN + peer: GenericVLAN optional: true cardinality: one kind: Attribute @@ -108,14 +120,14 @@ extensions: 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 @@ -124,6 +136,6 @@ extensions: relationships: - name: vlans label: VLANs - peer: IpamVLAN + peer: GenericVLAN cardinality: many optional: true