Skip to content

Commit 6cabe9d

Browse files
committed
Merge pull request #21 from miq-bot/openapi_generate
Update kubevirt gem
2 parents c627f90 + 78fda85 commit 6cabe9d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

docs/V1TPMDevice.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Name | Type | Description | Notes |
66
| ---- | ---- | ----------- | ----- |
7+
| **enabled** | **Boolean** | Enabled allows a user to explictly disable the vTPM even when one is enabled by a preference referenced by the VirtualMachine Defaults to True | [optional] |
78
| **persistent** | **Boolean** | Persistent indicates the state of the TPM device should be kept accross reboots Defaults to false | [optional] |
89

910
## Example
@@ -12,6 +13,7 @@
1213
require 'kubevirt'
1314

1415
instance = Kubevirt::V1TPMDevice.new(
16+
enabled: null,
1517
persistent: null
1618
)
1719
```

lib/kubevirt/models/v1_tpm_device.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@
1515

1616
module Kubevirt
1717
class V1TPMDevice
18+
# Enabled allows a user to explictly disable the vTPM even when one is enabled by a preference referenced by the VirtualMachine Defaults to True
19+
attr_accessor :enabled
20+
1821
# Persistent indicates the state of the TPM device should be kept accross reboots Defaults to false
1922
attr_accessor :persistent
2023

2124
# Attribute mapping from ruby-style variable name to JSON key.
2225
def self.attribute_map
2326
{
27+
:'enabled' => :'enabled',
2428
:'persistent' => :'persistent'
2529
}
2630
end
@@ -38,6 +42,7 @@ def self.acceptable_attributes
3842
# Attribute type mapping.
3943
def self.openapi_types
4044
{
45+
:'enabled' => :'Boolean',
4146
:'persistent' => :'Boolean'
4247
}
4348
end
@@ -64,6 +69,10 @@ def initialize(attributes = {})
6469
h[k.to_sym] = v
6570
}
6671

72+
if attributes.key?(:'enabled')
73+
self.enabled = attributes[:'enabled']
74+
end
75+
6776
if attributes.key?(:'persistent')
6877
self.persistent = attributes[:'persistent']
6978
end
@@ -89,6 +98,7 @@ def valid?
8998
def ==(o)
9099
return true if self.equal?(o)
91100
self.class == o.class &&
101+
enabled == o.enabled &&
92102
persistent == o.persistent
93103
end
94104

@@ -101,7 +111,7 @@ def eql?(o)
101111
# Calculates hash code according to all attributes.
102112
# @return [Integer] Hash code
103113
def hash
104-
[persistent].hash
114+
[enabled, persistent].hash
105115
end
106116

107117
# Builds the object from hash

spec/models/v1_tpm_device_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
end
2828
end
2929

30+
describe 'test attribute "enabled"' do
31+
it 'should work' do
32+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33+
end
34+
end
35+
3036
describe 'test attribute "persistent"' do
3137
it 'should work' do
3238
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/

0 commit comments

Comments
 (0)