opennebula-cli 6.4.2 → 6.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +1 -1
  3. data/bin/oneacl +1 -1
  4. data/bin/onecluster +1 -1
  5. data/bin/onedatastore +1 -1
  6. data/bin/oneflow +1 -1
  7. data/bin/oneflow-template +1 -1
  8. data/bin/onegroup +1 -1
  9. data/bin/onehook +1 -1
  10. data/bin/onehost +1 -1
  11. data/bin/oneimage +1 -1
  12. data/bin/oneirb +1 -2
  13. data/bin/onelog +1 -1
  14. data/bin/onemarket +1 -1
  15. data/bin/onemarketapp +1 -1
  16. data/bin/onesecgroup +1 -1
  17. data/bin/oneshowback +1 -1
  18. data/bin/onetemplate +1 -1
  19. data/bin/oneuser +2 -2
  20. data/bin/onevcenter +1 -1
  21. data/bin/onevdc +1 -1
  22. data/bin/onevm +1 -1
  23. data/bin/onevmgroup +1 -1
  24. data/bin/onevnet +1 -1
  25. data/bin/onevntemplate +1 -1
  26. data/bin/onevrouter +1 -1
  27. data/bin/onezone +1 -1
  28. data/lib/cli_helper.rb +1 -1
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +1 -1
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onecluster_helper.rb +1 -1
  33. data/lib/one_helper/onedatastore_helper.rb +1 -1
  34. data/lib/one_helper/oneflow_helper.rb +1 -1
  35. data/lib/one_helper/oneflowtemplate_helper.rb +1 -1
  36. data/lib/one_helper/onegroup_helper.rb +1 -1
  37. data/lib/one_helper/onehook_helper.rb +1 -1
  38. data/lib/one_helper/onehost_helper.rb +41 -6
  39. data/lib/one_helper/oneimage_helper.rb +1 -1
  40. data/lib/one_helper/onemarket_helper.rb +1 -1
  41. data/lib/one_helper/onemarketapp_helper.rb +1 -1
  42. data/lib/one_helper/onequota_helper.rb +1 -1
  43. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  44. data/lib/one_helper/onetemplate_helper.rb +1 -1
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +1 -1
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +1 -1
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +1 -1
  51. data/lib/one_helper/onevntemplate_helper.rb +1 -1
  52. data/lib/one_helper/onevrouter_helper.rb +1 -1
  53. data/lib/one_helper/onezone_helper.rb +1 -1
  54. data/lib/one_helper.rb +2 -2
  55. data/share/schemas/xsd/host.xsd +23 -3
  56. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e72258e445621b7bb43729bce0ef5f95f4a0debd990f3983bd8845fa19eebc0
4
- data.tar.gz: 4776aa4b2f7e59f114dee073504b2029f37cbf99ca544be0924af26a3f969a5c
3
+ metadata.gz: 52e0a5a3b38c09a00791302328c27a3f181e20e0a1f4b0508130eb2a12359ae1
4
+ data.tar.gz: 283952947e0a79cdae77f1b31194a00cd84d8e503dc70da22c702d64a1d95495
5
5
  SHA512:
6
- metadata.gz: 8293cbaf48c76f3601a0dd2d06b63aa3ff52bbbbb4c2fd510578224a4555cee0b0c9b6fae7486de1bc922d9cbc2a9844a4bac06e8b394ebea1b145dc6bae2718
7
- data.tar.gz: e42b6fc85a88aa97ca9be7d1f464b048993ca443c9119121cae800018ef1f27a90899e2d0cbcd18e72ac142b7bd8aac2568bcf1997933e42388f7896f96bd289
6
+ metadata.gz: 36ad8f15106d0da7d365684f85e9ccc88a36298dbd27901ba347aac6eb810abbd24c661bc96e30d40ab5427bef0fd8782e9b52b4a835c15fce8e85941496a806
7
+ data.tar.gz: 1d7570eb132a9d0547c6b4fda85db2975fe87969af9b8a84a11410b740f86c1db741d2c5bdb884e14ccc6d784f22480f266186391d5e804ca8b23feab8d427b0
data/bin/oneacct CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneacl CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onecluster CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onedatastore CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneflow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onegroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onehook CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onehost CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneimage CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneirb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -63,7 +63,6 @@ require 'json'
63
63
  require 'nokogiri'
64
64
  require 'openssl'
65
65
  require 'ox'
66
- require 'pp'
67
66
  require 'set'
68
67
  require 'socket'
69
68
  require 'sqlite3'
data/bin/onelog CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onemarket CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onemarketapp CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onesecgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneshowback CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onetemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneuser CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -708,7 +708,7 @@ CommandParser::CmdParser.new(ARGV) do
708
708
 
709
709
  tokens = helper.find_token(user, token_hint, group, false)
710
710
 
711
- if tokens.length.zero?
711
+ if tokens.empty?
712
712
  exit_with_code 1, 'No valid tokens found.'
713
713
  end
714
714
 
data/bin/onevcenter CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevdc CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevm CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevmgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevnet CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevntemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevrouter CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onezone CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/lib/cli_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -692,7 +692,14 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
692
692
  end
693
693
 
694
694
  if numa_nodes && !numa_nodes.empty?
695
- print_numa_nodes(numa_nodes)
695
+ begin
696
+ monitoring_numa =
697
+ host.to_hash['HOST']['MONITORING']['NUMA_NODE']
698
+ rescue StandardError
699
+ monitoring_numa = nil
700
+ end
701
+
702
+ print_numa_nodes(numa_nodes, monitoring_numa)
696
703
  end
697
704
 
698
705
  puts
@@ -777,14 +784,34 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
777
784
  table.show(pcis)
778
785
  end
779
786
 
