ovirt-engine-sdk 4.1.0.alpha2 → 4.1.0.alpha3
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/CHANGES.adoc +13 -1
- data/lib/ovirtsdk4/connection.rb +29 -4
- data/lib/ovirtsdk4/readers.rb +74 -0
- data/lib/ovirtsdk4/services.rb +81 -6
- data/lib/ovirtsdk4/types.rb +231 -0
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writers.rb +34 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbf161873ec7fa66757455c270b09c3c7ff16fa6
|
4
|
+
data.tar.gz: 8db4551dfbdc89280fdf1f5ba1c5f41df89eed51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df0adf18550076ebdf65e40c6810223f8864022fed0b2fa30bec62210444f4ea298e9b00cb383ad194b10076757213b910717a6d9df2fa668c0dc643adae0bc0
|
7
|
+
data.tar.gz: 2f0f413601dfc18cf729fee135d80f47fda0284093195d734e250b7512efbbfde7a8d65712483c42a59f7ba4ba975c3ddff2166959859627b0be522d616def60
|
data/CHANGES.adoc
CHANGED
@@ -2,9 +2,21 @@
|
|
2
2
|
|
3
3
|
This document describes the relevant changes between releases of the SDK.
|
4
4
|
|
5
|
+
== 4.1.0-alpha3 / Jan 27 2017
|
6
|
+
|
7
|
+
Update to model 4.1.29:
|
8
|
+
|
9
|
+
* Add `execution_host` link to the `Step` type.
|
10
|
+
|
11
|
+
* Add new `lease` attribute to virtual machines and templates.
|
12
|
+
|
13
|
+
New features:
|
14
|
+
|
15
|
+
* Accept CA files and strings.
|
16
|
+
|
5
17
|
== 4.1.0-alpha2 / Jan 12 2017
|
6
18
|
|
7
|
-
Update to model 4.1.
|
19
|
+
Update to model 4.1.26:
|
8
20
|
|
9
21
|
* Add `succeeded` parameter to the operation that end an external job.
|
10
22
|
|
data/lib/ovirtsdk4/connection.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2015-
|
2
|
+
# Copyright (c) 2015-2017 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -15,6 +15,7 @@
|
|
15
15
|
#
|
16
16
|
|
17
17
|
require 'json'
|
18
|
+
require 'tempfile'
|
18
19
|
require 'uri'
|
19
20
|
|
20
21
|
module OvirtSDK4
|
@@ -54,8 +55,14 @@ module OvirtSDK4
|
|
54
55
|
# name should be checked.
|
55
56
|
#
|
56
57
|
# @option opts [String] :ca_file The name of a PEM file containing the trusted CA certificates. The certificate
|
57
|
-
# presented by the server will be verified using these CA certificates. If
|
58
|
-
# certificates store is used.
|
58
|
+
# presented by the server will be verified using these CA certificates. If neither this nor the `ca_certs`
|
59
|
+
# options are provided, then the system wide CA certificates store is used. If both options are provided,
|
60
|
+
# then the certificates from both options will be trusted.
|
61
|
+
#
|
62
|
+
# @option opts [Array<String>] :ca_certs An array of strings containing the trusted CA certificates, in PEM
|
63
|
+
# format. The certificate presented by the server will be verified using these CA certificates. If neither this
|
64
|
+
# nor the `ca_file` options are provided, then the system wide CA certificates store is used. If both options
|
65
|
+
# are provided, then the certificates from both options will be trusted.
|
59
66
|
#
|
60
67
|
# @option opts [Boolean] :debug (false) A boolean flag indicating if debug output should be generated. If the
|
61
68
|
# values is `true` and the `log` parameter isn't `nil` then the data sent to and received from the server will be
|
@@ -93,6 +100,7 @@ module OvirtSDK4
|
|
93
100
|
@token = opts[:token]
|
94
101
|
@insecure = opts[:insecure] || false
|
95
102
|
@ca_file = opts[:ca_file]
|
103
|
+
@ca_certs = opts[:ca_certs]
|
96
104
|
@debug = opts[:debug] || false
|
97
105
|
@log = opts[:log]
|
98
106
|
@kerberos = opts[:kerberos] || false
|
@@ -106,10 +114,24 @@ module OvirtSDK4
|
|
106
114
|
# libcurl is also compressed, and that isn't useful for debugging:
|
107
115
|
@compress = false if @debug
|
108
116
|
|
117
|
+
# Create a temporary file to store the CA certificates, and populate it with the contents of the 'ca_file' and
|
118
|
+
# 'ca_certs' options. The file will be removed when the connection is closed.
|
119
|
+
@ca_store = nil
|
120
|
+
if @ca_file || @ca_certs
|
121
|
+
@ca_store = Tempfile.new('ca_store')
|
122
|
+
@ca_store.write(::File.read(@ca_file)) if @ca_file
|
123
|
+
if @ca_certs
|
124
|
+
@ca_certs.each do |ca_cert|
|
125
|
+
@ca_store.write(ca_cert)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
@ca_store.close
|
129
|
+
end
|
130
|
+
|
109
131
|
# Create the HTTP client:
|
110
132
|
@client = HttpClient.new(
|
111
133
|
insecure: @insecure,
|
112
|
-
ca_file: @
|
134
|
+
ca_file: @ca_store ? @ca_store.path : nil,
|
113
135
|
debug: @debug,
|
114
136
|
log: @log,
|
115
137
|
timeout: @timeout,
|
@@ -405,6 +427,9 @@ module OvirtSDK4
|
|
405
427
|
|
406
428
|
# Close the HTTP client:
|
407
429
|
@client.close if @client
|
430
|
+
|
431
|
+
# Remove the temporary file that contains the trusted CA certificates:
|
432
|
+
@ca_store.unlink if @ca_store
|
408
433
|
end
|
409
434
|
end
|
410
435
|
end
|
data/lib/ovirtsdk4/readers.rb
CHANGED
@@ -8316,6 +8316,8 @@ module OvirtSDK4
|
|
8316
8316
|
object.io = IoReader.read_one(reader)
|
8317
8317
|
when 'large_icon'
|
8318
8318
|
object.large_icon = IconReader.read_one(reader)
|
8319
|
+
when 'lease'
|
8320
|
+
object.lease = StorageDomainLeaseReader.read_one(reader)
|
8319
8321
|
when 'memory'
|
8320
8322
|
object.memory = Reader.read_integer(reader)
|
8321
8323
|
when 'memory_policy'
|
@@ -14421,6 +14423,8 @@ module OvirtSDK4
|
|
14421
14423
|
object.io = IoReader.read_one(reader)
|
14422
14424
|
when 'large_icon'
|
14423
14425
|
object.large_icon = IconReader.read_one(reader)
|
14426
|
+
when 'lease'
|
14427
|
+
object.lease = StorageDomainLeaseReader.read_one(reader)
|
14424
14428
|
when 'memory'
|
14425
14429
|
object.memory = Reader.read_integer(reader)
|
14426
14430
|
when 'memory_policy'
|
@@ -15162,6 +15166,8 @@ module OvirtSDK4
|
|
15162
15166
|
object.status = Reader.read_string(reader)
|
15163
15167
|
when 'type'
|
15164
15168
|
object.type = Reader.read_string(reader)
|
15169
|
+
when 'execution_host'
|
15170
|
+
object.execution_host = HostReader.read_one(reader)
|
15165
15171
|
when 'job'
|
15166
15172
|
object.job = JobReader.read_one(reader)
|
15167
15173
|
when 'parent_step'
|
@@ -15638,6 +15644,66 @@ module OvirtSDK4
|
|
15638
15644
|
|
15639
15645
|
end
|
15640
15646
|
|
15647
|
+
class StorageDomainLeaseReader < Reader
|
15648
|
+
|
15649
|
+
def self.read_one(reader)
|
15650
|
+
# Do nothing if there aren't more tags:
|
15651
|
+
return nil unless reader.forward
|
15652
|
+
|
15653
|
+
# Create the object:
|
15654
|
+
object = StorageDomainLease.new
|
15655
|
+
|
15656
|
+
# Process the attributes:
|
15657
|
+
object.href = reader.get_attribute('href')
|
15658
|
+
|
15659
|
+
# Discard the start tag:
|
15660
|
+
empty = reader.empty_element?
|
15661
|
+
reader.read
|
15662
|
+
return object if empty
|
15663
|
+
|
15664
|
+
# Process the inner elements:
|
15665
|
+
while reader.forward do
|
15666
|
+
case reader.node_name
|
15667
|
+
when 'storage_domain'
|
15668
|
+
object.storage_domain = StorageDomainReader.read_one(reader)
|
15669
|
+
else
|
15670
|
+
reader.next_element
|
15671
|
+
end
|
15672
|
+
end
|
15673
|
+
|
15674
|
+
# Discard the end tag:
|
15675
|
+
reader.read
|
15676
|
+
|
15677
|
+
return object
|
15678
|
+
end
|
15679
|
+
|
15680
|
+
|
15681
|
+
def self.read_many(reader)
|
15682
|
+
# Do nothing if there aren't more tags:
|
15683
|
+
list = List.new
|
15684
|
+
return list unless reader.forward
|
15685
|
+
|
15686
|
+
# Process the attributes:
|
15687
|
+
list.href = reader.get_attribute('href')
|
15688
|
+
|
15689
|
+
# Discard the start tag:
|
15690
|
+
empty = reader.empty_element?
|
15691
|
+
reader.read
|
15692
|
+
return list if empty
|
15693
|
+
|
15694
|
+
# Process the inner elements:
|
15695
|
+
while reader.forward do
|
15696
|
+
list << read_one(reader)
|
15697
|
+
end
|
15698
|
+
|
15699
|
+
# Discard the end tag:
|
15700
|
+
reader.read
|
15701
|
+
|
15702
|
+
return list
|
15703
|
+
end
|
15704
|
+
|
15705
|
+
end
|
15706
|
+
|
15641
15707
|
class TagReader < Reader
|
15642
15708
|
|
15643
15709
|
def self.read_one(reader)
|
@@ -15818,6 +15884,8 @@ module OvirtSDK4
|
|
15818
15884
|
object.io = IoReader.read_one(reader)
|
15819
15885
|
when 'large_icon'
|
15820
15886
|
object.large_icon = IconReader.read_one(reader)
|
15887
|
+
when 'lease'
|
15888
|
+
object.lease = StorageDomainLeaseReader.read_one(reader)
|
15821
15889
|
when 'memory'
|
15822
15890
|
object.memory = Reader.read_integer(reader)
|
15823
15891
|
when 'memory_policy'
|
@@ -17165,6 +17233,8 @@ module OvirtSDK4
|
|
17165
17233
|
object.io = IoReader.read_one(reader)
|
17166
17234
|
when 'large_icon'
|
17167
17235
|
object.large_icon = IconReader.read_one(reader)
|
17236
|
+
when 'lease'
|
17237
|
+
object.lease = StorageDomainLeaseReader.read_one(reader)
|
17168
17238
|
when 'memory'
|
17169
17239
|
object.memory = Reader.read_integer(reader)
|
17170
17240
|
when 'memory_policy'
|
@@ -17460,6 +17530,8 @@ module OvirtSDK4
|
|
17460
17530
|
object.io = IoReader.read_one(reader)
|
17461
17531
|
when 'large_icon'
|
17462
17532
|
object.large_icon = IconReader.read_one(reader)
|
17533
|
+
when 'lease'
|
17534
|
+
object.lease = StorageDomainLeaseReader.read_one(reader)
|
17463
17535
|
when 'memory'
|
17464
17536
|
object.memory = Reader.read_integer(reader)
|
17465
17537
|
when 'memory_policy'
|
@@ -18670,6 +18742,8 @@ module OvirtSDK4
|
|
18670
18742
|
Reader.register('storage_connection_extensions', StorageConnectionExtensionReader.method(:read_many))
|
18671
18743
|
Reader.register('storage_domain', StorageDomainReader.method(:read_one))
|
18672
18744
|
Reader.register('storage_domains', StorageDomainReader.method(:read_many))
|
18745
|
+
Reader.register('storage_domain_lease', StorageDomainLeaseReader.method(:read_one))
|
18746
|
+
Reader.register('storage_domain_leases', StorageDomainLeaseReader.method(:read_many))
|
18673
18747
|
Reader.register('tag', TagReader.method(:read_one))
|
18674
18748
|
Reader.register('tags', TagReader.method(:read_many))
|
18675
18749
|
Reader.register('template', TemplateReader.method(:read_one))
|
data/lib/ovirtsdk4/services.rb
CHANGED
@@ -6807,11 +6807,16 @@ module OvirtSDK4
|
|
6807
6807
|
#
|
6808
6808
|
# Adds a new floating disk.
|
6809
6809
|
#
|
6810
|
-
#
|
6811
|
-
#
|
6810
|
+
# There are three types of disks that can be added - disk image, direct LUN and
|
6811
|
+
# https://wiki.openstack.org/wiki/Cinder[Cinder] disk.
|
6812
6812
|
#
|
6813
|
-
#
|
6814
|
-
#
|
6813
|
+
# *Adding a new image disk:*
|
6814
|
+
#
|
6815
|
+
# When creating a new floating image <<types/disk,Disk>>, the API requires the `storage_domain`, `provisioned_size`
|
6816
|
+
# and `format` attributes.
|
6817
|
+
#
|
6818
|
+
# To create a new floating image disk with specified `provisioned_size`, `format` and `name` on a storage domain
|
6819
|
+
# with an id `123`, send a request as follows:
|
6815
6820
|
#
|
6816
6821
|
# [source]
|
6817
6822
|
# ----
|
@@ -6824,14 +6829,84 @@ module OvirtSDK4
|
|
6824
6829
|
# ----
|
6825
6830
|
# <disk>
|
6826
6831
|
# <storage_domains>
|
6827
|
-
# <storage_domain id="
|
6832
|
+
# <storage_domain id="123"/>
|
6828
6833
|
# </storage_domains>
|
6829
|
-
# <name>
|
6834
|
+
# <name>mydisk</name>
|
6830
6835
|
# <provisioned_size>1048576</provisioned_size>
|
6831
6836
|
# <format>cow</format>
|
6832
6837
|
# </disk>
|
6833
6838
|
# ----
|
6834
6839
|
#
|
6840
|
+
#
|
6841
|
+
# *Adding a new direct LUN disk:*
|
6842
|
+
#
|
6843
|
+
# When adding a new floating direct LUN via the API, there are two flavors that can be used:
|
6844
|
+
#
|
6845
|
+
# . With a `host` element - in this case, the host is used for sanity checks (e.g., that the LUN is visible) and
|
6846
|
+
# to retrieve basic information about the LUN (e.g., size and serial).
|
6847
|
+
# . Without a `host` element - in this case, the operation is a database-only operation, and the storage is never
|
6848
|
+
# accessed.
|
6849
|
+
#
|
6850
|
+
# To create a new floating direct LUN disk with a `host` element with an id `123`, specified `alias`, `type` and
|
6851
|
+
# `logical_unit` with an id `456` (that has the attributes `address`, `port` and `target`),
|
6852
|
+
# send a request as follows:
|
6853
|
+
#
|
6854
|
+
# [source]
|
6855
|
+
# ----
|
6856
|
+
# POST /ovirt-engine/api/disks
|
6857
|
+
# ----
|
6858
|
+
#
|
6859
|
+
# With a request body as follows:
|
6860
|
+
#
|
6861
|
+
# [source,xml]
|
6862
|
+
# ----
|
6863
|
+
# <disk>
|
6864
|
+
# <alias>mylun</alias>
|
6865
|
+
# <lun_storage>
|
6866
|
+
# <host id="123"/>
|
6867
|
+
# <type>iscsi</type>
|
6868
|
+
# <logical_units>
|
6869
|
+
# <logical_unit id="456">
|
6870
|
+
# <address>10.35.10.20</address>
|
6871
|
+
# <port>3260</port>
|
6872
|
+
# <target>iqn.2017-01.com.myhost:444</target>
|
6873
|
+
# </logical_unit>
|
6874
|
+
# </logical_units>
|
6875
|
+
# </lun_storage>
|
6876
|
+
# </disk>
|
6877
|
+
# ----
|
6878
|
+
#
|
6879
|
+
# To create a new floating direct LUN disk without using a host, remove the `host` element.
|
6880
|
+
#
|
6881
|
+
#
|
6882
|
+
# *Adding a new Cinder disk:*
|
6883
|
+
#
|
6884
|
+
# To create a new floating Cinder disk, send a request as follows:
|
6885
|
+
#
|
6886
|
+
# [source]
|
6887
|
+
# ----
|
6888
|
+
# POST /ovirt-engine/api/disks
|
6889
|
+
# ----
|
6890
|
+
#
|
6891
|
+
# With a request body as follows:
|
6892
|
+
#
|
6893
|
+
# [source,xml]
|
6894
|
+
# ----
|
6895
|
+
# <disk>
|
6896
|
+
# <openstack_volume_type>
|
6897
|
+
# <name>myceph</name>
|
6898
|
+
# </openstack_volume_type>
|
6899
|
+
# <storage_domains>
|
6900
|
+
# <storage_domain>
|
6901
|
+
# <name>cinderDomain</name>
|
6902
|
+
# </storage_domain>
|
6903
|
+
# </storage_domains>
|
6904
|
+
# <provisioned_size>1073741824</provisioned_size>
|
6905
|
+
# <interface>virtio</interface>
|
6906
|
+
# <format>raw</format>
|
6907
|
+
# </disk>
|
6908
|
+
# ----
|
6909
|
+
#
|
6835
6910
|
# @param disk [Disk] The disk.
|
6836
6911
|
#
|
6837
6912
|
# @param opts [Hash] Additional options.
|
data/lib/ovirtsdk4/types.rb
CHANGED
@@ -365,6 +365,9 @@ module OvirtSDK4
|
|
365
365
|
class StorageDomain < Identified
|
366
366
|
end
|
367
367
|
|
368
|
+
class StorageDomainLease < Struct
|
369
|
+
end
|
370
|
+
|
368
371
|
class Tag < Identified
|
369
372
|
end
|
370
373
|
|
@@ -18284,6 +18287,31 @@ module OvirtSDK4
|
|
18284
18287
|
@end_time = value
|
18285
18288
|
end
|
18286
18289
|
|
18290
|
+
#
|
18291
|
+
# Returns the value of the `execution_host` attribute.
|
18292
|
+
#
|
18293
|
+
# @return [Host]
|
18294
|
+
#
|
18295
|
+
def execution_host
|
18296
|
+
@execution_host
|
18297
|
+
end
|
18298
|
+
|
18299
|
+
#
|
18300
|
+
# Sets the value of the `execution_host` attribute.
|
18301
|
+
#
|
18302
|
+
# @param value [Host, Hash]
|
18303
|
+
#
|
18304
|
+
# The `value` parameter can be an instance of {OvirtSDK4::Host} or a hash.
|
18305
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
18306
|
+
# `opts` parameter to the constructor.
|
18307
|
+
#
|
18308
|
+
def execution_host=(value)
|
18309
|
+
if value.is_a?(Hash)
|
18310
|
+
value = Host.new(value)
|
18311
|
+
end
|
18312
|
+
@execution_host = value
|
18313
|
+
end
|
18314
|
+
|
18287
18315
|
#
|
18288
18316
|
# Returns the value of the `external` attribute.
|
18289
18317
|
#
|
@@ -18535,6 +18563,8 @@ module OvirtSDK4
|
|
18535
18563
|
#
|
18536
18564
|
# @option opts [DateTime] :end_time The value of attribute `end_time`.
|
18537
18565
|
#
|
18566
|
+
# @option opts [Host, Hash] :execution_host The value of attribute `execution_host`.
|
18567
|
+
#
|
18538
18568
|
# @option opts [Boolean] :external The value of attribute `external`.
|
18539
18569
|
#
|
18540
18570
|
# @option opts [ExternalSystemType] :external_type The value of attribute `external_type`.
|
@@ -18563,6 +18593,7 @@ module OvirtSDK4
|
|
18563
18593
|
def initialize(opts = {})
|
18564
18594
|
super(opts)
|
18565
18595
|
self.end_time = opts[:end_time]
|
18596
|
+
self.execution_host = opts[:execution_host]
|
18566
18597
|
self.external = opts[:external]
|
18567
18598
|
self.external_type = opts[:external_type]
|
18568
18599
|
self.job = opts[:job]
|
@@ -18581,6 +18612,7 @@ module OvirtSDK4
|
|
18581
18612
|
def ==(other)
|
18582
18613
|
super &&
|
18583
18614
|
@end_time == other.end_time &&
|
18615
|
+
@execution_host == other.execution_host &&
|
18584
18616
|
@external == other.external &&
|
18585
18617
|
@external_type == other.external_type &&
|
18586
18618
|
@job == other.job &&
|
@@ -18599,6 +18631,7 @@ module OvirtSDK4
|
|
18599
18631
|
def hash
|
18600
18632
|
super +
|
18601
18633
|
@end_time.hash +
|
18634
|
+
@execution_host.hash +
|
18602
18635
|
@external.hash +
|
18603
18636
|
@external_type.hash +
|
18604
18637
|
@job.hash +
|
@@ -20116,6 +20149,66 @@ module OvirtSDK4
|
|
20116
20149
|
|
20117
20150
|
end
|
20118
20151
|
|
20152
|
+
class StorageDomainLease < Struct
|
20153
|
+
|
20154
|
+
#
|
20155
|
+
# Returns the value of the `storage_domain` attribute.
|
20156
|
+
#
|
20157
|
+
# @return [StorageDomain]
|
20158
|
+
#
|
20159
|
+
def storage_domain
|
20160
|
+
@storage_domain
|
20161
|
+
end
|
20162
|
+
|
20163
|
+
#
|
20164
|
+
# Sets the value of the `storage_domain` attribute.
|
20165
|
+
#
|
20166
|
+
# @param value [StorageDomain, Hash]
|
20167
|
+
#
|
20168
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomain} or a hash.
|
20169
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
20170
|
+
# `opts` parameter to the constructor.
|
20171
|
+
#
|
20172
|
+
def storage_domain=(value)
|
20173
|
+
if value.is_a?(Hash)
|
20174
|
+
value = StorageDomain.new(value)
|
20175
|
+
end
|
20176
|
+
@storage_domain = value
|
20177
|
+
end
|
20178
|
+
|
20179
|
+
#
|
20180
|
+
# Creates a new instance of the {StorageDomainLease} class.
|
20181
|
+
#
|
20182
|
+
# @param opts [Hash] A hash containing the attributes of the object. The keys of the hash
|
20183
|
+
# should be symbols corresponding to the names of the attributes. The values of the hash
|
20184
|
+
# should be the values of the attributes.
|
20185
|
+
#
|
20186
|
+
# @option opts [StorageDomain, Hash] :storage_domain The value of attribute `storage_domain`.
|
20187
|
+
#
|
20188
|
+
#
|
20189
|
+
def initialize(opts = {})
|
20190
|
+
super(opts)
|
20191
|
+
self.storage_domain = opts[:storage_domain]
|
20192
|
+
end
|
20193
|
+
|
20194
|
+
#
|
20195
|
+
# Returns `true` if `self` and `other` have the same attributes and values.
|
20196
|
+
#
|
20197
|
+
def ==(other)
|
20198
|
+
super &&
|
20199
|
+
@storage_domain == other.storage_domain
|
20200
|
+
end
|
20201
|
+
|
20202
|
+
#
|
20203
|
+
# Generates a hash value for this object.
|
20204
|
+
#
|
20205
|
+
def hash
|
20206
|
+
super +
|
20207
|
+
@storage_domain.hash
|
20208
|
+
end
|
20209
|
+
|
20210
|
+
end
|
20211
|
+
|
20119
20212
|
class Tag < Identified
|
20120
20213
|
|
20121
20214
|
#
|
@@ -22829,6 +22922,31 @@ module OvirtSDK4
|
|
22829
22922
|
@large_icon = value
|
22830
22923
|
end
|
22831
22924
|
|
22925
|
+
#
|
22926
|
+
# Returns the value of the `lease` attribute.
|
22927
|
+
#
|
22928
|
+
# @return [StorageDomainLease]
|
22929
|
+
#
|
22930
|
+
def lease
|
22931
|
+
@lease
|
22932
|
+
end
|
22933
|
+
|
22934
|
+
#
|
22935
|
+
# Sets the value of the `lease` attribute.
|
22936
|
+
#
|
22937
|
+
# @param value [StorageDomainLease, Hash]
|
22938
|
+
#
|
22939
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomainLease} or a hash.
|
22940
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
22941
|
+
# `opts` parameter to the constructor.
|
22942
|
+
#
|
22943
|
+
def lease=(value)
|
22944
|
+
if value.is_a?(Hash)
|
22945
|
+
value = StorageDomainLease.new(value)
|
22946
|
+
end
|
22947
|
+
@lease = value
|
22948
|
+
end
|
22949
|
+
|
22832
22950
|
#
|
22833
22951
|
# Returns the value of the `memory` attribute.
|
22834
22952
|
#
|
@@ -23340,6 +23458,8 @@ module OvirtSDK4
|
|
23340
23458
|
#
|
23341
23459
|
# @option opts [Icon, Hash] :large_icon The value of attribute `large_icon`.
|
23342
23460
|
#
|
23461
|
+
# @option opts [StorageDomainLease, Hash] :lease The value of attribute `lease`.
|
23462
|
+
#
|
23343
23463
|
# @option opts [Integer] :memory The value of attribute `memory`.
|
23344
23464
|
#
|
23345
23465
|
# @option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
|
@@ -23403,6 +23523,7 @@ module OvirtSDK4
|
|
23403
23523
|
self.initialization = opts[:initialization]
|
23404
23524
|
self.io = opts[:io]
|
23405
23525
|
self.large_icon = opts[:large_icon]
|
23526
|
+
self.lease = opts[:lease]
|
23406
23527
|
self.memory = opts[:memory]
|
23407
23528
|
self.memory_policy = opts[:memory_policy]
|
23408
23529
|
self.migration = opts[:migration]
|
@@ -23448,6 +23569,7 @@ module OvirtSDK4
|
|
23448
23569
|
@initialization == other.initialization &&
|
23449
23570
|
@io == other.io &&
|
23450
23571
|
@large_icon == other.large_icon &&
|
23572
|
+
@lease == other.lease &&
|
23451
23573
|
@memory == other.memory &&
|
23452
23574
|
@memory_policy == other.memory_policy &&
|
23453
23575
|
@migration == other.migration &&
|
@@ -23493,6 +23615,7 @@ module OvirtSDK4
|
|
23493
23615
|
@initialization.hash +
|
23494
23616
|
@io.hash +
|
23495
23617
|
@large_icon.hash +
|
23618
|
+
@lease.hash +
|
23496
23619
|
@memory.hash +
|
23497
23620
|
@memory_policy.hash +
|
23498
23621
|
@migration.hash +
|
@@ -43112,6 +43235,31 @@ module OvirtSDK4
|
|
43112
43235
|
@large_icon = value
|
43113
43236
|
end
|
43114
43237
|
|
43238
|
+
#
|
43239
|
+
# Returns the value of the `lease` attribute.
|
43240
|
+
#
|
43241
|
+
# @return [StorageDomainLease]
|
43242
|
+
#
|
43243
|
+
def lease
|
43244
|
+
@lease
|
43245
|
+
end
|
43246
|
+
|
43247
|
+
#
|
43248
|
+
# Sets the value of the `lease` attribute.
|
43249
|
+
#
|
43250
|
+
# @param value [StorageDomainLease, Hash]
|
43251
|
+
#
|
43252
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomainLease} or a hash.
|
43253
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
43254
|
+
# `opts` parameter to the constructor.
|
43255
|
+
#
|
43256
|
+
def lease=(value)
|
43257
|
+
if value.is_a?(Hash)
|
43258
|
+
value = StorageDomainLease.new(value)
|
43259
|
+
end
|
43260
|
+
@lease = value
|
43261
|
+
end
|
43262
|
+
|
43115
43263
|
#
|
43116
43264
|
# Returns the value of the `memory` attribute.
|
43117
43265
|
#
|
@@ -43801,6 +43949,8 @@ module OvirtSDK4
|
|
43801
43949
|
#
|
43802
43950
|
# @option opts [Icon, Hash] :large_icon The value of attribute `large_icon`.
|
43803
43951
|
#
|
43952
|
+
# @option opts [StorageDomainLease, Hash] :lease The value of attribute `lease`.
|
43953
|
+
#
|
43804
43954
|
# @option opts [Integer] :memory The value of attribute `memory`.
|
43805
43955
|
#
|
43806
43956
|
# @option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
|
@@ -44731,6 +44881,31 @@ module OvirtSDK4
|
|
44731
44881
|
@large_icon = value
|
44732
44882
|
end
|
44733
44883
|
|
44884
|
+
#
|
44885
|
+
# Returns the value of the `lease` attribute.
|
44886
|
+
#
|
44887
|
+
# @return [StorageDomainLease]
|
44888
|
+
#
|
44889
|
+
def lease
|
44890
|
+
@lease
|
44891
|
+
end
|
44892
|
+
|
44893
|
+
#
|
44894
|
+
# Sets the value of the `lease` attribute.
|
44895
|
+
#
|
44896
|
+
# @param value [StorageDomainLease, Hash]
|
44897
|
+
#
|
44898
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomainLease} or a hash.
|
44899
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
44900
|
+
# `opts` parameter to the constructor.
|
44901
|
+
#
|
44902
|
+
def lease=(value)
|
44903
|
+
if value.is_a?(Hash)
|
44904
|
+
value = StorageDomainLease.new(value)
|
44905
|
+
end
|
44906
|
+
@lease = value
|
44907
|
+
end
|
44908
|
+
|
44734
44909
|
#
|
44735
44910
|
# Returns the value of the `memory` attribute.
|
44736
44911
|
#
|
@@ -45792,6 +45967,8 @@ module OvirtSDK4
|
|
45792
45967
|
#
|
45793
45968
|
# @option opts [Icon, Hash] :large_icon The value of attribute `large_icon`.
|
45794
45969
|
#
|
45970
|
+
# @option opts [StorageDomainLease, Hash] :lease The value of attribute `lease`.
|
45971
|
+
#
|
45795
45972
|
# @option opts [Integer] :memory The value of attribute `memory`.
|
45796
45973
|
#
|
45797
45974
|
# @option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
|
@@ -47974,6 +48151,31 @@ module OvirtSDK4
|
|
47974
48151
|
@large_icon = value
|
47975
48152
|
end
|
47976
48153
|
|
48154
|
+
#
|
48155
|
+
# Returns the value of the `lease` attribute.
|
48156
|
+
#
|
48157
|
+
# @return [StorageDomainLease]
|
48158
|
+
#
|
48159
|
+
def lease
|
48160
|
+
@lease
|
48161
|
+
end
|
48162
|
+
|
48163
|
+
#
|
48164
|
+
# Sets the value of the `lease` attribute.
|
48165
|
+
#
|
48166
|
+
# @param value [StorageDomainLease, Hash]
|
48167
|
+
#
|
48168
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomainLease} or a hash.
|
48169
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
48170
|
+
# `opts` parameter to the constructor.
|
48171
|
+
#
|
48172
|
+
def lease=(value)
|
48173
|
+
if value.is_a?(Hash)
|
48174
|
+
value = StorageDomainLease.new(value)
|
48175
|
+
end
|
48176
|
+
@lease = value
|
48177
|
+
end
|
48178
|
+
|
47977
48179
|
#
|
47978
48180
|
# Returns the value of the `memory` attribute.
|
47979
48181
|
#
|
@@ -48663,6 +48865,8 @@ module OvirtSDK4
|
|
48663
48865
|
#
|
48664
48866
|
# @option opts [Icon, Hash] :large_icon The value of attribute `large_icon`.
|
48665
48867
|
#
|
48868
|
+
# @option opts [StorageDomainLease, Hash] :lease The value of attribute `lease`.
|
48869
|
+
#
|
48666
48870
|
# @option opts [Integer] :memory The value of attribute `memory`.
|
48667
48871
|
#
|
48668
48872
|
# @option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
|
@@ -50337,6 +50541,31 @@ module OvirtSDK4
|
|
50337
50541
|
@large_icon = value
|
50338
50542
|
end
|
50339
50543
|
|
50544
|
+
#
|
50545
|
+
# Returns the value of the `lease` attribute.
|
50546
|
+
#
|
50547
|
+
# @return [StorageDomainLease]
|
50548
|
+
#
|
50549
|
+
def lease
|
50550
|
+
@lease
|
50551
|
+
end
|
50552
|
+
|
50553
|
+
#
|
50554
|
+
# Sets the value of the `lease` attribute.
|
50555
|
+
#
|
50556
|
+
# @param value [StorageDomainLease, Hash]
|
50557
|
+
#
|
50558
|
+
# The `value` parameter can be an instance of {OvirtSDK4::StorageDomainLease} or a hash.
|
50559
|
+
# If it is a hash then a new instance will be created passing the hash as the
|
50560
|
+
# `opts` parameter to the constructor.
|
50561
|
+
#
|
50562
|
+
def lease=(value)
|
50563
|
+
if value.is_a?(Hash)
|
50564
|
+
value = StorageDomainLease.new(value)
|
50565
|
+
end
|
50566
|
+
@lease = value
|
50567
|
+
end
|
50568
|
+
|
50340
50569
|
#
|
50341
50570
|
# Returns the value of the `memory` attribute.
|
50342
50571
|
#
|
@@ -51479,6 +51708,8 @@ module OvirtSDK4
|
|
51479
51708
|
#
|
51480
51709
|
# @option opts [Icon, Hash] :large_icon The value of attribute `large_icon`.
|
51481
51710
|
#
|
51711
|
+
# @option opts [StorageDomainLease, Hash] :lease The value of attribute `lease`.
|
51712
|
+
#
|
51482
51713
|
# @option opts [Integer] :memory The value of attribute `memory`.
|
51483
51714
|
#
|
51484
51715
|
# @option opts [MemoryPolicy, Hash] :memory_policy The value of attribute `memory_policy`.
|
data/lib/ovirtsdk4/version.rb
CHANGED
data/lib/ovirtsdk4/writers.rb
CHANGED
@@ -3165,6 +3165,7 @@ module OvirtSDK4
|
|
3165
3165
|
InitializationWriter.write_one(object.initialization, writer, 'initialization') unless object.initialization.nil?
|
3166
3166
|
IoWriter.write_one(object.io, writer, 'io') unless object.io.nil?
|
3167
3167
|
IconWriter.write_one(object.large_icon, writer, 'large_icon') unless object.large_icon.nil?
|
3168
|
+
StorageDomainLeaseWriter.write_one(object.lease, writer, 'lease') unless object.lease.nil?
|
3168
3169
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
3169
3170
|
MemoryPolicyWriter.write_one(object.memory_policy, writer, 'memory_policy') unless object.memory_policy.nil?
|
3170
3171
|
MigrationOptionsWriter.write_one(object.migration, writer, 'migration') unless object.migration.nil?
|
@@ -5517,6 +5518,7 @@ module OvirtSDK4
|
|
5517
5518
|
InitializationWriter.write_one(object.initialization, writer, 'initialization') unless object.initialization.nil?
|
5518
5519
|
IoWriter.write_one(object.io, writer, 'io') unless object.io.nil?
|
5519
5520
|
IconWriter.write_one(object.large_icon, writer, 'large_icon') unless object.large_icon.nil?
|
5521
|
+
StorageDomainLeaseWriter.write_one(object.lease, writer, 'lease') unless object.lease.nil?
|
5520
5522
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
5521
5523
|
MemoryPolicyWriter.write_one(object.memory_policy, writer, 'memory_policy') unless object.memory_policy.nil?
|
5522
5524
|
MigrationOptionsWriter.write_one(object.migration, writer, 'migration') unless object.migration.nil?
|
@@ -5808,6 +5810,7 @@ module OvirtSDK4
|
|
5808
5810
|
Writer.write_date(writer, 'start_time', object.start_time) unless object.start_time.nil?
|
5809
5811
|
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5810
5812
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
5813
|
+
HostWriter.write_one(object.execution_host, writer, 'execution_host') unless object.execution_host.nil?
|
5811
5814
|
JobWriter.write_one(object.job, writer, 'job') unless object.job.nil?
|
5812
5815
|
StepWriter.write_one(object.parent_step, writer, 'parent_step') unless object.parent_step.nil?
|
5813
5816
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
@@ -5966,6 +5969,33 @@ module OvirtSDK4
|
|
5966
5969
|
|
5967
5970
|
end
|
5968
5971
|
|
5972
|
+
class StorageDomainLeaseWriter < Writer
|
5973
|
+
|
5974
|
+
def self.write_one(object, writer, singular = nil)
|
5975
|
+
singular ||= 'storage_domain_lease'
|
5976
|
+
writer.write_start(singular)
|
5977
|
+
href = object.href
|
5978
|
+
writer.write_attribute('href', href) unless href.nil?
|
5979
|
+
StorageDomainWriter.write_one(object.storage_domain, writer, 'storage_domain') unless object.storage_domain.nil?
|
5980
|
+
writer.write_end
|
5981
|
+
end
|
5982
|
+
|
5983
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
5984
|
+
singular ||= 'storage_domain_lease'
|
5985
|
+
plural ||= 'storage_domain_leases'
|
5986
|
+
writer.write_start(plural)
|
5987
|
+
if list.is_a?(List)
|
5988
|
+
href = list.href
|
5989
|
+
writer.write_attribute('href', href) unless href.nil?
|
5990
|
+
end
|
5991
|
+
list.each do |item|
|
5992
|
+
write_one(item, writer, singular)
|
5993
|
+
end
|
5994
|
+
writer.write_end
|
5995
|
+
end
|
5996
|
+
|
5997
|
+
end
|
5998
|
+
|
5969
5999
|
class TagWriter < Writer
|
5970
6000
|
|
5971
6001
|
def self.write_one(object, writer, singular = nil)
|
@@ -6028,6 +6058,7 @@ module OvirtSDK4
|
|
6028
6058
|
InitializationWriter.write_one(object.initialization, writer, 'initialization') unless object.initialization.nil?
|
6029
6059
|
IoWriter.write_one(object.io, writer, 'io') unless object.io.nil?
|
6030
6060
|
IconWriter.write_one(object.large_icon, writer, 'large_icon') unless object.large_icon.nil?
|
6061
|
+
StorageDomainLeaseWriter.write_one(object.lease, writer, 'lease') unless object.lease.nil?
|
6031
6062
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
6032
6063
|
MemoryPolicyWriter.write_one(object.memory_policy, writer, 'memory_policy') unless object.memory_policy.nil?
|
6033
6064
|
MigrationOptionsWriter.write_one(object.migration, writer, 'migration') unless object.migration.nil?
|
@@ -6539,6 +6570,7 @@ module OvirtSDK4
|
|
6539
6570
|
InitializationWriter.write_one(object.initialization, writer, 'initialization') unless object.initialization.nil?
|
6540
6571
|
IoWriter.write_one(object.io, writer, 'io') unless object.io.nil?
|
6541
6572
|
IconWriter.write_one(object.large_icon, writer, 'large_icon') unless object.large_icon.nil?
|
6573
|
+
StorageDomainLeaseWriter.write_one(object.lease, writer, 'lease') unless object.lease.nil?
|
6542
6574
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
6543
6575
|
MemoryPolicyWriter.write_one(object.memory_policy, writer, 'memory_policy') unless object.memory_policy.nil?
|
6544
6576
|
MigrationOptionsWriter.write_one(object.migration, writer, 'migration') unless object.migration.nil?
|
@@ -6641,6 +6673,7 @@ module OvirtSDK4
|
|
6641
6673
|
InitializationWriter.write_one(object.initialization, writer, 'initialization') unless object.initialization.nil?
|
6642
6674
|
IoWriter.write_one(object.io, writer, 'io') unless object.io.nil?
|
6643
6675
|
IconWriter.write_one(object.large_icon, writer, 'large_icon') unless object.large_icon.nil?
|
6676
|
+
StorageDomainLeaseWriter.write_one(object.lease, writer, 'lease') unless object.lease.nil?
|
6644
6677
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
6645
6678
|
MemoryPolicyWriter.write_one(object.memory_policy, writer, 'memory_policy') unless object.memory_policy.nil?
|
6646
6679
|
MigrationOptionsWriter.write_one(object.migration, writer, 'migration') unless object.migration.nil?
|
@@ -7144,6 +7177,7 @@ module OvirtSDK4
|
|
7144
7177
|
Writer.register(StorageConnection, StorageConnectionWriter.method(:write_one))
|
7145
7178
|
Writer.register(StorageConnectionExtension, StorageConnectionExtensionWriter.method(:write_one))
|
7146
7179
|
Writer.register(StorageDomain, StorageDomainWriter.method(:write_one))
|
7180
|
+
Writer.register(StorageDomainLease, StorageDomainLeaseWriter.method(:write_one))
|
7147
7181
|
Writer.register(Tag, TagWriter.method(:write_one))
|
7148
7182
|
Writer.register(Template, TemplateWriter.method(:write_one))
|
7149
7183
|
Writer.register(TemplateVersion, TemplateVersionWriter.method(:write_one))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovirt-engine-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.0.
|
4
|
+
version: 4.1.0.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|