opennebula-cli 6.10.3 → 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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +5 -18
  3. data/bin/oneacl +2 -18
  4. data/bin/onebackupjob +2 -18
  5. data/bin/onecluster +36 -18
  6. data/bin/onedatastore +2 -18
  7. data/bin/oneflow +2 -18
  8. data/bin/oneflow-template +8 -24
  9. data/bin/onegroup +2 -18
  10. data/bin/onehook +2 -18
  11. data/bin/onehost +4 -48
  12. data/bin/oneimage +2 -18
  13. data/bin/oneirb +2 -61
  14. data/bin/onelog +3 -22
  15. data/bin/onemarket +2 -18
  16. data/bin/onemarketapp +2 -30
  17. data/bin/onesecgroup +2 -18
  18. data/bin/oneshowback +2 -18
  19. data/bin/onetemplate +2 -19
  20. data/bin/oneuser +2 -18
  21. data/bin/onevdc +2 -18
  22. data/bin/onevm +2 -18
  23. data/bin/onevmgroup +2 -18
  24. data/bin/onevnet +2 -18
  25. data/bin/onevntemplate +2 -18
  26. data/bin/onevrouter +13 -20
  27. data/bin/onezone +2 -18
  28. data/lib/cli_helper.rb +1 -1
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +10 -2
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onebackupjob_helper.rb +1 -1
  33. data/lib/one_helper/onecluster_helper.rb +49 -1
  34. data/lib/one_helper/onedatastore_helper.rb +1 -1
  35. data/lib/one_helper/oneflow_helper.rb +1 -1
  36. data/lib/one_helper/oneflowtemplate_helper.rb +17 -17
  37. data/lib/one_helper/onegroup_helper.rb +4 -55
  38. data/lib/one_helper/onehook_helper.rb +1 -1
  39. data/lib/one_helper/onehost_helper.rb +25 -86
  40. data/lib/one_helper/oneimage_helper.rb +2 -19
  41. data/lib/one_helper/onemarket_helper.rb +1 -1
  42. data/lib/one_helper/onemarketapp_helper.rb +13 -3
  43. data/lib/one_helper/onequota_helper.rb +35 -8
  44. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  45. data/lib/one_helper/onetemplate_helper.rb +1 -8
  46. data/lib/one_helper/oneuser_helper.rb +41 -75
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +96 -85
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +1 -1
  51. data/lib/one_helper/onevntemplate_helper.rb +1 -1
  52. data/lib/one_helper/onevrouter_helper.rb +1 -1
  53. data/lib/one_helper/onezone_helper.rb +10 -23
  54. data/lib/one_helper.rb +14 -138
  55. data/share/schemas/xsd/acct.xsd +2 -0
  56. data/share/schemas/xsd/cluster.xsd +21 -0
  57. data/share/schemas/xsd/datastore.xsd +1 -13
  58. data/share/schemas/xsd/group.xsd +11 -122
  59. data/share/schemas/xsd/group_pool.xsd +8 -120
  60. data/share/schemas/xsd/host.xsd +19 -21
  61. data/share/schemas/xsd/image.xsd +0 -1
  62. data/share/schemas/xsd/monitoring_data.xsd +0 -8
  63. data/share/schemas/xsd/opennebula_configuration.xsd +23 -1
  64. data/share/schemas/xsd/plan.xsd +29 -0
  65. data/share/schemas/xsd/requirements.xsd +45 -0
  66. data/share/schemas/xsd/scheduler_driver_action.xsd +24 -0
  67. data/share/schemas/xsd/shared.xsd +67 -0
  68. data/share/schemas/xsd/user.xsd +10 -122
  69. data/share/schemas/xsd/user_pool.xsd +8 -120
  70. data/share/schemas/xsd/vm.xsd +37 -28
  71. data/share/schemas/xsd/vm_pool.xsd +0 -12
  72. data/share/schemas/xsd/vm_pool_extended.xsd +12 -0
  73. data/share/schemas/xsd/vmtemplate.xsd +0 -3
  74. data/share/schemas/xsd/vnet.xsd +0 -5
  75. data/share/schemas/xsd/vnet_pool_extended.xsd +12 -0
  76. metadata +11 -9
  77. data/bin/onevcenter +0 -471
  78. data/lib/one_helper/onevcenter_helper.rb +0 -523