780
- def print_numa_nodes(numa_nodes)
787
+ def print_numa_nodes(numa_nodes, monitoring)
781
788
  numa_nodes = get_numa_data(numa_nodes)
782
789
 
790
+ merge_numa_monitoring(numa_nodes, monitoring)
791
+
783
792
  print_numa_cores(numa_nodes)
784
793
  print_numa_memory(numa_nodes)
785
794
  print_numa_hugepages(numa_nodes)
786
795
  end
787
796
 
797
+ def merge_numa_monitoring(numa_nodes, monitoring)
798
+ return if monitoring.nil?
799
+
800
+ monitoring = [monitoring] if monitoring.class == Hash
801
+
802
+ numa_nodes.each do |node|
803
+ mon_node = monitoring.find {|x| x['NODE_ID'] == node['NODE_ID'] }
804
+
805
+ node['MEMORY']['FREE'] = mon_node['MEMORY']['FREE']
806
+ node['MEMORY']['USED'] = mon_node['MEMORY']['USED']
807
+
808
+ node['HUGEPAGE'].each do |hp|
809
+ mon_hp = mon_node['HUGEPAGE'].find {|x| x['SIZE'] == hp['SIZE'] }
810
+ hp['FREE'] = mon_hp['FREE']
811
+ end
812
+ end
813
+ end
814
+
788
815
  def get_numa_data(numa_nodes)
789
816
  numa_nodes = [numa_nodes] if numa_nodes.class == Hash
790
817
 
@@ -894,7 +921,11 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
894
921
  end
895
922
 
896
923
  column :USED_REAL, 'Used memory', :size => 20, :left => true do |d|
897
- OpenNebulaHelper.unit_to_str(d['MEMORY']['USED'].to_i, {})
924
+ if d['MEMORY']['USED'].nil?
925
+ '-'
926
+ else
927
+ OpenNebulaHelper.unit_to_str(d['MEMORY']['USED'].to_i, {})
928
+ end
898
929
  end
899
930
 
900
931
  column :USED_ALLOCATED, 'U memory',
@@ -903,7 +934,11 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
903
934
  end
904
935
 
905
936
  column :FREE, 'Free memory', :size => 8, :left => true do |d|
906
- OpenNebulaHelper.unit_to_str(d['MEMORY']['FREE'].to_i, {})
937
+ if d['MEMORY']['FREE'].nil?
938
+ '-'
939
+ else
940
+ OpenNebulaHelper.unit_to_str(d['MEMORY']['FREE'].to_i, {})
941
+ end
907
942
  end
908
943
 
909
944
  default :NODE_ID, :TOTAL, :USED_REAL, :USED_ALLOCATED, :FREE
@@ -941,7 +976,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
941
976
  end
942
977
 
943
978
  column :FREE, 'Free pages', :size => 8, :left => true do |d|
944
- d['HUGEPAGE']['FREE']
979
+ d['HUGEPAGE']['FREE'] || '-'
945
980
  end
946
981
 
947
982
  column :USED, 'allocated pages', :size => 8, :left => true do |d|
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/one_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -30,7 +30,7 @@ include OpenNebula
30
30
  module OpenNebulaHelper
31
31
  ONE_VERSION=<<-EOT
32
32
  OpenNebula #{OpenNebula::VERSION}
33
- Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
33
+ Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
34
34
  EOT
35
35
 
36
36
  if ONE_LOCATION
@@ -98,7 +98,6 @@
98
98
  <xs:element name="HUGEPAGE" minOccurs="0" maxOccurs="unbounded">
99
99
  <xs:complexType>
100
100
  <xs:all>
101
- <xs:element name="FREE" type="xs:integer"/>
102
101
  <xs:element name="PAGES" type="xs:integer"/>
103
102
  <xs:element name="SIZE" type="xs:integer"/>
104
103
  <xs:element name="USAGE" type="xs:integer"/>
@@ -109,10 +108,8 @@
109
108
  <xs:complexType>
110
109
  <xs:all>
111
110
  <xs:element name="DISTANCE" type="xs:string"/>
112
- <xs:element name="FREE" type="xs:integer"/>
113
111
  <xs:element name="TOTAL" type="xs:integer"/>
114
112
  <xs:element name="USAGE" type="xs:integer"/>
115
- <xs:element name="USED" type="xs:integer"/>
116
113
  </xs:all>
117
114
  </xs:complexType>
118
115
  </xs:element>
@@ -177,6 +174,29 @@
177
174
  </xs:sequence>
178
175
  </xs:complexType>
179
176
  </xs:element>
177
+ <xs:element name="NUMA_NODE" minOccurs="0" maxOccurs="unbounded">
178
+ <xs:complexType>
179
+ <xs:sequence>
180
+ <xs:element name="HUGEPAGE" minOccurs="0" maxOccurs="unbounded">
181
+ <xs:complexType>
182
+ <xs:all>
183
+ <xs:element name="FREE" type="xs:integer"/>
184
+ <xs:element name="SIZE" type="xs:integer"/>
185
+ </xs:all>
186
+ </xs:complexType>
187
+ </xs:element>
188
+ <xs:element name="MEMORY">
189
+ <xs:complexType>
190
+ <xs:all>
191
+ <xs:element name="FREE" type="xs:string"/>
192
+ <xs:element name="USED" type="xs:integer"/>
193
+ </xs:all>
194
+ </xs:complexType>
195
+ </xs:element>
196
+ <xs:element name="NODE_ID" type="xs:integer"/>
197
+ </xs:sequence>
198
+ </xs:complexType>
199
+ </xs:element>
180
200
  </xs:sequence>
181
201
  </xs:complexType>
182
202
  </xs:element>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.2
4
+ version: 6.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.4.2
19
+ version: 6.4.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.4.2
26
+ version: 6.4.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement