opennebula-cli 5.12.13 → 5.13.80.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +5 -5
  2. data/bin/oneacct +5 -14
  3. data/bin/oneacl +4 -15
  4. data/bin/onecluster +6 -17
  5. data/bin/onedatastore +6 -17
  6. data/bin/oneflow +81 -23
  7. data/bin/oneflow-template +51 -27
  8. data/bin/onegroup +6 -17
  9. data/bin/onehook +6 -17
  10. data/bin/onehost +4 -15
  11. data/bin/oneimage +95 -18
  12. data/bin/onemarket +6 -17
  13. data/bin/onemarketapp +113 -20
  14. data/bin/onesecgroup +9 -17
  15. data/bin/oneshowback +14 -20
  16. data/bin/onetemplate +8 -18
  17. data/bin/oneuser +26 -17
  18. data/bin/onevcenter +6 -28
  19. data/bin/onevdc +6 -17
  20. data/bin/onevm +142 -21
  21. data/bin/onevmgroup +9 -17
  22. data/bin/onevnet +4 -15
  23. data/bin/onevntemplate +7 -17
  24. data/bin/onevrouter +6 -17
  25. data/bin/onezone +6 -17
  26. data/lib/cli_helper.rb +7 -10
  27. data/lib/command_parser.rb +1 -1
  28. data/lib/one_helper/oneacct_helper.rb +9 -22
  29. data/lib/one_helper/oneacl_helper.rb +1 -1
  30. data/lib/one_helper/onecluster_helper.rb +1 -1
  31. data/lib/one_helper/onedatastore_helper.rb +11 -1
  32. data/lib/one_helper/oneflow_helper.rb +20 -5
  33. data/lib/one_helper/oneflowtemplate_helper.rb +28 -2
  34. data/lib/one_helper/onegroup_helper.rb +1 -1
  35. data/lib/one_helper/onehook_helper.rb +1 -1
  36. data/lib/one_helper/onehost_helper.rb +1 -5
  37. data/lib/one_helper/oneimage_helper.rb +7 -7
  38. data/lib/one_helper/onemarket_helper.rb +1 -1
  39. data/lib/one_helper/onemarketapp_helper.rb +494 -96
  40. data/lib/one_helper/onequota_helper.rb +1 -1
  41. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  42. data/lib/one_helper/onetemplate_helper.rb +12 -1
  43. data/lib/one_helper/oneuser_helper.rb +11 -3
  44. data/lib/one_helper/onevcenter_helper.rb +176 -146
  45. data/lib/one_helper/onevdc_helper.rb +1 -1
  46. data/lib/one_helper/onevm_helper.rb +9 -9
  47. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  48. data/lib/one_helper/onevnet_helper.rb +1 -1
  49. data/lib/one_helper/onevntemplate_helper.rb +1 -1
  50. data/lib/one_helper/onevrouter_helper.rb +1 -20
  51. data/lib/one_helper/onezone_helper.rb +12 -1
  52. data/lib/one_helper.rb +398 -37
  53. data/share/schemas/xsd/acct.xsd +179 -0
  54. data/share/schemas/xsd/acl_pool.xsd +22 -0
  55. data/share/schemas/xsd/api_info.xsd +43 -0
  56. data/share/schemas/xsd/cluster.xsd +34 -0
  57. data/share/schemas/xsd/cluster_pool.xsd +12 -0
  58. data/share/schemas/xsd/datastore.xsd +67 -0
  59. data/share/schemas/xsd/datastore_pool.xsd +12 -0
  60. data/share/schemas/xsd/document.xsd +42 -0
  61. data/share/schemas/xsd/document_pool.xsd +12 -0
  62. data/share/schemas/xsd/group.xsd +179 -0
  63. data/share/schemas/xsd/group_pool.xsd +194 -0
  64. data/share/schemas/xsd/hook.xsd +59 -0
  65. data/share/schemas/xsd/hook_message_api.xsd +14 -0
  66. data/share/schemas/xsd/hook_message_retry.xsd +12 -0
  67. data/share/schemas/xsd/hook_message_state.xsd +25 -0
  68. data/share/schemas/xsd/hook_pool.xsd +12 -0
  69. data/share/schemas/xsd/host.xsd +164 -0
  70. data/share/schemas/xsd/host_pool.xsd +12 -0
  71. data/share/schemas/xsd/image.xsd +123 -0
  72. data/share/schemas/xsd/image_pool.xsd +12 -0
  73. data/share/schemas/xsd/index.xsd +49 -0
  74. data/share/schemas/xsd/marketplace.xsd +44 -0
  75. data/share/schemas/xsd/marketplace_pool.xsd +12 -0
  76. data/share/schemas/xsd/marketplaceapp.xsd +56 -0
  77. data/share/schemas/xsd/marketplaceapp_pool.xsd +12 -0
  78. data/share/schemas/xsd/opennebula_configuration.xsd +412 -0
  79. data/share/schemas/xsd/raftstatus.xsd +18 -0
  80. data/share/schemas/xsd/security_group.xsd +74 -0
  81. data/share/schemas/xsd/security_group_pool.xsd +12 -0
  82. data/share/schemas/xsd/showback.xsd +29 -0
  83. data/share/schemas/xsd/user.xsd +186 -0
  84. data/share/schemas/xsd/user_pool.xsd +201 -0
  85. data/share/schemas/xsd/vdc.xsd +76 -0
  86. data/share/schemas/xsd/vdc_pool.xsd +12 -0
  87. data/share/schemas/xsd/vm.xsd +251 -0
  88. data/share/schemas/xsd/vm_group.xsd +59 -0
  89. data/share/schemas/xsd/vm_group_pool.xsd +12 -0
  90. data/share/schemas/xsd/vm_pool.xsd +114 -0
  91. data/share/schemas/xsd/vmtemplate.xsd +52 -0
  92. data/share/schemas/xsd/vmtemplate_pool.xsd +12 -0
  93. data/share/schemas/xsd/vnet.xsd +137 -0
  94. data/share/schemas/xsd/vnet_pool.xsd +85 -0
  95. data/share/schemas/xsd/vntemplate.xsd +50 -0
  96. data/share/schemas/xsd/vntemplate_pool.xsd +12 -0
  97. data/share/schemas/xsd/vrouter.xsd +49 -0
  98. data/share/schemas/xsd/vrouter_pool.xsd +12 -0
  99. data/share/schemas/xsd/zone.xsd +40 -0
  100. data/share/schemas/xsd/zone_pool.xsd +36 -0
  101. metadata +92 -30
  102. data/lib/one_helper/oneprovision_helper.rb +0 -362
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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 #
@@ -124,8 +124,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
124
124
  :name => 'weekly',
