opennebula-cli 6.0.1 → 6.1.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +13 -2
  3. data/bin/oneacl +13 -2
  4. data/bin/onecluster +13 -2
  5. data/bin/onedatastore +13 -2
  6. data/bin/oneflow +115 -11
  7. data/bin/oneflow-template +17 -7
  8. data/bin/onegroup +13 -2
  9. data/bin/onehook +17 -6
  10. data/bin/onehost +13 -2
  11. data/bin/oneimage +19 -8
  12. data/bin/onemarket +33 -2
  13. data/bin/onemarketapp +21 -10
  14. data/bin/onesecgroup +13 -2
  15. data/bin/oneshowback +13 -2
  16. data/bin/onetemplate +28 -8
  17. data/bin/oneuser +13 -2
  18. data/bin/onevcenter +29 -9
  19. data/bin/onevdc +13 -2
  20. data/bin/onevm +141 -36
  21. data/bin/onevmgroup +17 -6
  22. data/bin/onevnet +17 -6
  23. data/bin/onevntemplate +17 -6
  24. data/bin/onevrouter +17 -6
  25. data/bin/onezone +34 -3
  26. data/lib/one_helper/oneacct_helper.rb +5 -1
  27. data/lib/one_helper/onecluster_helper.rb +75 -42
  28. data/lib/one_helper/onemarket_helper.rb +12 -1
  29. data/lib/one_helper/onevcenter_helper.rb +2 -2
  30. data/lib/one_helper/onevm_helper.rb +118 -36
  31. data/lib/one_helper/onevnet_helper.rb +173 -151
  32. data/lib/one_helper/onezone_helper.rb +25 -5
  33. data/lib/one_helper.rb +119 -131
  34. data/share/schemas/xsd/api_info.xsd +2 -2
  35. data/share/schemas/xsd/hook_message_api.xsd +1 -1
  36. data/share/schemas/xsd/hook_message_state.xsd +1 -1
  37. data/share/schemas/xsd/host.xsd +21 -1
  38. data/share/schemas/xsd/marketplace.xsd +1 -0
  39. data/share/schemas/xsd/monitoring_data.xsd +23 -11
  40. data/share/schemas/xsd/opennebula_configuration.xsd +1 -0
  41. data/share/schemas/xsd/showback.xsd +1 -0
  42. data/share/schemas/xsd/vm.xsd +64 -10
  43. data/share/schemas/xsd/vm_pool.xsd +3 -26
  44. data/share/schemas/xsd/vnet.xsd +6 -1
  45. data/share/schemas/xsd/zone.xsd +1 -0
  46. data/share/schemas/xsd/zone_pool.xsd +2 -1
  47. metadata +6 -6
data/lib/one_helper.rb CHANGED
@@ -576,6 +576,7 @@ EOT
576
576
  p_r, p_w = IO.pipe
577
577
 
578
578
  Signal.trap('PIPE', 'SIG_IGN')
579
+ Signal.trap('PIPE', 'EXIT')
579
580
 
580
581
  lpid = fork do
581
582
  $stdin.reopen(p_r)
@@ -615,10 +616,9 @@ EOT
615
616
  page = ""
616
617
 
617
618
  if options[:xml]
618
- pool.each {|e|
619
- elements += 1
620
- page << e.to_xml(true) << "\n"
621
- }
619
+ elements += 1
620
+
621
+ page << pool.to_xml(true)
622
622
  else
623
623
  pname = pool.pool_name
624
624
  ename = pool.element_name
@@ -710,8 +710,8 @@ EOT
710
710
  elements, hash = print_page(pool, options)
711
711
 
712
712
  if options[:ids] && elements
713
- arr = [hash[pool.pool_name][pool.element_name]].flatten
714
- arr.reject! do |element|
713
+ hash = [hash[pool.pool_name][pool.element_name]].flatten
714
+ hash.reject! do |element|
715
715
  !options[:ids].include?(element['ID'].to_i)
716
716
  end
717
717
  end
@@ -899,6 +899,9 @@ EOT
899
899
 
900
900
 
901
901
  def list_pool(options, top=false, filter_flag=nil)
902
+ # Capture Broken pipe
903
+ Signal.trap('PIPE', 'EXIT')
904
+
902
905
  table = format_pool(options)
