opennebula-cli 6.1.80.pre → 6.1.90.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/oneflow +26 -4
- data/lib/one_helper/oneacct_helper.rb +5 -1
- data/lib/one_helper.rb +3 -4
- data/share/schemas/xsd/showback.xsd +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a63f6a8df097aa2f01d3d2055ab3ac6ac9d7c760
|
4
|
+
data.tar.gz: d80893cb835b7cc47929fbf7df1b4ff57b383e80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa4b67191d1c4eac4018a357bd79789fae7ae70acfbdecd892b62b19f353e83f1f1854a1a8e56a1e1a6b84d65b84b806a6419a49cfb15ff6572bcb8e4619d47a
|
7
|
+
data.tar.gz: 45aa93131d687f5473d18514828630eafa933668877e4563aa560e7a3fda6d74ee18cd6b93270a02bf390c8d1fd5b342d388491983829dbfe291b73ffdfadb0c
|
data/bin/oneflow
CHANGED
@@ -82,6 +82,12 @@ CommandParser::CmdParser.new(ARGV) do
|
|
82
82
|
:description => 'Force flow necover delete'
|
83
83
|
}
|
84
84
|
|
85
|
+
APPEND = {
|
86
|
+
:name => 'append',
|
87
|
+
:large => '--append',
|
88
|
+
:description => 'Append template to the current one'
|
89
|
+
}
|
90
|
+
|
85
91
|
FORMAT = [OpenNebulaHelper::JSON, OpenNebulaHelper::YAML]
|
86
92
|
|
87
93
|
# create helper object
|
@@ -364,7 +370,11 @@ CommandParser::CmdParser.new(ARGV) do
|
|
364
370
|
be launched to modify the current content.
|
365
371
|
EOT
|
366
372
|
|
367
|
-
command :update,
|
373
|
+
command :update,
|
374
|
+
update_desc,
|
375
|
+
:service_id,
|
376
|
+
[:file, nil],
|
377
|
+
:options => APPEND do
|
368
378
|
service_id = args[0]
|
369
379
|
client = helper.client(options)
|
370
380
|
|
@@ -382,8 +392,10 @@ CommandParser::CmdParser.new(ARGV) do
|
|
382
392
|
tmp = Tempfile.new(service_id.to_s)
|
383
393
|
path = tmp.path
|
384
394
|
|
385
|
-
|
386
|
-
|
395
|
+
unless options[:append]
|
396
|
+
tmp.write(JSON.pretty_generate(template))
|
397
|
+
tmp.flush
|
398
|
+
end
|
387
399
|
|
388
400
|
if ENV['EDITOR']
|
389
401
|
editor_path = ENV['EDITOR']
|
@@ -402,7 +414,17 @@ CommandParser::CmdParser.new(ARGV) do
|
|
402
414
|
end
|
403
415
|
end
|
404
416
|
|
405
|
-
|
417
|
+
if options[:append]
|
418
|
+
req = {}
|
419
|
+
req['append'] = true
|
420
|
+
req['template'] = File.read(path)
|
421
|
+
|
422
|
+
response = client.put("#{RESOURCE_PATH}/#{service_id}",
|
423
|
+
req.to_json)
|
424
|
+
else
|
425
|
+
response = client.put("#{RESOURCE_PATH}/#{service_id}",
|
426
|
+
File.read(path))
|
427
|
+
end
|
406
428
|
|
407
429
|
if CloudClient.is_error?(response)
|
408
430
|
[response.code.to_i, response.to_s]
|
@@ -216,11 +216,15 @@ class AcctHelper < OpenNebulaHelper::OneHelper
|
|
216
216
|
d["HOURS"]
|
217
217
|
end
|
218
218
|
|
219
|
+
column :RUNNING_HOURS, "Running hours", :size=>7 do |d|
|
220
|
+
d["RHOURS"] || '-'
|
221
|
+
end
|
222
|
+
|
219
223
|
column :COST, "Cost", :size=>15 do |d|
|
220
224
|
d["TOTAL_COST"]
|
221
225
|
end
|
222
226
|
|
223
|
-
default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :COST
|
227
|
+
default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :RUNNING_HOURS, :COST
|
224
228
|
end
|
225
229
|
|
226
230
|
def self.print_start_end_time_header(start_time, end_time)
|
data/lib/one_helper.rb
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
<xs:element name="DISK_COST" type="xs:float"/>
|
21
21
|
<xs:element name="TOTAL_COST" type="xs:float"/>
|
22
22
|
<xs:element name="HOURS" type="xs:float"/>
|
23
|
+
<xs:element name="RHOURS" type="xs:float" minOccurs="0" maxOccurs="1"/>
|
23
24
|
</xs:sequence>
|
24
25
|
</xs:complexType>
|
25
26
|
</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.1.
|
4
|
+
version: 6.1.90.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-21 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.1.
|
19
|
+
version: 6.1.90.pre
|
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.1.
|
26
|
+
version: 6.1.90.pre
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|