-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathv1_node_system_info.py
384 lines (290 loc) · 14.1 KB
/
v1_node_system_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.32
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from kubernetes.client.configuration import Configuration
class V1NodeSystemInfo(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'architecture': 'str',
'boot_id': 'str',
'container_runtime_version': 'str',
'kernel_version': 'str',
'kube_proxy_version': 'str',
'kubelet_version': 'str',
'machine_id': 'str',
'operating_system': 'str',
'os_image': 'str',
'system_uuid': 'str'
}
attribute_map = {
'architecture': 'architecture',
'boot_id': 'bootID',
'container_runtime_version': 'containerRuntimeVersion',
'kernel_version': 'kernelVersion',
'kube_proxy_version': 'kubeProxyVersion',
'kubelet_version': 'kubeletVersion',
'machine_id': 'machineID',
'operating_system': 'operatingSystem',
'os_image': 'osImage',
'system_uuid': 'systemUUID'
}
def __init__(self, architecture=None, boot_id=None, container_runtime_version=None, kernel_version=None, kube_proxy_version=None, kubelet_version=None, machine_id=None, operating_system=None, os_image=None, system_uuid=None, local_vars_configuration=None): # noqa: E501
"""V1NodeSystemInfo - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._architecture = None
self._boot_id = None
self._container_runtime_version = None
self._kernel_version = None
self._kube_proxy_version = None
self._kubelet_version = None
self._machine_id = None
self._operating_system = None
self._os_image = None
self._system_uuid = None
self.discriminator = None
self.architecture = architecture
self.boot_id = boot_id
self.container_runtime_version = container_runtime_version
self.kernel_version = kernel_version
self.kube_proxy_version = kube_proxy_version
self.kubelet_version = kubelet_version
self.machine_id = machine_id
self.operating_system = operating_system
self.os_image = os_image
self.system_uuid = system_uuid
@property
def architecture(self):
"""Gets the architecture of this V1NodeSystemInfo. # noqa: E501
The Architecture reported by the node # noqa: E501
:return: The architecture of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._architecture
@architecture.setter
def architecture(self, architecture):
"""Sets the architecture of this V1NodeSystemInfo.
The Architecture reported by the node # noqa: E501
:param architecture: The architecture of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and architecture is None: # noqa: E501
raise ValueError("Invalid value for `architecture`, must not be `None`") # noqa: E501
self._architecture = architecture
@property
def boot_id(self):
"""Gets the boot_id of this V1NodeSystemInfo. # noqa: E501
Boot ID reported by the node. # noqa: E501
:return: The boot_id of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._boot_id
@boot_id.setter
def boot_id(self, boot_id):
"""Sets the boot_id of this V1NodeSystemInfo.
Boot ID reported by the node. # noqa: E501
:param boot_id: The boot_id of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and boot_id is None: # noqa: E501
raise ValueError("Invalid value for `boot_id`, must not be `None`") # noqa: E501
self._boot_id = boot_id
@property
def container_runtime_version(self):
"""Gets the container_runtime_version of this V1NodeSystemInfo. # noqa: E501
ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). # noqa: E501
:return: The container_runtime_version of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._container_runtime_version
@container_runtime_version.setter
def container_runtime_version(self, container_runtime_version):
"""Sets the container_runtime_version of this V1NodeSystemInfo.
ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). # noqa: E501
:param container_runtime_version: The container_runtime_version of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and container_runtime_version is None: # noqa: E501
raise ValueError("Invalid value for `container_runtime_version`, must not be `None`") # noqa: E501
self._container_runtime_version = container_runtime_version
@property
def kernel_version(self):
"""Gets the kernel_version of this V1NodeSystemInfo. # noqa: E501
Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). # noqa: E501
:return: The kernel_version of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._kernel_version
@kernel_version.setter
def kernel_version(self, kernel_version):
"""Sets the kernel_version of this V1NodeSystemInfo.
Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). # noqa: E501
:param kernel_version: The kernel_version of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and kernel_version is None: # noqa: E501
raise ValueError("Invalid value for `kernel_version`, must not be `None`") # noqa: E501
self._kernel_version = kernel_version
@property
def kube_proxy_version(self):
"""Gets the kube_proxy_version of this V1NodeSystemInfo. # noqa: E501
Deprecated: KubeProxy Version reported by the node. # noqa: E501
:return: The kube_proxy_version of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._kube_proxy_version
@kube_proxy_version.setter
def kube_proxy_version(self, kube_proxy_version):
"""Sets the kube_proxy_version of this V1NodeSystemInfo.
Deprecated: KubeProxy Version reported by the node. # noqa: E501
:param kube_proxy_version: The kube_proxy_version of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and kube_proxy_version is None: # noqa: E501
raise ValueError("Invalid value for `kube_proxy_version`, must not be `None`") # noqa: E501
self._kube_proxy_version = kube_proxy_version
@property
def kubelet_version(self):
"""Gets the kubelet_version of this V1NodeSystemInfo. # noqa: E501
Kubelet Version reported by the node. # noqa: E501
:return: The kubelet_version of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._kubelet_version
@kubelet_version.setter
def kubelet_version(self, kubelet_version):
"""Sets the kubelet_version of this V1NodeSystemInfo.
Kubelet Version reported by the node. # noqa: E501
:param kubelet_version: The kubelet_version of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and kubelet_version is None: # noqa: E501
raise ValueError("Invalid value for `kubelet_version`, must not be `None`") # noqa: E501
self._kubelet_version = kubelet_version
@property
def machine_id(self):
"""Gets the machine_id of this V1NodeSystemInfo. # noqa: E501
MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html # noqa: E501
:return: The machine_id of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._machine_id
@machine_id.setter
def machine_id(self, machine_id):
"""Sets the machine_id of this V1NodeSystemInfo.
MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html # noqa: E501
:param machine_id: The machine_id of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and machine_id is None: # noqa: E501
raise ValueError("Invalid value for `machine_id`, must not be `None`") # noqa: E501
self._machine_id = machine_id
@property
def operating_system(self):
"""Gets the operating_system of this V1NodeSystemInfo. # noqa: E501
The Operating System reported by the node # noqa: E501
:return: The operating_system of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._operating_system
@operating_system.setter
def operating_system(self, operating_system):
"""Sets the operating_system of this V1NodeSystemInfo.
The Operating System reported by the node # noqa: E501
:param operating_system: The operating_system of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and operating_system is None: # noqa: E501
raise ValueError("Invalid value for `operating_system`, must not be `None`") # noqa: E501
self._operating_system = operating_system
@property
def os_image(self):
"""Gets the os_image of this V1NodeSystemInfo. # noqa: E501
OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). # noqa: E501
:return: The os_image of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._os_image
@os_image.setter
def os_image(self, os_image):
"""Sets the os_image of this V1NodeSystemInfo.
OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). # noqa: E501
:param os_image: The os_image of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and os_image is None: # noqa: E501
raise ValueError("Invalid value for `os_image`, must not be `None`") # noqa: E501
self._os_image = os_image
@property
def system_uuid(self):
"""Gets the system_uuid of this V1NodeSystemInfo. # noqa: E501
SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid # noqa: E501
:return: The system_uuid of this V1NodeSystemInfo. # noqa: E501
:rtype: str
"""
return self._system_uuid
@system_uuid.setter
def system_uuid(self, system_uuid):
"""Sets the system_uuid of this V1NodeSystemInfo.
SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid # noqa: E501
:param system_uuid: The system_uuid of this V1NodeSystemInfo. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and system_uuid is None: # noqa: E501
raise ValueError("Invalid value for `system_uuid`, must not be `None`") # noqa: E501
self._system_uuid = system_uuid
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, V1NodeSystemInfo):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, V1NodeSystemInfo):
return True
return self.to_dict() != other.to_dict()