903
906
 
904
907
  if options[:describe]
@@ -920,15 +923,11 @@ EOT
920
923
  elsif options[:json]
921
924
  list_pool_format(pool, options, filter_flag) do |pool|
922
925
  hash = check_resource_xsd(pool, pname)
923
- hash[pname] = check_resource_xsd(hash[pname], ename)
924
-
925
926
  puts ::JSON.pretty_generate(hash)
926
927
  end
927
928
  elsif options[:yaml]
928
929
  list_pool_format(pool, options, filter_flag) do |pool|
929
930
  hash = check_resource_xsd(pool, pname)
930
- hash[pname] = check_resource_xsd(hash[pname], ename)
931
-
932
931
  puts hash.to_yaml(:indent => 4)
933
932
  end
934
933
  else
@@ -936,6 +935,9 @@ EOT
936
935
  end
937
936
 
938
937
  return 0
938
+ rescue SystemExit, Interrupt
939
+ # Rescue ctrl + c when paginated
940
+ 0
939
941
  end
940
942
 
941
943
  # Check if a resource defined by attributes is referenced in pool
@@ -1223,11 +1225,41 @@ EOT
1223
1225
 
1224
1226
  return hash unless xsd
1225
1227
 
1226
- hash[ename] = check_xsd(hash[ename], nil, ename, xsd)
1228
+ if xsd.keys.include?('complexType')
1229
+ xsd = xsd['complexType']['sequence']['element']
1230
+ else
1231
+ xsd = xsd['element']
1232
+ end
1233
+
1234
+ xsd = [ xsd ] unless xsd.is_a? Array
1235
+
1236
+ check_xsd(hash[ename], xsd)
1227
1237
 
1228
1238
  hash
1229
1239
  end
1230
1240
 
1241
+
1242
+ # Replaces refs in xsd definition
1243
+ # limited func: only traverse hashes (not arrays), but works well for pools
1244
+ #
1245
+ # @param h [Hash] XSD in hash format
1246
+ #
1247
+ # @return [Object] XSD but where ref were, there inner XSD is loaded
1248
+ def replace_refs(h)
1249
+ return h unless h.is_a? Hash
1250
+
1251
+ if h.keys.include? 'ref'
1252
+ ref_xsd = read_xsd(h['ref'])
1253
+ return ref_xsd unless ref_xsd.nil?
1254
+ return h
1255
+ else
1256
+ h.each do |k,v|
1257
+ h[k] = replace_refs(v)
1258
+ end
1259
+ end
1260
+ end
1261
+
1262
+
1231
1263
  # Read XSD file and parse to XML
1232
1264
  #
1233
1265
  # @param ename [String] Element name to read XSD
@@ -1250,141 +1282,95 @@ EOT
1250
1282
  end
1251
1283
 
1252
1284
  hash = Hash.from_xml(Nokogiri::XML(File.read(file)).to_s)
1285
+
1253
1286
  hash = hash['schema']['element']
1254
1287
 
1255
- if hash.keys.include?('complexType')
1256
- hash['complexType']['sequence']['element']
1257
- else
1258
- hash['element']
1259
- end
1288
+ hash = replace_refs(hash)
1289
+
1290
+ hash
1260
1291
  end
1261
1292
 
1262
- # Check values XSD
1293
+ # Decides if given xsd definiton should be array in xml
1294
+ # Must be hash and contain either 'maxOccurs' => unbounded'
1295
+ # or 'maxOccurs' => >1
1263
1296
  #
