Permalink
Browse files

summarize running and stopped domains

  • Loading branch information...
1 parent 42b07de commit e31f6d577ee67ff68df9127bbfe8764e4efc2c86 @ripienaar committed Jul 2, 2012
Showing with 11 additions and 4 deletions.
  1. +11 −4 agent/libvirt/agent/libvirt.ddl
View
15 agent/libvirt/agent/libvirt.ddl
@@ -10,10 +10,10 @@ action "hvinfo", :description => "Hypervisor Information" do
display :always
input :facts,
- :prompt => "Include Facts?",
- :description => "Also include Facter in the reply",
- :type => :boolean,
- :optional => true
+ :prompt => "Include Facts?",
+ :description => "Also include Facter in the reply",
+ :type => :boolean,
+ :optional => true
output :model,
:description => "Hypervisor Model",
@@ -122,6 +122,13 @@ action "hvinfo", :description => "Hypervisor Information" do
output :facts,
:description => "Facts about this machine",
:display_as => "Facts"
+
+ if respond_to?(:summarize)
+ summarize do
+ aggregate sum(:num_of_domains), :format => "Total Running Domains: %d"
+ aggregate sum(:num_of_defined_domains), :format => "Total Stopped Domains: %d"
+ end
+ end
end
action "domaininfo", :description => "Domain Information" do

0 comments on commit e31f6d5

Please sign in to comment.