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
data/bin/onezone CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2021, 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 #
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
-
35
- # Suppress warnings from Rubygems
36
- # https://github.com/OpenNebula/one/issues/5379
37
- begin
38
- verb = $VERBOSE
39
- $VERBOSE = nil
40
- require 'rubygems'
41
- Gem.use_paths(real_gems_path)
42
- ensure
43
- $VERBOSE = verb
44
- end
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -82,8 +71,8 @@ CommandParser::CmdParser.new(ARGV) do
82
71
  ########################################################################
83
72
  set :option, CommandParser::OPTIONS + OpenNebulaHelper::CLIENT_OPTIONS
84
73
 
85
- list_options = CLIHelper::OPTIONS
86
- list_options << OpenNebulaHelper::XML
74
+ list_options = CLIHelper::OPTIONS
75
+ list_options += OpenNebulaHelper::FORMAT
87
76
  list_options << OpenNebulaHelper::NUMERIC
88
77
  list_options << OpenNebulaHelper::DESCRIBE
89
78
 
@@ -222,7 +211,7 @@ CommandParser::CmdParser.new(ARGV) do
222
211
  Shows information for the given Zone
223
212
  EOT
224
213
 
225
- command :show, show_desc, :zoneid, :options => OpenNebulaHelper::XML do
214
+ command :show, show_desc, :zoneid, :options => OpenNebulaHelper::FORMAT do
226
215
  helper.show_resource(args[0], options)
227
216
  end
228
217
 
data/lib/cli_helper.rb CHANGED
@@ -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 #
@@ -61,8 +61,7 @@ module CLIHelper
61
61
  ' ' * 31 << 'column=value pairs.' <<
62
62
  ' ' * 31 << "Valid operators #{FILTER_OPS.join(',')}" <<
63
63
  ' ' * 31 << 'e.g. NAME=test (match name with test)' <<
64
- ' ' * 31 << 'NAME~test (match every NAME containing' <<
65
- ' ' * 31 << 'the substring \'test\')'
64
+ ' ' * 31 << 'NAME~test (match test, te, tes..)'
66
65
  }
67
66
 
68
67
  OPERATOR = {
@@ -182,7 +181,7 @@ module CLIHelper
182
181
  ANSI_YELLOW = "\33[33m"
183
182
 
184
183
  # CLI states
185
- OK_STATES = %w[runn rdy on configured SUCCESS RUNNING]
184
+ OK_STATES = %w[runn rdy on SUCCESS RUNNING]
186
185
  BAD_STATES = %w[fail
187
186
  err
188
187
  error
@@ -190,7 +189,7 @@ module CLIHelper
190
189
  FAILED_DEPLOYING
191
190
  FAILED_UNDEPLOYING
192
191
  FAILED_SCALING]
193
- REGULAR_STATES = %w[pending WARNING]
192
+ REGULAR_STATES = %w[PENDING DEPLOYING CONFIGURING WARNING]
194
193
 
195
194
  # Set state color
196
195
  #
@@ -358,14 +357,14 @@ module CLIHelper
358
357
  # @param options [Hash] Object with CLI user options
359
358
  # @param top [Boolean] True to not update columns again
360
359
  def show(data, options = {}, top = false)
361
- update_columns(options) unless top
362
-
363
360
  if options[:list]
364
361
  @cli_columns = options[:list].collect {|o| o.upcase.to_sym }
365
362
  else
366
363
  @cli_columns = @default_columns
367
364
  end
368
365
 
366
+ update_columns(options) unless top
367
+
369
368
  if data.is_a? Hash
370
369
  @data = data
371
370
 
@@ -600,9 +599,7 @@ module CLIHelper
600
599
  end
601
600
  end
602
601
 
603
- if options
604
- filter_data!(res_data, options) if options[:filter]
605
- end
602
+ filter_data!(res_data, options) if options && options[:filter]
606
603
 
607
604
  res_data
608
605
  end
@@ -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 #
@@ -91,28 +91,19 @@ class AcctHelper < OpenNebulaHelper::OneHelper
91
91
  :format => String
92
92
  }
93
93
 
94
- XML = {
95
- :name => "xml",
96
- :short => "-x",
97
- :large => "--xml",
98
- :description => "Show the resource in xml format"
99
- }
100
-
101
- JSON = {
102
- :name => "json",
103
- :short => "-j",
104
- :large => "--json",
105
- :description => "Show the resource in json format"
106
- }
107
-
108
94
  SPLIT={
109
95
  :name => "split",
110
96
  :large => "--split",
111
97
  :description => "Split the output in a table for each VM"
112
98
  }
113
99
 
114
- ACCT_OPTIONS = [START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, XML, JSON, SPLIT]
115
- SHOWBACK_OPTIONS = [START_TIME_SHOWBACK, END_TIME_SHOWBACK, USERFILTER, GROUP, XML, JSON]
100
+ ACCT_OPTIONS = [START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, SPLIT]
101
+ SHOWBACK_OPTIONS = [START_TIME_SHOWBACK, END_TIME_SHOWBACK, USERFILTER, GROUP]
102
+
103
+ ACCT_OPTIONS << OpenNebulaHelper::XML
104
+ ACCT_OPTIONS << OpenNebulaHelper::JSON
105
+
106
+ SHOWBACK_OPTIONS += OpenNebulaHelper::FORMAT
116
107
 