1264
- # @param hash [Object] Resource information in hash format
1265
- # @param elements [Array] Keys to check
1266
- # @param ename [String] Element name to take XSD
1267
- # @param xsd [Hash] XSD file content
1268
- # @param parents [Array] Parent keys of current hash
1269
- def check_xsd(hash, elements, ename, xsd, parents = [])
1270
- return unless hash
1271
-
1272
- if (hash.is_a? Hash) && !hash.empty?
1273
- hash.map do |ki, vi|
1274
- vi = [vi].flatten if is_array?(xsd, [ki])
1275
-
1276
- if (vi.is_a? Hash) && !vi.empty?
1277
- parents << ki
1278
-
1279
- vi.map do |kj, vj|
1280
- parents << kj
1281
-
1282
- path = (parents + [ki, kj]).uniq
1283
- vj = [vj].flatten if is_array?(xsd, path)
1284
-
1285
- hash[ki][kj] = check_xsd(vj,
1286
- [ki, kj],
1287
- ename,
1288
- xsd,
1289
- parents)
1290
- end
1291
-
1292
- parents.clear
1293
- elsif vi.is_a? Array
1294
- hash[ki] = check_xsd(vi, [ki], ename, xsd, parents)
1295
- else
1296
- hash[ki] = check_xsd(vi, [ki], ename, xsd, parents)
1297
- end
1298
- end
1299
-
1300
- hash
1301
- elsif hash.is_a? Array
1302
- ret = []
1303
-
1304
- hash.each do |v|
1305
- ret << check_xsd(v, elements, ename, xsd, parents)
1306
- end
1307
-
1308
- ret
1309
- else
1310
- check_type(hash) do
1311
- type = get_xsd_path(xsd, elements)
1312
- type['type'] unless type.nil?
1313
- end
1314
- end
1297
+ # @param e [Hash] XSD definition transfomred in hash
1298
+ #
1299
+ # @return [Boolean]
1300
+ #
1301
+ def is_array?(e)
1302
+ return false if e.nil?
1303
+ return false unless e.is_a? Hash
1304
+ e['maxOccurs'] == 'unbounded' || e['maxOccurs'].to_i > 1
1315
1305
  end
1316
1306
 
1317
- # Get xsd path value
1307
+ # Decides if given xsd definiton is complex type sequence
1308
+ # Must be hash and contain nested hash
1309
+ # ['complexType']['sequence']['element']
1318
1310
  #
1319
- # @param xsd [Hash] XSD information
1320
- # @param elements [Array] Path to get
1311
+ # @param [Hash] XSD definition transfomred in hash
1321
1312
  #
1322
- # @return [Hash] Path information
1323
- def get_xsd_path(xsd, elements)
1324
- return unless elements
1325
-
1326
- element = elements.shift
1327
-
1328
- # Return nil, because is an empty complexType
1329
- return unless element
1330
-
1331
- element = [xsd].flatten.find do |v|
1332
- v['name'] == element || v['ref'] == element
1333
- end
1334
-
1335
- # Return nil, because element was not find in XSD
1336
- return unless element
1337
-
1338
- if element.keys.include?('complexType') && !elements.empty?
1339
- if element['complexType']['all']
1340
- element = element['complexType']['all']['element']
1341
- else
1342
- element = element['complexType']['sequence']['element']
1343
- end
1344
-
1345
- get_xsd_path(element, elements)
1346
- else
1347
- element
1348
- end
1313
+ # @return [Boolean]
1314
+ #
1315
+ def xsd_complex_sequence?(x)
1316
+ x['complexType']['sequence']['element'] rescue return false
1317
+ true
1349
1318
  end
1350
1319
 
1351
- # CHeck if current element is an array
1320
+ # Decides if given xsd definiton is complex type all
1321
+ # Must be hash and contain nested hash
1322
+ # ['complexType']['all']['element']
1352
1323
  #
1353
- # @param xsd [Hash] XSD information
1354
- # @param elements [Array] Path to check
1324
+ # @param [Hash] XSD definition transfomred in hash
1355
1325
  #
1356
- # @return [Boolean] True if it's an array, false otherwise
1357
- def is_array?(xsd, elements)
1358
- max = get_xsd_path(xsd, elements)
1359
- max = max['maxOccurs'] if max
1360
-
1361
- max == 'unbounded' || max.to_i > 1
1326
+ # @return [Boolean]
1327
+ #
1328
+ def xsd_complex_all?(x)
1329
+ x['complexType']['all']['element'] rescue return false
1330
+ true
1362
1331
  end
1363
1332
 
1364
- # Check XSD type for especific value
1333
+ # Recursively traverse the OpenNebula resource (in Hash) and it's XSD
1334
+ # Where array is required in XSD, there encapsulate the entry into [ ]
1335
+ # Typically usefull for single disk, snapshots etc.
1365
1336
  #
1366
- # @param value [Object] Value to check
1337
+ # @param hash [Hash] Resource information in hash format
1338
+ # @param xsd [Hash] XSD of the resource, transformed into hash
1367
1339
  #
