Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change all the references of default_filter to human_friendly_id #4682

Closed
wants to merge 8 commits into from
14 changes: 7 additions & 7 deletions docs/docs/guides/create-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -228,7 +228,7 @@ generics:
nodes:
- name: Device
namespace: Network
default_filter: hostname__value
human_friendly_id: ["hostname__value"]
attributes:
- name: hostname
kind: Text
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -350,7 +350,7 @@ generics:
nodes:
- name: Device
namespace: Network
default_filter: hostname__value
human_friendly_id: ["hostname__value"]
attributes:
- name: hostname
kind: Text
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/generator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/topics/groups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
- Performance Optimizations: Efficient handling and querying of large groups for better scalability.
5 changes: 2 additions & 3 deletions models/base/dcim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion models/base/ipam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions models/base/location.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions models/base/organization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions models/base/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion models/base/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion models/examples/extension_rack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions models/examples/ipfabric/ipfabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -439,7 +439,7 @@ nodes:
description: "IP Address"
label: "IP Address"
icon: "mdi:ip"
default_filter: address__value
human_friendly_id: ["address__value"]
order_by:
- "address__value"
display_labels:
Expand All @@ -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: ["prefix__value"]
menu_placement: "InfraIPAddress"
order_by:
- vrf__name__value
Expand Down
Loading
Loading