Files
infra-clab-pipeline/infrahub/generators/datacenter_query.gql
2025-11-14 18:31:31 +01:00

56 lines
1.3 KiB
GraphQL

# GraphQL query to fetch InfraDatacenter with all required attributes
# This query retrieves all necessary data for the datacenter generator
query DatacenterQuery($datacenter_id: String!) {
InfraDatacenter(ids: [$datacenter_id]) {
edges {
node {
id
__typename
# Basic attributes
name { value }
dc_id { value }
description { value }
# Topology configuration
number_of_bays { value }
spine_count { value }
border_leaf_count { value }
# Network configuration
parent_subnet { value }
bgp_base_asn { value }
spine_asn { value }
mlag_domain_id { value }
mtu { value }
# DCI configuration
dci_enabled { value }
dci_remote_dc_id { value }
has_border_leafs { value }
# Status
status { value }
# Relationships
site {
node {
id
__typename
name { value }
organization {
node {
id
__typename
name { value }
asn_base { value }
}
}
}
}
}
}
}
}