opennebula-cli 6.0.0.2 → 6.1.80.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -499,6 +499,13 @@ class OneZoneHelper < OpenNebulaHelper::OneHelper
499
499
  "onezone.yaml"
500
500
  end
501
501
 
502
+ def self.state_to_str(id)
503
+ id = id.to_i
504
+ state_str = Zone::ZONE_STATES[id]
505
+
506
+ Zone::SHORT_ZONE_STATES[state_str]
507
+ end
508
+
502
509
  def format_pool(options)
503
510
  config_file = self.class.table_conf
504
511
 
@@ -524,7 +531,11 @@ class OneZoneHelper < OpenNebulaHelper::OneHelper
524
531
  helper.get_fed_index(d["TEMPLATE"]['ENDPOINT'])
525
532
  end
526
533
 
527
- default :CURRENT, :ID, :NAME, :ENDPOINT, :FED_INDEX
534
+ column :STAT, 'Zone status', :left, :size => 6 do |d|
535
+ OneZoneHelper.state_to_str(d['STATE'])
536
+ end
537
+
538
+ default :CURRENT, :ID, :NAME, :ENDPOINT, :FED_INDEX, :STAT
528
539
  end
529
540
 
530
541
  table
@@ -591,6 +602,7 @@ class OneZoneHelper < OpenNebulaHelper::OneHelper
591
602
  CLIHelper.print_header(str_h1 % "ZONE #{zone['ID']} INFORMATION")
592
603
  puts str % ["ID", zone.id.to_s]
593
604
  puts str % ["NAME", zone.name]
605
+ puts str % ["STATE",zone.state_str]
594
606
  puts
595
607
 
596
608
  zone_hash=zone.to_hash
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)
@@ -899,6 +900,9 @@ EOT
899
900
 
900
901
 
901
902
  def list_pool(options, top=false, filter_flag=nil)
903
+ # Capture Broken pipe
904
+ Signal.trap('PIPE', 'EXIT')
905
+
902
906
  table = format_pool(options)
903
907
 
904
908
  if options[:describe]
@@ -920,15 +924,11 @@ EOT
920
924
  elsif options[:json]
921
925
  list_pool_format(pool, options, filter_flag) do |pool|
922
926
  hash = check_resource_xsd(pool, pname)
923
- hash[pname] = check_resource_xsd(hash[pname], ename)
924
-
925
927
  puts ::JSON.pretty_generate(hash)
926
928
  end
927
929
  elsif options[:yaml]
928
930
  list_pool_format(pool, options, filter_flag) do |pool|
929
931
  hash = check_resource_xsd(pool, pname)
930
- hash[pname] = check_resource_xsd(hash[pname], ename)
931
-
932
932
  puts hash.to_yaml(:indent => 4)
933
933
  end
934
934
  else
@@ -936,6 +936,9 @@ EOT
936
936
  end
937
937
 
938
938
  return 0
939
+ rescue SystemExit, Interrupt
940
+ # Rescue ctrl + c when paginated
941
+ 0
939
942
  end
940
943
 
941
944
  # Check if a resource defined by attributes is referenced in pool
@@ -1223,11 +1226,41 @@ EOT
1223
1226
 
1224
1227
  return hash unless xsd
1225
1228
 
1226
- hash[ename] = check_xsd(hash[ename], nil, ename, xsd)
1229
+ if xsd.keys.include?('complexType')
1230
+ xsd = xsd['complexType']['sequence']['element']
1231
+ else
1232
+ xsd = xsd['element']
1233
+ end
1234
+
1235
+ xsd = [ xsd ] unless xsd.is_a? Array
1236
+
1237
+ check_xsd(hash[ename], xsd)
1227
1238
 
1228
1239
  hash
1229
1240
  end
1230
1241
 
1242
+
1243
+ # Replaces refs in xsd definition
1244
+ # limited func: only traverse hashes (not arrays), but works well for pools
1245
+ #
1246
+ # @param h [Hash] XSD in hash format
1247
+ #
1248
+ # @return [Object] XSD but where ref were, there inner XSD is loaded
1249
+ def replace_refs(h)
1250
+ return h unless h.is_a? Hash
1251
+
1252
+ if h.keys.include? 'ref'
1253
+ ref_xsd = read_xsd(h['ref'])
1254
+ return ref_xsd unless ref_xsd.nil?
1255
+ return h
1256
+ else
1257
+ h.each do |k,v|
1258
+ h[k] = replace_refs(v)
1259
+ end
1260
+ end
1261
+ end
1262
+
1263
+
1231
1264
  # Read XSD file and parse to XML
1232
1265
  #
1233
1266
  # @param ename [String] Element name to read XSD
@@ -1250,141 +1283,95 @@ EOT
1250
1283
  end
1251
1284
 
1252
1285
  hash = Hash.from_xml(Nokogiri::XML(File.read(file)).to_s)
1286
+
1253
1287
  hash = hash['schema']['element']
1254
1288
 
1255
- if hash.keys.include?('complexType')
1256
- hash['complexType']['sequence']['element']
1257
- else
1258
- hash['element']
1259
- end
1289
+ hash = replace_refs(hash)
1290
+
1291
+ hash
1260
1292
  end
1261
1293
 
1262
- # Check values XSD
1294
+ # Decides if given xsd definiton should be array in xml
1295
+ # Must be hash and contain either 'maxOccurs' => unbounded'
1296
+ # or 'maxOccurs' => >1
1263
1297
  #
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
1298
+ # @param e [Hash] XSD definition transfomred in hash
1299
+ #
1300
+ # @return [Boolean]
1301
+ #
1302
+ def is_array?(e)
1303
+ return false if e.nil?
1304
+ return false unless e.is_a? Hash
1305
+ e['maxOccurs'] == 'unbounded' || e['maxOccurs'].to_i > 1
1315
1306
  end