1368
- # @return [Object] nil if the type is not correct, value otherwise
1369
- def check_type(value)
1370
- type = yield if block_given?
1340
+ def check_xsd(hash, xsd)
1341
+ return unless hash or hash.empty?
1371
1342
 
1372
- # If there is no type, return current value
1373
- return value unless type
1343
+ hash.each do |k, v|
1374
1344
 
1375
- types = %w[string decimal integer boolean date time]
1376
- type = type.split(':')[1]
1345
+ # find the elem definition in xsd array
1346
+ xsd_elem = xsd.select { |e| e['name'] == k }.first unless xsd.nil?
1377
1347
 
1378
- if types.include?(type)
1379
- # If the current type is different, return string
1380
- # because this value doesn't respect the type
1381
- if (value.is_a? Hash) || (value.is_a? Array)
1382
- ''
1383
- else
1384
- value
1348
+ if xsd_complex_sequence?(xsd_elem) || xsd_complex_all?(xsd_elem)
1349
+
1350
+ # go deeper in xsd, xsd is ehter complex sequence or all
1351
+ begin
1352
+ inner_xsd = xsd_elem['complexType']['sequence']['element']
1353
+ rescue
1354
+ inner_xsd = xsd_elem['complexType']['all']['element']
1355
+ end
1356
+
1357
+ # recursively traverse resource - hash
1358
+ if v.is_a? Hash
1359
+ hash[k] = check_xsd(v, inner_xsd)
1360
+
1361
+ # recursively traverse resource - array
1362
+ elsif v.is_a? Array
1363
+ hash[k] = []
1364
+ v.each do |e|
1365
+ hash[k] << check_xsd(e, inner_xsd)
1366
+ end
1367
+ end
1368
+ end
1369
+
1370
+ # if XSD requires array, do so in resource if missing
1371
+ if is_array?(xsd_elem) && (! v.is_a? Array)
1372
+ hash[k] = [ v ]
1385
1373
  end
1386
- else
1387
- value
1388
1374
  end
1389
1375
  end
1390
1376
  end
@@ -1893,8 +1879,10 @@ EOT
1893
1879
  if options[:size]
1894
1880
  ar << ', SIZE = ' << options[:size]
1895
1881
  else
1896
- STDERR.puts 'Address range needs to specify size (-s size)'
1897
- exit(-1)
1882
+ unless options[:ip6]
1883
+ STDERR.puts 'Address range needs to specify size (-s size)'
1884
+ exit(-1)
1885
+ end
1898
1886
  end
1899
1887
 
1900
1888
  if options[:ip6]
@@ -2164,10 +2152,10 @@ EOT
2164
2152
  when 'number', 'number-float'
2165
2153
  if type == 'number'
2166
2154
  header += 'Integer: '
2167
- exp = INT_EXP
2155
+ exp = OneTemplateHelper::INT_EXP
2168
2156
  else
2169
2157
  header += 'Float: '
2170
- exp = FLOAT_EXP
2158
+ exp = OneTemplateHelper::FLOAT_EXP
2171
2159
  end
2172
2160
 
2173
2161
  begin
@@ -2193,13 +2181,13 @@ EOT
2193
2181
  end
2194
2182
 
2195
2183
  if type == 'range'
2196
- exp = INT_EXP
2184
+ exp = OneTemplateHelper::INT_EXP
2197
2185
  min = min.to_i
2198
2186
  max = max.to_i
2199
2187
 
2200
2188
  header += "Integer in the range [#{min}..#{max}]: "
2201
2189
  else
2202
- exp = FLOAT_EXP
2190
+ exp = OneTemplateHelper::FLOAT_EXP
2203
2191
  min = min.to_f
2204
2192
  max = max.to_f
2205
2193
 
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- The information sent to the hook when $API is used in an API Hook follos the following schema -->
2
+ <!-- The information sent to the hook when $API is used in an API Hook follow the following schema -->
3
3
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema">
4
4
  <xs:element name="CALL_INFO">
5
5
  <xs:complexType>
@@ -13,7 +13,7 @@
13
13
  <xs:complexType>
14
14
  <xs:sequence>
15
15
  <xs:element name="POSITION" type="xs:integer"/>