117
108
  ACCT_TABLE = CLIHelper::ShowTable.new(self.table_conf("oneacct.yaml"), nil) do
118
109
  column :UID, "User ID", :size=>4 do |d|
@@ -227,15 +218,11 @@ class AcctHelper < OpenNebulaHelper::OneHelper
227
218
  d["HOURS"]
228
219
  end
229
220
 
230
- column :RUNNING_HOURS, "Running hours", :size=>7 do |d|
231
- d["RHOURS"] || '-'
232
- end
233
-
234
221
  column :COST, "Cost", :size=>15 do |d|
235
222
  d["TOTAL_COST"]
236
223
  end
237
224
 
238
- default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :RUNNING_HOURS, :COST
225
+ default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :COST
239
226
  end
240
227
 
241
228
  def self.print_start_end_time_header(start_time, end_time)
@@ -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 #
@@ -28,6 +28,16 @@ class OneDatastoreHelper < OpenNebulaHelper::OneHelper
28
28
  }
29
29
  }
30
30
 
31
+ FILE_DATASTORE = {
32
+ :name => "file_datastore",
33
+ :large => "--file-datastore id|name" ,
34
+ :description => "Selects the file datastore",
35
+ :format => String,
36
+ :proc => lambda { |o, options|
37
+ OpenNebulaHelper.rname_to_id(o, "DATASTORE")
38
+ }
39
+ }
40
+
31
41
  def self.rname
32
42
  "DATASTORE"
33
43
  end
@@ -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 #
@@ -57,11 +57,18 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
57
57
  d['NAME']
58
58
  end
59
59
 
60
+ column :STARTTIME, 'Start time of the Service', :size => 15 do |d|
61
+ d.extend(CLIHelper::HashWithSearch)
62
+ d = d.dsearch('TEMPLATE/BODY')
63
+
64
+ OpenNebulaHelper.time_to_str(d['start_time'])
65
+ end
66
+
60
67
  column :STAT, 'State', :size => 11, :left => true do |d|
61
68
  Service.state_str(d['TEMPLATE']['BODY']['state'])
62
69
  end
63
70
 
64
- default :ID, :USER, :GROUP, :NAME, :STAT
71
+ default :ID, :USER, :GROUP, :NAME, :STARTTIME, :STAT
65
72
  end
66
73
  end
67
74
 
@@ -74,6 +81,8 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
74
81
 
75
82
  if CloudClient.is_error?(response)
76
83
  [response.code.to_i, response.to_s]
84
+ elsif options[:yaml]
85
+ [0, JSON.parse(response.body).to_yaml(:indent => 4)]
77
86
  else
78
87
  array_list = JSON.parse(response.body)
79
88
  array_list = array_list['DOCUMENT_POOL']['DOCUMENT']
@@ -93,6 +102,8 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
93
102
  else
94
103
  [0, JSON.pretty_generate(array_list)]
95
104
  end
105
+ elsif options[:yaml]
106
+ [0, array_list.to_yaml(:indent => 4)]
96
107
  else
97
108
  format_service_pool.show(array_list)
98
109
 
@@ -139,6 +150,8 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
139
150
  else
140
151
  if options[:json]
141
152
  [0, response.body]
153
+ elsif options[:yaml]
154
+ [0, JSON.parse(response.body).to_yaml(:indent => 4)]
142
155
  else
143
156
  str_h1 = '%-80s'
144
157
  document = JSON.parse(response.body)['DOCUMENT']
@@ -260,9 +273,10 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
260
273
  #
261
274
  # @param document [Hash] Service document information
262
275
  def print_service_info(document)
263
- str = '%-20s: %-20s'
264
- str_h1 = '%-80s'
265
- template = document['TEMPLATE']['BODY']
276
+ str = '%-20s: %-20s'
277
+ str_h1 = '%-80s'
278
+ template = document['TEMPLATE']['BODY']
279
+ start_time = OpenNebulaHelper.time_to_str(template['start_time'])
266
280
 
267
281
  puts Kernel.format(str, 'ID', document['ID'])
268
282
  puts Kernel.format(str, 'NAME', document['NAME'])
@@ -273,6 +287,7 @@ class OneFlowHelper < OpenNebulaHelper::OneHelper
273
287
  puts Kernel.format(str,
274
288
  'SERVICE STATE',
275
289
  Service.state_str(template['state']))
290
+ puts Kernel.format(str, 'START TIME', start_time)
276
291
 
277
292
  if template['shutdown_action']
278
293
  puts Kernel.format(str, 'SHUTDOWN', template['shutdown_action'])
@@ -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 #
@@ -57,7 +57,16 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
57
57
  d['NAME']
58
58
  end
59
59
 
