List all components on a device
This query retrieves all components on a named device, and lists each component. The query lists the components by entity ID and displays the name of the component. All components are displayed, regardless of their type.
You can run this query in the following ways, which specify the main node device differently:
- Using the device name (entityName) and the name of the domain in which the device is located (domainName). The device name might be an IP address or a textual name and should be unique within a given domain. This query is shown below.
- You can also write this query using the entityId for the device within the entityData table. This field contains an integer value unique across all domains.
Example
1] SELECT eComponent.entityId Component_Entity_ID,
2] eComponent.entityName Component_Name,
3] eMainNode.entityName Main_Node_Name
4] FROM domainMgr d
5] INNER JOIN entity eComponent ON eComponent.domainMgrId = d.domainMgrId
6] INNER JOIN entityData eMainNode ON eMainNode.entityId =
7] eComponent.mainNodeEntityId
8] WHERE eMainNode.entityName = 'VE004.example.net'
9] AND d.domainName = 'NCOMS';
The table below describes this query.
| Line numbers | Description |
|---|---|
| 1-3 |
Specify the data to show in the results, as follows:
|
| 4 |
Use the |
| 5 |
Retrieve data for all the entities in this domain by joining the entity view to the query. This join retrieves all entities in the domain, including those wholly contained within a single main node (required) as well as those entities related to multiple main nodes , such as VPNs and global VLANs (not required). In this join, the |
| 6-7 | Identify the containing main node device for each of the
entities by joining the entityData table to itself using the
mainNodeEntityId field. This automatically excludes those
entities that are related to multiple main node devices, such as VPNs and global
VLANs. These entities have a NULL value in the mainNodeEntityId
field. |
| 8-9 | Limit the entities retrieved to those contained within the main node VE004.example.net and the domain to the NCOMS domain. |
The table below describes the results of this query.
| Component entity ID | Component name | Main node name |
|---|---|---|
| 83 | VE004.example.net |
VE004.example.net |
| 84 | VLAN_trunk_1_VE004.example.net[0[26]] |
VE004.example.net |
| 2151 | VE004.example.net[0[21]] |
VE004.example.net |
| 2224 | VE004.example.net[0[14]] |
VE004.example.net |
| 2226 | VE004.example.net[0[10]] |
VE004.example.net |
| 2227 | VE004.example.net[0[15]] |
VE004.example.net |
| 2228 | VE004.example.net[0[12]] |
VE004.example.net |
| 2231 |
|
VE004.example.net |
| 2232 | VE004.example.net[0[13]] |
VE004.example.net |
| 2233 | VLAN_OBJECT_VE004.example.net_VLAN_1 |
VE004.example.net |
| 3187 | VE004.example.net_CARD_0 |
VE004.example.net |