16
- <xs:element name="TYPE" type="xs:integer">
16
+ <xs:element name="TYPE" type="xs:string">
17
17
  <xs:simpleType>
18
18
  <xs:restriction base="xs:string">
19
19
  <xs:enumeration value="IN"/>
@@ -6,7 +6,7 @@
6
6
  <xs:sequence>
7
7
  <xs:element name="HOOK_TYPE" type="xs:string" fixed="API"/>
8
8
  <xs:element name="CALL" type="xs:string"/>
9
- <!-- CALL_INFO type is defined in call_info.xsd -->
9
+ <!-- CALL_INFO type is defined in api_info.xsd -->
10
10
  <xs:element ref="CALL_INFO" maxOccurs="unbounded" minOccurs="0"/>
11
11
  </xs:sequence>
12
12
  </xs:complexType>
@@ -16,7 +16,7 @@
16
16
  <xs:element name="STATE" type="xs:string"/>
17
17
  <xs:element name="LCM_STATE" type="xs:string" maxOccurs="1" minOccurs="0"/>
18
18
  <xs:element name="REMOTE_HOST" type="xs:string" maxOccurs="1" minOccurs="0"/>
19
- <!-- The template of the resource (VM or Host) is inlcuded here -->
19
+ <!-- The template of the resource (VM or Host) is included here -->
20
20
  <xs:element ref="HOST" maxOccurs="1" minOccurs="0"/>
21
21
  <xs:element ref="VM" maxOccurs="1" minOccurs="0"/>
22
22
  </xs:sequence>
@@ -53,7 +53,27 @@
53
53
  <xs:element name="PCI_DEVICES">
54
54
  <xs:complexType>
55
55
  <xs:sequence>
56
- <xs:element name="PCI" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
56
+ <xs:element name="PCI" minOccurs="0" maxOccurs="unbounded">
57
+ <xs:complexType>
58
+ <xs:sequence>
59
+ <xs:element name="ADDRESS" type="xs:string"/>
60
+ <xs:element name="BUS" type="xs:string"/>
61
+ <xs:element name="CLASS" type="xs:string"/>
62
+ <xs:element name="CLASS_NAME" type="xs:string"/>
63
+ <xs:element name="DEVICE" type="xs:string"/>
64
+ <xs:element name="DEVICE_NAME" type="xs:string"/>
65
+ <xs:element name="DOMAIN" type="xs:string"/>
66
+ <xs:element name="FUNCTION" type="xs:string"/>
67
+ <xs:element name="NUMA_NODE" type="xs:string"/>
68
+ <xs:element name="SHORT_ADDRESS" type="xs:string"/>
69
+ <xs:element name="SLOT" type="xs:string"/>
70
+ <xs:element name="TYPE" type="xs:string"/>
71
+ <xs:element name="VENDOR" type="xs:string"/>
72
+ <xs:element name="VENDOR_NAME" type="xs:string"/>
73
+ <xs:element name="VMID" type="xs:integer"/>
74
+ </xs:sequence>
75
+ </xs:complexType>
76
+ </xs:element>
57
77
  </xs:sequence>
58
78
  </xs:complexType>
59
79
  </xs:element>
@@ -10,6 +10,7 @@
10
10
  <xs:element name="UNAME" type="xs:string"/>
11
11
  <xs:element name="GNAME" type="xs:string"/>
12
12
  <xs:element name="NAME" type="xs:string"/>
13
+ <xs:element name="STATE" type="xs:integer"/>
13
14
  <xs:element name="MARKET_MAD" type="xs:string"/>
14
15
  <xs:element name="ZONE_ID" type="xs:string"/>
15
16
  <xs:element name="TOTAL_MB" type="xs:integer"/>
@@ -6,17 +6,37 @@
6
6
  <xs:sequence>
7
7
  <xs:element name="MONITORING" minOccurs="0" maxOccurs="unbounded">
8
8
  <xs:complexType>
9
- <xs:all>
9
+ <xs:sequence>
10
+ <!-- Percentage of 1 CPU consumed (two fully consumed cpu is 2.0) -->
10
11
  <xs:element name="CPU" type="xs:decimal" minOccurs="0" maxOccurs="1"/>