125
125
  :large => '--weekly days',
126
126
  :description => 'Repeats the schedule action the days of the week ' \
127
- 'specified, it can be a number between 0 (Sunday) to 6 (Saturday) ' \
128
- 'separated with commas. ' \
127
+ 'specified, it can be a number between 0,6 separated with commas.' \
129
128
  'For example: onevm resume 0 --schedule "09/23 14:15" --weekly 0,2,4',
130
129
  :format => String
131
130
  }
@@ -134,8 +133,8 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
134
133
  :name => 'monthly',
135
134
  :large => '--monthly days',
136
135
  :description => 'Repeats the schedule action the days of the month ' \
137
- 'specified, it can be a number between 1,31 separated with commas. ' \
138
- 'For example: onevm resume 0 --schedule "09/23 14:15" --monthly 1,14',
136
+ 'specified, it can be a number between 0,31 separated with commas.' \
137
+ 'For example: onevm resume 0 --schedule "09/23 14:15" --monthly 0,14',
139
138
  :format => String
140
139
  }
141
140
 
@@ -143,7 +142,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
143
142
  :name => 'yearly',
144
143
  :large => '--yearly days',
145
144
  :description => 'Repeats the schedule action the days of the year ' \
146
- 'specified, it can be a number between 0,365 separated with commas. ' \
145
+ 'specified, it can be a number between 0,365 separated with commas.' \
147
146
  'For example: onevm resume 0 --schedule "09/23 14:15" --yearly 30,60',
148
147
  :format => String
149
148
  }
@@ -152,7 +151,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
152
151
  :name => 'hourly',
153
152
  :large => '--hourly hour',
154
153
  :description => 'Repeats the schedule action each hours specified,' \
155
- 'it can be a number between 0,168 separated with commas. ' \
154
+ 'it can be a number between 0,168 separated with commas.' \
156
155
  'For example: onevm resume 0 --schedule "09/23 14:15" --hourly 1,5',
157
156
  :format => Numeric
158
157
  }
@@ -253,7 +252,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
253
252
  end
254
253
 
255
254
  vm_nics.each do |nic|
256
- %w[IP IP6_GLOBAL IP6_ULA IP6
255
+ %w[IP EXTERNAL_IP IP6_GLOBAL IP6_ULA IP6
257
256
  VROUTER_IP VROUTER_IP6_GLOBAL VROUTER_IP6_ULA].each do |attr|
258
257
  if nic.key?(attr)
259
258
  ips.push(nic[attr])
@@ -986,7 +985,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
986
985
  vm_nics.each do |nic|
987
986
  next if nic.key?('CLI_DONE')
988
987
 
989
- %w[IP6_LINK IP6_ULA IP6_GLOBAL IP6].each do |attr|
988
+ %w[EXTERNAL_IP IP6_LINK IP6_ULA IP6_GLOBAL IP6].each do |attr|
990
989
  next unless nic.key?(attr)
991
990
 
992
991
  shown_ips << nic[attr]
@@ -1014,6 +1013,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
1014
1013
  end
1015
1014
 
1016
1015
  shown_ips << nic['IP'] if nic.key?('IP')
1016
+ shown_ips << nic['EXTERNAL_IP'] if nic.key?('EXTERNAL_IP')
1017
1017
 
1018
1018
  nic.merge!(nic_default) {|_k, v1, _v2| v1 }
1019
1019
  array_id += 1
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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 #
@@ -38,25 +38,6 @@ class OneVirtualRouterHelper < OpenNebulaHelper::OneHelper
38
38
  "onevrouter.yaml"
39
39
  end
40
40
 
41
- def show_resource(id, options)
42
- resource = retrieve_resource(id)
43
-
44
- if !options[:extended].nil?
45
- rc = resource.info(options[:extended])
46
- else
47
- rc = resource.info
48
- end
49
-
50
- return -1, rc.message if OpenNebula.is_error?(rc)
51
-
52
- if options[:xml]
53
- return 0, resource.to_xml(true)
54
- else
55
- format_resource(resource, options)
56
- return 0
57
- end
58
- end
59
-
60
41
  def format_pool(options)
61
42
  config_file = self.class.table_conf
62
43
 
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2021, 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 #
@@ -470,6 +470,17 @@ class OneZoneHelper < OpenNebulaHelper::OneHelper
470
470
 
471
471
  if options[:xml]
472
472
  return 0, resource.to_xml(true)
473
+ elsif options[:json]
474
+ # If body is set, the resource contains a JSON inside
475
+ if options[:body]
476
+ return 0, check_resource_xsd(resource)
477
+ else
478
+ return 0, ::JSON.pretty_generate(
479
+ check_resource_xsd(resource)
480
+ )
481
+ end
482
+ elsif options[:yaml]
483
+ return 0, check_resource_xsd(resource).to_yaml(:indent => 4)
473
484
  else
474
485
  format_resource(resource, options)
475
486
  return 0