opennebula-cli 6.10.2 → 6.99.85.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/oneacct +5 -18
- data/bin/oneacl +2 -18
- data/bin/onebackupjob +2 -18
- data/bin/onecluster +36 -18
- data/bin/onedatastore +2 -18
- data/bin/oneflow +2 -18
- data/bin/oneflow-template +8 -24
- data/bin/onegroup +2 -18
- data/bin/onehook +2 -18
- data/bin/onehost +4 -48
- data/bin/oneimage +2 -18
- data/bin/oneirb +2 -61
- data/bin/onelog +3 -22
- data/bin/onemarket +2 -18
- data/bin/onemarketapp +2 -30
- data/bin/onesecgroup +2 -18
- data/bin/oneshowback +2 -18
- data/bin/onetemplate +2 -19
- data/bin/oneuser +2 -18
- data/bin/onevdc +2 -18
- data/bin/onevm +21 -19
- data/bin/onevmgroup +2 -18
- data/bin/onevnet +2 -18
- data/bin/onevntemplate +2 -18
- data/bin/onevrouter +13 -20
- data/bin/onezone +2 -18
- data/lib/cli_helper.rb +1 -1
- data/lib/command_parser.rb +1 -1
- data/lib/one_helper/oneacct_helper.rb +10 -2
- data/lib/one_helper/oneacl_helper.rb +1 -1
- data/lib/one_helper/onebackupjob_helper.rb +1 -1
- data/lib/one_helper/onecluster_helper.rb +49 -1
- data/lib/one_helper/onedatastore_helper.rb +1 -1
- data/lib/one_helper/oneflow_helper.rb +1 -1
- data/lib/one_helper/oneflowtemplate_helper.rb +17 -17
- data/lib/one_helper/onegroup_helper.rb +4 -55
- data/lib/one_helper/onehook_helper.rb +1 -1
- data/lib/one_helper/onehost_helper.rb +29 -87
- data/lib/one_helper/oneimage_helper.rb +2 -19
- data/lib/one_helper/onemarket_helper.rb +1 -1
- data/lib/one_helper/onemarketapp_helper.rb +13 -3
- data/lib/one_helper/onequota_helper.rb +35 -8
- data/lib/one_helper/onesecgroup_helper.rb +1 -1
- data/lib/one_helper/onetemplate_helper.rb +1 -8
- data/lib/one_helper/oneuser_helper.rb +41 -75
- data/lib/one_helper/onevdc_helper.rb +1 -1
- data/lib/one_helper/onevm_helper.rb +119 -102
- data/lib/one_helper/onevmgroup_helper.rb +1 -1
- data/lib/one_helper/onevnet_helper.rb +1 -1
- data/lib/one_helper/onevntemplate_helper.rb +1 -1
- data/lib/one_helper/onevrouter_helper.rb +1 -1
- data/lib/one_helper/onezone_helper.rb +10 -23
- data/lib/one_helper.rb +34 -156
- data/share/schemas/xsd/acct.xsd +2 -0
- data/share/schemas/xsd/cluster.xsd +21 -0
- data/share/schemas/xsd/datastore.xsd +1 -13
- data/share/schemas/xsd/group.xsd +11 -122
- data/share/schemas/xsd/group_pool.xsd +8 -120
- data/share/schemas/xsd/host.xsd +19 -21
- data/share/schemas/xsd/image.xsd +0 -1
- data/share/schemas/xsd/monitoring_data.xsd +0 -8
- data/share/schemas/xsd/opennebula_configuration.xsd +23 -1
- data/share/schemas/xsd/plan.xsd +29 -0
- data/share/schemas/xsd/requirements.xsd +45 -0
- data/share/schemas/xsd/scheduler_driver_action.xsd +24 -0
- data/share/schemas/xsd/shared.xsd +67 -0
- data/share/schemas/xsd/user.xsd +10 -122
- data/share/schemas/xsd/user_pool.xsd +8 -120
- data/share/schemas/xsd/vm.xsd +37 -28
- data/share/schemas/xsd/vm_pool.xsd +0 -12
- data/share/schemas/xsd/vm_pool_extended.xsd +12 -0
- data/share/schemas/xsd/vmtemplate.xsd +0 -3
- data/share/schemas/xsd/vnet.xsd +0 -5
- data/share/schemas/xsd/vnet_pool_extended.xsd +12 -0
- metadata +11 -9
- data/bin/onevcenter +0 -471
- data/lib/one_helper/onevcenter_helper.rb +0 -523
data/lib/one_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -33,7 +33,7 @@ module OpenNebulaHelper
|
|
33
33
|
|
34
34
|
ONE_VERSION=<<~EOT
|
35
35
|
OpenNebula #{OpenNebula::VERSION}
|
36
|
-
Copyright 2002-
|
36
|
+
Copyright 2002-2025, OpenNebula Project, OpenNebula Systems
|
37
37
|
EOT
|
38
38
|
|
39
39
|
if ONE_LOCATION
|
@@ -411,32 +411,20 @@ Bash symbols must be escaped on STDIN passing'
|
|
411
411
|
:large => '--report_ready',
|
412
412
|
:description => 'Sends READY=YES to OneGate, useful for OneFlow'
|
413
413
|
},
|
414
|
-
{
|
415
|
-
:name => 'vcenter_vm_folder',
|
416
|
-
:large => '--vcenter_vm_folder path',
|
417
|
-
:format => String,
|
418
|
-
:description => 'In a vCenter environment sets the the VMs and Template folder where the VM will be placed in.' \
|
419
|
-
' The path uses slashes to separate folders. For example: --vcenter_vm_folder "/Management/VMs"'
|
420
|
-
},
|
421
414
|
{
|
422
415
|
:name => 'user_inputs',
|
423
416
|
:large => '--user-inputs ui1,ui2,ui3',
|
424
|
-
:format =>
|
417
|
+
:format => String,
|
425
418
|
:description => 'Specify the user inputs values when instantiating',
|
426
|
-
:proc => lambda do |
|
427
|
-
|
428
|
-
options[:
|
429
|
-
|
430
|
-
# escape values
|
431
|
-
options[:user_inputs].map! do |user_input|
|
432
|
-
user_input_split = user_input.split('=')
|
419
|
+
:proc => lambda do |_o, options|
|
420
|
+
keys = options[:user_inputs].scan(/(?:^|,)([^,=]+)=/).flatten
|
421
|
+
values = options[:user_inputs].scan(/=(.+?)(?=,[^,]+=|$)/).flatten
|
433
422
|
|
434
|
-
|
435
|
-
|
436
|
-
"#{user_input_split[0]}=\"#{user_input_split[1]}\""
|
437
|
-
end
|
423
|
+
options[:user_inputs_keys] = keys
|
438
424
|
|
439
|
-
options[:user_inputs] =
|
425
|
+
options[:user_inputs] = keys.zip(values).map do |k, v|
|
426
|
+
%[#{k}="#{v}"]
|
427
|
+
end.join("\n")
|
440
428
|
end
|
441
429
|
},
|
442
430
|
{
|
@@ -1860,15 +1848,13 @@ Bash symbols must be escaped on STDIN passing'
|
|
1860
1848
|
[0, template]
|
1861
1849
|
end
|
1862
1850
|
|
1863
|
-
def self.
|
1851
|
+
def self.create_context_str(options, context_hash)
|
1864
1852
|
context_options = [:ssh, :net_context, :context, :init, :files_ds, :startscript,
|
1865
1853
|
:report_ready]
|
1866
1854
|
if !(options.keys & context_options).empty?
|
1867
|
-
lines=[]
|
1868
|
-
|
1869
1855
|
if options[:ssh]
|
1870
1856
|
if options[:ssh]==true
|
1871
|
-
|
1857
|
+
context_hash['SSH_PUBLIC_KEY'] = "$USER[SSH_PUBLIC_KEY]"
|
1872
1858
|
else
|
1873
1859
|
begin
|
1874
1860
|
key=File.read(options[:ssh]).strip
|
@@ -1876,28 +1862,22 @@ Bash symbols must be escaped on STDIN passing'
|
|
1876
1862
|
STDERR.puts e.message
|
1877
1863
|
exit(-1)
|
1878
1864
|
end
|
1879
|
-
|
1865
|
+
context_hash['SSH_PUBLIC_KEY'] = key
|
1880
1866
|
end
|
1881
1867
|
end
|
1882
1868
|
|
1883
1869
|
if options[:net_context]
|
1884
|
-
|
1870
|
+
context_hash['NETWORK'] = "YES"
|
1885
1871
|
end
|
1886
1872
|
|
1887
|
-
lines+=options[:context] if options[:context]
|
1888
|
-
|
1889
1873
|
if options[:files_ds]
|
1890
|
-
|
1891
|
-
text << options[:files_ds].map do |file|
|
1892
|
-
%($FILE[IMAGE=\\"#{file}\\"])
|
1893
|
-
end.join(' ')
|
1894
|
-
text << '"'
|
1874
|
+
files = options[:files_ds].map { |file| %($FILE[IMAGE=\\"#{file}\\"]) }.join(" ")
|
1895
1875
|
|
1896
|
-
|
1876
|
+
context_hash['FILES_DS'] = files
|
1897
1877
|
end
|
1898
1878
|
|
1899
1879
|
if options[:init]
|
1900
|
-
|
1880
|
+
context_hash['INIT_SCRIPTS'] = options[:init].join(" ")
|
1901
1881
|
end
|
1902
1882
|
|
1903
1883
|
if options[:startscript]
|
@@ -1909,15 +1889,23 @@ Bash symbols must be escaped on STDIN passing'
|
|
1909
1889
|
exit(-1)
|
1910
1890
|
end
|
1911
1891
|
script = Base64.strict_encode64(script)
|
1912
|
-
|
1892
|
+
context_hash['START_SCRIPT_BASE64'] = script
|
1893
|
+
|
1913
1894
|
end
|
1914
1895
|
|
1915
1896
|
if options[:report_ready]
|
1916
|
-
|
1897
|
+
context_hash['REPORT_READY'] = "YES"
|
1917
1898
|
end
|
1918
1899
|
|
1919
|
-
if
|
1920
|
-
"CONTEXT=[\n"
|
1900
|
+
if context_hash.any? || options[:context]
|
1901
|
+
formatted_context = "CONTEXT=[\n"
|
1902
|
+
formatted_context << options[:context].map {|l| ' ' << l }.join(",\n") if options[:context]
|
1903
|
+
if context_hash.any?
|
1904
|
+
formatted_context << ",\n" if options[:context]
|
1905
|
+
formatted_context << context_hash.map { |k, v| " #{k}=\"#{v}\"" }.join(",\n")
|
1906
|
+
end
|
1907
|
+
formatted_context << "\n]\n"
|
1908
|
+
formatted_context
|
1921
1909
|
else
|
1922
1910
|
nil
|
1923
1911
|
end
|
@@ -1998,21 +1986,12 @@ Bash symbols must be escaped on STDIN passing'
|
|
1998
1986
|
template<<' ]' << "\n"
|
1999
1987
|
end
|
2000
1988
|
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
template<<context if context
|
2005
|
-
|
2006
|
-
if options[:userdata] && !template_obj.nil? && template_obj.has_elements?('TEMPLATE/EC2')
|
2007
|
-
template_obj.add_element(
|
2008
|
-
'TEMPLATE/EC2',
|
2009
|
-
'USERDATA' => options[:userdata]
|
2010
|
-
)
|
2011
|
-
|
2012
|
-
template << template_obj.template_like_str(
|
2013
|
-
'TEMPLATE', false, 'EC2'
|
2014
|
-
)
|
1989
|
+
context_hash = {}
|
1990
|
+
if !template_obj.nil? && template_obj.has_elements?('TEMPLATE/CONTEXT')
|
1991
|
+
context_hash = template_obj.to_hash["VMTEMPLATE"]["TEMPLATE"]["CONTEXT"]
|
2015
1992
|
end
|
1993
|
+
context_str=create_context_str(options, context_hash)
|
1994
|
+
template<<context_str if context_str
|
2016
1995
|
|
2017
1996
|
[0, template]
|
2018
1997
|
end
|
@@ -2108,107 +2087,6 @@ Bash symbols must be escaped on STDIN passing'
|
|
2108
2087
|
!conflicting_opts.empty?
|
2109
2088
|
end
|
2110
2089
|
|
2111
|
-
def self.sunstone_url
|
2112
|
-
if (one_sunstone = ENV['ONE_SUNSTONE'])
|
2113
|
-
one_sunstone
|
2114
|
-
elsif (one_xmlrpc = ENV['ONE_XMLRPC'])
|
2115
|
-
uri = URI(one_xmlrpc)
|
2116
|
-
"#{uri.scheme}://#{uri.host}:9869"
|
2117
|
-
else
|
2118
|
-
'http://localhost:9869'
|
2119
|
-
end
|
2120
|
-
end
|
2121
|
-
|
2122
|
-
def self.download_resource_sunstone(kind, id, path, _force)
|
2123
|
-
client = OneHelper.client
|
2124
|
-
user, password = client.one_auth.split(':', 2)
|
2125
|
-
|
2126
|
-
# Step 1: Build Session to get Cookie
|
2127
|
-
uri = URI(File.join(sunstone_url, 'login'))
|
2128
|
-
|
2129
|
-
req = Net::HTTP::Post.new(uri)
|
2130
|
-
req.basic_auth user, password
|
2131
|
-
|
2132
|
-
begin
|
2133
|
-
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2134
|
-
http.request(req)
|
2135
|
-
end
|
2136
|
-
rescue StandardError
|
2137
|
-
return OpenNebula::Error.new("Error connecting to '#{uri}'.")
|
2138
|
-
end
|
2139
|
-
|
2140
|
-
cookie = res.response['set-cookie'].split('; ')[0]
|
2141
|
-
|
2142
|
-
if cookie.nil?
|
2143
|
-
return OpenNebula::Error.new('Unable to get Cookie. Is OpenNebula running?')
|
2144
|
-
end
|
2145
|
-
|
2146
|
-
# Step 2: Open '/' to get the csrftoken
|
2147
|
-
uri = URI(sunstone_url)
|
2148
|
-
|
2149
|
-
req = Net::HTTP::Get.new(uri)
|
2150
|
-
req['Cookie'] = cookie
|
2151
|
-
|
2152
|
-
begin
|
2153
|
-
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2154
|
-
http.request(req)
|
2155
|
-
end
|
2156
|
-
rescue StandardError
|
2157
|
-
return OpenNebula::Error.new("Error connecting to '#{uri}'.")
|
2158
|
-
end
|
2159
|
-
|
2160
|
-
m = res.body.match(/var csrftoken = '(.*)';/)
|
2161
|
-
csrftoken = m[1] rescue nil
|
2162
|
-
|
2163
|
-
if csrftoken.nil?
|
2164
|
-
return OpenNebula::Error.new('Unable to get csrftoken.')
|
2165
|
-
end
|
2166
|
-
|
2167
|
-
# Step 3: Download resource
|
2168
|
-
uri = URI(File.join(sunstone_url,
|
2169
|
-
kind.to_s,
|
2170
|
-
id.to_s,
|
2171
|
-
"download?csrftoken=#{csrftoken}"))
|
2172
|
-
|
2173
|
-
req = Net::HTTP::Get.new(uri)
|
2174
|
-
|
2175
|
-
req['Cookie'] = cookie
|
2176
|
-
req['User-Agent'] = 'OpenNebula CLI'
|
2177
|
-
|
2178
|
-
begin
|
2179
|
-
File.open(path, 'wb') do |f|
|
2180
|
-
Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2181
|
-
http.request(req) do |res|
|
2182
|
-
res.read_body do |chunk|
|
2183
|
-
f.write(chunk)
|
2184
|
-
end
|
2185
|
-
end
|
2186
|
-
end
|
2187
|
-
end
|
2188
|
-
rescue Errno::EACCES
|
2189
|
-
return OpenNebula::Error.new('Target file not writable.')
|
2190
|
-
end
|
2191
|
-
|
2192
|
-
error_message = nil
|
2193
|
-
|
2194
|
-
File.open(path, 'rb') do |f|
|
2195
|
-
begin
|
2196
|
-
f.seek(-1024, IO::SEEK_END)
|
2197
|
-
rescue Errno::EINVAL
|
2198
|
-
end
|
2199
|
-
|
2200
|
-
tail = f.read
|
2201
|
-
|
2202
|
-
m = tail.match(/@\^_\^@ (.*) @\^_\^@/m)
|
2203
|
-
error_message = m[1] if m
|
2204
|
-
end
|
2205
|
-
|
2206
|
-
return unless error_message
|
2207
|
-
|
2208
|
-
File.unlink(path)
|
2209
|
-
OpenNebula::Error.new("Remote server error: #{error_message}")
|
2210
|
-
end
|
2211
|
-
|
2212
2090
|
def self.level_lock_to_str(str)
|
2213
2091
|
level = str.to_i
|
2214
2092
|
if level == 0
|
data/share/schemas/xsd/acct.xsd
CHANGED
@@ -23,6 +23,8 @@
|
|
23
23
|
<xs:element name="VM_MAD" type="xs:string"/>
|
24
24
|
<xs:element name="TM_MAD" type="xs:string"/>
|
25
25
|
<xs:element name="DS_ID" type="xs:integer"/>
|
26
|
+
<xs:element name="PLAN_ID" type="xs:integer"/>
|
27
|
+
<xs:element name="ACTION_ID" type="xs:integer"/>
|
26
28
|
<xs:element name="PSTIME" type="xs:integer"/>
|
27
29
|
<xs:element name="PETIME" type="xs:integer"/>
|
28
30
|
<xs:element name="RSTIME" type="xs:integer"/>
|
@@ -28,6 +28,27 @@
|
|
28
28
|
</xs:complexType>
|
29
29
|
</xs:element>
|
30
30
|
<xs:element name="TEMPLATE" type="xs:anyType"/>
|
31
|
+
<xs:element name="PLAN" minOccurs="0" maxOccurs="1">
|
32
|
+
<xs:complexType>
|
33
|
+
<xs:sequence>
|
34
|
+
<xs:element name="ID" type="xs:integer"/>
|
35
|
+
<xs:element name="STATE" type="xs:integer"/>
|
36
|
+
<xs:element name="ACTION">
|
37
|
+
<xs:complexType>
|
38
|
+
<xs:sequence>
|
39
|
+
<xs:element name="ID" type="xs:integer"/>
|
40
|
+
<xs:element name="VM_ID" type="xs:integer"/>
|
41
|
+
<xs:element name="STATE" type="xs:integer"/>
|
42
|
+
<xs:element name="OPERATION" type="xs:string"/>
|
43
|
+
<xs:element name="HOST_ID" type="xs:integer"/>
|
44
|
+
<xs:element name="DS_ID" type="xs:integer"/>
|
45
|
+
<xs:element name="TIMESTAMP" type="xs:integer"/>
|
46
|
+
</xs:sequence>
|
47
|
+
</xs:complexType>
|
48
|
+
</xs:element>
|
49
|
+
</xs:sequence>
|
50
|
+
</xs:complexType>
|
51
|
+
</xs:element>
|
31
52
|
</xs:sequence>
|
32
53
|
</xs:complexType>
|
33
54
|
</xs:element>
|
@@ -48,19 +48,7 @@
|
|
48
48
|
</xs:sequence>
|
49
49
|
</xs:complexType>
|
50
50
|
</xs:element>
|
51
|
-
|
52
|
-
<xs:complexType>
|
53
|
-
<xs:sequence>
|
54
|
-
<xs:element name="VCENTER_DC_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
55
|
-
<xs:element name="VCENTER_DC_REF" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
56
|
-
<xs:element name="VCENTER_DS_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
57
|
-
<xs:element name="VCENTER_DS_REF" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
58
|
-
<xs:element name="VCENTER_HOST" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
59
|
-
<xs:element name="VCENTER_INSTANCE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
60
|
-
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
|
61
|
-
</xs:sequence>
|
62
|
-
</xs:complexType>
|
63
|
-
</xs:element>
|
51
|
+
<xs:element name="TEMPLATE"/>
|
64
52
|
</xs:sequence>
|
65
53
|
</xs:complexType>
|
66
54
|
</xs:element>
|
data/share/schemas/xsd/group.xsd
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
|
3
3
|
targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
|
4
|
+
<xs:include schemaLocation="shared.xsd"/>
|
4
5
|
<xs:element name="GROUP">
|
5
6
|
<xs:complexType>
|
6
7
|
<xs:sequence>
|
@@ -21,120 +22,22 @@
|
|
21
22
|
</xs:sequence>
|
22
23
|
</xs:complexType>
|
23
24
|
</xs:element>
|
24
|
-
<xs:element name="DATASTORE_QUOTA"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<xs:complexType>
|
29
|
-
<xs:sequence>
|
30
|
-
<xs:element name="ID" type="xs:string"/>
|
31
|
-
<xs:element name="IMAGES" type="xs:string"/>
|
32
|
-
<xs:element name="IMAGES_USED" type="xs:string"/>
|
33
|
-
<xs:element name="SIZE" type="xs:string"/>
|
34
|
-
<xs:element name="SIZE_USED" type="xs:string"/>
|
35
|
-
</xs:sequence>
|
36
|
-
</xs:complexType>
|
37
|
-
</xs:element>
|
38
|
-
</xs:sequence>
|
39
|
-
</xs:complexType>
|
40
|
-
</xs:element>
|
41
|
-
<xs:element name="NETWORK_QUOTA" minOccurs="0" maxOccurs="1">
|
42
|
-
<xs:complexType>
|
43
|
-
<xs:sequence>
|
44
|
-
<xs:element name="NETWORK" minOccurs="0" maxOccurs="unbounded">
|
45
|
-
<xs:complexType>
|
46
|
-
<xs:sequence>
|
47
|
-
<xs:element name="ID" type="xs:string"/>
|
48
|
-
<xs:element name="LEASES" type="xs:string"/>
|
49
|
-
<xs:element name="LEASES_USED" type="xs:string"/>
|
50
|
-
</xs:sequence>
|
51
|
-
</xs:complexType>
|
52
|
-
</xs:element>
|
53
|
-
</xs:sequence>
|
54
|
-
</xs:complexType>
|
55
|
-
</xs:element>
|
56
|
-
<xs:element name="VM_QUOTA" minOccurs="0" maxOccurs="1">
|
57
|
-
<xs:complexType>
|
58
|
-
<xs:sequence>
|
59
|
-
<xs:element name="VM" minOccurs="0" maxOccurs="1">
|
60
|
-
<xs:complexType>
|
61
|
-
<xs:sequence>
|
62
|
-
<xs:element name="CPU" type="xs:float"/>
|
63
|
-
<xs:element name="CPU_USED" type="xs:float"/>
|
64
|
-
<xs:element name="MEMORY" type="xs:integer"/>
|
65
|
-
<xs:element name="MEMORY_USED" type="xs:integer"/>
|
66
|
-
<xs:element name="RUNNING_CPU" type="xs:float"/>
|
67
|
-
<xs:element name="RUNNING_CPU_USED" type="xs:float"/>
|
68
|
-
<xs:element name="RUNNING_MEMORY" type="xs:integer"/>
|
69
|
-
<xs:element name="RUNNING_MEMORY_USED" type="xs:integer"/>
|
70
|
-
<xs:element name="RUNNING_VMS" type="xs:integer"/>
|
71
|
-
<xs:element name="RUNNING_VMS_USED" type="xs:integer"/>
|
72
|
-
<xs:element name="SYSTEM_DISK_SIZE" type="xs:long"/>
|
73
|
-
<xs:element name="SYSTEM_DISK_SIZE_USED" type="xs:long"/>
|
74
|
-
<xs:element name="VMS" type="xs:integer"/>
|
75
|
-
<xs:element name="VMS_USED" type="xs:integer"/>
|
76
|
-
</xs:sequence>
|
77
|
-
</xs:complexType>
|
78
|
-
</xs:element>
|
79
|
-
</xs:sequence>
|
80
|
-
</xs:complexType>
|
81
|
-
</xs:element>
|
82
|
-
<xs:element name="IMAGE_QUOTA" minOccurs="0" maxOccurs="1">
|
83
|
-
<xs:complexType>
|
84
|
-
<xs:sequence>
|
85
|
-
<xs:element name="IMAGE" minOccurs="0" maxOccurs="unbounded">
|
86
|
-
<xs:complexType>
|
87
|
-
<xs:sequence>
|
88
|
-
<xs:element name="ID" type="xs:string"/>
|
89
|
-
<xs:element name="RVMS" type="xs:string"/>
|
90
|
-
<xs:element name="RVMS_USED" type="xs:string"/>
|
91
|
-
</xs:sequence>
|
92
|
-
</xs:complexType>
|
93
|
-
</xs:element>
|
94
|
-
</xs:sequence>
|
95
|
-
</xs:complexType>
|
96
|
-
</xs:element>
|
25
|
+
<xs:element name="DATASTORE_QUOTA" type="DATASTORE_QUOTA" minOccurs="0"/>
|
26
|
+
<xs:element name="NETWORK_QUOTA" type="NETWORK_QUOTA" minOccurs="0"/>
|
27
|
+
<xs:element name="VM_QUOTA" type="VM_QUOTA" minOccurs="0"/>
|
28
|
+
<xs:element name="IMAGE_QUOTA" type="IMAGE_QUOTA" minOccurs="0"/>
|
97
29
|
<xs:element name="DEFAULT_GROUP_QUOTAS">
|
98
30
|
<xs:complexType>
|
99
31
|
<xs:sequence>
|
100
|
-
<xs:element name="DATASTORE_QUOTA"
|
101
|
-
|
102
|
-
|
103
|
-
<xs:element name="DATASTORE" minOccurs="0" maxOccurs="unbounded">
|
104
|
-
<xs:complexType>
|
105
|
-
<xs:sequence>
|
106
|
-
<xs:element name="ID" type="xs:string"/>
|
107
|
-
<xs:element name="IMAGES" type="xs:string"/>
|
108
|
-
<xs:element name="IMAGES_USED" type="xs:string"/>
|
109
|
-
<xs:element name="SIZE" type="xs:string"/>
|
110
|
-
<xs:element name="SIZE_USED" type="xs:string"/>
|
111
|
-
</xs:sequence>
|
112
|
-
</xs:complexType>
|
113
|
-
</xs:element>
|
114
|
-
</xs:sequence>
|
115
|
-
</xs:complexType>
|
116
|
-
</xs:element>
|
117
|
-
<xs:element name="NETWORK_QUOTA" minOccurs="0" maxOccurs="1">
|
118
|
-
<xs:complexType>
|
119
|
-
<xs:sequence>
|
120
|
-
<xs:element name="NETWORK" minOccurs="0" maxOccurs="unbounded">
|
121
|
-
<xs:complexType>
|
122
|
-
<xs:sequence>
|
123
|
-
<xs:element name="ID" type="xs:string"/>
|
124
|
-
<xs:element name="LEASES" type="xs:string"/>
|
125
|
-
<xs:element name="LEASES_USED" type="xs:string"/>
|
126
|
-
</xs:sequence>
|
127
|
-
</xs:complexType>
|
128
|
-
</xs:element>
|
129
|
-
</xs:sequence>
|
130
|
-
</xs:complexType>
|
131
|
-
</xs:element>
|
132
|
-
<xs:element name="VM_QUOTA" minOccurs="0" maxOccurs="1">
|
32
|
+
<xs:element name="DATASTORE_QUOTA" type="DATASTORE_QUOTA" minOccurs="0"/>
|
33
|
+
<xs:element name="NETWORK_QUOTA" type="NETWORK_QUOTA" minOccurs="0"/>
|
34
|
+
<xs:element name="VM_QUOTA" minOccurs="0">
|
133
35
|
<xs:complexType>
|
134
36
|
<xs:sequence>
|
135
|
-
<xs:element name="VM" minOccurs="0"
|
37
|
+
<xs:element name="VM" minOccurs="0">
|
136
38
|
<xs:complexType>
|
137
39
|
<xs:sequence>
|
40
|
+
<xs:element name="CLUSTER_IDS" type="xs:string" minOccurs="0"/>
|
138
41
|
<xs:element name="CPU" type="xs:float"/>
|
139
42
|
<xs:element name="CPU_USED" type="xs:float"/>
|
140
43
|
<xs:element name="MEMORY" type="xs:integer"/>
|
@@ -155,21 +58,7 @@
|
|
155
58
|
</xs:sequence>
|
156
59
|
</xs:complexType>
|
157
60
|
</xs:element>
|
158
|
-
|
159
|
-
<xs:complexType>
|
160
|
-
<xs:sequence>
|
161
|
-
<xs:element name="IMAGE" minOccurs="0" maxOccurs="unbounded">
|
162
|
-
<xs:complexType>
|
163
|
-
<xs:sequence>
|
164
|
-
<xs:element name="ID" type="xs:string"/>
|
165
|
-
<xs:element name="RVMS" type="xs:string"/>
|
166
|
-
<xs:element name="RVMS_USED" type="xs:string"/>
|
167
|
-
</xs:sequence>
|
168
|
-
</xs:complexType>
|
169
|
-
</xs:element>
|
170
|
-
</xs:sequence>
|
171
|
-
</xs:complexType>
|
172
|
-
</xs:element>
|
61
|
+
<xs:element name="IMAGE_QUOTA" type="IMAGE_QUOTA" minOccurs="0"/>
|
173
62
|
</xs:sequence>
|
174
63
|
</xs:complexType>
|
175
64
|
</xs:element>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
|
3
3
|
targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
|
4
|
+
<xs:include schemaLocation="shared.xsd"/>
|
4
5
|
<xs:element name="GROUP_POOL">
|
5
6
|
<xs:complexType>
|
6
7
|
<xs:sequence maxOccurs="1" minOccurs="1">
|
@@ -32,79 +33,10 @@
|
|
32
33
|
<xs:complexType>
|
33
34
|
<xs:sequence>
|
34
35
|
<xs:element name="ID" type="xs:integer"/>
|
35
|
-
<xs:element name="DATASTORE_QUOTA"
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<xs:complexType>
|
40
|
-
<xs:sequence>
|
41
|
-
<xs:element name="ID" type="xs:string"/>
|
42
|
-
<xs:element name="IMAGES" type="xs:string"/>
|
43
|
-
<xs:element name="IMAGES_USED" type="xs:string"/>
|
44
|
-
<xs:element name="SIZE" type="xs:string"/>
|
45
|
-
<xs:element name="SIZE_USED" type="xs:string"/>
|
46
|
-
</xs:sequence>
|
47
|
-
</xs:complexType>
|
48
|
-
</xs:element>
|
49
|
-
</xs:sequence>
|
50
|
-
</xs:complexType>
|
51
|
-
</xs:element>
|
52
|
-
<xs:element name="NETWORK_QUOTA" minOccurs="0" maxOccurs="1">
|
53
|
-
<xs:complexType>
|
54
|
-
<xs:sequence>
|
55
|
-
<xs:element name="NETWORK" minOccurs="0" maxOccurs="unbounded">
|
56
|
-
<xs:complexType>
|
57
|
-
<xs:sequence>
|
58
|
-
<xs:element name="ID" type="xs:string"/>
|
59
|
-
<xs:element name="LEASES" type="xs:string"/>
|
60
|
-
<xs:element name="LEASES_USED" type="xs:string"/>
|
61
|
-
</xs:sequence>
|
62
|
-
</xs:complexType>
|
63
|
-
</xs:element>
|
64
|
-
</xs:sequence>
|
65
|
-
</xs:complexType>
|
66
|
-
</xs:element>
|
67
|
-
<xs:element name="VM_QUOTA" minOccurs="0" maxOccurs="1">
|
68
|
-
<xs:complexType>
|
69
|
-
<xs:sequence>
|
70
|
-
<xs:element name="VM" minOccurs="0" maxOccurs="1">
|
71
|
-
<xs:complexType>
|
72
|
-
<xs:sequence>
|
73
|
-
<xs:element name="CPU" type="xs:string"/>
|
74
|
-
<xs:element name="CPU_USED" type="xs:string"/>
|
75
|
-
<xs:element name="MEMORY" type="xs:string"/>
|
76
|
-
<xs:element name="MEMORY_USED" type="xs:string"/>
|
77
|
-
<xs:element name="RUNNING_CPU" type="xs:string"/>
|
78
|
-
<xs:element name="RUNNING_CPU_USED" type="xs:string"/>
|
79
|
-
<xs:element name="RUNNING_MEMORY" type="xs:string"/>
|
80
|
-
<xs:element name="RUNNING_MEMORY_USED" type="xs:string"/>
|
81
|
-
<xs:element name="RUNNING_VMS" type="xs:string"/>
|
82
|
-
<xs:element name="RUNNING_VMS_USED" type="xs:string"/>
|
83
|
-
<xs:element name="SYSTEM_DISK_SIZE" type="xs:string"/>
|
84
|
-
<xs:element name="SYSTEM_DISK_SIZE_USED" type="xs:string"/>
|
85
|
-
<xs:element name="VMS" type="xs:string"/>
|
86
|
-
<xs:element name="VMS_USED" type="xs:string"/>
|
87
|
-
</xs:sequence>
|
88
|
-
</xs:complexType>
|
89
|
-
</xs:element>
|
90
|
-
</xs:sequence>
|
91
|
-
</xs:complexType>
|
92
|
-
</xs:element>
|
93
|
-
<xs:element name="IMAGE_QUOTA" minOccurs="0" maxOccurs="1">
|
94
|
-
<xs:complexType>
|
95
|
-
<xs:sequence>
|
96
|
-
<xs:element name="IMAGE" minOccurs="0" maxOccurs="unbounded">
|
97
|
-
<xs:complexType>
|
98
|
-
<xs:sequence>
|
99
|
-
<xs:element name="ID" type="xs:string"/>
|
100
|
-
<xs:element name="RVMS" type="xs:string"/>
|
101
|
-
<xs:element name="RVMS_USED" type="xs:string"/>
|
102
|
-
</xs:sequence>
|
103
|
-
</xs:complexType>
|
104
|
-
</xs:element>
|
105
|
-
</xs:sequence>
|
106
|
-
</xs:complexType>
|
107
|
-
</xs:element>
|
36
|
+
<xs:element name="DATASTORE_QUOTA" type="DATASTORE_QUOTA" minOccurs="0"/>
|
37
|
+
<xs:element name="NETWORK_QUOTA" type="NETWORK_QUOTA" minOccurs="0"/>
|
38
|
+
<xs:element name="VM_QUOTA" type="VM_QUOTA" minOccurs="0"/>
|
39
|
+
<xs:element name="IMAGE_QUOTA" type="IMAGE_QUOTA" minOccurs="0"/>
|
108
40
|
</xs:sequence>
|
109
41
|
</xs:complexType>
|
110
42
|
</xs:element>
|
@@ -112,38 +44,8 @@
|
|
112
44
|
<xs:element name="DEFAULT_GROUP_QUOTAS" minOccurs="1" maxOccurs="1">
|
113
45
|
<xs:complexType>
|
114
46
|
<xs:sequence>
|
115
|
-
<xs:element name="DATASTORE_QUOTA"
|
116
|
-
|
117
|
-
<xs:sequence>
|
118
|
-
<xs:element name="DATASTORE" minOccurs="0" maxOccurs="unbounded">
|
119
|
-
<xs:complexType>
|
120
|
-
<xs:sequence>
|
121
|
-
<xs:element name="ID" type="xs:string"/>
|
122
|
-
<xs:element name="IMAGES" type="xs:string"/>
|
123
|
-
<xs:element name="IMAGES_USED" type="xs:string"/>
|
124
|
-
<xs:element name="SIZE" type="xs:string"/>
|
125
|
-
<xs:element name="SIZE_USED" type="xs:string"/>
|
126
|
-
</xs:sequence>
|
127
|
-
</xs:complexType>
|
128
|
-
</xs:element>
|
129
|
-
</xs:sequence>
|
130
|
-
</xs:complexType>
|
131
|
-
</xs:element>
|
132
|
-
<xs:element name="NETWORK_QUOTA" minOccurs="0" maxOccurs="1">
|
133
|
-
<xs:complexType>
|
134
|
-
<xs:sequence>
|
135
|
-
<xs:element name="NETWORK" minOccurs="0" maxOccurs="unbounded">
|
136
|
-
<xs:complexType>
|
137
|
-
<xs:sequence>
|
138
|
-
<xs:element name="ID" type="xs:string"/>
|
139
|
-
<xs:element name="LEASES" type="xs:string"/>
|
140
|
-
<xs:element name="LEASES_USED" type="xs:string"/>
|
141
|
-
</xs:sequence>
|
142
|
-
</xs:complexType>
|
143
|
-
</xs:element>
|
144
|
-
</xs:sequence>
|
145
|
-
</xs:complexType>
|
146
|
-
</xs:element>
|
47
|
+
<xs:element name="DATASTORE_QUOTA" type="DATASTORE_QUOTA" minOccurs="0"/>
|
48
|
+
<xs:element name="NETWORK_QUOTA" type="NETWORK_QUOTA" minOccurs="0"/>
|
147
49
|
<xs:element name="VM_QUOTA" minOccurs="0" maxOccurs="1">
|
148
50
|
<xs:complexType>
|
149
51
|
<xs:sequence>
|
@@ -170,21 +72,7 @@
|
|
170
72
|
</xs:sequence>
|
171
73
|
</xs:complexType>
|
172
74
|
</xs:element>
|
173
|
-
<xs:element name="IMAGE_QUOTA"
|
174
|
-
<xs:complexType>
|
175
|
-
<xs:sequence>
|
176
|
-
<xs:element name="IMAGE" minOccurs="0" maxOccurs="unbounded">
|
177
|
-
<xs:complexType>
|
178
|
-
<xs:sequence>
|
179
|
-
<xs:element name="ID" type="xs:string"/>
|
180
|
-
<xs:element name="RVMS" type="xs:string"/>
|
181
|
-
<xs:element name="RVMS_USED" type="xs:string"/>
|
182
|
-
</xs:sequence>
|
183
|
-
</xs:complexType>
|
184
|
-
</xs:element>
|
185
|
-
</xs:sequence>
|
186
|
-
</xs:complexType>
|
187
|
-
</xs:element>
|
75
|
+
<xs:element name="IMAGE_QUOTA" type="IMAGE_QUOTA" minOccurs="0"/>
|
188
76
|
</xs:sequence>
|
189
77
|
</xs:complexType>
|
190
78
|
</xs:element>
|