Skip to content

Instantly share code, notes, and snippets.

@dmamolina
Created January 24, 2012 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmamolina/1669318 to your computer and use it in GitHub Desktop.
Save dmamolina/1669318 to your computer and use it in GitHub Desktop.
Add a new column to onehost list command
diff --git a/src/cli/etc/onehost.yaml b/src/cli/etc/onehost.yaml
index 8a8c781..81c7bf7 100644
--- a/src/cli/etc/onehost.yaml
+++ b/src/cli/etc/onehost.yaml
@@ -40,6 +40,10 @@
:desc: Host status
:size: 6
+:TM_MAD:
+ :desc: TM_MAD driver
+ :size: 6
+
:default:
- :ID
- :NAME
@@ -51,3 +55,4 @@
- :FMEM
- :AMEM
- :STAT
+- :TM_MAD
diff --git a/src/cli/one_helper/onehost_helper.rb b/src/cli/one_helper/onehost_helper.rb
index 5951f13..31bb493 100644
--- a/src/cli/one_helper/onehost_helper.rb
+++ b/src/cli/one_helper/onehost_helper.rb
@@ -138,8 +138,12 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
OneHostHelper.state_to_str(d["STATE"])
end
+ column :TM_MAD, "TM_MAD driver", :size=>6 do |d|
+ d['TM_MAD']
+ end
+
default :ID, :NAME, :RVM, :TCPU, :FCPU, :ACPU, :TMEM, :FMEM,
- :AMEM, :STAT
+ :AMEM, :STAT, :TM_MAD
end
table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment