Class: Kubevirt::V1InterfaceBindingPlugin
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Kubevirt::V1InterfaceBindingPlugin
- Defined in:
- lib/kubevirt/models/v1_interface_binding_plugin.rb
Instance Attribute Summary collapse
-
#compute_resource_overhead ⇒ Object
Returns the value of attribute compute_resource_overhead.
-
#domain_attachment_type ⇒ Object
DomainAttachmentType is a standard domain network attachment method kubevirt supports.
-
#downward_api ⇒ Object
DownwardAPI specifies what kind of data should be exposed to the binding plugin sidecar.
-
#migration ⇒ Object
Returns the value of attribute migration.
-
#network_attachment_definition ⇒ Object
NetworkAttachmentDefinition references to a NetworkAttachmentDefinition CR object.
-
#sidecar_image ⇒ Object
SidecarImage references a container image that runs in the virt-launcher pod.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ V1InterfaceBindingPlugin
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ V1InterfaceBindingPlugin
Initializes the object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 76 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Kubevirt::V1InterfaceBindingPlugin` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Kubevirt::V1InterfaceBindingPlugin`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'compute_resource_overhead') self.compute_resource_overhead = attributes[:'compute_resource_overhead'] end if attributes.key?(:'domain_attachment_type') self. = attributes[:'domain_attachment_type'] end if attributes.key?(:'downward_api') self.downward_api = attributes[:'downward_api'] end if attributes.key?(:'migration') self.migration = attributes[:'migration'] end if attributes.key?(:'network_attachment_definition') self. = attributes[:'network_attachment_definition'] end if attributes.key?(:'sidecar_image') self.sidecar_image = attributes[:'sidecar_image'] end end |
Instance Attribute Details
#compute_resource_overhead ⇒ Object
Returns the value of attribute compute_resource_overhead.
18 19 20 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 18 def compute_resource_overhead @compute_resource_overhead end |
#domain_attachment_type ⇒ Object
DomainAttachmentType is a standard domain network attachment method kubevirt supports. Supported values: "tap", "managedTap" (since v1.4). The standard domain attachment can be used instead or in addition to the sidecarImage. version: 1alphav1
21 22 23 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 21 def @domain_attachment_type end |
#downward_api ⇒ Object
DownwardAPI specifies what kind of data should be exposed to the binding plugin sidecar. Supported values: "device-info" version: v1alphav1
24 25 26 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 24 def downward_api @downward_api end |
#migration ⇒ Object
Returns the value of attribute migration.
26 27 28 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 26 def migration @migration end |
#network_attachment_definition ⇒ Object
NetworkAttachmentDefinition references to a NetworkAttachmentDefinition CR object. Format: <name>, <namespace>/<name>. If namespace is not specified, VMI namespace is assumed. version: 1alphav1
29 30 31 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 29 def @network_attachment_definition end |
#sidecar_image ⇒ Object
SidecarImage references a container image that runs in the virt-launcher pod. The sidecar handles (libvirt) domain configuration and optional services. version: 1alphav1
32 33 34 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 32 def sidecar_image @sidecar_image end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
47 48 49 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 47 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
52 53 54 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 52 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 35 def self.attribute_map { :'compute_resource_overhead' => :'computeResourceOverhead', :'domain_attachment_type' => :'domainAttachmentType', :'downward_api' => :'downwardAPI', :'migration' => :'migration', :'network_attachment_definition' => :'networkAttachmentDefinition', :'sidecar_image' => :'sidecarImage' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 158 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
69 70 71 72 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 69 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 57 def self.openapi_types { :'compute_resource_overhead' => :'V1ResourceRequirementsWithoutClaims', :'domain_attachment_type' => :'String', :'downward_api' => :'String', :'migration' => :'V1InterfaceBindingMigration', :'network_attachment_definition' => :'String', :'sidecar_image' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 132 def ==(o) return true if self.equal?(o) self.class == o.class && compute_resource_overhead == o.compute_resource_overhead && == o. && downward_api == o.downward_api && migration == o.migration && == o. && sidecar_image == o.sidecar_image end |
#eql?(o) ⇒ Boolean
145 146 147 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 145 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
151 152 153 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 151 def hash [compute_resource_overhead, , downward_api, migration, , sidecar_image].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
117 118 119 120 121 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 117 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 180 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
125 126 127 128 |
# File 'lib/kubevirt/models/v1_interface_binding_plugin.rb', line 125 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |