{%- if "Tenant" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,Owner Key,Owner Tag,User Domain,Modified Timestamp
{%-     for tenant in data_to_template['imdata'] %}
{{ tenant.fvTenant.attributes.name }},{{ tenant.fvTenant.attributes.nameAlias }},{{ tenant.fvTenant.attributes.descr }},{{ tenant.fvTenant.attributes.status }},{{ tenant.fvTenant.attributes.dn }},{{ tenant.fvTenant.attributes.uid }},{{ tenant.fvTenant.attributes.annotation }},{{ tenant.fvTenant.attributes.childAction }},{{ tenant.fvTenant.attributes.extMngdBy }},{{ tenant.fvTenant.attributes.lcOwn }},{{ tenant.fvTenant.attributes.monPolDn }},{{ tenant.fvTenant.attributes.ownerKey }},{{ tenant.fvTenant.attributes.ownerTag }},{{ tenant.fvTenant.attributes.userdom }},{{ tenant.fvTenant.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "AEPg" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,User Domain,Configuration Issues,Configuration State,Exception Tag,Flood On Encapsulation,Forward Control,Has Multicast Source,Is Attribute Based EPG,Is Shared Service Multicast Site EPG,Match T,PC Enforcement Preference,PC Tag,PC Tag Allocation Source,Preference Gr Member,Priority,Scope,Shutdown,Trigger State,TX Id,Modified Timestamp
{%-     for epg in data_to_template['imdata'] %}
{{ epg.fvAEPg.attributes.name }},{{ epg.fvAEPg.attributes.nameAlias }},{{ epg.fvAEPg.attributes.descr }},{{ epg.fvAEPg.attributes.status }},{{ epg.fvAEPg.attributes.dn }},{{ epg.fvAEPg.attributes.uid }},{{ epg.fvAEPg.attributes.annotation }},{{ epg.fvAEPg.attributes.childAction }},{{ epg.fvAEPg.attributes.extMngdBy }},{{ epg.fvAEPg.attributes.lcOwn }},{{ epg.fvAEPg.attributes.monPolDn }},{{ epg.fvAEPg.attributes.userdom }},{{ epg.fvAEPg.attributes.configIssues }},{{ epg.fvAEPg.attributes.configSt }},{{ epg.fvAEPg.attributes.exceptionTag }},{{ epg.fvAEPg.attributes.floodOnEncap }},{{ epg.fvAEPg.attributes.fwdCtrl }},{{ epg.fvAEPg.attributes.hasMcastSource }},{{ epg.fvAEPg.attributes.isAttrBasedEPg }},{{ epg.fvAEPg.attributes.isSharedSrvMsiteEPg }},{{ epg.fvAEPg.attributes.matchT }},{{ epg.fvAEPg.attributes.pcEnfPref }},{{ epg.fvAEPg.attributes.pcTag }},{{ epg.fvAEPg.attributes.pcTagAllocSrc }},{{ epg.fvAEPg.attributes.prefGrMemb }},{{ epg.fvAEPg.attributes.prio }},{{ epg.fvAEPg.attributes.scope }},{{ epg.fvAEPg.attributes.shutdown }},{{ epg.fvAEPg.attributes.triggerSt }},{{ epg.fvAEPg.attributes.txId }},{{ epg.fvAEPg.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "BD" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,User Domain,Configuration Issues,Optimize Wan Bandwidth,ARP Flood,Broadcast P,Endpoint Clear,Endpoint Move Detect Mode,Host Based Routing,Intersite BUM Traffic Allow,Intersite L2 Stretch,IP Learning,IPv6 Multicast Allow,Limit IP Learn To Subnets,Link Local Address,MAC,Multicast Allow,MTU,Multicase Destination Packet Action,Owner Key,Owner Tag,PC Tag,Scope,Segment,Type,Unicast Route,Unknown MAC Unicast Action,Unknown Multicast Action,IPv6 Unknown Multicast Action,Virtual MAC,Modified Timestamp
{%-     for bd in data_to_template['imdata'] %}
{{ bd.fvBD.attributes.name }},{{ bd.fvBD.attributes.nameAlias }},{{ bd.fvBD.attributes.descr }},{{ bd.fvBD.attributes.status }},{{ bd.fvBD.attributes.dn }},{{ bd.fvBD.attributes.uid }},{{ bd.fvBD.attributes.annotation }},{{ bd.fvBD.attributes.childAction }},{{ bd.fvBD.attributes.extMngdBy }},{{ bd.fvBD.attributes.lcOwn }},{{ bd.fvBD.attributes.monPolDn }},{{ bd.fvBD.attributes.userdom }},{{ bd.fvBD.attributes.configIssues }},{{ bd.fvBD.attributes.OptimizeWanBandwidth }},{{ bd.fvBD.attributes.arpFlood }},{{ bd.fvBD.attributes.bcastP }},{{ bd.fvBD.attributes.epClear }},{{ bd.fvBD.attributes.epMoveDetectMode }},{{ bd.fvBD.attributes.hostBasedRouting }},{{ bd.fvBD.attributes.intersiteBumTrafficAllow }},{{ bd.fvBD.attributes.intersiteL2Stretch }},{{ bd.fvBD.attributes.ipLearning }},{{ bd.fvBD.attributes.ipv6McastAllow }},{{ bd.fvBD.attributes.limitIpLearnToSubnets }},{{ bd.fvBD.attributes.llAddr }},{{ bd.fvBD.attributes.mac }},{{ bd.fvBD.attributes.mcastAllow }},{{ bd.fvBD.attributes.mtu }},{{ bd.fvBD.attributes.multiDstPktAct }},{{ bd.fvBD.attributes.ownerKey }},{{ bd.fvBD.attributes.ownerTag }},{{ bd.fvBD.attributes.pcTag }},{{ bd.fvBD.attributes.scope }},{{ bd.fvBD.attributes.seg }},{{ bd.fvBD.attributes.type }},{{ bd.fvBD.attributes.unicastRoute }},{{ bd.fvBD.attributes.unkMacUcastAct }},{{ bd.fvBD.attributes.unkMcastAct }},{{ bd.fvBD.attributes.v6unkMcastAct }},{{ bd.fvBD.attributes.vmac }},{{ bd.fvBD.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "Ctx" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,User Domain,Bridge Domain Enforced Enable,IP Data Plane Learning,Known Multicast Action,Owner Key,Owner Tag,PC Enforce Directory,PC Enforce Directory Updated,PC Enforce Preference,PC Tag,Scope,Seg,VRF ID,VRF Index,Modified Timestamp
{%-     for context in data_to_template['imdata'] %}
{{ context.fvCtx.attributes.name }},{{ context.fvCtx.attributes.nameAlias }},{{ context.fvCtx.attributes.descr }},{{ context.fvCtx.attributes.status }},{{ context.fvCtx.attributes.dn }},{{ context.fvCtx.attributes.uid }},{{ context.fvCtx.attributes.annotation }},{{ context.fvCtx.attributes.childAction }},{{ context.fvCtx.attributes.extMngdBy }},{{ context.fvCtx.attributes.lcOwn }},{{ context.fvCtx.attributes.monPolDn }},{{ context.fvCtx.attributes.userdom }},{{ context.fvCtx.attributes.bdEnforcedEnable }},{{ context.fvCtx.attributes.ipDataPlaneLearning }},{{ context.fvCtx.attributes.knwMcastAct }},{{ context.fvCtx.attributes.ownerKey }},{{ context.fvCtx.attributes.ownerTag }},{{ context.fvCtx.attributes.pcEnfDir }},{{ context.fvCtx.attributes.pcEnfDirUpdated }},{{ context.fvCtx.attributes.pcEnfPref }},{{ context.fvCtx.attributes.pcTag }},{{ context.fvCtx.attributes.scope }},{{ context.fvCtx.attributes.seg }},{{ context.fvCtx.attributes.vrfId }},{{ context.fvCtx.attributes.vrfIndex }},{{ context.fvCtx.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "Ap" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,User Domain,Owner Key,Owner Tag,Priority,Modified Timestamp
{%-     for application_profile in data_to_template['imdata'] %}
{{ application_profile.fvAp.attributes.name }},{{ application_profile.fvAp.attributes.nameAlias }},{{ application_profile.fvAp.attributes.descr }},{{ application_profile.fvAp.attributes.status }},{{ application_profile.fvAp.attributes.dn }},{{ application_profile.fvAp.attributes.uid }},{{ application_profile.fvAp.attributes.annotation }},{{ application_profile.fvAp.attributes.childAction }},{{ application_profile.fvAp.attributes.extMngdBy }},{{ application_profile.fvAp.attributes.lcOwn }},{{ application_profile.fvAp.attributes.monPolDn }},{{ application_profile.fvAp.attributes.userdom }},{{ application_profile.fvAp.attributes.ownerKey }},{{ application_profile.fvAp.attributes.ownerTag }},{{ application_profile.fvAp.attributes.prio }},{{ application_profile.fvAp.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "l3extOut" in api %}Name,Alias,Description,Status,DN,UID,Annotation,Child Action,Externally Managed By,Local Owner,Monitoring Policy DN,User Domain,Owner Key,Owner Tag,Priority,Enforce Route Control,Target DSCP,Modified Timestamp
{%-     for l3out in data_to_template['imdata'] %}
{{ l3out.l3extOut.attributes.name }},{{ l3out.l3extOut.attributes.nameAlias }},{{ l3out.l3extOut.attributes.descr }},{{ l3out.l3extOut.attributes.status }},{{ l3out.l3extOut.attributes.dn }},{{ l3out.l3extOut.attributes.uid }},{{ l3out.l3extOut.attributes.annotation }},{{ l3out.l3extOut.attributes.childAction }},{{ l3out.l3extOut.attributes.extMngdBy }},{{ l3out.l3extOut.attributes.lcOwn }},{{ l3out.l3extOut.attributes.monPolDn }},{{ l3out.l3extOut.attributes.userdom }},{{ l3out.l3extOut.attributes.ownerKey }},{{ l3out.l3extOut.attributes.ownerTag }},{{ l3out.l3extOut.attributes.prio }},{{ l3out.l3extOut.attributes.enforceRtctrl }},{{ l3out.l3extOut.attributes.targetDscp }},{{ l3out.l3extOut.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "topSystem" in api %}Name,Address,Bootstrap State,Child Action,Cluster Time Diff,Configuration Issues,Control Plane MTU,Current Time,DN,Enforce Subnet Check,ETEP Address,Fabric Domain,Fabric ID,Fabric MAC,ID,Inband Mgmt Address,Inband Mgmt Address6,Inband Mgmt Address6 Mask,Inband Mgmt Address Mask,Inband Mgmt Gateway,Inband Mgmt Gateway6,Last Reboot Time,Last Reset Reason,LC Own,Modified Timestamp,Mode,Monitoring Policy DN,Name Alias,Node Type,Out of Band Mgmt Address,Out of Band Mgmt Address6,Out of Band Mgmt Address6 Mask,Out of Band Mgmt Address Mask,Out of Band Mgmt Gateway,Out of Band Mgmt Gateway6,Pod ID,Remote Network ID,Remote Node,RL Oper Pod ID,RL Routable Mode,RL Direct Mode,Role,Serial Number,Server Type,Site ID,State,Status,System Uptime,TEP Pool,Unicast XR EP Learn Disable,Version,Virtual Mode
{%-     for topSystem in data_to_template['imdata'] %}
{{ topSystem.topSystem.attributes.name }},{{ topSystem.topSystem.attributes.address }},{{ topSystem.topSystem.attributes.bootstrapState }},{{ topSystem.topSystem.attributes.childAction }},{{ topSystem.topSystem.attributes.clusterTimeDiff }},{{ topSystem.topSystem.attributes.configIssues }},{{ topSystem.topSystem.attributes.controlPlaneMTU }},{{ topSystem.topSystem.attributes.currentTime }},{{ topSystem.topSystem.attributes.dn }},{{ topSystem.topSystem.attributes.enforceSubnetCheck }},{{ topSystem.topSystem.attributes.etepAddr }},{{ topSystem.topSystem.attributes.fabricDomain }},{{ topSystem.topSystem.attributes.fabricId }},{{ topSystem.topSystem.attributes.fabricMAC }},{{ topSystem.topSystem.attributes.id }},{{ topSystem.topSystem.attributes.inbMgmtAddr }},{{ topSystem.topSystem.attributes.inbMgmtAddr }},{{ topSystem.topSystem.attributes.inbMgmtAddr6Mask }},{{ topSystem.topSystem.attributes.inbMgmtAddrMask }},{{ topSystem.topSystem.attributes.inbMgmtGateway }},{{ topSystem.topSystem.attributes.inbMgmtGateway6 }},{{ topSystem.topSystem.attributes.lastRebootTime }},{{ topSystem.topSystem.attributes.lastResetReason }},{{ topSystem.topSystem.attributes.lcOwn }},{{ topSystem.topSystem.attributes.modTs }},{{ topSystem.topSystem.attributes.mode }},{{ topSystem.topSystem.attributes.monPolDn }},{{ topSystem.topSystem.attributes.nameAlias }},{{ topSystem.topSystem.attributes.nodeType }},{{ topSystem.topSystem.attributes.oobMgmtAddr }},{{ topSystem.topSystem.attributes.oobMgmtAddr6 }},{{ topSystem.topSystem.attributes.oobMgmtAddr6Mask }},{{ topSystem.topSystem.attributes.oobMgmtAddrMask }},{{ topSystem.topSystem.attributes.oobMgmtGateway }},{{ topSystem.topSystem.attributes.oobMgmtGateway6 }},{{ topSystem.topSystem.attributes.podId }},{{ topSystem.topSystem.attributes.remoteNetworkId }},{{ topSystem.topSystem.attributes.remoteNode }},{{ topSystem.topSystem.attributes.rlOperPodId }},{{ topSystem.topSystem.attributes.rlRoutableMode }},{{ topSystem.topSystem.attributes.rldirectMode }},{{ topSystem.topSystem.attributes.role }},{{ topSystem.topSystem.attributes.serial }},{{ topSystem.topSystem.attributes.serverType }},{{ topSystem.topSystem.attributes.siteId }},{{ topSystem.topSystem.attributes.state }},{{ topSystem.topSystem.attributes.status }},{{ topSystem.topSystem.attributes.systemUpTime }},{{ topSystem.topSystem.attributes.tepPool }},{{ topSystem.topSystem.attributes.unicastXrEpLearnDisable }},{{ topSystem.topSystem.attributes.version }},{{ topSystem.topSystem.attributes.virtualMode }}
{%-     endfor %}
{%- else %}
{%- if "Subnet" in api %}Name,Alias,Annotation,Child Action,Config Issues,Control,Debug Message,Description,DN,Externally Managed By,IP,IP Data Plane Learning,LC Owner,Monitoring Policy DN,Preferred,Scope,Status,UID,User Domain,Virtual,Last Modified
{%-     for subnet in data_to_template['imdata'] %}
{{ subnet.fvSubnet.attributes.name }},{{ subnet.fvSubnet.attributes.nameAlias }},{{ subnet.fvSubnet.attributes.annotation }},{{ subnet.fvSubnet.attributes.childAction }},{{ subnet.fvSubnet.attributes.configIssues }},{{ subnet.fvSubnet.attributes.ctrl }},{{ subnet.fvSubnet.attributes.debugMessage }},{{ subnet.fvSubnet.attributes.descr }},{{ subnet.fvSubnet.attributes.dn }},{{ subnet.fvSubnet.attributes.extMngdBy }},{{ subnet.fvSubnet.attributes.ip }},{{ subnet.fvSubnet.attributes.ipDPLearning }},{{ subnet.fvSubnet.attributes.lcOwn }},{{ subnet.fvSubnet.attributes.monPolDn }},{{ subnet.fvSubnet.attributes.preferred }},{{ subnet.fvSubnet.attributes.scope | replace(","," ")}},{{ subnet.fvSubnet.attributes.status }},{{ subnet.fvSubnet.attributes.uid }},{{ subnet.fvSubnet.attributes.userdom }},{{ subnet.fvSubnet.attributes.virtual }},{{ subnet.fvSubnet.attributes.modTs }}
{%-     endfor %}
{%- else %}
{%- if "CEp" in api %}Name,Name Alias,MAC,Annotation,Base EPG DN,Bridge Domain DN,Child Action,Container Name,DN,Encapsulation,ESG Use gDN,Externally Managed By,Full Fabric Path DN,POD,Path,Parent Interface,Interface Number,ID,ID Endpoint DN,LCC,LC Owner,Multicast Address,Last Modified,Monitor Policy DN,Status,UID,User Domain,UUID,VMM Source,VRF DN
{%-     for endpoint in data_to_template['imdata'] %}
{{ endpoint.fvCEp.attributes.name }},{{ endpoint.fvCEp.attributes.nameAlias }},{{ endpoint.fvCEp.attributes.mac }},{{ endpoint.fvCEp.attributes.annotation }},{{ endpoint.fvCEp.attributes.baseEpgDn }},{{ endpoint.fvCEp.attributes.bdDn }},{{ endpoint.fvCEp.attributes.childAction }},{{ endpoint.fvCEp.attributes.contName }},{{ endpoint.fvCEp.attributes.dn }},{{ endpoint.fvCEp.attributes.encap }},{{ endpoint.fvCEp.attributes.esgUsegDn }},{{ endpoint.fvCEp.attributes.extMngdBy }},{{ endpoint.fvCEp.attributes.fabricPathDn }},{%- if endpoint.fvCEp.attributes.fabricPathDn %}{{ endpoint.fvCEp.attributes.fabricPathDn | replace("topology/","") | replace("/",",") | replace("pathep-[","") | replace("]","")}}{%- if "eth" not in endpoint.fvCEp.attributes.fabricPathDn %},N/A{%- endif %}{%- else %}N/A,N/A,N/A,N/A{%- endif %},{{ endpoint.fvCEp.attributes.id }},{{ endpoint.fvCEp.attributes.idepdn }},{{ endpoint.fvCEp.attributes.lcC | replace(","," ") }},{{ endpoint.fvCEp.attributes.lcOwn }},{{ endpoint.fvCEp.attributes.mcastAddr }},{{ endpoint.fvCEp.attributes.modTs }},{{ endpoint.fvCEp.attributes.monPolDn }},{{ endpoint.fvCEp.attributes.status }},{{ endpoint.fvCEp.attributes.uid }},{{ endpoint.fvCEp.attributes.userdom }},{{ endpoint.fvCEp.attributes.uuid }},{{ endpoint.fvCEp.attributes.vmmSrc }},{{ endpoint.fvCEp.attributes.vrfDn }}
{%-     endfor %}
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}