Warehouse contains "Unsupported" host_address for plugin based hosts (#1656)

* Populating the warehouse with the host_address from a plugin basd host is unsupported.

* Adding test for plugin hosts in the datawarehouse.
This commit is contained in:
Todd authored and GitHub committed 2021-11-03 07:24:53 -07:00
1 parent ec36528e97
commit 1ff2968409
4 files changed
+64 -9

No files matched your search

@@ -6,6 +6,7 @@ begin;
├──────────────────┤
│public_id (pk) │
│scope_id (fk) │
│name │
└──────────────────┘
┼
┼
@@ -20,8 +21,6 @@ begin;
│name │
│description │
│version │
│plugin_name │
│id_prefix │
└──────────────────┘
*/
create table plugin_host (
@@ -6,8 +6,9 @@ begin;
-- resources. While this will return rows where there are host_sets where hosts
-- are not in the host sets, this view is only used when looking up a row by
-- host, set, and target so the records where hosts and host sets aren't
-- related beyond the shared catalog will be ignored.
-- TODO: Support a host having multiple addresses.
-- related beyond the shared catalog will be ignored. Retrieving the ip address
-- or dns name of plugin based hosts is not supported in this version of the
-- warehouse.
drop view whx_host_dimension_source;
create view whx_host_dimension_source as
select -- id is the first column in the target view
@@ -22,8 +23,7 @@ select -- id is the first column in the target view
when ph.public_id is not null then coalesce(ph.description, 'None')
else 'Unknown' end as host_description,
-- TODO: update this to be endpoint address...
coalesce(sh.address, 'Unknown') as host_address,
coalesce(sh.address, 'Unsupported') as host_address,
hs.public_id as host_set_id,
case when shs.public_id is not null then 'static host set'