12
+ <!-- Amount of bytes read from disk-->
11
13
  <xs:element name="DISKRDBYTES" type="xs:integer" minOccurs="0" maxOccurs="1"/>
14
+ <!-- Number of IO read operations -->
12
15
  <xs:element name="DISKRDIOPS" type="xs:integer" minOccurs="0" maxOccurs="1"/>
16
+ <!-- Amount of bytes written to disk -->
13
17
  <xs:element name="DISKWRBYTES" type="xs:integer" minOccurs="0" maxOccurs="1"/>
18
+ <!-- Number of IO write operations -->
14
19
  <xs:element name="DISKWRIOPS" type="xs:integer" minOccurs="0" maxOccurs="1"/>
20
+ <!-- Disk size details -->
21
+ <xs:element name="DISK_SIZE" minOccurs="0" maxOccurs="unbounded">
22
+ <xs:complexType>
23
+ <xs:sequence>
24
+ <xs:element name="ID" type="xs:integer"/>
25
+ <xs:element name="SIZE" type="xs:integer"/>
26
+ </xs:sequence>
27
+ </xs:complexType>
28
+ </xs:element>
29
+ <!-- ID of the VM -->
15
30
  <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="1"/>
31
+ <!-- Consumption in kilobytes -->
16
32
  <xs:element name="MEMORY" type="xs:integer" minOccurs="0" maxOccurs="1"/>
17
- <xs:element name="NETTX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
33
+ <!-- Received bytes from the network -->
18
34
  <xs:element name="NETRX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
35
+ <!-- Sent bytes to the network -->
36
+ <xs:element name="NETTX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
37
+ <!-- Exact time when monitoring info were retieved -->
19
38
  <xs:element name="TIMESTAMP" type="xs:integer" minOccurs="0" maxOccurs="1"/>
39
+ <!-- vCetner information -->
20
40
  <xs:element name="VCENTER_ESX_HOST" type="xs:string" minOccurs="0" maxOccurs="1"/>
21
41
  <xs:element name="VCENTER_GUEST_STATE" type="xs:string" minOccurs="0" maxOccurs="1"/>
22
42
  <xs:element name="VCENTER_RP_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
@@ -24,15 +44,7 @@
24
44
  <xs:element name="VCENTER_VMWARETOOLS_VERSION" type="xs:string" minOccurs="0" maxOccurs="1"/>
25
45
  <xs:element name="VCENTER_VMWARETOOLS_VERSION_STATUS" type="xs:string" minOccurs="0" maxOccurs="1"/>
26
46
  <xs:element name="VCENTER_VM_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
27
- <xs:element name="DISK_SIZE" minOccurs="0" maxOccurs="unbounded">
28
- <xs:complexType>
29
- <xs:sequence>
30
- <xs:element name="ID" type="xs:integer"/>
31
- <xs:element name="SIZE" type="xs:integer"/>
32
- </xs:sequence>
33
- </xs:complexType>
34
- </xs:element>
35
- </xs:all>
47
+ </xs:sequence>
36
48
  </xs:complexType>
37
49
  </xs:element>
38
50
  </xs:sequence>
@@ -270,6 +270,7 @@
270
270
  <xs:element name="RPC_LOG" type="xs:string" minOccurs="0" maxOccurs="1"/>
271
271
  <xs:element name="SCRIPTS_REMOTE_DIR" type="xs:string" minOccurs="0" maxOccurs="1"/>
272
272
  <xs:element name="SESSION_EXPIRATION_TIME" type="xs:integer" minOccurs="0" maxOccurs="1"/>
273
+ <xs:element name="SHOWBACK_ONLY_RUNNING" type="xs:string" minOccurs="0" maxOccurs="1"/>
273
274
  <xs:element name="TIMEOUT" type="xs:integer" minOccurs="0" maxOccurs="1"/>
274
275
 
275
276
  <xs:element name="TM_MAD" minOccurs="0" maxOccurs="unbounded">
@@ -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>
@@ -50,7 +50,7 @@
50
50
  </xs:element>
51
51
  <xs:element name="MONITORING">
52
52
  <xs:complexType>
53
- <xs:all>
53
+ <xs:sequence>
54
54
  <!-- Percentage of 1 CPU consumed (two fully consumed cpu is 2.0) -->
55
55
  <xs:element name="CPU" type="xs:decimal" minOccurs="0" maxOccurs="1"/>