data/lib/one_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
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-2024, OpenNebula Project, OpenNebula Systems
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 => Array,
417
+ :format => String,
425
418
  :description => 'Specify the user inputs values when instantiating',
426
- :proc => lambda do |o, options|
427
- # Store user inputs that has been already processed
428
- options[:user_inputs_keys] = []
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
- options[:user_inputs_keys] << user_input_split[0]
435
-
436
- "#{user_input_split[0]}=\"#{user_input_split[1]}\""
437
- end
423
+ options[:user_inputs_keys] = keys
438
424
 
439
- options[:user_inputs] = o.join("\n")
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
  {
@@ -1877,7 +1865,7 @@ Bash symbols must be escaped on STDIN passing'
1877
1865
  context_hash['SSH_PUBLIC_KEY'] = key
1878
1866
  end
1879
1867
  end
1880
-
1868
+
1881
1869
  if options[:net_context]
1882
1870
  context_hash['NETWORK'] = "YES"
1883
1871
  end
@@ -1887,11 +1875,11 @@ Bash symbols must be escaped on STDIN passing'
1887
1875
 
1888
1876
  context_hash['FILES_DS'] = files
1889
1877
  end
1890
-
1878
+
1891
1879
  if options[:init]
1892
1880
  context_hash['INIT_SCRIPTS'] = options[:init].join(" ")
1893
1881
  end
1894
-
1882
+
1895
1883
  if options[:startscript]
1896
1884
  script = nil
1897
1885
  begin
@@ -1914,7 +1902,7 @@ Bash symbols must be escaped on STDIN passing'
1914
1902
  formatted_context << options[:context].map {|l| ' ' << l }.join(",\n") if options[:context]
1915
1903
  if context_hash.any?
1916
1904
  formatted_context << ",\n" if options[:context]
1917
- formatted_context << context_hash.map { |k, v| " #{k}=\"#{v}\"" }.join(",\n")
1905
+ formatted_context << context_hash.map { |k, v| " #{k}=\"#{v}\"" }.join(",\n")
1918
1906
  end
1919
1907
  formatted_context << "\n]\n"
1920
1908
  formatted_context
@@ -1998,23 +1986,12 @@ Bash symbols must be escaped on STDIN passing'
1998
1986
  template<<' ]' << "\n"
1999
1987
  end
2000
1988
 
2001
- template<<"VCENTER_VM_FOLDER=#{options[:vcenter_vm_folder]}\n" if options[:vcenter_vm_folder]
2002
1989
  context_hash = {}
2003
1990
  if !template_obj.nil? && template_obj.has_elements?('TEMPLATE/CONTEXT')
2004
1991
  context_hash = template_obj.to_hash["VMTEMPLATE"]["TEMPLATE"]["CONTEXT"]
2005
1992
  end
2006
1993
  context_str=create_context_str(options, context_hash)
2007
1994
  template<<context_str if context_str
2008
- if options[:userdata] && !template_obj.nil? && template_obj.has_elements?('TEMPLATE/EC2')
2009
- template_obj.add_element(
2010
- 'TEMPLATE/EC2',
2011
- 'USERDATA' => options[:userdata]
2012
- )
2013
-
2014
- template << template_obj.template_like_str(
2015
- 'TEMPLATE', false, 'EC2'
2016
- )
2017
- end
2018
1995
 
2019
1996
  [0, template]
2020
1997
  end
@@ -2110,107 +2087,6 @@ Bash symbols must be escaped on STDIN passing'
2110
2087
  !conflicting_opts.empty?
2111
2088
  end
2112
2089
 
2113
- def self.sunstone_url
2114
- if (one_sunstone = ENV['ONE_SUNSTONE'])
2115
- one_sunstone
2116
- elsif (one_xmlrpc = ENV['ONE_XMLRPC'])
2117
- uri = URI(one_xmlrpc)
2118
- "#{uri.scheme}://#{uri.host}:9869"
2119
- else
2120
- 'http://localhost:9869'
2121
- end
2122
- end
2123
-
2124
- def self.download_resource_sunstone(kind, id, path, _force)
2125
- client = OneHelper.client
2126
- user, password = client.one_auth.split(':', 2)
2127
-
2128
- # Step 1: Build Session to get Cookie
2129
- uri = URI(File.join(sunstone_url, 'login'))
2130
-
2131
- req = Net::HTTP::Post.new(uri)
2132
- req.basic_auth user, password
2133
-
2134
- begin
2135
- res = Net::HTTP.start(uri.hostname, uri.port) do |http|
2136
- http.request(req)
2137
- end
2138
- rescue StandardError
2139
- return OpenNebula::Error.new("Error connecting to '#{uri}'.")
2140
- end
2141
-
2142
- cookie = res.response['set-cookie'].split('; ')[0]
2143
-
2144
- if cookie.nil?
2145
- return OpenNebula::Error.new('Unable to get Cookie. Is OpenNebula running?')
2146
- end
2147
-
2148
- # Step 2: Open '/' to get the csrftoken
2149
- uri = URI(sunstone_url)
2150
-
2151
- req = Net::HTTP::Get.new(uri)
2152
- req['Cookie'] = cookie
2153
-
2154
- begin
2155
- res = Net::HTTP.start(uri.hostname, uri.port) do |http|
2156
- http.request(req)
2157
- end
2158
- rescue StandardError
2159
- return OpenNebula::Error.new("Error connecting to '#{uri}'.")
2160
- end
2161
-
2162
- m = res.body.match(/var csrftoken = '(.*)';/)
2163
- csrftoken = m[1] rescue nil
2164
-
2165
- if csrftoken.nil?
2166
- return OpenNebula::Error.new('Unable to get csrftoken.')
2167
- end
2168
-
2169
- # Step 3: Download resource
2170
- uri = URI(File.join(sunstone_url,
2171
- kind.to_s,
2172
- id.to_s,
2173
- "download?csrftoken=#{csrftoken}"))
2174
-
2175
- req = Net::HTTP::Get.new(uri)
2176
-
2177
- req['Cookie'] = cookie
2178
- req['User-Agent'] = 'OpenNebula CLI'
2179
-
2180
- begin
2181
- File.open(path, 'wb') do |f|
2182
- Net::HTTP.start(uri.hostname, uri.port) do |http|
2183
- http.request(req) do |res|
2184
- res.read_body do |chunk|
2185
- f.write(chunk)
2186
- end
2187
- end
2188
- end
2189
- end
2190
- rescue Errno::EACCES
2191
- return OpenNebula::Error.new('Target file not writable.')
2192
- end
2193
-
2194
- error_message = nil
2195
-
2196
- File.open(path, 'rb') do |f|
2197
- begin
2198
- f.seek(-1024, IO::SEEK_END)
2199
- rescue Errno::EINVAL
2200
- end
2201
-
2202
- tail = f.read
2203
-
2204
- m = tail.match(/@\^_\^@ (.*) @\^_\^@/m)
2205
- error_message = m[1] if m
2206
- end
2207
-
2208
- return unless error_message
2209
-
2210
- File.unlink(path)
2211
- OpenNebula::Error.new("Remote server error: #{error_message}")
2212
- end
2213
-
2214
2090
  def self.level_lock_to_str(str)
2215
2091
  level = str.to_i
2216
2092
  if level == 0
@@ -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
- <xs:element name="TEMPLATE">
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>
@@ -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" minOccurs="0" maxOccurs="1">
25
- <xs:complexType>
26
- <xs:sequence>
27
- <xs:element name="DATASTORE" minOccurs="0" maxOccurs="unbounded">
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" minOccurs="0" maxOccurs="1">
101
- <xs:complexType>
102
- <xs:sequence>
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" maxOccurs="1">
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
- <xs:element name="IMAGE_QUOTA" minOccurs="0" maxOccurs="1">
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" minOccurs="0" maxOccurs="1">
36
- <xs:complexType>
37
- <xs:sequence>
38
- <xs:element name="DATASTORE" minOccurs="0" maxOccurs="unbounded">
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" minOccurs="0" maxOccurs="1">
116
- <xs:complexType>
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" minOccurs="0" maxOccurs="1">
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>