opennebula-cli 6.10.4 → 6.99.90.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 +2 -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 +2 -18
- data/bin/onevmgroup +2 -18
- data/bin/onevnet +2 -18
- data/bin/onevntemplate +2 -18
- data/bin/onevrouter +2 -18
- 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 +1 -1
- 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 +16 -16
- 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 +25 -86
- data/lib/one_helper/oneimage_helper.rb +9 -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 +96 -85
- 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 +6 -125
- 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 +1 -1
- data/share/schemas/xsd/monitoring_data.xsd +0 -8
- data/share/schemas/xsd/opennebula_configuration.xsd +24 -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,13 +411,6 @@ 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',
|
@@ -1872,7 +1865,7 @@ Bash symbols must be escaped on STDIN passing'
|
|
1872
1865
|
context_hash['SSH_PUBLIC_KEY'] = key
|
1873
1866
|
end
|
1874
1867
|
end
|
1875
|
-
|
1868
|
+
|
1876
1869
|
if options[:net_context]
|
1877
1870
|
context_hash['NETWORK'] = "YES"
|
1878
1871
|
end
|
@@ -1882,11 +1875,11 @@ Bash symbols must be escaped on STDIN passing'
|
|
1882
1875
|
|
1883
1876
|
context_hash['FILES_DS'] = files
|
1884
1877
|
end
|
1885
|
-
|
1878
|
+
|
1886
1879
|
if options[:init]
|
1887
1880
|
context_hash['INIT_SCRIPTS'] = options[:init].join(" ")
|
1888
1881
|
end
|
1889
|
-
|
1882
|
+
|
1890
1883
|
if options[:startscript]
|
1891
1884
|
script = nil
|
1892
1885
|
begin
|
@@ -1909,7 +1902,7 @@ Bash symbols must be escaped on STDIN passing'
|
|
1909
1902
|
formatted_context << options[:context].map {|l| ' ' << l }.join(",\n") if options[:context]
|
1910
1903
|
if context_hash.any?
|
1911
1904
|
formatted_context << ",\n" if options[:context]
|
1912
|
-
formatted_context << context_hash.map { |k, v| " #{k}=\"#{v}\"" }.join(",\n")
|
1905
|
+
formatted_context << context_hash.map { |k, v| " #{k}=\"#{v}\"" }.join(",\n")
|
1913
1906
|
end
|
1914
1907
|
formatted_context << "\n]\n"
|
1915
1908
|
formatted_context
|
@@ -1993,23 +1986,12 @@ Bash symbols must be escaped on STDIN passing'
|
|
1993
1986
|
template<<' ]' << "\n"
|
1994
1987
|
end
|
1995
1988
|
|
1996
|
-
template<<"VCENTER_VM_FOLDER=#{options[:vcenter_vm_folder]}\n" if options[:vcenter_vm_folder]
|
1997
1989
|
context_hash = {}
|
1998
1990
|
if !template_obj.nil? && template_obj.has_elements?('TEMPLATE/CONTEXT')
|
1999
1991
|
context_hash = template_obj.to_hash["VMTEMPLATE"]["TEMPLATE"]["CONTEXT"]
|
2000
1992
|
end
|
2001
1993
|
context_str=create_context_str(options, context_hash)
|
2002
1994
|
template<<context_str if context_str
|
2003
|
-
if options[:userdata] && !template_obj.nil? && template_obj.has_elements?('TEMPLATE/EC2')
|
2004
|
-
template_obj.add_element(
|
2005
|
-
'TEMPLATE/EC2',
|
2006
|
-
'USERDATA' => options[:userdata]
|
2007
|
-
)
|
2008
|
-
|
2009
|
-
template << template_obj.template_like_str(
|
2010
|
-
'TEMPLATE', false, 'EC2'
|
2011
|
-
)
|
2012
|
-
end
|
2013
1995
|
|
2014
1996
|
[0, template]
|
2015
1997
|
end
|
@@ -2105,107 +2087,6 @@ Bash symbols must be escaped on STDIN passing'
|
|
2105
2087
|
!conflicting_opts.empty?
|
2106
2088
|
end
|
2107
2089
|
|
2108
|
-
def self.sunstone_url
|
2109
|
-
if (one_sunstone = ENV['ONE_SUNSTONE'])
|
2110
|
-
one_sunstone
|
2111
|
-
elsif (one_xmlrpc = ENV['ONE_XMLRPC'])
|
2112
|
-
uri = URI(one_xmlrpc)
|
2113
|
-
"#{uri.scheme}://#{uri.host}:9869"
|
2114
|
-
else
|
2115
|
-
'http://localhost:9869'
|
2116
|
-
end
|
2117
|
-
end
|
2118
|
-
|
2119
|
-
def self.download_resource_sunstone(kind, id, path, _force)
|
2120
|
-
client = OneHelper.client
|
2121
|
-
user, password = client.one_auth.split(':', 2)
|
2122
|
-
|
2123
|
-
# Step 1: Build Session to get Cookie
|
2124
|
-
uri = URI(File.join(sunstone_url, 'login'))
|
2125
|
-
|
2126
|
-
req = Net::HTTP::Post.new(uri)
|
2127
|
-
req.basic_auth user, password
|
2128
|
-
|
2129
|
-
begin
|
2130
|
-
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2131
|
-
http.request(req)
|
2132
|
-
end
|
2133
|
-
rescue StandardError
|
2134
|
-
return OpenNebula::Error.new("Error connecting to '#{uri}'.")
|
2135
|
-
end
|
2136
|
-
|
2137
|
-
cookie = res.response['set-cookie'].split('; ')[0]
|
2138
|
-
|
2139
|
-
if cookie.nil?
|
2140
|
-
return OpenNebula::Error.new('Unable to get Cookie. Is OpenNebula running?')
|
2141
|
-
end
|
2142
|
-
|
2143
|
-
# Step 2: Open '/' to get the csrftoken
|
2144
|
-
uri = URI(sunstone_url)
|
2145
|
-
|
2146
|
-
req = Net::HTTP::Get.new(uri)
|
2147
|
-
req['Cookie'] = cookie
|
2148
|
-
|
2149
|
-
begin
|
2150
|
-
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2151
|
-
http.request(req)
|
2152
|
-
end
|
2153
|
-
rescue StandardError
|
2154
|
-
return OpenNebula::Error.new("Error connecting to '#{uri}'.")
|
2155
|
-
end
|
2156
|
-
|
2157
|
-
m = res.body.match(/var csrftoken = '(.*)';/)
|
2158
|
-
csrftoken = m[1] rescue nil
|
2159
|
-
|
2160
|
-
if csrftoken.nil?
|
2161
|
-
return OpenNebula::Error.new('Unable to get csrftoken.')
|
2162
|
-
end
|
2163
|
-
|
2164
|
-
# Step 3: Download resource
|
2165
|
-
uri = URI(File.join(sunstone_url,
|
2166
|
-
kind.to_s,
|
2167
|
-
id.to_s,
|
2168
|
-
"download?csrftoken=#{csrftoken}"))
|
2169
|
-
|
2170
|
-
req = Net::HTTP::Get.new(uri)
|
2171
|
-
|
2172
|
-
req['Cookie'] = cookie
|
2173
|
-
req['User-Agent'] = 'OpenNebula CLI'
|
2174
|
-
|
2175
|
-
begin
|
2176
|
-
File.open(path, 'wb') do |f|
|
2177
|
-
Net::HTTP.start(uri.hostname, uri.port) do |http|
|
2178
|
-
http.request(req) do |res|
|
2179
|
-
res.read_body do |chunk|
|
2180
|
-
f.write(chunk)
|
2181
|
-
end
|
2182
|
-
end
|
2183
|
-
end
|
2184
|
-
end
|
2185
|
-
rescue Errno::EACCES
|
2186
|
-
return OpenNebula::Error.new('Target file not writable.')
|
2187
|
-
end
|
2188
|
-
|
2189
|
-
error_message = nil
|
2190
|
-
|
2191
|
-
File.open(path, 'rb') do |f|
|
2192
|
-
begin
|
2193
|
-
f.seek(-1024, IO::SEEK_END)
|
2194
|
-
rescue Errno::EINVAL
|
2195
|
-
end
|
2196
|
-
|
2197
|
-
tail = f.read
|
2198
|
-
|
2199
|
-
m = tail.match(/@\^_\^@ (.*) @\^_\^@/m)
|
2200
|
-
error_message = m[1] if m
|
2201
|
-
end
|
2202
|
-
|
2203
|
-
return unless error_message
|
2204
|
-
|
2205
|
-
File.unlink(path)
|
2206
|
-
OpenNebula::Error.new("Remote server error: #{error_message}")
|
2207
|
-
end
|
2208
|
-
|
2209
2090
|
def self.level_lock_to_str(str)
|
2210
2091
|
level = str.to_i
|
2211
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>
|
data/share/schemas/xsd/host.xsd
CHANGED
@@ -143,23 +143,7 @@
|
|
143
143
|
</xs:sequence>
|
144
144
|
</xs:complexType>
|
145
145
|
</xs:element>
|
146
|
-
|
147
|
-
<xs:complexType>
|
148
|
-
<xs:sequence>
|
149
|
-
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
|
150
|
-
<xs:element name="VCENTER_CCR_REF" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
151
|
-
<xs:element name="VCENTER_DS_REF" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
152
|
-
<xs:element name="VCENTER_HOST" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
153
|
-
<xs:element name="VCENTER_INSTANCE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
154
|
-
<xs:element name="VCENTER_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
155
|
-
<xs:element name="VCENTER_PASSWORD" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
156
|
-
<xs:element name="VCENTER_RESOURCE_POOL_INFO" minOccurs="0" maxOccurs="unbounded"/>
|
157
|
-
<xs:element name="VCENTER_USER" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
158
|
-
<xs:element name="VCENTER_VERSION" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
159
|
-
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
|
160
|
-
</xs:sequence>
|
161
|
-
</xs:complexType>
|
162
|
-
</xs:element>
|
146
|
+
<xs:element name="TEMPLATE"/>
|
163
147
|
<xs:element name="MONITORING">
|
164
148
|
<xs:complexType>
|
165
149
|
<xs:sequence>
|
@@ -168,13 +152,21 @@
|
|
168
152
|
<xs:element name="CAPACITY" minOccurs="0">
|
169
153
|
<xs:complexType>
|
170
154
|
<xs:sequence>
|
171
|
-
<xs:element name="FREE_CPU" type="xs:integer"/>
|
155
|
+
<xs:element name="FREE_CPU" type="xs:integer" minOccurs="0"/>
|
156
|
+
<xs:element name="FREE_CPU_FORECAST" type="xs:decimal" minOccurs="0"/>
|
157
|
+
<xs:element name="FREE_CPU_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
172
158
|
<!-- ^^ Percentage, Free CPU as returned by the probes -->
|
173
|
-
<xs:element name="FREE_MEMORY" type="xs:integer"/>
|
159
|
+
<xs:element name="FREE_MEMORY" type="xs:integer" minOccurs="0"/>
|
160
|
+
<xs:element name="FREE_MEMORY_FORECAST" type="xs:decimal" minOccurs="0"/>
|
161
|
+
<xs:element name="FREE_MEMORY_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
174
162
|
<!-- ^^ KB, Free MEMORY returned by the probes -->
|
175
|
-
<xs:element name="USED_CPU" type="xs:integer"/>
|
163
|
+
<xs:element name="USED_CPU" type="xs:integer" minOccurs="0"/>
|
164
|
+
<xs:element name="USED_CPU_FORECAST" type="xs:decimal" minOccurs="0"/>
|
165
|
+
<xs:element name="USED_CPU_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
176
166
|
<!-- ^^ Percentage of CPU used by all host processes (including VMs) over a total of # cores * 100 -->
|
177
|
-
<xs:element name="USED_MEMORY" type="xs:integer"/>
|
167
|
+
<xs:element name="USED_MEMORY" type="xs:integer" minOccurs="0"/>
|
168
|
+
<xs:element name="USED_MEMORY_FORECAST" type="xs:decimal" minOccurs="0"/>
|
169
|
+
<xs:element name="USED_MEMORY_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
178
170
|
<!-- ^^ KB, Memory used by all host processes (including VMs) over a total of MAX_MEM -->
|
179
171
|
</xs:sequence>
|
180
172
|
</xs:complexType>
|
@@ -183,7 +175,13 @@
|
|
183
175
|
<xs:complexType>
|
184
176
|
<xs:sequence>
|
185
177
|
<xs:element name="NETRX" type="xs:integer" minOccurs="0"/>
|
178
|
+
<xs:element name="NETRX_BW" type="xs:decimal" minOccurs="0"/>
|
179
|
+
<xs:element name="NETRX_BW_FORECAST" type="xs:decimal" minOccurs="0"/>
|
180
|
+
<xs:element name="NETRX_BW_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
186
181
|
<xs:element name="NETTX" type="xs:integer" minOccurs="0"/>
|
182
|
+
<xs:element name="NETTX_BW" type="xs:decimal" minOccurs="0"/>
|
183
|
+
<xs:element name="NETTX_BW_FORECAST" type="xs:decimal" minOccurs="0"/>
|
184
|
+
<xs:element name="NETTX_BW_FORECAST_FAR" type="xs:decimal" minOccurs="0"/>
|
187
185
|
</xs:sequence>
|
188
186
|
</xs:complexType>
|
189
187
|
</xs:element>
|
data/share/schemas/xsd/image.xsd
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
<xs:element name="DISK_TYPE" type="xs:integer"/>
|
40
40
|
<xs:element name="PERSISTENT" type="xs:integer"/>
|
41
41
|
<xs:element name="REGTIME" type="xs:integer"/>
|
42
|
+
<xs:element name="MODTIME" type="xs:integer"/>
|
42
43
|
<xs:element name="SOURCE" type="xs:string"/>
|
43
44
|
<xs:element name="PATH" type="xs:string"/>
|
44
45
|
<xs:element name="FORMAT" type="xs:string"/>
|
@@ -73,7 +74,6 @@
|
|
73
74
|
<xs:complexType>
|
74
75
|
<xs:sequence>
|
75
76
|
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
|
76
|
-
<xs:element name="VCENTER_IMPORTED" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
77
77
|
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
|
78
78
|
</xs:sequence>
|
79
79
|
</xs:complexType>
|