56
56
  <!-- Amount of bytes read from disk-->
@@ -61,14 +61,23 @@
61
61
  <xs:element name="DISKWRBYTES" type="xs:integer" minOccurs="0" maxOccurs="1"/>
62
62
  <!-- Number of IO write operations -->
63
63
  <xs:element name="DISKWRIOPS" type="xs:integer" minOccurs="0" maxOccurs="1"/>
64
+ <!-- Disk size details -->
65
+ <xs:element name="DISK_SIZE" minOccurs="0" maxOccurs="unbounded">
66
+ <xs:complexType>
67
+ <xs:sequence>
68
+ <xs:element name="ID" type="xs:integer"/>
69
+ <xs:element name="SIZE" type="xs:integer"/>
70
+ </xs:sequence>
71
+ </xs:complexType>
72
+ </xs:element>
64
73
  <!-- ID of the VM -->
65
74
  <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="1"/>
66
75
  <!-- Consumption in kilobytes -->
67
76
  <xs:element name="MEMORY" type="xs:integer" minOccurs="0" maxOccurs="1"/>
68
- <!-- Sent bytes to the network -->
69
- <xs:element name="NETTX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
70
77
  <!-- Received bytes from the network -->
71
78
  <xs:element name="NETRX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
79
+ <!-- Sent bytes to the network -->
80
+ <xs:element name="NETTX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
72
81
  <!-- Exact time when monitoring info were retieved -->
73
82
  <xs:element name="TIMESTAMP" type="xs:integer" minOccurs="0" maxOccurs="1"/>
74
83
  <!-- vCetner information -->
@@ -79,13 +88,19 @@
79
88
  <xs:element name="VCENTER_VMWARETOOLS_VERSION" type="xs:string" minOccurs="0" maxOccurs="1"/>
80
89
  <xs:element name="VCENTER_VMWARETOOLS_VERSION_STATUS" type="xs:string" minOccurs="0" maxOccurs="1"/>
81
90
  <xs:element name="VCENTER_VM_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
82
- </xs:all>
91
+ </xs:sequence>
83
92
  </xs:complexType>
84
93
  </xs:element>
85
94
  <xs:element name="TEMPLATE">
86
95
  <xs:complexType>
87
96
  <xs:sequence>
88
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
97
+ <xs:element name="AUTOMATIC_DS_REQUIREMENTS" type="xs:string" minOccurs="0" maxOccurs="1"/>
98
+ <xs:element name="AUTOMATIC_NIC_REQUIREMENTS" type="xs:string" minOccurs="0" maxOccurs="1"/>
99
+ <xs:element name="AUTOMATIC_REQUIREMENTS" type="xs:string" minOccurs="0" maxOccurs="1"/>
100
+ <xs:element name="CLONING_TEMPLATE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
101
+ <xs:element name="CONTEXT" minOccurs="0" maxOccurs="1"/>
102
+ <xs:element name="CPU" type="xs:string" minOccurs="0" maxOccurs="1"/>
103
+ <xs:element name="CPU_COST" type="xs:string" minOccurs="0" maxOccurs="1"/>
89
104
  <xs:element name="DISK" minOccurs="0" maxOccurs="unbounded">
90
105
  <xs:complexType>
91
106
  <xs:sequence>
@@ -96,12 +111,20 @@
96
111
  </xs:sequence>
97
112
  </xs:complexType>
98
113
  </xs:element>
99
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
114
+ <xs:element name="DISK_COST" type="xs:string" minOccurs="0" maxOccurs="1"/>
115
+ <xs:element name="EMULATOR" type="xs:string" minOccurs="0" maxOccurs="1"/>
116
+ <xs:element name="FEATURES" minOccurs="0" maxOccurs="1"/>
117
+ <xs:element name="HYPERV_OPTIONS" minOccurs="0" maxOccurs="1"/>
118
+ <xs:element name="GRAPHICS" minOccurs="0" maxOccurs="1"/>
119
+ <xs:element name="IMPORTED" type="xs:string" minOccurs="0" maxOccurs="1"/>
120
+ <xs:element name="INPUT" minOccurs="0" maxOccurs="1"/>
121
+ <xs:element name="MEMORY" type="xs:string" minOccurs="0" maxOccurs="1"/>
122
+ <xs:element name="MEMORY_COST" type="xs:string" minOccurs="0" maxOccurs="1"/>
123
+ <xs:element name="MEMORY_MAX" type="xs:string" minOccurs="0" maxOccurs="1"/>
124
+ <xs:element name="MEMORY_SLOTS" type="xs:string" minOccurs="0" maxOccurs="1"/>
100
125
  <xs:element name="NIC" minOccurs="0" maxOccurs="unbounded">
101
126
  <xs:complexType>
102
127
  <xs:sequence>
103
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
104
- <xs:element name="BRIDGE_TYPE" type="xs:string"/>
105
128
  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
106
129
  <xs:element name="VCENTER_INSTANCE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
107
130
  <xs:element name="VCENTER_NET_REF" type="xs:string" minOccurs="0" maxOccurs="1"/>
@@ -109,7 +132,6 @@
109
132
  </xs:sequence>
110
133
  </xs:complexType>
111
134
  </xs:element>
112
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
113
135
  <xs:element name="NIC_ALIAS" minOccurs="0" maxOccurs="unbounded">
114
136
  <xs:complexType>
115
137
  <xs:sequence>
@@ -124,7 +146,39 @@
124
146
  </xs:sequence>
125
147
  </xs:complexType>
126
148
  </xs:element>
127
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
149
+ <xs:element name="NIC_DEFAULT" minOccurs="0" maxOccurs="1"/>
150
+ <xs:element name="NUMA_NODE" minOccurs="0" maxOccurs="1"/>
151
+ <xs:element name="OS" minOccurs="0" maxOccurs="1"/>
152
+ <xs:element name="PCI" minOccurs="0" maxOccurs="1"/>
153
+ <xs:element name="RAW" minOccurs="0" maxOccurs="1"/>
154
+ <xs:element name="SCHED_ACTION" minOccurs="0" maxOccurs="unbounded">
155
+ <xs:complexType>
156
+ <xs:sequence>
157
+ <xs:element name="ACTION" type="xs:string"/>
158
+ <xs:element name="ARGS" type="xs:string" minOccurs="0" maxOccurs="1"/>
159
+ <xs:element name="DAYS" type="xs:string" minOccurs="0" maxOccurs="1"/>
160
+ <xs:element name="END_TYPE" type="xs:string" minOccurs="0" maxOccurs="1"/>
161
+ <xs:element name="END_VALUE" type="xs:string" minOccurs="0" maxOccurs="1"/>
162
+ <xs:element name="ID" type="xs:string"/>
163
+ <xs:element name="REPEAT" type="xs:string" minOccurs="0" maxOccurs="1"/>
164
+ <xs:element name="TIME" type="xs:string"/>
165
+ <xs:element name="WARNING" type="xs:string"/>
166
+ </xs:sequence>
167
+ </xs:complexType>
168
+ </xs:element>
169
+ <xs:element name="SECURITY_GROUP_RULE" minOccurs="0" maxOccurs="unbounded"/>
170
+ <xs:element name="SPICE_OPTIONS" minOccurs="0" maxOccurs="1"/>
171
+ <xs:element name="SUBMIT_ON_HOLD" type="xs:string" minOccurs="0" maxOccurs="1"/>
172
+ <xs:element name="TEMPLATE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
173
+ <xs:element name="TM_MAD_SYSTEM" type="xs:string"/>
174
+ <xs:element name="TOPOLOGY" minOccurs="0" maxOccurs="1"/>
175
+ <xs:element name="VCPU" type="xs:string" minOccurs="0" maxOccurs="1"/>
176
+ <xs:element name="VCPU_MAX" type="xs:string" minOccurs="0" maxOccurs="1"/>
177
+ <xs:element name="VMGROUP" minOccurs="0" maxOccurs="unbounded"/>
178
+ <xs:element name="VMID" type="xs:string"/>
179
+ <xs:element name="VROUTER_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
180
+ <xs:element name="VROUTER_KEEPALIVED_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
181
+ <xs:element name="VROUTER_KEEPALIVED_PASSWORD" type="xs:string" minOccurs="0" maxOccurs="1"/>
128
182
  </xs:sequence>
129
183
  </xs:complexType>
130
184
  </xs:element>