1316
1307
 
1317
- # Get xsd path value
1308
+ # Decides if given xsd definiton is complex type sequence
1309
+ # Must be hash and contain nested hash
1310
+ # ['complexType']['sequence']['element']
1318
1311
  #
1319
- # @param xsd [Hash] XSD information
1320
- # @param elements [Array] Path to get
1312
+ # @param [Hash] XSD definition transfomred in hash
1321
1313
  #
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
1314
+ # @return [Boolean]
1315
+ #
1316
+ def xsd_complex_sequence?(x)
1317
+ x['complexType']['sequence']['element'] rescue return false
1318
+ true
1349
1319
  end
1350
1320
 
1351
- # CHeck if current element is an array
1321
+ # Decides if given xsd definiton is complex type all
1322
+ # Must be hash and contain nested hash
1323
+ # ['complexType']['all']['element']
1352
1324
  #
1353
- # @param xsd [Hash] XSD information
1354
- # @param elements [Array] Path to check
1325
+ # @param [Hash] XSD definition transfomred in hash
1355
1326
  #
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
1327
+ # @return [Boolean]
1328
+ #
1329
+ def xsd_complex_all?(x)
1330
+ x['complexType']['all']['element'] rescue return false
1331
+ true
1362
1332
  end
1363
1333
 
1364
- # Check XSD type for especific value
1334
+ # Recursively traverse the OpenNebula resource (in Hash) and it's XSD
1335
+ # Where array is required in XSD, there encapsulate the entry into [ ]
1336
+ # Typically usefull for single disk, snapshots etc.
1365
1337
  #
1366
- # @param value [Object] Value to check
1338
+ # @param hash [Hash] Resource information in hash format
1339
+ # @param xsd [Hash] XSD of the resource, transformed into hash
1367
1340
  #
1368
- # @return [Object] nil if the type is not correct, value otherwise
1369
- def check_type(value)
1370
- type = yield if block_given?
1341
+ def check_xsd(hash, xsd)
1342
+ return unless hash or hash.empty?
1371
1343
 
1372
- # If there is no type, return current value
1373
- return value unless type
1344
+ hash.each do |k, v|
1374
1345
 
1375
- types = %w[string decimal integer boolean date time]
1376
- type = type.split(':')[1]
1346
+ # find the elem definition in xsd array
1347
+ xsd_elem = xsd.select { |e| e['name'] == k }.first unless xsd.nil?
1377
1348
 
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
1349
+ if xsd_complex_sequence?(xsd_elem) || xsd_complex_all?(xsd_elem)
1350
+
1351
+ # go deeper in xsd, xsd is ehter complex sequence or all
1352
+ begin
1353
+ inner_xsd = xsd_elem['complexType']['sequence']['element']
1354
+ rescue
1355
+ inner_xsd = xsd_elem['complexType']['all']['element']
1356
+ end
1357
+
1358
+ # recursively traverse resource - hash
1359
+ if v.is_a? Hash
1360
+ hash[k] = check_xsd(v, inner_xsd)
1361
+
1362
+ # recursively traverse resource - array
1363
+ elsif v.is_a? Array
1364
+ hash[k] = []
1365
+ v.each do |e|
1366
+ hash[k] << check_xsd(e, inner_xsd)
1367
+ end
1368
+ end
1369
+ end
1370
+
1371
+ # if XSD requires array, do so in resource if missing
1372
+ if is_array?(xsd_elem) && (! v.is_a? Array)
1373
+ hash[k] = [ v ]
1385
1374
  end
1386
- else
1387
- value
1388
1375
  end
1389
1376
  end
1390
1377
  end
@@ -1893,8 +1880,10 @@ EOT
1893
1880
  if options[:size]
1894
1881
  ar << ', SIZE = ' << options[:size]
1895
1882
  else
1896
- STDERR.puts 'Address range needs to specify size (-s size)'
1897
- exit(-1)
1883
+ unless options[:ip6]
1884
+ STDERR.puts 'Address range needs to specify size (-s size)'
1885
+ exit(-1)
1886
+ end
1898
1887
  end
1899
1888
 
1900
1889
  if options[:ip6]
@@ -2164,10 +2153,10 @@ EOT
2164
2153
  when 'number', 'number-float'
2165
2154
  if type == 'number'
2166
2155
  header += 'Integer: '
2167
- exp = INT_EXP
2156
+ exp = OneTemplateHelper::INT_EXP
2168
2157
  else
2169
2158
  header += 'Float: '
2170
- exp = FLOAT_EXP
2159
+ exp = OneTemplateHelper::FLOAT_EXP
2171
2160
  end
2172
2161
 
2173
2162
  begin
@@ -2193,13 +2182,13 @@ EOT
2193
2182
  end
2194
2183
 
2195
2184
  if type == 'range'
2196
- exp = INT_EXP
2185
+ exp = OneTemplateHelper::INT_EXP
2197
2186
  min = min.to_i
2198
2187
  max = max.to_i
2199
2188
 
2200
2189
  header += "Integer in the range [#{min}..#{max}]: "
2201
2190
  else
2202
- exp = FLOAT_EXP
2191
+ exp = OneTemplateHelper::FLOAT_EXP
2203
2192
  min = min.to_f
2204
2193
  max = max.to_f
2205
2194
 
@@ -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>
@@ -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>