60
- default :ID, :USER, :GROUP, :NAME
60
+ column :REGTIME,
61
+ 'Registration time of the Service Template',
62
+ :size => 15 do |d|
63
+ d.extend(CLIHelper::HashWithSearch)
64
+ d = d.dsearch('TEMPLATE/BODY')
65
+
66
+ OpenNebulaHelper.time_to_str(d['registration_time'])
67
+ end
68
+
69
+ default :ID, :USER, :GROUP, :NAME, :REGTIME
61
70
  end
62
71
  end
63
72
 
@@ -73,6 +82,8 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
73
82
  else
74
83
  if options[:json]
75
84
  [0, response.body]
85
+ elsif options[:yaml]
86
+ [0, JSON.parse(response.body).to_yaml(:indent => 4)]
76
87
  else
77
88
  documents = JSON.parse(response.body)['DOCUMENT_POOL']
78
89
  format_service_template_pool.show(documents['DOCUMENT'])
@@ -120,12 +131,17 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
120
131
  else
121
132
  if options[:json]
122
133
  [0, response.body]
134
+ elsif options[:yaml]
135
+ [0, JSON.parse(response.body).to_yaml(:indent => 4)]
123
136
  else
124
137
  str = '%-20s: %-20s'
125
138
  str_h1 = '%-80s'
126
139
 
127
140
  document = JSON.parse(response.body)['DOCUMENT']
128
141
  template = document['TEMPLATE']['BODY']
142
+ reg_time = OpenNebulaHelper.time_to_str(
143
+ template['registration_time']
144
+ )
129
145
 
130
146
  CLIHelper.print_header(
131
147
  str_h1 % "SERVICE TEMPLATE #{document['ID']} INFORMATION"
@@ -135,6 +151,7 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
135
151
  puts Kernel.format str, 'NAME', document['NAME']
136
152
  puts Kernel.format str, 'USER', document['UNAME']
137
153
  puts Kernel.format str, 'GROUP', document['GNAME']
154
+ puts Kernel.format str, 'REGISTRATION TIME', reg_time
138
155
 
139
156
  puts
140
157
 
@@ -309,4 +326,13 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
309
326
  answers
310
327
  end
311
328
 
329
+ def factory(id = nil)
330
+ if id
331
+ OpenNebula::ServiceTemplate.new_with_id(id, @client)
332
+ else
333
+ xml = OpenNebula::ServiceTemplate.build_xml
334
+ OpenNebula::ServiceTemplate.new(xml, @client)
335
+ end
336
+ end
337
+
312
338
  end
@@ -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 #
@@ -222,10 +222,6 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
222
222
  end
223
223
  end
224
224
 
225
- column :PROVIDER, 'Host provider', :left, :size => 6 do |d|
226
- d['TEMPLATE']['PM_MAD'].nil? ? '-' : d['TEMPLATE']['PM_MAD']
227
- end
228
-
229
225
  column :STAT, 'Host status', :left, :size => 6 do |d|
230
226
  OneHostHelper.state_to_str(d['STATE'])
231
227
  end
@@ -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 #
@@ -22,7 +22,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
22
22
 
23
23
  # This list contains prefixes that should skip adding user home to the path
24
24
  # This must have the same content as the case $FROM in downloader.sh
25
- PREFIXES = %w[http https ssh s3 rbd vcenter lxd docker]
25
+ PREFIXES = %w[http https ssh s3 rbd vcenter lxd docker dockerfile]
26
26
 
27
27
  TEMPLATE_OPTIONS=[
28
28
  {
@@ -98,9 +98,9 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
98
98
  end
99
99
  },
100
100
  {
101
- :name => 'driver',
102
- :large => '--driver driver',
103
- :description => 'Driver to use image (raw, qcow2, tap:aio:...)',
101
+ :name => 'format',
102
+ :large => '--format format',
103
+ :description => 'Format of the image (raw, qcow2, ...)',
104
104
  :format => String
105
105
  },
106
106
  {
@@ -295,7 +295,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
295
295
  str_h1='%-80s'
296
296
 
297
297
  path = image['PATH']
298
- fstype = image['FSTYPE']
298
+ iformat = image['FORMAT']
299
299
 
300
300
  size = OpenNebulaHelper.unit_to_str(image['SIZE'].to_i, {}, 'M')
301
301
  lock = OpenNebulaHelper.level_lock_to_str(image['LOCK/LOCKED'])
@@ -314,7 +314,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
314
314
  puts format(str, 'PERSISTENT', pers)
315
315
  puts format(str, 'SOURCE', image['SOURCE'])
316
316
  puts format(str, 'PATH', path) if path && !path.empty?
317
- puts format(str, 'FSTYPE', fstype) if fstype && !fstype.empty?
317
+ puts format(str, 'FORMAT', iformat) if iformat && !iformat.empty?
318
318
  puts format(str, 'SIZE', size)
319
319
  puts format(str, 'STATE', image.short_state_str)
320
320
  puts format(str, 'RUNNING_VMS', image['RUNNING_VMS'])
@@ -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 #