/usr/lib/python2.7/dist-packages/kubernetes/client/models/v1_node_status.py is in python-kubernetes 2.0.0-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class V1NodeStatus(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, addresses=None, allocatable=None, capacity=None, conditions=None, daemon_endpoints=None, images=None, node_info=None, phase=None, volumes_attached=None, volumes_in_use=None):
"""
V1NodeStatus - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
"""
self.swagger_types = {
'addresses': 'list[V1NodeAddress]',
'allocatable': 'dict(str, str)',
'capacity': 'dict(str, str)',
'conditions': 'list[V1NodeCondition]',
'daemon_endpoints': 'V1NodeDaemonEndpoints',
'images': 'list[V1ContainerImage]',
'node_info': 'V1NodeSystemInfo',
'phase': 'str',
'volumes_attached': 'list[V1AttachedVolume]',
'volumes_in_use': 'list[str]'
}
self.attribute_map = {
'addresses': 'addresses',
'allocatable': 'allocatable',
'capacity': 'capacity',
'conditions': 'conditions',
'daemon_endpoints': 'daemonEndpoints',
'images': 'images',
'node_info': 'nodeInfo',
'phase': 'phase',
'volumes_attached': 'volumesAttached',
'volumes_in_use': 'volumesInUse'
}
self._addresses = addresses
self._allocatable = allocatable
self._capacity = capacity
self._conditions = conditions
self._daemon_endpoints = daemon_endpoints
self._images = images
self._node_info = node_info
self._phase = phase
self._volumes_attached = volumes_attached
self._volumes_in_use = volumes_in_use
@property
def addresses(self):
"""
Gets the addresses of this V1NodeStatus.
List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses
:return: The addresses of this V1NodeStatus.
:rtype: list[V1NodeAddress]
"""
return self._addresses
@addresses.setter
def addresses(self, addresses):
"""
Sets the addresses of this V1NodeStatus.
List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses
:param addresses: The addresses of this V1NodeStatus.
:type: list[V1NodeAddress]
"""
self._addresses = addresses
@property
def allocatable(self):
"""
Gets the allocatable of this V1NodeStatus.
Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.
:return: The allocatable of this V1NodeStatus.
:rtype: dict(str, str)
"""
return self._allocatable
@allocatable.setter
def allocatable(self, allocatable):
"""
Sets the allocatable of this V1NodeStatus.
Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.
:param allocatable: The allocatable of this V1NodeStatus.
:type: dict(str, str)
"""
self._allocatable = allocatable
@property
def capacity(self):
"""
Gets the capacity of this V1NodeStatus.
Capacity represents the total resources of a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details.
:return: The capacity of this V1NodeStatus.
:rtype: dict(str, str)
"""
return self._capacity
@capacity.setter
def capacity(self, capacity):
"""
Sets the capacity of this V1NodeStatus.
Capacity represents the total resources of a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details.
:param capacity: The capacity of this V1NodeStatus.
:type: dict(str, str)
"""
self._capacity = capacity
@property
def conditions(self):
"""
Gets the conditions of this V1NodeStatus.
Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition
:return: The conditions of this V1NodeStatus.
:rtype: list[V1NodeCondition]
"""
return self._conditions
@conditions.setter
def conditions(self, conditions):
"""
Sets the conditions of this V1NodeStatus.
Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition
:param conditions: The conditions of this V1NodeStatus.
:type: list[V1NodeCondition]
"""
self._conditions = conditions
@property
def daemon_endpoints(self):
"""
Gets the daemon_endpoints of this V1NodeStatus.
Endpoints of daemons running on the Node.
:return: The daemon_endpoints of this V1NodeStatus.
:rtype: V1NodeDaemonEndpoints
"""
return self._daemon_endpoints
@daemon_endpoints.setter
def daemon_endpoints(self, daemon_endpoints):
"""
Sets the daemon_endpoints of this V1NodeStatus.
Endpoints of daemons running on the Node.
:param daemon_endpoints: The daemon_endpoints of this V1NodeStatus.
:type: V1NodeDaemonEndpoints
"""
self._daemon_endpoints = daemon_endpoints
@property
def images(self):
"""
Gets the images of this V1NodeStatus.
List of container images on this node
:return: The images of this V1NodeStatus.
:rtype: list[V1ContainerImage]
"""
return self._images
@images.setter
def images(self, images):
"""
Sets the images of this V1NodeStatus.
List of container images on this node
:param images: The images of this V1NodeStatus.
:type: list[V1ContainerImage]
"""
self._images = images
@property
def node_info(self):
"""
Gets the node_info of this V1NodeStatus.
Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info
:return: The node_info of this V1NodeStatus.
:rtype: V1NodeSystemInfo
"""
return self._node_info
@node_info.setter
def node_info(self, node_info):
"""
Sets the node_info of this V1NodeStatus.
Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info
:param node_info: The node_info of this V1NodeStatus.
:type: V1NodeSystemInfo
"""
self._node_info = node_info
@property
def phase(self):
"""
Gets the phase of this V1NodeStatus.
NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.
:return: The phase of this V1NodeStatus.
:rtype: str
"""
return self._phase
@phase.setter
def phase(self, phase):
"""
Sets the phase of this V1NodeStatus.
NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.
:param phase: The phase of this V1NodeStatus.
:type: str
"""
self._phase = phase
@property
def volumes_attached(self):
"""
Gets the volumes_attached of this V1NodeStatus.
List of volumes that are attached to the node.
:return: The volumes_attached of this V1NodeStatus.
:rtype: list[V1AttachedVolume]
"""
return self._volumes_attached
@volumes_attached.setter
def volumes_attached(self, volumes_attached):
"""
Sets the volumes_attached of this V1NodeStatus.
List of volumes that are attached to the node.
:param volumes_attached: The volumes_attached of this V1NodeStatus.
:type: list[V1AttachedVolume]
"""
self._volumes_attached = volumes_attached
@property
def volumes_in_use(self):
"""
Gets the volumes_in_use of this V1NodeStatus.
List of attachable volumes in use (mounted) by the node.
:return: The volumes_in_use of this V1NodeStatus.
:rtype: list[str]
"""
return self._volumes_in_use
@volumes_in_use.setter
def volumes_in_use(self, volumes_in_use):
"""
Sets the volumes_in_use of this V1NodeStatus.
List of attachable volumes in use (mounted) by the node.
:param volumes_in_use: The volumes_in_use of this V1NodeStatus.
:type: list[str]
"""
self._volumes_in_use = volumes_in_use
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_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 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
"""
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other
|