-
Notifications
You must be signed in to change notification settings - Fork 40
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
Hide internal silos in utilization #4943
Changes from 4 commits
91f6c67
633d36e
8a37249
eaf76f9
f0dda10
f72e63f
1baaba7
29fb75b
c9c3a43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ use uuid::Uuid; | |
pub struct SiloUtilization { | ||
pub silo_id: Uuid, | ||
pub silo_name: Name, | ||
pub silo_discoverable: bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strictly speaking, while this is fine to add, you don't actually need this line, right? In the query you're using it in SQL directly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm, perhaps. I thought this struct is what generated the type to use for the |
||
|
||
pub cpus_allocated: i64, | ||
pub memory_allocated: ByteCount, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ALTER VIEW omicron.public.silo_utilization | ||
AS SELECT | ||
c.id AS silo_id, | ||
s.name AS silo_name, | ||
s.discoverable as silo_discoverable, | ||
c.cpus_provisioned AS cpus_provisioned, | ||
c.ram_provisioned AS memory_provisioned, | ||
c.virtual_disk_bytes_provisioned AS storage_provisioned, | ||
q.cpus AS cpus_allocated, | ||
q.memory_bytes AS memory_allocated, | ||
q.storage_bytes AS storage_allocated | ||
FROM | ||
omicron.public.virtual_provisioning_collection AS c | ||
RIGHT JOIN omicron.public.silo_quotas AS q | ||
ON c.id = q.silo_id | ||
INNER JOIN omicron.public.silo AS s | ||
ON c.id = s.id | ||
WHERE | ||
c.collection_type = 'Silo' | ||
AND | ||
s.time_deleted IS NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to be 32 so #4852 can be 31