From a87b762a6909263b689153aa229b7560ba1a583d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csuresh=E2=80=9D?= Date: Tue, 22 Oct 2024 13:31:28 +0100 Subject: [PATCH 1/8] removed references to default_filter --- .gitignore | 1 + models/base/dcim.yml | 5 ++-- models/base/ipam.yml | 1 - models/base/location.yml | 6 ++--- models/base/organization.yml | 7 +++--- models/base/routing.yml | 4 +-- models/base/service.yml | 2 +- models/examples/extension_rack.yml | 2 +- models/examples/ipfabric/ipfabric.yml | 16 ++++++------ models/examples/nautobot/nautobot-v1.yml | 32 ++++++++++++------------ models/examples/nautobot/nautobot-v2.yml | 32 ++++++++++++------------ models/examples/netbox/netbox.yml | 26 +++++++++---------- 12 files changed, 66 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 3660391a67..71b5a39880 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ development/docker-compose.dev-override.yml .ruff_cache **/.ruff_cache **/.idea/** +venv # Direnv files (https://direnv.net/) .direnv/ diff --git a/models/base/dcim.yml b/models/base/dcim.yml index 58fd7e370f..f87d6127fd 100644 --- a/models/base/dcim.yml +++ b/models/base/dcim.yml @@ -168,7 +168,6 @@ nodes: description: "Generic Device object" label: "Device" icon: "mdi:server" - default_filter: name__value human_friendly_id: ["name__value"] inherit_from: - "CoreArtifactTarget" @@ -428,7 +427,7 @@ nodes: description: "A Platform represents the type of software running on a device" label: "Platform" icon: "mdi:application-cog-outline" - default_filter: name__value + menu_placement: "InfraDevice" human_friendly_id: ["name__value"] order_by: - name__value @@ -464,7 +463,7 @@ nodes: namespace: Infra description: "A Circuit represent a single physical link between two locations" label: "Circuit" - default_filter: circuit_id__value + icon: "mdi:cable-data" human_friendly_id: ["circuit_id__value"] order_by: - circuit_id__value diff --git a/models/base/ipam.yml b/models/base/ipam.yml index 78befdbb16..c5d2896a53 100644 --- a/models/base/ipam.yml +++ b/models/base/ipam.yml @@ -29,7 +29,6 @@ nodes: description: "A VLAN is a logical grouping of devices in the same broadcast domain" label: "VLAN" icon: "mdi:lan-pending" # mdi:lan - default_filter: name__value human_friendly_id: ["name__value", "vlan_id__value"] order_by: - name__value diff --git a/models/base/location.yml b/models/base/location.yml index 797995e648..064b6d9008 100644 --- a/models/base/location.yml +++ b/models/base/location.yml @@ -27,7 +27,7 @@ nodes: inherit_from: - "LocationGeneric" generate_profile: false - default_filter: "name__value" + human_friendly_id: ["name__value"] order_by: - "name__value" display_labels: @@ -41,7 +41,7 @@ nodes: inherit_from: - "LocationGeneric" generate_profile: false - default_filter: "name__value" + human_friendly_id: ["name__value"] order_by: - "name__value" display_labels: @@ -54,7 +54,7 @@ nodes: icon: "ri:building-line" inherit_from: - "LocationGeneric" - default_filter: "name__value" + human_friendly_id: ["name__value"] order_by: - "name__value" display_labels: diff --git a/models/base/organization.yml b/models/base/organization.yml index 2940071bfe..3c41c0a40a 100644 --- a/models/base/organization.yml +++ b/models/base/organization.yml @@ -6,7 +6,6 @@ generics: namespace: Organization label: Organization description: An organization represent a legal entity, a company. - default_filter: name__value icon: mdi:domain human_friendly_id: ["name__value"] include_in_menu: true @@ -37,7 +36,7 @@ nodes: - name: Manufacturer namespace: Organization description: Device Manufacturer - default_filter: name__value + human_friendly_id: ["name__value"] order_by: [name__value] display_labels: - name__value @@ -54,7 +53,7 @@ nodes: - name: Provider namespace: Organization description: Circuit or Location Provider - default_filter: name__value + human_friendly_id: ["name__value"] order_by: [name__value] display_labels: - name__value @@ -74,7 +73,7 @@ nodes: - name: Tenant namespace: Organization description: Customer - default_filter: name__value + human_friendly_id: ["name__value"] order_by: [name__value] display_labels: - name__value diff --git a/models/base/routing.yml b/models/base/routing.yml index 064b7bd70c..c84952dd3b 100644 --- a/models/base/routing.yml +++ b/models/base/routing.yml @@ -8,7 +8,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" - default_filter: name__value + menu_placement: InfraBGPSession human_friendly_id: ["name__value", "asn__value"] order_by: ["asn__value"] display_labels: @@ -35,7 +35,7 @@ nodes: 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" - default_filter: name__value + menu_placement: InfraBGPSession human_friendly_id: ["name__value"] order_by: - name__value diff --git a/models/base/service.yml b/models/base/service.yml index 698d981afc..d36d11ef06 100644 --- a/models/base/service.yml +++ b/models/base/service.yml @@ -5,7 +5,7 @@ generics: - name: Service namespace: Infra description: "Services" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: diff --git a/models/examples/extension_rack.yml b/models/examples/extension_rack.yml index 33548c3a97..69234aa495 100644 --- a/models/examples/extension_rack.yml +++ b/models/examples/extension_rack.yml @@ -6,7 +6,7 @@ nodes: namespace: Infra description: "A Rack represents a physical two- or four-post equipment rack in which devices can be installed" label: "Rack" - default_filter: name__value + human_friendly_id: ["name__value"] icon: clarity:rack-server-solid display_labels: - name__value diff --git a/models/examples/ipfabric/ipfabric.yml b/models/examples/ipfabric/ipfabric.yml index 682fda6fda..a149eaacb6 100644 --- a/models/examples/ipfabric/ipfabric.yml +++ b/models/examples/ipfabric/ipfabric.yml @@ -48,7 +48,7 @@ generics: description: "Generic Choice" include_in_menu: false label: "Choice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -80,7 +80,7 @@ nodes: namespace: Organization label: Organization description: An organization represent a legal entity, a company. - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:domain @@ -109,7 +109,7 @@ nodes: namespace: Location label: Location description: 'A location represent a physical element: a building, a site, a city' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [name__value] order_by: [name__value] icon: mdi:map-marker-radius-outline @@ -141,7 +141,7 @@ nodes: label: "Platform" icon: "mdi:application-cog-outline" # mdi:application-brackets-outline menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -176,7 +176,7 @@ nodes: label: "Device Type" icon: "mdi:poll" menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -386,7 +386,7 @@ nodes: description: "A VRF is isolated layer three domain" label: "VRF" icon: "mdi:router" - default_filter: name__value + human_friendly_id: ["name__value"] menu_placement: "InfraIPAddress" order_by: - name__value @@ -439,7 +439,7 @@ nodes: description: "IP Address" label: "IP Address" icon: "mdi:ip" - default_filter: address__value + human_friendly_id: ["name__value"] order_by: - "address__value" display_labels: @@ -464,7 +464,7 @@ nodes: description: "IPv4 or IPv6 network (with mask)" icon: "mdi:ip-network" label: "Prefix" - default_filter: prefix__value + human_friendly_id: ["name__value"] menu_placement: "InfraIPAddress" order_by: - vrf__name__value diff --git a/models/examples/nautobot/nautobot-v1.yml b/models/examples/nautobot/nautobot-v1.yml index 600cf3dc74..9c50ada6ad 100644 --- a/models/examples/nautobot/nautobot-v1.yml +++ b/models/examples/nautobot/nautobot-v1.yml @@ -138,7 +138,7 @@ nodes: label: "Autonomous System" icon: "mdi:bank-circle-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: ["asn__value"] display_labels: - name__value @@ -165,7 +165,7 @@ nodes: label: "BGP Peer Group" icon: "mdi:view-grid-plus-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -272,7 +272,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - default_filter: circuit_id__value + human_friendly_id: ["name__value"] order_by: - circuit_id__value display_labels: @@ -361,7 +361,7 @@ nodes: description: "Generic Device object" label: "Device" icon: "mdi:router-network" - default_filter: name__value + human_friendly_id: ["name__value"] inherit_from: - "CoreArtifactTarget" order_by: @@ -554,7 +554,7 @@ nodes: label: "IP Address" icon: "mdi:ip-outline" menu_placement: "InfraPrefix" - default_filter: address__value + human_friendly_id: ["name__value"] order_by: - "address__value" display_labels: @@ -615,7 +615,7 @@ nodes: label: "Platform" icon: "mdi:application-cog-outline" menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - manufacturer__name__value - name__value @@ -653,7 +653,7 @@ nodes: label: "Provider Network" icon: "mdi:cloud" menu_placement: "InfraCircuit" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -691,7 +691,7 @@ nodes: description: "IPv4 or IPv6 network (with mask)" icon: "mdi:ip-network" label: "Prefix" - default_filter: prefix__value + human_friendly_id: ["name__value"] order_by: - prefix__value display_labels: @@ -751,7 +751,7 @@ nodes: label: "Rack" icon: "mdi:server" menu_placement: "LocationGeneric" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value attributes: @@ -826,7 +826,7 @@ nodes: label: "Route Target" icon: "mdi:target" menu_placement: "InfraVRF" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -854,7 +854,7 @@ nodes: description: "A VLAN is isolated layer two domain" label: "VLAN" icon: "mdi:lan-pending" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - vlan_id__value display_labels: @@ -905,7 +905,7 @@ nodes: description: "A VRF is isolated layer three domain" label: "VRF" icon: "mdi:router" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -961,7 +961,7 @@ nodes: namespace: Organization label: Organization description: An organization represent a legal entity, a company. - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:domain @@ -995,7 +995,7 @@ nodes: namespace: Status label: Status description: 'Represent the status of an object: active, maintenance' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] icon: mdi:list-status include_in_menu: false @@ -1013,7 +1013,7 @@ nodes: namespace: Role label: Role description: Represent the role of an object - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:ballot @@ -1032,7 +1032,7 @@ nodes: namespace: Location label: Location description: 'A location represent a physical element: a building, a site, a city' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [name__value] order_by: [name__value] icon: mdi:map-marker-radius-outline diff --git a/models/examples/nautobot/nautobot-v2.yml b/models/examples/nautobot/nautobot-v2.yml index 45d37abba8..e932afd481 100644 --- a/models/examples/nautobot/nautobot-v2.yml +++ b/models/examples/nautobot/nautobot-v2.yml @@ -82,7 +82,7 @@ generics: description: "Generic Choice" include_in_menu: false label: "Choice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -141,7 +141,7 @@ nodes: label: "Autonomous System" icon: "mdi:bank-circle-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: ["asn__value"] display_labels: - name__value @@ -168,7 +168,7 @@ nodes: label: "BGP Peer Group" icon: "mdi:view-grid-plus-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -275,7 +275,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - default_filter: circuit_id__value + human_friendly_id: ["name__value"] order_by: - circuit_id__value display_labels: @@ -369,7 +369,7 @@ nodes: description: "Generic Device object" label: "Device" icon: "mdi:router-network" - default_filter: name__value + human_friendly_id: ["name__value"] inherit_from: - "CoreArtifactTarget" order_by: @@ -458,7 +458,7 @@ nodes: label: "Device Type" icon: "mdi:poll" menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -603,7 +603,7 @@ nodes: namespace: Nautobot label: "Nautobot Namespace" include_in_menu: false - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -622,7 +622,7 @@ nodes: label: "Platform" icon: "mdi:application-cog-outline" menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -659,7 +659,7 @@ nodes: label: "Provider Network" icon: "mdi:cloud" menu_placement: "InfraCircuit" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -744,7 +744,7 @@ nodes: label: "Rack" icon: "mdi:server" menu_placement: "LocationGeneric" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value attributes: @@ -814,7 +814,7 @@ nodes: label: "Route Target" icon: "mdi:target" menu_placement: "InfraVRF" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -842,7 +842,7 @@ nodes: description: "A VLAN is isolated layer two domain" label: "VLAN" icon: "mdi:lan-pending" - default_filter: name__value + human_friendly_id: ["name__value"] uniqueness_constraints: - ["name__value"] order_by: @@ -961,7 +961,7 @@ nodes: namespace: Organization label: Organization description: An organization represent a legal entity, a company. - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:domain @@ -995,7 +995,7 @@ nodes: namespace: Status label: Status description: 'Represent the status of an object: active, maintenance' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] icon: mdi:list-status include_in_menu: false @@ -1013,7 +1013,7 @@ nodes: namespace: Role label: Role description: Represent the role of an object - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:ballot @@ -1032,7 +1032,7 @@ nodes: namespace: Location label: Location description: 'A location represent a physical element: a building, a site, a city' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [name__value] order_by: [name__value] icon: mdi:map-marker-radius-outline diff --git a/models/examples/netbox/netbox.yml b/models/examples/netbox/netbox.yml index ae3f0c8008..2501d31ec3 100644 --- a/models/examples/netbox/netbox.yml +++ b/models/examples/netbox/netbox.yml @@ -79,7 +79,7 @@ generics: description: "Generic Choice" include_in_menu: false label: "Choice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -108,7 +108,7 @@ nodes: label: "Autonomous System" icon: "mdi:bank-circle-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: ["asn__value"] display_labels: - name__value @@ -135,7 +135,7 @@ nodes: label: "BGP Peer Group" icon: "mdi:view-grid-plus-outline" menu_placement: InfraBGPSession - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -242,7 +242,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - default_filter: circuit_id__value + human_friendly_id: ["name__value"] order_by: - circuit_id__value display_labels: @@ -423,7 +423,7 @@ nodes: label: "Device Type" icon: "mdi:poll" menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value order_by: @@ -584,7 +584,7 @@ nodes: label: "Platform" icon: "mdi:application-cog-outline" # mdi:application-brackets-outline menu_placement: "InfraDevice" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -619,7 +619,7 @@ nodes: label: "Provider Network" icon: "mdi:cloud" menu_placement: "InfraCircuit" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -753,7 +753,7 @@ nodes: label: "Route Target" icon: "mdi:target" menu_placement: "InfraVRF" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -831,7 +831,7 @@ nodes: description: "A VRF is isolated layer three domain" label: "VRF" icon: "mdi:router" - default_filter: name__value + human_friendly_id: ["name__value"] order_by: - name__value display_labels: @@ -887,7 +887,7 @@ nodes: namespace: Organization label: Organization description: An organization represent a legal entity, a company. - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:domain @@ -921,7 +921,7 @@ nodes: namespace: Status label: Status description: 'Represent the status of an object: active, maintenance' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] icon: mdi:list-status include_in_menu: true @@ -939,7 +939,7 @@ nodes: namespace: Role label: Role description: Represent the role of an object - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [label__value] order_by: [name__value] icon: mdi:ballot @@ -958,7 +958,7 @@ nodes: namespace: Location label: Location description: 'A location represent a physical element: a building, a site, a city' - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: [name__value] order_by: [name__value] icon: mdi:map-marker-radius-outline From 674e7fba5cfb6b1422e4b13c5abd9d7e1b314fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csuresh=E2=80=9D?= Date: Tue, 22 Oct 2024 14:40:19 +0100 Subject: [PATCH 2/8] removed references to default_filter --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 71b5a39880..3660391a67 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ development/docker-compose.dev-override.yml .ruff_cache **/.ruff_cache **/.idea/** -venv # Direnv files (https://direnv.net/) .direnv/ From b14f6fe0b4da837ef3bbdb8229c5558dca698cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csuresh=E2=80=9D?= Date: Tue, 22 Oct 2024 15:41:13 +0100 Subject: [PATCH 3/8] removed references to default_filter - more changes --- models/examples/ipfabric/ipfabric.yml | 4 ++-- models/examples/nautobot/nautobot-v1.yml | 6 +++--- models/examples/nautobot/nautobot-v2.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/models/examples/ipfabric/ipfabric.yml b/models/examples/ipfabric/ipfabric.yml index a149eaacb6..d8cd2873bb 100644 --- a/models/examples/ipfabric/ipfabric.yml +++ b/models/examples/ipfabric/ipfabric.yml @@ -439,7 +439,7 @@ nodes: description: "IP Address" label: "IP Address" icon: "mdi:ip" - human_friendly_id: ["name__value"] + human_friendly_id: ["address__value"] order_by: - "address__value" display_labels: @@ -464,7 +464,7 @@ nodes: description: "IPv4 or IPv6 network (with mask)" icon: "mdi:ip-network" label: "Prefix" - human_friendly_id: ["name__value"] + human_friendly_id: ["prefix__value"] menu_placement: "InfraIPAddress" order_by: - vrf__name__value diff --git a/models/examples/nautobot/nautobot-v1.yml b/models/examples/nautobot/nautobot-v1.yml index 9c50ada6ad..050de086bb 100644 --- a/models/examples/nautobot/nautobot-v1.yml +++ b/models/examples/nautobot/nautobot-v1.yml @@ -272,7 +272,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - human_friendly_id: ["name__value"] + human_friendly_id: ["circuit_id__value"] order_by: - circuit_id__value display_labels: @@ -554,7 +554,7 @@ nodes: label: "IP Address" icon: "mdi:ip-outline" menu_placement: "InfraPrefix" - human_friendly_id: ["name__value"] + human_friendly_id: ["address__value"] order_by: - "address__value" display_labels: @@ -691,7 +691,7 @@ nodes: description: "IPv4 or IPv6 network (with mask)" icon: "mdi:ip-network" label: "Prefix" - human_friendly_id: ["name__value"] + human_friendly_id: ["prefix__value"] order_by: - prefix__value display_labels: diff --git a/models/examples/nautobot/nautobot-v2.yml b/models/examples/nautobot/nautobot-v2.yml index e932afd481..4dbecd6d3a 100644 --- a/models/examples/nautobot/nautobot-v2.yml +++ b/models/examples/nautobot/nautobot-v2.yml @@ -275,7 +275,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - human_friendly_id: ["name__value"] + human_friendly_id: ["circuit_id__value"] order_by: - circuit_id__value display_labels: From a1df7d138bcda55cdf090d664971da00e6d14a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csuresh=E2=80=9D?= Date: Tue, 22 Oct 2024 17:10:44 +0100 Subject: [PATCH 4/8] removed references to default_filter - more changes --- models/examples/netbox/netbox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/examples/netbox/netbox.yml b/models/examples/netbox/netbox.yml index 2501d31ec3..946eb61f90 100644 --- a/models/examples/netbox/netbox.yml +++ b/models/examples/netbox/netbox.yml @@ -242,7 +242,7 @@ nodes: description: "A Circuit represent a single physical link between two locations" label: "Circuit" icon: "mdi:transit-connection-variant" - human_friendly_id: ["name__value"] + human_friendly_id: ["circuit_id__value"] order_by: - circuit_id__value display_labels: From c0c3a18597183bb22d271467abae1692ce8aebcb Mon Sep 17 00:00:00 2001 From: wvandeun Date: Wed, 23 Oct 2024 11:14:32 +0200 Subject: [PATCH 5/8] create circuit endpoints use site hfid instead of default_filter --- models/infrastructure_edge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/infrastructure_edge.py b/models/infrastructure_edge.py index 66a397e3c3..06f1f533e6 100644 --- a/models/infrastructure_edge.py +++ b/models/infrastructure_edge.py @@ -884,7 +884,7 @@ async def create_backbone_connectivity( branch=branch, kind=InfraCircuitEndpoint, description=f"Endpoint {backbone_link.circuit} to {backbone_link.site1_device}", - site=backbone_link.site1, + site={"hfid": [backbone_link.site1]}, circuit=obj, connected_endpoint=intf1, ) @@ -894,7 +894,7 @@ async def create_backbone_connectivity( branch=branch, kind=InfraCircuitEndpoint, description=f"Endpoint {backbone_link.circuit} to {backbone_link.site2_device}", - site=backbone_link.site2, + site={"hfid": [backbone_link.site2]}, circuit=obj, connected_endpoint=intf2, ) From 07c969c7d590cd652fcc9ca77f111637a9cc27f1 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Mon, 28 Oct 2024 08:51:19 +0100 Subject: [PATCH 6/8] remove `default_filter` from create schema guide in docs --- docs/docs/guides/create-schema.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs/guides/create-schema.mdx b/docs/docs/guides/create-schema.mdx index 73137d4d56..d76bb4a181 100644 --- a/docs/docs/guides/create-schema.mdx +++ b/docs/docs/guides/create-schema.mdx @@ -59,7 +59,7 @@ version: "1.0" nodes: - name: Device namespace: Network - default_filter: hostname__value + human_friendly_id: ["hostname__value"] attributes: - name: hostname kind: Text @@ -128,7 +128,7 @@ version: "1.0" nodes: - name: Device namespace: Network - default_filter: hostname__value + human_friendly_id: ["hostname__value"] attributes: - name: hostname kind: Text @@ -180,7 +180,7 @@ mutation { id } } - NetworkInterfaceCreate(data: {name: {value: "Ethernet1"}, description: {value: "WAN interface"}, device: {id: "atl1-edge1"} }) { + NetworkInterfaceCreate(data: {name: {value: "Ethernet1"}, description: {value: "WAN interface"}, device: {hfid: ["atl1-edge1"]}}) { ok object { id @@ -228,7 +228,7 @@ generics: nodes: - name: Device namespace: Network - default_filter: hostname__value + human_friendly_id: ["hostname__value"] attributes: - name: hostname kind: Text @@ -277,13 +277,13 @@ mutation { id } } - NetworkPhysicalInterfaceCreate(data: {name: {value: "Ethernet1"}, description: {value: "WAN interface"}, speed: {value: 1000000000}, device: {id: "atl1-edge1"}}) { + NetworkPhysicalInterfaceCreate(data: {name: {value: "Ethernet1"}, description: {value: "WAN interface"}, speed: {value: 1000000000}, device: {hfid: ["atl1-edge1"]}}) { ok object { id } } - NetworkLogicalInterfaceCreate(data: {name: {value: "Vlan1"}, description: {value: "SVI for Vlan 1"}, device: {id: "atl1-edge1"}}) { + NetworkLogicalInterfaceCreate(data: {name: {value: "Vlan1"}, description: {value: "SVI for Vlan 1"}, device: {hfid: ["atl1-edge1"]}}) { ok object { id @@ -350,7 +350,7 @@ generics: nodes: - name: Device namespace: Network - default_filter: hostname__value + human_friendly_id: ["hostname__value"] attributes: - name: hostname kind: Text From 4ab645e81308fcd774019a8ba44ac5e3a062568c Mon Sep 17 00:00:00 2001 From: wvandeun Date: Mon, 28 Oct 2024 09:28:57 +0100 Subject: [PATCH 7/8] remove `default_filter` from generator guide in docs --- docs/docs/guides/generator.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/guides/generator.mdx b/docs/docs/guides/generator.mdx index 6e8b6ddae0..4c10b5ca75 100644 --- a/docs/docs/guides/generator.mdx +++ b/docs/docs/guides/generator.mdx @@ -35,7 +35,7 @@ nodes: - name: Widget namespace: Test label: "Widget" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value attributes: @@ -47,7 +47,7 @@ nodes: - name: Resource namespace: Test label: "Resource" - default_filter: name__value + human_friendly_id: ["name__value"] display_labels: - name__value attributes: From 7d1111d73b8ff9f38a4fc763539fdf1605839223 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Mon, 28 Oct 2024 15:13:52 +0100 Subject: [PATCH 8/8] remove `default_filter` usage from groups topic in docs --- docs/docs/topics/groups.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/topics/groups.mdx b/docs/docs/topics/groups.mdx index 5e3aea8883..531d1ac4b8 100644 --- a/docs/docs/topics/groups.mdx +++ b/docs/docs/topics/groups.mdx @@ -36,7 +36,7 @@ Infrahub automatically adds relationships to all objects for seamless integratio ```graphql query { - device(id: "device-123") { + InfraDevice(hfid: ["device-123"]) { member_of_groups { name description @@ -75,4 +75,4 @@ The group functionality in Infrahub is designed to be extensible and is expected - Dynamic Membership Rules: Ability to define dynamic rules for group membership based on object attributes or conditions. - Integration with Access Control: Deeper integration with permission systems to control access and operations based on group memberships. -- Performance Optimizations: Efficient handling and querying of large groups for better scalability. \ No newline at end of file +- Performance Optimizations: Efficient handling and querying of large groups for better scalability.