mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
feature #201 Added Cluster info to Host
This commit is contained in:
parent
5c69971412
commit
fb66cd4849
@ -46,6 +46,13 @@ ShowTableHost={
|
||||
:left => true,
|
||||
:proc => lambda {|d,e| d.name }
|
||||
},
|
||||
:cluster => {
|
||||
:name => "CLUSTER",
|
||||
:desc => "Clustername",
|
||||
:size => 25,
|
||||
:left => true,
|
||||
:proc => lambda {|d,e| d.cluster }
|
||||
},
|
||||
:rvm => {
|
||||
:name => "RVM",
|
||||
:desc => "Number of virtual machines running",
|
||||
@ -98,7 +105,7 @@ ShowTableHost={
|
||||
},
|
||||
|
||||
|
||||
:default => [:id, :name, :rvm, :tcpu, :fcpu, :acpu, :tmem, :fmem, :stat]
|
||||
:default => [:id, :name, :cluster, :rvm, :tcpu, :fcpu, :acpu, :tmem, :fmem, :stat]
|
||||
}
|
||||
|
||||
class HostShow
|
||||
@ -257,6 +264,7 @@ when "show"
|
||||
|
||||
puts str % ["ID", host[:id]]
|
||||
puts str % ["NAME", host[:name]]
|
||||
puts str % ["CLUSTER", host[:cluster]]
|
||||
puts str % ["STATE", host.state_str]
|
||||
puts str % ["IM_MAD", host[:im_mad]]
|
||||
puts str % ["VM_MAD", host[:vm_mad]]
|
||||
|
@ -86,12 +86,16 @@ module OpenNebula
|
||||
HOST_STATES[state]
|
||||
end
|
||||
|
||||
|
||||
# Returns the state of the Host (string value)
|
||||
def short_state_str
|
||||
SHORT_HOST_STATES[state_str]
|
||||
end
|
||||
|
||||
# Returns the cluster of the Host
|
||||
def cluster
|
||||
self['CLUSTER']
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
def set_enabled(enabled)
|
||||
|
Loading…
x
Reference in New Issue
Block a user