Adding batch_v1 api support

Change-Id: I37cfdc92f1ff9cf4ff96b9d0ca14e3b777890ffc
This commit is contained in:
Andrey Pavlov 2016-05-27 14:05:26 +03:00 committed by Davanum Srinivas
parent 793696fd9a
commit 5d0f2a67a3
67 changed files with 14606 additions and 5 deletions

View File

@ -19,6 +19,7 @@ Copyright 2015 SmartBear Software
from __future__ import absolute_import
from . import models
from .models import extensions_beta
from .models import batch
from .rest import RESTClient
from .rest import ApiException
@ -267,12 +268,9 @@ class ApiClient(object):
if klass in ['int', 'float', 'str', 'bool',
"date", 'datetime', "object"]:
klass = getattr(__builtin__, klass)
# for model types
else:
try:
klass = getattr(models, klass)
except AttributeError:
klass = getattr(extensions_beta, klass)
klass = getattr(models, klass, None) or getattr(
extensions_beta, klass, None) or getattr(batch, klass)
if klass in [int, float, str, bool]:
return self.__deserialize_primitive(data, klass)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,77 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
# import models into model package
from .v1_se_linux_options import V1SELinuxOptions
from .v1_object_field_selector import V1ObjectFieldSelector
from .v1_volume_mount import V1VolumeMount
from .v1_nfs_volume_source import V1NFSVolumeSource
from .v1_label_selector import V1LabelSelector
from .v1_ceph_fs_volume_source import V1CephFSVolumeSource
from .v1_http_header import V1HTTPHeader
from .v1_fc_volume_source import V1FCVolumeSource
from .v1_downward_api_volume_source import V1DownwardAPIVolumeSource
from .unversioned_status_cause import UnversionedStatusCause
from .v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource
from .v1_tcp_socket_action import V1TCPSocketAction
from .v1_config_map_volume_source import V1ConfigMapVolumeSource
from .unversioned_status_details import UnversionedStatusDetails
from .v1_git_repo_volume_source import V1GitRepoVolumeSource
from .v1_http_get_action import V1HTTPGetAction
from .v1_capabilities import V1Capabilities
from .v1_local_object_reference import V1LocalObjectReference
from .v1_container import V1Container
from .v1_pod_security_context import V1PodSecurityContext
from .v1_exec_action import V1ExecAction
from .v1_job_status import V1JobStatus
from .v1_object_meta import V1ObjectMeta
from .v1_host_path_volume_source import V1HostPathVolumeSource
from .v1_azure_file_volume_source import V1AzureFileVolumeSource
from .v1_iscsi_volume_source import V1ISCSIVolumeSource
from .json_watch_event import JsonWatchEvent
from .v1_empty_dir_volume_source import V1EmptyDirVolumeSource
from .unversioned_patch import UnversionedPatch
from .v1_cinder_volume_source import V1CinderVolumeSource
from .v1_security_context import V1SecurityContext
from .v1_persistent_volume_claim_volume_source import V1PersistentVolumeClaimVolumeSource
from .v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
from .v1_flocker_volume_source import V1FlockerVolumeSource
from .unversioned_list_meta import UnversionedListMeta
from .v1_job import V1Job
from .v1_job_condition import V1JobCondition
from .v1_job_list import V1JobList
from .v1_secret_volume_source import V1SecretVolumeSource
from .v1_label_selector_requirement import V1LabelSelectorRequirement
from .v1_env_var import V1EnvVar
from .v1_resource_requirements import V1ResourceRequirements
from .v1_flex_volume_source import V1FlexVolumeSource
from .v1_env_var_source import V1EnvVarSource
from .v1_pod_template_spec import V1PodTemplateSpec
from .v1_key_to_path import V1KeyToPath
from .v1_job_spec import V1JobSpec
from .v1_delete_options import V1DeleteOptions
from .v1_volume import V1Volume
from .integer import Integer
from .v1_probe import V1Probe
from .v1_secret_key_selector import V1SecretKeySelector
from .unversioned_status import UnversionedStatus
from .v1_capability import V1Capability
from .v1_downward_api_volume_file import V1DownwardAPIVolumeFile
from .v1_pod_spec import V1PodSpec
from .v1_container_port import V1ContainerPort
from .v1_lifecycle import V1Lifecycle
from .v1_config_map_key_selector import V1ConfigMapKeySelector
from .v1_glusterfs_volume_source import V1GlusterfsVolumeSource
from .v1_handler import V1Handler
from .v1_rbd_volume_source import V1RBDVolumeSource

View File

@ -0,0 +1,76 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class Integer(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
}
self.attribute_map = {
}
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class JsonWatchEvent(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'type': 'str',
'object': 'str'
}
self.attribute_map = {
'type': 'type',
'object': 'object'
}
self._type = None
self._object = None
@property
def type(self):
"""
Gets the type of this JsonWatchEvent.
the type of watch event; may be ADDED, MODIFIED, DELETED, or ERROR
:return: The type of this JsonWatchEvent.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""
Sets the type of this JsonWatchEvent.
the type of watch event; may be ADDED, MODIFIED, DELETED, or ERROR
:param type: The type of this JsonWatchEvent.
:type: str
"""
self._type = type
@property
def object(self):
"""
Gets the object of this JsonWatchEvent.
the object being watched; will match the type of the resource endpoint or be a Status object if the type is ERROR
:return: The object of this JsonWatchEvent.
:rtype: str
"""
return self._object
@object.setter
def object(self, object):
"""
Sets the object of this JsonWatchEvent.
the object being watched; will match the type of the resource endpoint or be a Status object if the type is ERROR
:param object: The object of this JsonWatchEvent.
:type: str
"""
self._object = object
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class UnversionedListMeta(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'self_link': 'str',
'resource_version': 'str'
}
self.attribute_map = {
'self_link': 'selfLink',
'resource_version': 'resourceVersion'
}
self._self_link = None
self._resource_version = None
@property
def self_link(self):
"""
Gets the self_link of this UnversionedListMeta.
SelfLink is a URL representing this object. Populated by the system. Read-only.
:return: The self_link of this UnversionedListMeta.
:rtype: str
"""
return self._self_link
@self_link.setter
def self_link(self, self_link):
"""
Sets the self_link of this UnversionedListMeta.
SelfLink is a URL representing this object. Populated by the system. Read-only.
:param self_link: The self_link of this UnversionedListMeta.
:type: str
"""
self._self_link = self_link
@property
def resource_version(self):
"""
Gets the resource_version of this UnversionedListMeta.
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#concurrency-control-and-consistency
:return: The resource_version of this UnversionedListMeta.
:rtype: str
"""
return self._resource_version
@resource_version.setter
def resource_version(self, resource_version):
"""
Sets the resource_version of this UnversionedListMeta.
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#concurrency-control-and-consistency
:param resource_version: The resource_version of this UnversionedListMeta.
:type: str
"""
self._resource_version = resource_version
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,76 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class UnversionedPatch(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
}
self.attribute_map = {
}
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,274 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class UnversionedStatus(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'kind': 'str',
'api_version': 'str',
'metadata': 'UnversionedListMeta',
'status': 'str',
'message': 'str',
'reason': 'str',
'details': 'UnversionedStatusDetails',
'code': 'int'
}
self.attribute_map = {
'kind': 'kind',
'api_version': 'apiVersion',
'metadata': 'metadata',
'status': 'status',
'message': 'message',
'reason': 'reason',
'details': 'details',
'code': 'code'
}
self._kind = None
self._api_version = None
self._metadata = None
self._status = None
self._message = None
self._reason = None
self._details = None
self._code = None
@property
def kind(self):
"""
Gets the kind of this UnversionedStatus.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The kind of this UnversionedStatus.
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this UnversionedStatus.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param kind: The kind of this UnversionedStatus.
:type: str
"""
self._kind = kind
@property
def api_version(self):
"""
Gets the api_version of this UnversionedStatus.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:return: The api_version of this UnversionedStatus.
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
"""
Sets the api_version of this UnversionedStatus.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:param api_version: The api_version of this UnversionedStatus.
:type: str
"""
self._api_version = api_version
@property
def metadata(self):
"""
Gets the metadata of this UnversionedStatus.
Standard list metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The metadata of this UnversionedStatus.
:rtype: UnversionedListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""
Sets the metadata of this UnversionedStatus.
Standard list metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param metadata: The metadata of this UnversionedStatus.
:type: UnversionedListMeta
"""
self._metadata = metadata
@property
def status(self):
"""
Gets the status of this UnversionedStatus.
Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:return: The status of this UnversionedStatus.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this UnversionedStatus.
Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:param status: The status of this UnversionedStatus.
:type: str
"""
self._status = status
@property
def message(self):
"""
Gets the message of this UnversionedStatus.
A human-readable description of the status of this operation.
:return: The message of this UnversionedStatus.
:rtype: str
"""
return self._message
@message.setter
def message(self, message):
"""
Sets the message of this UnversionedStatus.
A human-readable description of the status of this operation.
:param message: The message of this UnversionedStatus.
:type: str
"""
self._message = message
@property
def reason(self):
"""
Gets the reason of this UnversionedStatus.
A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
:return: The reason of this UnversionedStatus.
:rtype: str
"""
return self._reason
@reason.setter
def reason(self, reason):
"""
Sets the reason of this UnversionedStatus.
A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
:param reason: The reason of this UnversionedStatus.
:type: str
"""
self._reason = reason
@property
def details(self):
"""
Gets the details of this UnversionedStatus.
Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
:return: The details of this UnversionedStatus.
:rtype: UnversionedStatusDetails
"""
return self._details
@details.setter
def details(self, details):
"""
Sets the details of this UnversionedStatus.
Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
:param details: The details of this UnversionedStatus.
:type: UnversionedStatusDetails
"""
self._details = details
@property
def code(self):
"""
Gets the code of this UnversionedStatus.
Suggested HTTP return code for this status, 0 if not set.
:return: The code of this UnversionedStatus.
:rtype: int
"""
return self._code
@code.setter
def code(self, code):
"""
Sets the code of this UnversionedStatus.
Suggested HTTP return code for this status, 0 if not set.
:param code: The code of this UnversionedStatus.
:type: int
"""
self._code = code
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class UnversionedStatusCause(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'reason': 'str',
'message': 'str',
'field': 'str'
}
self.attribute_map = {
'reason': 'reason',
'message': 'message',
'field': 'field'
}
self._reason = None
self._message = None
self._field = None
@property
def reason(self):
"""
Gets the reason of this UnversionedStatusCause.
A machine-readable description of the cause of the error. If this value is empty there is no information available.
:return: The reason of this UnversionedStatusCause.
:rtype: str
"""
return self._reason
@reason.setter
def reason(self, reason):
"""
Sets the reason of this UnversionedStatusCause.
A machine-readable description of the cause of the error. If this value is empty there is no information available.
:param reason: The reason of this UnversionedStatusCause.
:type: str
"""
self._reason = reason
@property
def message(self):
"""
Gets the message of this UnversionedStatusCause.
A human-readable description of the cause of the error. This field may be presented as-is to a reader.
:return: The message of this UnversionedStatusCause.
:rtype: str
"""
return self._message
@message.setter
def message(self, message):
"""
Sets the message of this UnversionedStatusCause.
A human-readable description of the cause of the error. This field may be presented as-is to a reader.
:param message: The message of this UnversionedStatusCause.
:type: str
"""
self._message = message
@property
def field(self):
"""
Gets the field of this UnversionedStatusCause.
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"
:return: The field of this UnversionedStatusCause.
:rtype: str
"""
return self._field
@field.setter
def field(self, field):
"""
Sets the field of this UnversionedStatusCause.
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"
:param field: The field of this UnversionedStatusCause.
:type: str
"""
self._field = field
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class UnversionedStatusDetails(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'group': 'str',
'kind': 'str',
'causes': 'list[UnversionedStatusCause]',
'retry_after_seconds': 'int'
}
self.attribute_map = {
'name': 'name',
'group': 'group',
'kind': 'kind',
'causes': 'causes',
'retry_after_seconds': 'retryAfterSeconds'
}
self._name = None
self._group = None
self._kind = None
self._causes = None
self._retry_after_seconds = None
@property
def name(self):
"""
Gets the name of this UnversionedStatusDetails.
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
:return: The name of this UnversionedStatusDetails.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this UnversionedStatusDetails.
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
:param name: The name of this UnversionedStatusDetails.
:type: str
"""
self._name = name
@property
def group(self):
"""
Gets the group of this UnversionedStatusDetails.
The group attribute of the resource associated with the status StatusReason.
:return: The group of this UnversionedStatusDetails.
:rtype: str
"""
return self._group
@group.setter
def group(self, group):
"""
Sets the group of this UnversionedStatusDetails.
The group attribute of the resource associated with the status StatusReason.
:param group: The group of this UnversionedStatusDetails.
:type: str
"""
self._group = group
@property
def kind(self):
"""
Gets the kind of this UnversionedStatusDetails.
The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The kind of this UnversionedStatusDetails.
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this UnversionedStatusDetails.
The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param kind: The kind of this UnversionedStatusDetails.
:type: str
"""
self._kind = kind
@property
def causes(self):
"""
Gets the causes of this UnversionedStatusDetails.
The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
:return: The causes of this UnversionedStatusDetails.
:rtype: list[UnversionedStatusCause]
"""
return self._causes
@causes.setter
def causes(self, causes):
"""
Sets the causes of this UnversionedStatusDetails.
The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
:param causes: The causes of this UnversionedStatusDetails.
:type: list[UnversionedStatusCause]
"""
self._causes = causes
@property
def retry_after_seconds(self):
"""
Gets the retry_after_seconds of this UnversionedStatusDetails.
If specified, the time in seconds before the operation should be retried.
:return: The retry_after_seconds of this UnversionedStatusDetails.
:rtype: int
"""
return self._retry_after_seconds
@retry_after_seconds.setter
def retry_after_seconds(self, retry_after_seconds):
"""
Sets the retry_after_seconds of this UnversionedStatusDetails.
If specified, the time in seconds before the operation should be retried.
:param retry_after_seconds: The retry_after_seconds of this UnversionedStatusDetails.
:type: int
"""
self._retry_after_seconds = retry_after_seconds
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,174 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1AWSElasticBlockStoreVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'volume_id': 'str',
'fs_type': 'str',
'partition': 'int',
'read_only': 'bool'
}
self.attribute_map = {
'volume_id': 'volumeID',
'fs_type': 'fsType',
'partition': 'partition',
'read_only': 'readOnly'
}
self._volume_id = None
self._fs_type = None
self._partition = None
self._read_only = None
@property
def volume_id(self):
"""
Gets the volume_id of this V1AWSElasticBlockStoreVolumeSource.
Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:return: The volume_id of this V1AWSElasticBlockStoreVolumeSource.
:rtype: str
"""
return self._volume_id
@volume_id.setter
def volume_id(self, volume_id):
"""
Sets the volume_id of this V1AWSElasticBlockStoreVolumeSource.
Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:param volume_id: The volume_id of this V1AWSElasticBlockStoreVolumeSource.
:type: str
"""
self._volume_id = volume_id
@property
def fs_type(self):
"""
Gets the fs_type of this V1AWSElasticBlockStoreVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:return: The fs_type of this V1AWSElasticBlockStoreVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1AWSElasticBlockStoreVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:param fs_type: The fs_type of this V1AWSElasticBlockStoreVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def partition(self):
"""
Gets the partition of this V1AWSElasticBlockStoreVolumeSource.
The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).
:return: The partition of this V1AWSElasticBlockStoreVolumeSource.
:rtype: int
"""
return self._partition
@partition.setter
def partition(self, partition):
"""
Sets the partition of this V1AWSElasticBlockStoreVolumeSource.
The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).
:param partition: The partition of this V1AWSElasticBlockStoreVolumeSource.
:type: int
"""
self._partition = partition
@property
def read_only(self):
"""
Gets the read_only of this V1AWSElasticBlockStoreVolumeSource.
Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:return: The read_only of this V1AWSElasticBlockStoreVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1AWSElasticBlockStoreVolumeSource.
Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:param read_only: The read_only of this V1AWSElasticBlockStoreVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1AzureFileVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'secret_name': 'str',
'share_name': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'secret_name': 'secretName',
'share_name': 'shareName',
'read_only': 'readOnly'
}
self._secret_name = None
self._share_name = None
self._read_only = None
@property
def secret_name(self):
"""
Gets the secret_name of this V1AzureFileVolumeSource.
the name of secret that contains Azure Storage Account Name and Key
:return: The secret_name of this V1AzureFileVolumeSource.
:rtype: str
"""
return self._secret_name
@secret_name.setter
def secret_name(self, secret_name):
"""
Sets the secret_name of this V1AzureFileVolumeSource.
the name of secret that contains Azure Storage Account Name and Key
:param secret_name: The secret_name of this V1AzureFileVolumeSource.
:type: str
"""
self._secret_name = secret_name
@property
def share_name(self):
"""
Gets the share_name of this V1AzureFileVolumeSource.
Share Name
:return: The share_name of this V1AzureFileVolumeSource.
:rtype: str
"""
return self._share_name
@share_name.setter
def share_name(self, share_name):
"""
Sets the share_name of this V1AzureFileVolumeSource.
Share Name
:param share_name: The share_name of this V1AzureFileVolumeSource.
:type: str
"""
self._share_name = share_name
@property
def read_only(self):
"""
Gets the read_only of this V1AzureFileVolumeSource.
Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:return: The read_only of this V1AzureFileVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1AzureFileVolumeSource.
Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:param read_only: The read_only of this V1AzureFileVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Capabilities(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'add': 'list[V1Capability]',
'drop': 'list[V1Capability]'
}
self.attribute_map = {
'add': 'add',
'drop': 'drop'
}
self._add = None
self._drop = None
@property
def add(self):
"""
Gets the add of this V1Capabilities.
Added capabilities
:return: The add of this V1Capabilities.
:rtype: list[V1Capability]
"""
return self._add
@add.setter
def add(self, add):
"""
Sets the add of this V1Capabilities.
Added capabilities
:param add: The add of this V1Capabilities.
:type: list[V1Capability]
"""
self._add = add
@property
def drop(self):
"""
Gets the drop of this V1Capabilities.
Removed capabilities
:return: The drop of this V1Capabilities.
:rtype: list[V1Capability]
"""
return self._drop
@drop.setter
def drop(self, drop):
"""
Sets the drop of this V1Capabilities.
Removed capabilities
:param drop: The drop of this V1Capabilities.
:type: list[V1Capability]
"""
self._drop = drop
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,76 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Capability(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
}
self.attribute_map = {
}
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1CephFSVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'monitors': 'list[str]',
'path': 'str',
'user': 'str',
'secret_file': 'str',
'secret_ref': 'V1LocalObjectReference',
'read_only': 'bool'
}
self.attribute_map = {
'monitors': 'monitors',
'path': 'path',
'user': 'user',
'secret_file': 'secretFile',
'secret_ref': 'secretRef',
'read_only': 'readOnly'
}
self._monitors = None
self._path = None
self._user = None
self._secret_file = None
self._secret_ref = None
self._read_only = None
@property
def monitors(self):
"""
Gets the monitors of this V1CephFSVolumeSource.
Required: Monitors is a collection of Ceph monitors More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:return: The monitors of this V1CephFSVolumeSource.
:rtype: list[str]
"""
return self._monitors
@monitors.setter
def monitors(self, monitors):
"""
Sets the monitors of this V1CephFSVolumeSource.
Required: Monitors is a collection of Ceph monitors More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:param monitors: The monitors of this V1CephFSVolumeSource.
:type: list[str]
"""
self._monitors = monitors
@property
def path(self):
"""
Gets the path of this V1CephFSVolumeSource.
Optional: Used as the mounted root, rather than the full Ceph tree, default is /
:return: The path of this V1CephFSVolumeSource.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1CephFSVolumeSource.
Optional: Used as the mounted root, rather than the full Ceph tree, default is /
:param path: The path of this V1CephFSVolumeSource.
:type: str
"""
self._path = path
@property
def user(self):
"""
Gets the user of this V1CephFSVolumeSource.
Optional: User is the rados user name, default is admin More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:return: The user of this V1CephFSVolumeSource.
:rtype: str
"""
return self._user
@user.setter
def user(self, user):
"""
Sets the user of this V1CephFSVolumeSource.
Optional: User is the rados user name, default is admin More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:param user: The user of this V1CephFSVolumeSource.
:type: str
"""
self._user = user
@property
def secret_file(self):
"""
Gets the secret_file of this V1CephFSVolumeSource.
Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:return: The secret_file of this V1CephFSVolumeSource.
:rtype: str
"""
return self._secret_file
@secret_file.setter
def secret_file(self, secret_file):
"""
Sets the secret_file of this V1CephFSVolumeSource.
Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:param secret_file: The secret_file of this V1CephFSVolumeSource.
:type: str
"""
self._secret_file = secret_file
@property
def secret_ref(self):
"""
Gets the secret_ref of this V1CephFSVolumeSource.
Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:return: The secret_ref of this V1CephFSVolumeSource.
:rtype: V1LocalObjectReference
"""
return self._secret_ref
@secret_ref.setter
def secret_ref(self, secret_ref):
"""
Sets the secret_ref of this V1CephFSVolumeSource.
Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:param secret_ref: The secret_ref of this V1CephFSVolumeSource.
:type: V1LocalObjectReference
"""
self._secret_ref = secret_ref
@property
def read_only(self):
"""
Gets the read_only of this V1CephFSVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:return: The read_only of this V1CephFSVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1CephFSVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/release-1.2/examples/cephfs/README.md#how-to-use-it
:param read_only: The read_only of this V1CephFSVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1CinderVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'volume_id': 'str',
'fs_type': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'volume_id': 'volumeID',
'fs_type': 'fsType',
'read_only': 'readOnly'
}
self._volume_id = None
self._fs_type = None
self._read_only = None
@property
def volume_id(self):
"""
Gets the volume_id of this V1CinderVolumeSource.
volume id used to identify the volume in cinder More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:return: The volume_id of this V1CinderVolumeSource.
:rtype: str
"""
return self._volume_id
@volume_id.setter
def volume_id(self, volume_id):
"""
Sets the volume_id of this V1CinderVolumeSource.
volume id used to identify the volume in cinder More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:param volume_id: The volume_id of this V1CinderVolumeSource.
:type: str
"""
self._volume_id = volume_id
@property
def fs_type(self):
"""
Gets the fs_type of this V1CinderVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:return: The fs_type of this V1CinderVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1CinderVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:param fs_type: The fs_type of this V1CinderVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def read_only(self):
"""
Gets the read_only of this V1CinderVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:return: The read_only of this V1CinderVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1CinderVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:param read_only: The read_only of this V1CinderVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ConfigMapKeySelector(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'key': 'str'
}
self.attribute_map = {
'name': 'name',
'key': 'key'
}
self._name = None
self._key = None
@property
def name(self):
"""
Gets the name of this V1ConfigMapKeySelector.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1ConfigMapKeySelector.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1ConfigMapKeySelector.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1ConfigMapKeySelector.
:type: str
"""
self._name = name
@property
def key(self):
"""
Gets the key of this V1ConfigMapKeySelector.
The key to select.
:return: The key of this V1ConfigMapKeySelector.
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
"""
Sets the key of this V1ConfigMapKeySelector.
The key to select.
:param key: The key of this V1ConfigMapKeySelector.
:type: str
"""
self._key = key
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ConfigMapVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'items': 'list[V1KeyToPath]'
}
self.attribute_map = {
'name': 'name',
'items': 'items'
}
self._name = None
self._items = None
@property
def name(self):
"""
Gets the name of this V1ConfigMapVolumeSource.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1ConfigMapVolumeSource.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1ConfigMapVolumeSource.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1ConfigMapVolumeSource.
:type: str
"""
self._name = name
@property
def items(self):
"""
Gets the items of this V1ConfigMapVolumeSource.
If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.
:return: The items of this V1ConfigMapVolumeSource.
:rtype: list[V1KeyToPath]
"""
return self._items
@items.setter
def items(self, items):
"""
Sets the items of this V1ConfigMapVolumeSource.
If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.
:param items: The items of this V1ConfigMapVolumeSource.
:type: list[V1KeyToPath]
"""
self._items = items
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,524 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Container(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'image': 'str',
'command': 'list[str]',
'args': 'list[str]',
'working_dir': 'str',
'ports': 'list[V1ContainerPort]',
'env': 'list[V1EnvVar]',
'resources': 'V1ResourceRequirements',
'volume_mounts': 'list[V1VolumeMount]',
'liveness_probe': 'V1Probe',
'readiness_probe': 'V1Probe',
'lifecycle': 'V1Lifecycle',
'termination_message_path': 'str',
'image_pull_policy': 'str',
'security_context': 'V1SecurityContext',
'stdin': 'bool',
'stdin_once': 'bool',
'tty': 'bool'
}
self.attribute_map = {
'name': 'name',
'image': 'image',
'command': 'command',
'args': 'args',
'working_dir': 'workingDir',
'ports': 'ports',
'env': 'env',
'resources': 'resources',
'volume_mounts': 'volumeMounts',
'liveness_probe': 'livenessProbe',
'readiness_probe': 'readinessProbe',
'lifecycle': 'lifecycle',
'termination_message_path': 'terminationMessagePath',
'image_pull_policy': 'imagePullPolicy',
'security_context': 'securityContext',
'stdin': 'stdin',
'stdin_once': 'stdinOnce',
'tty': 'tty'
}
self._name = None
self._image = None
self._command = None
self._args = None
self._working_dir = None
self._ports = None
self._env = None
self._resources = None
self._volume_mounts = None
self._liveness_probe = None
self._readiness_probe = None
self._lifecycle = None
self._termination_message_path = None
self._image_pull_policy = None
self._security_context = None
self._stdin = None
self._stdin_once = None
self._tty = None
@property
def name(self):
"""
Gets the name of this V1Container.
Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
:return: The name of this V1Container.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1Container.
Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
:param name: The name of this V1Container.
:type: str
"""
self._name = name
@property
def image(self):
"""
Gets the image of this V1Container.
Docker image name. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md
:return: The image of this V1Container.
:rtype: str
"""
return self._image
@image.setter
def image(self, image):
"""
Sets the image of this V1Container.
Docker image name. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md
:param image: The image of this V1Container.
:type: str
"""
self._image = image
@property
def command(self):
"""
Gets the command of this V1Container.
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md#containers-and-commands
:return: The command of this V1Container.
:rtype: list[str]
"""
return self._command
@command.setter
def command(self, command):
"""
Sets the command of this V1Container.
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md#containers-and-commands
:param command: The command of this V1Container.
:type: list[str]
"""
self._command = command
@property
def args(self):
"""
Gets the args of this V1Container.
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md#containers-and-commands
:return: The args of this V1Container.
:rtype: list[str]
"""
return self._args
@args.setter
def args(self, args):
"""
Sets the args of this V1Container.
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md#containers-and-commands
:param args: The args of this V1Container.
:type: list[str]
"""
self._args = args
@property
def working_dir(self):
"""
Gets the working_dir of this V1Container.
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
:return: The working_dir of this V1Container.
:rtype: str
"""
return self._working_dir
@working_dir.setter
def working_dir(self, working_dir):
"""
Sets the working_dir of this V1Container.
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
:param working_dir: The working_dir of this V1Container.
:type: str
"""
self._working_dir = working_dir
@property
def ports(self):
"""
Gets the ports of this V1Container.
List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.
:return: The ports of this V1Container.
:rtype: list[V1ContainerPort]
"""
return self._ports
@ports.setter
def ports(self, ports):
"""
Sets the ports of this V1Container.
List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.
:param ports: The ports of this V1Container.
:type: list[V1ContainerPort]
"""
self._ports = ports
@property
def env(self):
"""
Gets the env of this V1Container.
List of environment variables to set in the container. Cannot be updated.
:return: The env of this V1Container.
:rtype: list[V1EnvVar]
"""
return self._env
@env.setter
def env(self, env):
"""
Sets the env of this V1Container.
List of environment variables to set in the container. Cannot be updated.
:param env: The env of this V1Container.
:type: list[V1EnvVar]
"""
self._env = env
@property
def resources(self):
"""
Gets the resources of this V1Container.
Compute Resources required by this container. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#resources
:return: The resources of this V1Container.
:rtype: V1ResourceRequirements
"""
return self._resources
@resources.setter
def resources(self, resources):
"""
Sets the resources of this V1Container.
Compute Resources required by this container. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#resources
:param resources: The resources of this V1Container.
:type: V1ResourceRequirements
"""
self._resources = resources
@property
def volume_mounts(self):
"""
Gets the volume_mounts of this V1Container.
Pod volumes to mount into the container's filesyste. Cannot be updated.
:return: The volume_mounts of this V1Container.
:rtype: list[V1VolumeMount]
"""
return self._volume_mounts
@volume_mounts.setter
def volume_mounts(self, volume_mounts):
"""
Sets the volume_mounts of this V1Container.
Pod volumes to mount into the container's filesyste. Cannot be updated.
:param volume_mounts: The volume_mounts of this V1Container.
:type: list[V1VolumeMount]
"""
self._volume_mounts = volume_mounts
@property
def liveness_probe(self):
"""
Gets the liveness_probe of this V1Container.
Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:return: The liveness_probe of this V1Container.
:rtype: V1Probe
"""
return self._liveness_probe
@liveness_probe.setter
def liveness_probe(self, liveness_probe):
"""
Sets the liveness_probe of this V1Container.
Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:param liveness_probe: The liveness_probe of this V1Container.
:type: V1Probe
"""
self._liveness_probe = liveness_probe
@property
def readiness_probe(self):
"""
Gets the readiness_probe of this V1Container.
Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:return: The readiness_probe of this V1Container.
:rtype: V1Probe
"""
return self._readiness_probe
@readiness_probe.setter
def readiness_probe(self, readiness_probe):
"""
Sets the readiness_probe of this V1Container.
Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:param readiness_probe: The readiness_probe of this V1Container.
:type: V1Probe
"""
self._readiness_probe = readiness_probe
@property
def lifecycle(self):
"""
Gets the lifecycle of this V1Container.
Actions that the management system should take in response to container lifecycle events. Cannot be updated.
:return: The lifecycle of this V1Container.
:rtype: V1Lifecycle
"""
return self._lifecycle
@lifecycle.setter
def lifecycle(self, lifecycle):
"""
Sets the lifecycle of this V1Container.
Actions that the management system should take in response to container lifecycle events. Cannot be updated.
:param lifecycle: The lifecycle of this V1Container.
:type: V1Lifecycle
"""
self._lifecycle = lifecycle
@property
def termination_message_path(self):
"""
Gets the termination_message_path of this V1Container.
Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.
:return: The termination_message_path of this V1Container.
:rtype: str
"""
return self._termination_message_path
@termination_message_path.setter
def termination_message_path(self, termination_message_path):
"""
Sets the termination_message_path of this V1Container.
Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.
:param termination_message_path: The termination_message_path of this V1Container.
:type: str
"""
self._termination_message_path = termination_message_path
@property
def image_pull_policy(self):
"""
Gets the image_pull_policy of this V1Container.
Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md#updating-images
:return: The image_pull_policy of this V1Container.
:rtype: str
"""
return self._image_pull_policy
@image_pull_policy.setter
def image_pull_policy(self, image_pull_policy):
"""
Sets the image_pull_policy of this V1Container.
Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md#updating-images
:param image_pull_policy: The image_pull_policy of this V1Container.
:type: str
"""
self._image_pull_policy = image_pull_policy
@property
def security_context(self):
"""
Gets the security_context of this V1Container.
Security options the pod should run with. More info: http://releases.k8s.io/release-1.2/docs/design/security_context.md
:return: The security_context of this V1Container.
:rtype: V1SecurityContext
"""
return self._security_context
@security_context.setter
def security_context(self, security_context):
"""
Sets the security_context of this V1Container.
Security options the pod should run with. More info: http://releases.k8s.io/release-1.2/docs/design/security_context.md
:param security_context: The security_context of this V1Container.
:type: V1SecurityContext
"""
self._security_context = security_context
@property
def stdin(self):
"""
Gets the stdin of this V1Container.
Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
:return: The stdin of this V1Container.
:rtype: bool
"""
return self._stdin
@stdin.setter
def stdin(self, stdin):
"""
Sets the stdin of this V1Container.
Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
:param stdin: The stdin of this V1Container.
:type: bool
"""
self._stdin = stdin
@property
def stdin_once(self):
"""
Gets the stdin_once of this V1Container.
Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
:return: The stdin_once of this V1Container.
:rtype: bool
"""
return self._stdin_once
@stdin_once.setter
def stdin_once(self, stdin_once):
"""
Sets the stdin_once of this V1Container.
Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
:param stdin_once: The stdin_once of this V1Container.
:type: bool
"""
self._stdin_once = stdin_once
@property
def tty(self):
"""
Gets the tty of this V1Container.
Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
:return: The tty of this V1Container.
:rtype: bool
"""
return self._tty
@tty.setter
def tty(self, tty):
"""
Sets the tty of this V1Container.
Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
:param tty: The tty of this V1Container.
:type: bool
"""
self._tty = tty
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ContainerPort(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'host_port': 'int',
'container_port': 'int',
'protocol': 'str',
'host_ip': 'str'
}
self.attribute_map = {
'name': 'name',
'host_port': 'hostPort',
'container_port': 'containerPort',
'protocol': 'protocol',
'host_ip': 'hostIP'
}
self._name = None
self._host_port = None
self._container_port = None
self._protocol = None
self._host_ip = None
@property
def name(self):
"""
Gets the name of this V1ContainerPort.
If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
:return: The name of this V1ContainerPort.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1ContainerPort.
If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
:param name: The name of this V1ContainerPort.
:type: str
"""
self._name = name
@property
def host_port(self):
"""
Gets the host_port of this V1ContainerPort.
Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
:return: The host_port of this V1ContainerPort.
:rtype: int
"""
return self._host_port
@host_port.setter
def host_port(self, host_port):
"""
Sets the host_port of this V1ContainerPort.
Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
:param host_port: The host_port of this V1ContainerPort.
:type: int
"""
self._host_port = host_port
@property
def container_port(self):
"""
Gets the container_port of this V1ContainerPort.
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
:return: The container_port of this V1ContainerPort.
:rtype: int
"""
return self._container_port
@container_port.setter
def container_port(self, container_port):
"""
Sets the container_port of this V1ContainerPort.
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
:param container_port: The container_port of this V1ContainerPort.
:type: int
"""
self._container_port = container_port
@property
def protocol(self):
"""
Gets the protocol of this V1ContainerPort.
Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".
:return: The protocol of this V1ContainerPort.
:rtype: str
"""
return self._protocol
@protocol.setter
def protocol(self, protocol):
"""
Sets the protocol of this V1ContainerPort.
Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".
:param protocol: The protocol of this V1ContainerPort.
:type: str
"""
self._protocol = protocol
@property
def host_ip(self):
"""
Gets the host_ip of this V1ContainerPort.
What host IP to bind the external port to.
:return: The host_ip of this V1ContainerPort.
:rtype: str
"""
return self._host_ip
@host_ip.setter
def host_ip(self, host_ip):
"""
Sets the host_ip of this V1ContainerPort.
What host IP to bind the external port to.
:param host_ip: The host_ip of this V1ContainerPort.
:type: str
"""
self._host_ip = host_ip
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1DeleteOptions(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'kind': 'str',
'api_version': 'str',
'grace_period_seconds': 'int'
}
self.attribute_map = {
'kind': 'kind',
'api_version': 'apiVersion',
'grace_period_seconds': 'gracePeriodSeconds'
}
self._kind = None
self._api_version = None
self._grace_period_seconds = None
@property
def kind(self):
"""
Gets the kind of this V1DeleteOptions.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The kind of this V1DeleteOptions.
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this V1DeleteOptions.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param kind: The kind of this V1DeleteOptions.
:type: str
"""
self._kind = kind
@property
def api_version(self):
"""
Gets the api_version of this V1DeleteOptions.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:return: The api_version of this V1DeleteOptions.
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
"""
Sets the api_version of this V1DeleteOptions.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:param api_version: The api_version of this V1DeleteOptions.
:type: str
"""
self._api_version = api_version
@property
def grace_period_seconds(self):
"""
Gets the grace_period_seconds of this V1DeleteOptions.
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:return: The grace_period_seconds of this V1DeleteOptions.
:rtype: int
"""
return self._grace_period_seconds
@grace_period_seconds.setter
def grace_period_seconds(self, grace_period_seconds):
"""
Sets the grace_period_seconds of this V1DeleteOptions.
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
:param grace_period_seconds: The grace_period_seconds of this V1DeleteOptions.
:type: int
"""
self._grace_period_seconds = grace_period_seconds
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1DownwardAPIVolumeFile(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'path': 'str',
'field_ref': 'V1ObjectFieldSelector'
}
self.attribute_map = {
'path': 'path',
'field_ref': 'fieldRef'
}
self._path = None
self._field_ref = None
@property
def path(self):
"""
Gets the path of this V1DownwardAPIVolumeFile.
Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
:return: The path of this V1DownwardAPIVolumeFile.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1DownwardAPIVolumeFile.
Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
:param path: The path of this V1DownwardAPIVolumeFile.
:type: str
"""
self._path = path
@property
def field_ref(self):
"""
Gets the field_ref of this V1DownwardAPIVolumeFile.
Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
:return: The field_ref of this V1DownwardAPIVolumeFile.
:rtype: V1ObjectFieldSelector
"""
return self._field_ref
@field_ref.setter
def field_ref(self, field_ref):
"""
Sets the field_ref of this V1DownwardAPIVolumeFile.
Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
:param field_ref: The field_ref of this V1DownwardAPIVolumeFile.
:type: V1ObjectFieldSelector
"""
self._field_ref = field_ref
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1DownwardAPIVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'items': 'list[V1DownwardAPIVolumeFile]'
}
self.attribute_map = {
'items': 'items'
}
self._items = None
@property
def items(self):
"""
Gets the items of this V1DownwardAPIVolumeSource.
Items is a list of downward API volume file
:return: The items of this V1DownwardAPIVolumeSource.
:rtype: list[V1DownwardAPIVolumeFile]
"""
return self._items
@items.setter
def items(self, items):
"""
Sets the items of this V1DownwardAPIVolumeSource.
Items is a list of downward API volume file
:param items: The items of this V1DownwardAPIVolumeSource.
:type: list[V1DownwardAPIVolumeFile]
"""
self._items = items
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1EmptyDirVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'medium': 'str'
}
self.attribute_map = {
'medium': 'medium'
}
self._medium = None
@property
def medium(self):
"""
Gets the medium of this V1EmptyDirVolumeSource.
What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#emptydir
:return: The medium of this V1EmptyDirVolumeSource.
:rtype: str
"""
return self._medium
@medium.setter
def medium(self, medium):
"""
Sets the medium of this V1EmptyDirVolumeSource.
What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#emptydir
:param medium: The medium of this V1EmptyDirVolumeSource.
:type: str
"""
self._medium = medium
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1EnvVar(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'value': 'str',
'value_from': 'V1EnvVarSource'
}
self.attribute_map = {
'name': 'name',
'value': 'value',
'value_from': 'valueFrom'
}
self._name = None
self._value = None
self._value_from = None
@property
def name(self):
"""
Gets the name of this V1EnvVar.
Name of the environment variable. Must be a C_IDENTIFIER.
:return: The name of this V1EnvVar.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1EnvVar.
Name of the environment variable. Must be a C_IDENTIFIER.
:param name: The name of this V1EnvVar.
:type: str
"""
self._name = name
@property
def value(self):
"""
Gets the value of this V1EnvVar.
Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".
:return: The value of this V1EnvVar.
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
"""
Sets the value of this V1EnvVar.
Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".
:param value: The value of this V1EnvVar.
:type: str
"""
self._value = value
@property
def value_from(self):
"""
Gets the value_from of this V1EnvVar.
Source for the environment variable's value. Cannot be used if value is not empty.
:return: The value_from of this V1EnvVar.
:rtype: V1EnvVarSource
"""
return self._value_from
@value_from.setter
def value_from(self, value_from):
"""
Sets the value_from of this V1EnvVar.
Source for the environment variable's value. Cannot be used if value is not empty.
:param value_from: The value_from of this V1EnvVar.
:type: V1EnvVarSource
"""
self._value_from = value_from
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1EnvVarSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'field_ref': 'V1ObjectFieldSelector',
'config_map_key_ref': 'V1ConfigMapKeySelector',
'secret_key_ref': 'V1SecretKeySelector'
}
self.attribute_map = {
'field_ref': 'fieldRef',
'config_map_key_ref': 'configMapKeyRef',
'secret_key_ref': 'secretKeyRef'
}
self._field_ref = None
self._config_map_key_ref = None
self._secret_key_ref = None
@property
def field_ref(self):
"""
Gets the field_ref of this V1EnvVarSource.
Selects a field of the pod; only name and namespace are supported.
:return: The field_ref of this V1EnvVarSource.
:rtype: V1ObjectFieldSelector
"""
return self._field_ref
@field_ref.setter
def field_ref(self, field_ref):
"""
Sets the field_ref of this V1EnvVarSource.
Selects a field of the pod; only name and namespace are supported.
:param field_ref: The field_ref of this V1EnvVarSource.
:type: V1ObjectFieldSelector
"""
self._field_ref = field_ref
@property
def config_map_key_ref(self):
"""
Gets the config_map_key_ref of this V1EnvVarSource.
Selects a key of a ConfigMap.
:return: The config_map_key_ref of this V1EnvVarSource.
:rtype: V1ConfigMapKeySelector
"""
return self._config_map_key_ref
@config_map_key_ref.setter
def config_map_key_ref(self, config_map_key_ref):
"""
Sets the config_map_key_ref of this V1EnvVarSource.
Selects a key of a ConfigMap.
:param config_map_key_ref: The config_map_key_ref of this V1EnvVarSource.
:type: V1ConfigMapKeySelector
"""
self._config_map_key_ref = config_map_key_ref
@property
def secret_key_ref(self):
"""
Gets the secret_key_ref of this V1EnvVarSource.
Selects a key of a secret in the pod's namespace
:return: The secret_key_ref of this V1EnvVarSource.
:rtype: V1SecretKeySelector
"""
return self._secret_key_ref
@secret_key_ref.setter
def secret_key_ref(self, secret_key_ref):
"""
Sets the secret_key_ref of this V1EnvVarSource.
Selects a key of a secret in the pod's namespace
:param secret_key_ref: The secret_key_ref of this V1EnvVarSource.
:type: V1SecretKeySelector
"""
self._secret_key_ref = secret_key_ref
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ExecAction(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'command': 'list[str]'
}
self.attribute_map = {
'command': 'command'
}
self._command = None
@property
def command(self):
"""
Gets the command of this V1ExecAction.
Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
:return: The command of this V1ExecAction.
:rtype: list[str]
"""
return self._command
@command.setter
def command(self, command):
"""
Sets the command of this V1ExecAction.
Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
:param command: The command of this V1ExecAction.
:type: list[str]
"""
self._command = command
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,174 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1FCVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'target_ww_ns': 'list[str]',
'lun': 'int',
'fs_type': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'target_ww_ns': 'targetWWNs',
'lun': 'lun',
'fs_type': 'fsType',
'read_only': 'readOnly'
}
self._target_ww_ns = None
self._lun = None
self._fs_type = None
self._read_only = None
@property
def target_ww_ns(self):
"""
Gets the target_ww_ns of this V1FCVolumeSource.
Required: FC target world wide names (WWNs)
:return: The target_ww_ns of this V1FCVolumeSource.
:rtype: list[str]
"""
return self._target_ww_ns
@target_ww_ns.setter
def target_ww_ns(self, target_ww_ns):
"""
Sets the target_ww_ns of this V1FCVolumeSource.
Required: FC target world wide names (WWNs)
:param target_ww_ns: The target_ww_ns of this V1FCVolumeSource.
:type: list[str]
"""
self._target_ww_ns = target_ww_ns
@property
def lun(self):
"""
Gets the lun of this V1FCVolumeSource.
Required: FC target lun number
:return: The lun of this V1FCVolumeSource.
:rtype: int
"""
return self._lun
@lun.setter
def lun(self, lun):
"""
Sets the lun of this V1FCVolumeSource.
Required: FC target lun number
:param lun: The lun of this V1FCVolumeSource.
:type: int
"""
self._lun = lun
@property
def fs_type(self):
"""
Gets the fs_type of this V1FCVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.
:return: The fs_type of this V1FCVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1FCVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.
:param fs_type: The fs_type of this V1FCVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def read_only(self):
"""
Gets the read_only of this V1FCVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:return: The read_only of this V1FCVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1FCVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:param read_only: The read_only of this V1FCVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1FlexVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'driver': 'str',
'fs_type': 'str',
'secret_ref': 'V1LocalObjectReference',
'read_only': 'bool',
'options': 'object'
}
self.attribute_map = {
'driver': 'driver',
'fs_type': 'fsType',
'secret_ref': 'secretRef',
'read_only': 'readOnly',
'options': 'options'
}
self._driver = None
self._fs_type = None
self._secret_ref = None
self._read_only = None
self._options = None
@property
def driver(self):
"""
Gets the driver of this V1FlexVolumeSource.
Driver is the name of the driver to use for this volume.
:return: The driver of this V1FlexVolumeSource.
:rtype: str
"""
return self._driver
@driver.setter
def driver(self, driver):
"""
Sets the driver of this V1FlexVolumeSource.
Driver is the name of the driver to use for this volume.
:param driver: The driver of this V1FlexVolumeSource.
:type: str
"""
self._driver = driver
@property
def fs_type(self):
"""
Gets the fs_type of this V1FlexVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.
:return: The fs_type of this V1FlexVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1FlexVolumeSource.
Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.
:param fs_type: The fs_type of this V1FlexVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def secret_ref(self):
"""
Gets the secret_ref of this V1FlexVolumeSource.
Optional: SecretRef is reference to the authentication secret for User, default is empty.
:return: The secret_ref of this V1FlexVolumeSource.
:rtype: V1LocalObjectReference
"""
return self._secret_ref
@secret_ref.setter
def secret_ref(self, secret_ref):
"""
Sets the secret_ref of this V1FlexVolumeSource.
Optional: SecretRef is reference to the authentication secret for User, default is empty.
:param secret_ref: The secret_ref of this V1FlexVolumeSource.
:type: V1LocalObjectReference
"""
self._secret_ref = secret_ref
@property
def read_only(self):
"""
Gets the read_only of this V1FlexVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:return: The read_only of this V1FlexVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1FlexVolumeSource.
Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
:param read_only: The read_only of this V1FlexVolumeSource.
:type: bool
"""
self._read_only = read_only
@property
def options(self):
"""
Gets the options of this V1FlexVolumeSource.
Optional: Extra command options if any.
:return: The options of this V1FlexVolumeSource.
:rtype: object
"""
return self._options
@options.setter
def options(self, options):
"""
Sets the options of this V1FlexVolumeSource.
Optional: Extra command options if any.
:param options: The options of this V1FlexVolumeSource.
:type: object
"""
self._options = options
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1FlockerVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'dataset_name': 'str'
}
self.attribute_map = {
'dataset_name': 'datasetName'
}
self._dataset_name = None
@property
def dataset_name(self):
"""
Gets the dataset_name of this V1FlockerVolumeSource.
Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
:return: The dataset_name of this V1FlockerVolumeSource.
:rtype: str
"""
return self._dataset_name
@dataset_name.setter
def dataset_name(self, dataset_name):
"""
Sets the dataset_name of this V1FlockerVolumeSource.
Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
:param dataset_name: The dataset_name of this V1FlockerVolumeSource.
:type: str
"""
self._dataset_name = dataset_name
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,174 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1GCEPersistentDiskVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'pd_name': 'str',
'fs_type': 'str',
'partition': 'int',
'read_only': 'bool'
}
self.attribute_map = {
'pd_name': 'pdName',
'fs_type': 'fsType',
'partition': 'partition',
'read_only': 'readOnly'
}
self._pd_name = None
self._fs_type = None
self._partition = None
self._read_only = None
@property
def pd_name(self):
"""
Gets the pd_name of this V1GCEPersistentDiskVolumeSource.
Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:return: The pd_name of this V1GCEPersistentDiskVolumeSource.
:rtype: str
"""
return self._pd_name
@pd_name.setter
def pd_name(self, pd_name):
"""
Sets the pd_name of this V1GCEPersistentDiskVolumeSource.
Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:param pd_name: The pd_name of this V1GCEPersistentDiskVolumeSource.
:type: str
"""
self._pd_name = pd_name
@property
def fs_type(self):
"""
Gets the fs_type of this V1GCEPersistentDiskVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:return: The fs_type of this V1GCEPersistentDiskVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1GCEPersistentDiskVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:param fs_type: The fs_type of this V1GCEPersistentDiskVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def partition(self):
"""
Gets the partition of this V1GCEPersistentDiskVolumeSource.
The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:return: The partition of this V1GCEPersistentDiskVolumeSource.
:rtype: int
"""
return self._partition
@partition.setter
def partition(self, partition):
"""
Sets the partition of this V1GCEPersistentDiskVolumeSource.
The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:param partition: The partition of this V1GCEPersistentDiskVolumeSource.
:type: int
"""
self._partition = partition
@property
def read_only(self):
"""
Gets the read_only of this V1GCEPersistentDiskVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:return: The read_only of this V1GCEPersistentDiskVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1GCEPersistentDiskVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:param read_only: The read_only of this V1GCEPersistentDiskVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1GitRepoVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'repository': 'str',
'revision': 'str',
'directory': 'str'
}
self.attribute_map = {
'repository': 'repository',
'revision': 'revision',
'directory': 'directory'
}
self._repository = None
self._revision = None
self._directory = None
@property
def repository(self):
"""
Gets the repository of this V1GitRepoVolumeSource.
Repository URL
:return: The repository of this V1GitRepoVolumeSource.
:rtype: str
"""
return self._repository
@repository.setter
def repository(self, repository):
"""
Sets the repository of this V1GitRepoVolumeSource.
Repository URL
:param repository: The repository of this V1GitRepoVolumeSource.
:type: str
"""
self._repository = repository
@property
def revision(self):
"""
Gets the revision of this V1GitRepoVolumeSource.
Commit hash for the specified revision.
:return: The revision of this V1GitRepoVolumeSource.
:rtype: str
"""
return self._revision
@revision.setter
def revision(self, revision):
"""
Sets the revision of this V1GitRepoVolumeSource.
Commit hash for the specified revision.
:param revision: The revision of this V1GitRepoVolumeSource.
:type: str
"""
self._revision = revision
@property
def directory(self):
"""
Gets the directory of this V1GitRepoVolumeSource.
Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
:return: The directory of this V1GitRepoVolumeSource.
:rtype: str
"""
return self._directory
@directory.setter
def directory(self, directory):
"""
Sets the directory of this V1GitRepoVolumeSource.
Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
:param directory: The directory of this V1GitRepoVolumeSource.
:type: str
"""
self._directory = directory
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1GlusterfsVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'endpoints': 'str',
'path': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'endpoints': 'endpoints',
'path': 'path',
'read_only': 'readOnly'
}
self._endpoints = None
self._path = None
self._read_only = None
@property
def endpoints(self):
"""
Gets the endpoints of this V1GlusterfsVolumeSource.
EndpointsName is the endpoint name that details Glusterfs topology. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:return: The endpoints of this V1GlusterfsVolumeSource.
:rtype: str
"""
return self._endpoints
@endpoints.setter
def endpoints(self, endpoints):
"""
Sets the endpoints of this V1GlusterfsVolumeSource.
EndpointsName is the endpoint name that details Glusterfs topology. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:param endpoints: The endpoints of this V1GlusterfsVolumeSource.
:type: str
"""
self._endpoints = endpoints
@property
def path(self):
"""
Gets the path of this V1GlusterfsVolumeSource.
Path is the Glusterfs volume path. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:return: The path of this V1GlusterfsVolumeSource.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1GlusterfsVolumeSource.
Path is the Glusterfs volume path. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:param path: The path of this V1GlusterfsVolumeSource.
:type: str
"""
self._path = path
@property
def read_only(self):
"""
Gets the read_only of this V1GlusterfsVolumeSource.
ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:return: The read_only of this V1GlusterfsVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1GlusterfsVolumeSource.
ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md#create-a-pod
:param read_only: The read_only of this V1GlusterfsVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Handler(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'_exec': 'V1ExecAction',
'http_get': 'V1HTTPGetAction',
'tcp_socket': 'V1TCPSocketAction'
}
self.attribute_map = {
'_exec': 'exec',
'http_get': 'httpGet',
'tcp_socket': 'tcpSocket'
}
self.__exec = None
self._http_get = None
self._tcp_socket = None
@property
def _exec(self):
"""
Gets the _exec of this V1Handler.
One and only one of the following should be specified. Exec specifies the action to take.
:return: The _exec of this V1Handler.
:rtype: V1ExecAction
"""
return self.__exec
@_exec.setter
def _exec(self, _exec):
"""
Sets the _exec of this V1Handler.
One and only one of the following should be specified. Exec specifies the action to take.
:param _exec: The _exec of this V1Handler.
:type: V1ExecAction
"""
self.__exec = _exec
@property
def http_get(self):
"""
Gets the http_get of this V1Handler.
HTTPGet specifies the http request to perform.
:return: The http_get of this V1Handler.
:rtype: V1HTTPGetAction
"""
return self._http_get
@http_get.setter
def http_get(self, http_get):
"""
Sets the http_get of this V1Handler.
HTTPGet specifies the http request to perform.
:param http_get: The http_get of this V1Handler.
:type: V1HTTPGetAction
"""
self._http_get = http_get
@property
def tcp_socket(self):
"""
Gets the tcp_socket of this V1Handler.
TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported
:return: The tcp_socket of this V1Handler.
:rtype: V1TCPSocketAction
"""
return self._tcp_socket
@tcp_socket.setter
def tcp_socket(self, tcp_socket):
"""
Sets the tcp_socket of this V1Handler.
TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported
:param tcp_socket: The tcp_socket of this V1Handler.
:type: V1TCPSocketAction
"""
self._tcp_socket = tcp_socket
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1HostPathVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'path': 'str'
}
self.attribute_map = {
'path': 'path'
}
self._path = None
@property
def path(self):
"""
Gets the path of this V1HostPathVolumeSource.
Path of the directory on the host. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#hostpath
:return: The path of this V1HostPathVolumeSource.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1HostPathVolumeSource.
Path of the directory on the host. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#hostpath
:param path: The path of this V1HostPathVolumeSource.
:type: str
"""
self._path = path
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1HTTPGetAction(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'path': 'str',
'port': 'str',
'host': 'str',
'scheme': 'str',
'http_headers': 'list[V1HTTPHeader]'
}
self.attribute_map = {
'path': 'path',
'port': 'port',
'host': 'host',
'scheme': 'scheme',
'http_headers': 'httpHeaders'
}
self._path = None
self._port = None
self._host = None
self._scheme = None
self._http_headers = None
@property
def path(self):
"""
Gets the path of this V1HTTPGetAction.
Path to access on the HTTP server.
:return: The path of this V1HTTPGetAction.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1HTTPGetAction.
Path to access on the HTTP server.
:param path: The path of this V1HTTPGetAction.
:type: str
"""
self._path = path
@property
def port(self):
"""
Gets the port of this V1HTTPGetAction.
Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
:return: The port of this V1HTTPGetAction.
:rtype: str
"""
return self._port
@port.setter
def port(self, port):
"""
Sets the port of this V1HTTPGetAction.
Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
:param port: The port of this V1HTTPGetAction.
:type: str
"""
self._port = port
@property
def host(self):
"""
Gets the host of this V1HTTPGetAction.
Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.
:return: The host of this V1HTTPGetAction.
:rtype: str
"""
return self._host
@host.setter
def host(self, host):
"""
Sets the host of this V1HTTPGetAction.
Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.
:param host: The host of this V1HTTPGetAction.
:type: str
"""
self._host = host
@property
def scheme(self):
"""
Gets the scheme of this V1HTTPGetAction.
Scheme to use for connecting to the host. Defaults to HTTP.
:return: The scheme of this V1HTTPGetAction.
:rtype: str
"""
return self._scheme
@scheme.setter
def scheme(self, scheme):
"""
Sets the scheme of this V1HTTPGetAction.
Scheme to use for connecting to the host. Defaults to HTTP.
:param scheme: The scheme of this V1HTTPGetAction.
:type: str
"""
self._scheme = scheme
@property
def http_headers(self):
"""
Gets the http_headers of this V1HTTPGetAction.
Custom headers to set in the request. HTTP allows repeated headers.
:return: The http_headers of this V1HTTPGetAction.
:rtype: list[V1HTTPHeader]
"""
return self._http_headers
@http_headers.setter
def http_headers(self, http_headers):
"""
Sets the http_headers of this V1HTTPGetAction.
Custom headers to set in the request. HTTP allows repeated headers.
:param http_headers: The http_headers of this V1HTTPGetAction.
:type: list[V1HTTPHeader]
"""
self._http_headers = http_headers
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1HTTPHeader(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'value': 'str'
}
self.attribute_map = {
'name': 'name',
'value': 'value'
}
self._name = None
self._value = None
@property
def name(self):
"""
Gets the name of this V1HTTPHeader.
The header field name
:return: The name of this V1HTTPHeader.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1HTTPHeader.
The header field name
:param name: The name of this V1HTTPHeader.
:type: str
"""
self._name = name
@property
def value(self):
"""
Gets the value of this V1HTTPHeader.
The header field value
:return: The value of this V1HTTPHeader.
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
"""
Sets the value of this V1HTTPHeader.
The header field value
:param value: The value of this V1HTTPHeader.
:type: str
"""
self._value = value
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ISCSIVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'target_portal': 'str',
'iqn': 'str',
'lun': 'int',
'iscsi_interface': 'str',
'fs_type': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'target_portal': 'targetPortal',
'iqn': 'iqn',
'lun': 'lun',
'iscsi_interface': 'iscsiInterface',
'fs_type': 'fsType',
'read_only': 'readOnly'
}
self._target_portal = None
self._iqn = None
self._lun = None
self._iscsi_interface = None
self._fs_type = None
self._read_only = None
@property
def target_portal(self):
"""
Gets the target_portal of this V1ISCSIVolumeSource.
iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
:return: The target_portal of this V1ISCSIVolumeSource.
:rtype: str
"""
return self._target_portal
@target_portal.setter
def target_portal(self, target_portal):
"""
Sets the target_portal of this V1ISCSIVolumeSource.
iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
:param target_portal: The target_portal of this V1ISCSIVolumeSource.
:type: str
"""
self._target_portal = target_portal
@property
def iqn(self):
"""
Gets the iqn of this V1ISCSIVolumeSource.
Target iSCSI Qualified Name.
:return: The iqn of this V1ISCSIVolumeSource.
:rtype: str
"""
return self._iqn
@iqn.setter
def iqn(self, iqn):
"""
Sets the iqn of this V1ISCSIVolumeSource.
Target iSCSI Qualified Name.
:param iqn: The iqn of this V1ISCSIVolumeSource.
:type: str
"""
self._iqn = iqn
@property
def lun(self):
"""
Gets the lun of this V1ISCSIVolumeSource.
iSCSI target lun number.
:return: The lun of this V1ISCSIVolumeSource.
:rtype: int
"""
return self._lun
@lun.setter
def lun(self, lun):
"""
Sets the lun of this V1ISCSIVolumeSource.
iSCSI target lun number.
:param lun: The lun of this V1ISCSIVolumeSource.
:type: int
"""
self._lun = lun
@property
def iscsi_interface(self):
"""
Gets the iscsi_interface of this V1ISCSIVolumeSource.
Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
:return: The iscsi_interface of this V1ISCSIVolumeSource.
:rtype: str
"""
return self._iscsi_interface
@iscsi_interface.setter
def iscsi_interface(self, iscsi_interface):
"""
Sets the iscsi_interface of this V1ISCSIVolumeSource.
Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
:param iscsi_interface: The iscsi_interface of this V1ISCSIVolumeSource.
:type: str
"""
self._iscsi_interface = iscsi_interface
@property
def fs_type(self):
"""
Gets the fs_type of this V1ISCSIVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#iscsi
:return: The fs_type of this V1ISCSIVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1ISCSIVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#iscsi
:param fs_type: The fs_type of this V1ISCSIVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def read_only(self):
"""
Gets the read_only of this V1ISCSIVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
:return: The read_only of this V1ISCSIVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1ISCSIVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
:param read_only: The read_only of this V1ISCSIVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Job(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'kind': 'str',
'api_version': 'str',
'metadata': 'V1ObjectMeta',
'spec': 'V1JobSpec',
'status': 'V1JobStatus'
}
self.attribute_map = {
'kind': 'kind',
'api_version': 'apiVersion',
'metadata': 'metadata',
'spec': 'spec',
'status': 'status'
}
self._kind = None
self._api_version = None
self._metadata = None
self._spec = None
self._status = None
@property
def kind(self):
"""
Gets the kind of this V1Job.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The kind of this V1Job.
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this V1Job.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param kind: The kind of this V1Job.
:type: str
"""
self._kind = kind
@property
def api_version(self):
"""
Gets the api_version of this V1Job.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:return: The api_version of this V1Job.
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
"""
Sets the api_version of this V1Job.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:param api_version: The api_version of this V1Job.
:type: str
"""
self._api_version = api_version
@property
def metadata(self):
"""
Gets the metadata of this V1Job.
Standard object's metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:return: The metadata of this V1Job.
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""
Sets the metadata of this V1Job.
Standard object's metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:param metadata: The metadata of this V1Job.
:type: V1ObjectMeta
"""
self._metadata = metadata
@property
def spec(self):
"""
Gets the spec of this V1Job.
Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:return: The spec of this V1Job.
:rtype: V1JobSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
"""
Sets the spec of this V1Job.
Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:param spec: The spec of this V1Job.
:type: V1JobSpec
"""
self._spec = spec
@property
def status(self):
"""
Gets the status of this V1Job.
Status is a structure describing current status of a job. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:return: The status of this V1Job.
:rtype: V1JobStatus
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this V1Job.
Status is a structure describing current status of a job. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:param status: The status of this V1Job.
:type: V1JobStatus
"""
self._status = status
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1JobCondition(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'type': 'str',
'status': 'str',
'last_probe_time': 'str',
'last_transition_time': 'str',
'reason': 'str',
'message': 'str'
}
self.attribute_map = {
'type': 'type',
'status': 'status',
'last_probe_time': 'lastProbeTime',
'last_transition_time': 'lastTransitionTime',
'reason': 'reason',
'message': 'message'
}
self._type = None
self._status = None
self._last_probe_time = None
self._last_transition_time = None
self._reason = None
self._message = None
@property
def type(self):
"""
Gets the type of this V1JobCondition.
Type of job condition, Complete or Failed.
:return: The type of this V1JobCondition.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""
Sets the type of this V1JobCondition.
Type of job condition, Complete or Failed.
:param type: The type of this V1JobCondition.
:type: str
"""
self._type = type
@property
def status(self):
"""
Gets the status of this V1JobCondition.
Status of the condition, one of True, False, Unknown.
:return: The status of this V1JobCondition.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this V1JobCondition.
Status of the condition, one of True, False, Unknown.
:param status: The status of this V1JobCondition.
:type: str
"""
self._status = status
@property
def last_probe_time(self):
"""
Gets the last_probe_time of this V1JobCondition.
Last time the condition was checked.
:return: The last_probe_time of this V1JobCondition.
:rtype: str
"""
return self._last_probe_time
@last_probe_time.setter
def last_probe_time(self, last_probe_time):
"""
Sets the last_probe_time of this V1JobCondition.
Last time the condition was checked.
:param last_probe_time: The last_probe_time of this V1JobCondition.
:type: str
"""
self._last_probe_time = last_probe_time
@property
def last_transition_time(self):
"""
Gets the last_transition_time of this V1JobCondition.
Last time the condition transit from one status to another.
:return: The last_transition_time of this V1JobCondition.
:rtype: str
"""
return self._last_transition_time
@last_transition_time.setter
def last_transition_time(self, last_transition_time):
"""
Sets the last_transition_time of this V1JobCondition.
Last time the condition transit from one status to another.
:param last_transition_time: The last_transition_time of this V1JobCondition.
:type: str
"""
self._last_transition_time = last_transition_time
@property
def reason(self):
"""
Gets the reason of this V1JobCondition.
(brief) reason for the condition's last transition.
:return: The reason of this V1JobCondition.
:rtype: str
"""
return self._reason
@reason.setter
def reason(self, reason):
"""
Sets the reason of this V1JobCondition.
(brief) reason for the condition's last transition.
:param reason: The reason of this V1JobCondition.
:type: str
"""
self._reason = reason
@property
def message(self):
"""
Gets the message of this V1JobCondition.
Human readable message indicating details about last transition.
:return: The message of this V1JobCondition.
:rtype: str
"""
return self._message
@message.setter
def message(self, message):
"""
Sets the message of this V1JobCondition.
Human readable message indicating details about last transition.
:param message: The message of this V1JobCondition.
:type: str
"""
self._message = message
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,174 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1JobList(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'kind': 'str',
'api_version': 'str',
'metadata': 'UnversionedListMeta',
'items': 'list[V1Job]'
}
self.attribute_map = {
'kind': 'kind',
'api_version': 'apiVersion',
'metadata': 'metadata',
'items': 'items'
}
self._kind = None
self._api_version = None
self._metadata = None
self._items = None
@property
def kind(self):
"""
Gets the kind of this V1JobList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:return: The kind of this V1JobList.
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this V1JobList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds
:param kind: The kind of this V1JobList.
:type: str
"""
self._kind = kind
@property
def api_version(self):
"""
Gets the api_version of this V1JobList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:return: The api_version of this V1JobList.
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
"""
Sets the api_version of this V1JobList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources
:param api_version: The api_version of this V1JobList.
:type: str
"""
self._api_version = api_version
@property
def metadata(self):
"""
Gets the metadata of this V1JobList.
Standard list metadata More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:return: The metadata of this V1JobList.
:rtype: UnversionedListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""
Sets the metadata of this V1JobList.
Standard list metadata More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:param metadata: The metadata of this V1JobList.
:type: UnversionedListMeta
"""
self._metadata = metadata
@property
def items(self):
"""
Gets the items of this V1JobList.
Items is the list of Job.
:return: The items of this V1JobList.
:rtype: list[V1Job]
"""
return self._items
@items.setter
def items(self, items):
"""
Sets the items of this V1JobList.
Items is the list of Job.
:param items: The items of this V1JobList.
:type: list[V1Job]
"""
self._items = items
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1JobSpec(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'parallelism': 'int',
'completions': 'int',
'active_deadline_seconds': 'int',
'selector': 'V1LabelSelector',
'manual_selector': 'bool',
'template': 'V1PodTemplateSpec'
}
self.attribute_map = {
'parallelism': 'parallelism',
'completions': 'completions',
'active_deadline_seconds': 'activeDeadlineSeconds',
'selector': 'selector',
'manual_selector': 'manualSelector',
'template': 'template'
}
self._parallelism = None
self._completions = None
self._active_deadline_seconds = None
self._selector = None
self._manual_selector = None
self._template = None
@property
def parallelism(self):
"""
Gets the parallelism of this V1JobSpec.
Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:return: The parallelism of this V1JobSpec.
:rtype: int
"""
return self._parallelism
@parallelism.setter
def parallelism(self, parallelism):
"""
Sets the parallelism of this V1JobSpec.
Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:param parallelism: The parallelism of this V1JobSpec.
:type: int
"""
self._parallelism = parallelism
@property
def completions(self):
"""
Gets the completions of this V1JobSpec.
Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:return: The completions of this V1JobSpec.
:rtype: int
"""
return self._completions
@completions.setter
def completions(self, completions):
"""
Sets the completions of this V1JobSpec.
Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:param completions: The completions of this V1JobSpec.
:type: int
"""
self._completions = completions
@property
def active_deadline_seconds(self):
"""
Gets the active_deadline_seconds of this V1JobSpec.
Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer
:return: The active_deadline_seconds of this V1JobSpec.
:rtype: int
"""
return self._active_deadline_seconds
@active_deadline_seconds.setter
def active_deadline_seconds(self, active_deadline_seconds):
"""
Sets the active_deadline_seconds of this V1JobSpec.
Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer
:param active_deadline_seconds: The active_deadline_seconds of this V1JobSpec.
:type: int
"""
self._active_deadline_seconds = active_deadline_seconds
@property
def selector(self):
"""
Gets the selector of this V1JobSpec.
Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/release-1.2/docs/user-guide/labels.md#label-selectors
:return: The selector of this V1JobSpec.
:rtype: V1LabelSelector
"""
return self._selector
@selector.setter
def selector(self, selector):
"""
Sets the selector of this V1JobSpec.
Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/release-1.2/docs/user-guide/labels.md#label-selectors
:param selector: The selector of this V1JobSpec.
:type: V1LabelSelector
"""
self._selector = selector
@property
def manual_selector(self):
"""
Gets the manual_selector of this V1JobSpec.
ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/release-1.2/docs/design/selector-generation.md
:return: The manual_selector of this V1JobSpec.
:rtype: bool
"""
return self._manual_selector
@manual_selector.setter
def manual_selector(self, manual_selector):
"""
Sets the manual_selector of this V1JobSpec.
ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/release-1.2/docs/design/selector-generation.md
:param manual_selector: The manual_selector of this V1JobSpec.
:type: bool
"""
self._manual_selector = manual_selector
@property
def template(self):
"""
Gets the template of this V1JobSpec.
Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:return: The template of this V1JobSpec.
:rtype: V1PodTemplateSpec
"""
return self._template
@template.setter
def template(self, template):
"""
Sets the template of this V1JobSpec.
Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:param template: The template of this V1JobSpec.
:type: V1PodTemplateSpec
"""
self._template = template
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1JobStatus(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'conditions': 'list[V1JobCondition]',
'start_time': 'str',
'completion_time': 'str',
'active': 'int',
'succeeded': 'int',
'failed': 'int'
}
self.attribute_map = {
'conditions': 'conditions',
'start_time': 'startTime',
'completion_time': 'completionTime',
'active': 'active',
'succeeded': 'succeeded',
'failed': 'failed'
}
self._conditions = None
self._start_time = None
self._completion_time = None
self._active = None
self._succeeded = None
self._failed = None
@property
def conditions(self):
"""
Gets the conditions of this V1JobStatus.
Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:return: The conditions of this V1JobStatus.
:rtype: list[V1JobCondition]
"""
return self._conditions
@conditions.setter
def conditions(self, conditions):
"""
Sets the conditions of this V1JobStatus.
Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/release-1.2/docs/user-guide/jobs.md
:param conditions: The conditions of this V1JobStatus.
:type: list[V1JobCondition]
"""
self._conditions = conditions
@property
def start_time(self):
"""
Gets the start_time of this V1JobStatus.
StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
:return: The start_time of this V1JobStatus.
:rtype: str
"""
return self._start_time
@start_time.setter
def start_time(self, start_time):
"""
Sets the start_time of this V1JobStatus.
StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
:param start_time: The start_time of this V1JobStatus.
:type: str
"""
self._start_time = start_time
@property
def completion_time(self):
"""
Gets the completion_time of this V1JobStatus.
CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
:return: The completion_time of this V1JobStatus.
:rtype: str
"""
return self._completion_time
@completion_time.setter
def completion_time(self, completion_time):
"""
Sets the completion_time of this V1JobStatus.
CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.
:param completion_time: The completion_time of this V1JobStatus.
:type: str
"""
self._completion_time = completion_time
@property
def active(self):
"""
Gets the active of this V1JobStatus.
Active is the number of actively running pods.
:return: The active of this V1JobStatus.
:rtype: int
"""
return self._active
@active.setter
def active(self, active):
"""
Sets the active of this V1JobStatus.
Active is the number of actively running pods.
:param active: The active of this V1JobStatus.
:type: int
"""
self._active = active
@property
def succeeded(self):
"""
Gets the succeeded of this V1JobStatus.
Succeeded is the number of pods which reached Phase Succeeded.
:return: The succeeded of this V1JobStatus.
:rtype: int
"""
return self._succeeded
@succeeded.setter
def succeeded(self, succeeded):
"""
Sets the succeeded of this V1JobStatus.
Succeeded is the number of pods which reached Phase Succeeded.
:param succeeded: The succeeded of this V1JobStatus.
:type: int
"""
self._succeeded = succeeded
@property
def failed(self):
"""
Gets the failed of this V1JobStatus.
Failed is the number of pods which reached Phase Failed.
:return: The failed of this V1JobStatus.
:rtype: int
"""
return self._failed
@failed.setter
def failed(self, failed):
"""
Sets the failed of this V1JobStatus.
Failed is the number of pods which reached Phase Failed.
:param failed: The failed of this V1JobStatus.
:type: int
"""
self._failed = failed
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1KeyToPath(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'key': 'str',
'path': 'str'
}
self.attribute_map = {
'key': 'key',
'path': 'path'
}
self._key = None
self._path = None
@property
def key(self):
"""
Gets the key of this V1KeyToPath.
The key to project.
:return: The key of this V1KeyToPath.
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
"""
Sets the key of this V1KeyToPath.
The key to project.
:param key: The key of this V1KeyToPath.
:type: str
"""
self._key = key
@property
def path(self):
"""
Gets the path of this V1KeyToPath.
The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
:return: The path of this V1KeyToPath.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1KeyToPath.
The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
:param path: The path of this V1KeyToPath.
:type: str
"""
self._path = path
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1LabelSelector(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'match_labels': 'object',
'match_expressions': 'list[V1LabelSelectorRequirement]'
}
self.attribute_map = {
'match_labels': 'matchLabels',
'match_expressions': 'matchExpressions'
}
self._match_labels = None
self._match_expressions = None
@property
def match_labels(self):
"""
Gets the match_labels of this V1LabelSelector.
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.
:return: The match_labels of this V1LabelSelector.
:rtype: object
"""
return self._match_labels
@match_labels.setter
def match_labels(self, match_labels):
"""
Sets the match_labels of this V1LabelSelector.
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.
:param match_labels: The match_labels of this V1LabelSelector.
:type: object
"""
self._match_labels = match_labels
@property
def match_expressions(self):
"""
Gets the match_expressions of this V1LabelSelector.
matchExpressions is a list of label selector requirements. The requirements are ANDed.
:return: The match_expressions of this V1LabelSelector.
:rtype: list[V1LabelSelectorRequirement]
"""
return self._match_expressions
@match_expressions.setter
def match_expressions(self, match_expressions):
"""
Sets the match_expressions of this V1LabelSelector.
matchExpressions is a list of label selector requirements. The requirements are ANDed.
:param match_expressions: The match_expressions of this V1LabelSelector.
:type: list[V1LabelSelectorRequirement]
"""
self._match_expressions = match_expressions
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1LabelSelectorRequirement(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'key': 'str',
'operator': 'str',
'values': 'list[str]'
}
self.attribute_map = {
'key': 'key',
'operator': 'operator',
'values': 'values'
}
self._key = None
self._operator = None
self._values = None
@property
def key(self):
"""
Gets the key of this V1LabelSelectorRequirement.
key is the label key that the selector applies to.
:return: The key of this V1LabelSelectorRequirement.
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
"""
Sets the key of this V1LabelSelectorRequirement.
key is the label key that the selector applies to.
:param key: The key of this V1LabelSelectorRequirement.
:type: str
"""
self._key = key
@property
def operator(self):
"""
Gets the operator of this V1LabelSelectorRequirement.
operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.
:return: The operator of this V1LabelSelectorRequirement.
:rtype: str
"""
return self._operator
@operator.setter
def operator(self, operator):
"""
Sets the operator of this V1LabelSelectorRequirement.
operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.
:param operator: The operator of this V1LabelSelectorRequirement.
:type: str
"""
self._operator = operator
@property
def values(self):
"""
Gets the values of this V1LabelSelectorRequirement.
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
:return: The values of this V1LabelSelectorRequirement.
:rtype: list[str]
"""
return self._values
@values.setter
def values(self, values):
"""
Sets the values of this V1LabelSelectorRequirement.
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
:param values: The values of this V1LabelSelectorRequirement.
:type: list[str]
"""
self._values = values
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Lifecycle(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'post_start': 'V1Handler',
'pre_stop': 'V1Handler'
}
self.attribute_map = {
'post_start': 'postStart',
'pre_stop': 'preStop'
}
self._post_start = None
self._pre_stop = None
@property
def post_start(self):
"""
Gets the post_start of this V1Lifecycle.
PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: http://releases.k8s.io/release-1.2/docs/user-guide/container-environment.md#hook-details
:return: The post_start of this V1Lifecycle.
:rtype: V1Handler
"""
return self._post_start
@post_start.setter
def post_start(self, post_start):
"""
Sets the post_start of this V1Lifecycle.
PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: http://releases.k8s.io/release-1.2/docs/user-guide/container-environment.md#hook-details
:param post_start: The post_start of this V1Lifecycle.
:type: V1Handler
"""
self._post_start = post_start
@property
def pre_stop(self):
"""
Gets the pre_stop of this V1Lifecycle.
PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: http://releases.k8s.io/release-1.2/docs/user-guide/container-environment.md#hook-details
:return: The pre_stop of this V1Lifecycle.
:rtype: V1Handler
"""
return self._pre_stop
@pre_stop.setter
def pre_stop(self, pre_stop):
"""
Sets the pre_stop of this V1Lifecycle.
PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: http://releases.k8s.io/release-1.2/docs/user-guide/container-environment.md#hook-details
:param pre_stop: The pre_stop of this V1Lifecycle.
:type: V1Handler
"""
self._pre_stop = pre_stop
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1LocalObjectReference(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str'
}
self.attribute_map = {
'name': 'name'
}
self._name = None
@property
def name(self):
"""
Gets the name of this V1LocalObjectReference.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1LocalObjectReference.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1LocalObjectReference.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1LocalObjectReference.
:type: str
"""
self._name = name
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1NFSVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'server': 'str',
'path': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'server': 'server',
'path': 'path',
'read_only': 'readOnly'
}
self._server = None
self._path = None
self._read_only = None
@property
def server(self):
"""
Gets the server of this V1NFSVolumeSource.
Server is the hostname or IP address of the NFS server. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:return: The server of this V1NFSVolumeSource.
:rtype: str
"""
return self._server
@server.setter
def server(self, server):
"""
Sets the server of this V1NFSVolumeSource.
Server is the hostname or IP address of the NFS server. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:param server: The server of this V1NFSVolumeSource.
:type: str
"""
self._server = server
@property
def path(self):
"""
Gets the path of this V1NFSVolumeSource.
Path that is exported by the NFS server. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:return: The path of this V1NFSVolumeSource.
:rtype: str
"""
return self._path
@path.setter
def path(self, path):
"""
Sets the path of this V1NFSVolumeSource.
Path that is exported by the NFS server. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:param path: The path of this V1NFSVolumeSource.
:type: str
"""
self._path = path
@property
def read_only(self):
"""
Gets the read_only of this V1NFSVolumeSource.
ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:return: The read_only of this V1NFSVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1NFSVolumeSource.
ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:param read_only: The read_only of this V1NFSVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ObjectFieldSelector(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'api_version': 'str',
'field_path': 'str'
}
self.attribute_map = {
'api_version': 'apiVersion',
'field_path': 'fieldPath'
}
self._api_version = None
self._field_path = None
@property
def api_version(self):
"""
Gets the api_version of this V1ObjectFieldSelector.
Version of the schema the FieldPath is written in terms of, defaults to \"v1\".
:return: The api_version of this V1ObjectFieldSelector.
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
"""
Sets the api_version of this V1ObjectFieldSelector.
Version of the schema the FieldPath is written in terms of, defaults to \"v1\".
:param api_version: The api_version of this V1ObjectFieldSelector.
:type: str
"""
self._api_version = api_version
@property
def field_path(self):
"""
Gets the field_path of this V1ObjectFieldSelector.
Path of the field to select in the specified API version.
:return: The field_path of this V1ObjectFieldSelector.
:rtype: str
"""
return self._field_path
@field_path.setter
def field_path(self, field_path):
"""
Sets the field_path of this V1ObjectFieldSelector.
Path of the field to select in the specified API version.
:param field_path: The field_path of this V1ObjectFieldSelector.
:type: str
"""
self._field_path = field_path
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,374 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ObjectMeta(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'generate_name': 'str',
'namespace': 'str',
'self_link': 'str',
'uid': 'str',
'resource_version': 'str',
'generation': 'int',
'creation_timestamp': 'str',
'deletion_timestamp': 'str',
'deletion_grace_period_seconds': 'int',
'labels': 'object',
'annotations': 'object'
}
self.attribute_map = {
'name': 'name',
'generate_name': 'generateName',
'namespace': 'namespace',
'self_link': 'selfLink',
'uid': 'uid',
'resource_version': 'resourceVersion',
'generation': 'generation',
'creation_timestamp': 'creationTimestamp',
'deletion_timestamp': 'deletionTimestamp',
'deletion_grace_period_seconds': 'deletionGracePeriodSeconds',
'labels': 'labels',
'annotations': 'annotations'
}
self._name = None
self._generate_name = None
self._namespace = None
self._self_link = None
self._uid = None
self._resource_version = None
self._generation = None
self._creation_timestamp = None
self._deletion_timestamp = None
self._deletion_grace_period_seconds = None
self._labels = None
self._annotations = None
@property
def name(self):
"""
Gets the name of this V1ObjectMeta.
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1ObjectMeta.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1ObjectMeta.
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1ObjectMeta.
:type: str
"""
self._name = name
@property
def generate_name(self):
"""
Gets the generate_name of this V1ObjectMeta.
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#idempotency
:return: The generate_name of this V1ObjectMeta.
:rtype: str
"""
return self._generate_name
@generate_name.setter
def generate_name(self, generate_name):
"""
Sets the generate_name of this V1ObjectMeta.
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#idempotency
:param generate_name: The generate_name of this V1ObjectMeta.
:type: str
"""
self._generate_name = generate_name
@property
def namespace(self):
"""
Gets the namespace of this V1ObjectMeta.
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/namespaces.md
:return: The namespace of this V1ObjectMeta.
:rtype: str
"""
return self._namespace
@namespace.setter
def namespace(self, namespace):
"""
Sets the namespace of this V1ObjectMeta.
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/namespaces.md
:param namespace: The namespace of this V1ObjectMeta.
:type: str
"""
self._namespace = namespace
@property
def self_link(self):
"""
Gets the self_link of this V1ObjectMeta.
SelfLink is a URL representing this object. Populated by the system. Read-only.
:return: The self_link of this V1ObjectMeta.
:rtype: str
"""
return self._self_link
@self_link.setter
def self_link(self, self_link):
"""
Sets the self_link of this V1ObjectMeta.
SelfLink is a URL representing this object. Populated by the system. Read-only.
:param self_link: The self_link of this V1ObjectMeta.
:type: str
"""
self._self_link = self_link
@property
def uid(self):
"""
Gets the uid of this V1ObjectMeta.
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#uids
:return: The uid of this V1ObjectMeta.
:rtype: str
"""
return self._uid
@uid.setter
def uid(self, uid):
"""
Sets the uid of this V1ObjectMeta.
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#uids
:param uid: The uid of this V1ObjectMeta.
:type: str
"""
self._uid = uid
@property
def resource_version(self):
"""
Gets the resource_version of this V1ObjectMeta.
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#concurrency-control-and-consistency
:return: The resource_version of this V1ObjectMeta.
:rtype: str
"""
return self._resource_version
@resource_version.setter
def resource_version(self, resource_version):
"""
Sets the resource_version of this V1ObjectMeta.
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#concurrency-control-and-consistency
:param resource_version: The resource_version of this V1ObjectMeta.
:type: str
"""
self._resource_version = resource_version
@property
def generation(self):
"""
Gets the generation of this V1ObjectMeta.
A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
:return: The generation of this V1ObjectMeta.
:rtype: int
"""
return self._generation
@generation.setter
def generation(self, generation):
"""
Sets the generation of this V1ObjectMeta.
A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
:param generation: The generation of this V1ObjectMeta.
:type: int
"""
self._generation = generation
@property
def creation_timestamp(self):
"""
Gets the creation_timestamp of this V1ObjectMeta.
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:return: The creation_timestamp of this V1ObjectMeta.
:rtype: str
"""
return self._creation_timestamp
@creation_timestamp.setter
def creation_timestamp(self, creation_timestamp):
"""
Sets the creation_timestamp of this V1ObjectMeta.
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:param creation_timestamp: The creation_timestamp of this V1ObjectMeta.
:type: str
"""
self._creation_timestamp = creation_timestamp
@property
def deletion_timestamp(self):
"""
Gets the deletion_timestamp of this V1ObjectMeta.
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:return: The deletion_timestamp of this V1ObjectMeta.
:rtype: str
"""
return self._deletion_timestamp
@deletion_timestamp.setter
def deletion_timestamp(self, deletion_timestamp):
"""
Sets the deletion_timestamp of this V1ObjectMeta.
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:param deletion_timestamp: The deletion_timestamp of this V1ObjectMeta.
:type: str
"""
self._deletion_timestamp = deletion_timestamp
@property
def deletion_grace_period_seconds(self):
"""
Gets the deletion_grace_period_seconds of this V1ObjectMeta.
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.
:return: The deletion_grace_period_seconds of this V1ObjectMeta.
:rtype: int
"""
return self._deletion_grace_period_seconds
@deletion_grace_period_seconds.setter
def deletion_grace_period_seconds(self, deletion_grace_period_seconds):
"""
Sets the deletion_grace_period_seconds of this V1ObjectMeta.
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.
:param deletion_grace_period_seconds: The deletion_grace_period_seconds of this V1ObjectMeta.
:type: int
"""
self._deletion_grace_period_seconds = deletion_grace_period_seconds
@property
def labels(self):
"""
Gets the labels of this V1ObjectMeta.
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://releases.k8s.io/release-1.2/docs/user-guide/labels.md
:return: The labels of this V1ObjectMeta.
:rtype: object
"""
return self._labels
@labels.setter
def labels(self, labels):
"""
Sets the labels of this V1ObjectMeta.
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://releases.k8s.io/release-1.2/docs/user-guide/labels.md
:param labels: The labels of this V1ObjectMeta.
:type: object
"""
self._labels = labels
@property
def annotations(self):
"""
Gets the annotations of this V1ObjectMeta.
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/release-1.2/docs/user-guide/annotations.md
:return: The annotations of this V1ObjectMeta.
:rtype: object
"""
return self._annotations
@annotations.setter
def annotations(self, annotations):
"""
Sets the annotations of this V1ObjectMeta.
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/release-1.2/docs/user-guide/annotations.md
:param annotations: The annotations of this V1ObjectMeta.
:type: object
"""
self._annotations = annotations
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1PersistentVolumeClaimVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'claim_name': 'str',
'read_only': 'bool'
}
self.attribute_map = {
'claim_name': 'claimName',
'read_only': 'readOnly'
}
self._claim_name = None
self._read_only = None
@property
def claim_name(self):
"""
Gets the claim_name of this V1PersistentVolumeClaimVolumeSource.
ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
:return: The claim_name of this V1PersistentVolumeClaimVolumeSource.
:rtype: str
"""
return self._claim_name
@claim_name.setter
def claim_name(self, claim_name):
"""
Sets the claim_name of this V1PersistentVolumeClaimVolumeSource.
ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
:param claim_name: The claim_name of this V1PersistentVolumeClaimVolumeSource.
:type: str
"""
self._claim_name = claim_name
@property
def read_only(self):
"""
Gets the read_only of this V1PersistentVolumeClaimVolumeSource.
Will force the ReadOnly setting in VolumeMounts. Default false.
:return: The read_only of this V1PersistentVolumeClaimVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1PersistentVolumeClaimVolumeSource.
Will force the ReadOnly setting in VolumeMounts. Default false.
:param read_only: The read_only of this V1PersistentVolumeClaimVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,199 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1PodSecurityContext(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'se_linux_options': 'V1SELinuxOptions',
'run_as_user': 'int',
'run_as_non_root': 'bool',
'supplemental_groups': 'list[int]',
'fs_group': 'int'
}
self.attribute_map = {
'se_linux_options': 'seLinuxOptions',
'run_as_user': 'runAsUser',
'run_as_non_root': 'runAsNonRoot',
'supplemental_groups': 'supplementalGroups',
'fs_group': 'fsGroup'
}
self._se_linux_options = None
self._run_as_user = None
self._run_as_non_root = None
self._supplemental_groups = None
self._fs_group = None
@property
def se_linux_options(self):
"""
Gets the se_linux_options of this V1PodSecurityContext.
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
:return: The se_linux_options of this V1PodSecurityContext.
:rtype: V1SELinuxOptions
"""
return self._se_linux_options
@se_linux_options.setter
def se_linux_options(self, se_linux_options):
"""
Sets the se_linux_options of this V1PodSecurityContext.
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
:param se_linux_options: The se_linux_options of this V1PodSecurityContext.
:type: V1SELinuxOptions
"""
self._se_linux_options = se_linux_options
@property
def run_as_user(self):
"""
Gets the run_as_user of this V1PodSecurityContext.
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
:return: The run_as_user of this V1PodSecurityContext.
:rtype: int
"""
return self._run_as_user
@run_as_user.setter
def run_as_user(self, run_as_user):
"""
Sets the run_as_user of this V1PodSecurityContext.
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
:param run_as_user: The run_as_user of this V1PodSecurityContext.
:type: int
"""
self._run_as_user = run_as_user
@property
def run_as_non_root(self):
"""
Gets the run_as_non_root of this V1PodSecurityContext.
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:return: The run_as_non_root of this V1PodSecurityContext.
:rtype: bool
"""
return self._run_as_non_root
@run_as_non_root.setter
def run_as_non_root(self, run_as_non_root):
"""
Sets the run_as_non_root of this V1PodSecurityContext.
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:param run_as_non_root: The run_as_non_root of this V1PodSecurityContext.
:type: bool
"""
self._run_as_non_root = run_as_non_root
@property
def supplemental_groups(self):
"""
Gets the supplemental_groups of this V1PodSecurityContext.
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.
:return: The supplemental_groups of this V1PodSecurityContext.
:rtype: list[int]
"""
return self._supplemental_groups
@supplemental_groups.setter
def supplemental_groups(self, supplemental_groups):
"""
Sets the supplemental_groups of this V1PodSecurityContext.
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.
:param supplemental_groups: The supplemental_groups of this V1PodSecurityContext.
:type: list[int]
"""
self._supplemental_groups = supplemental_groups
@property
def fs_group(self):
"""
Gets the fs_group of this V1PodSecurityContext.
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw
:return: The fs_group of this V1PodSecurityContext.
:rtype: int
"""
return self._fs_group
@fs_group.setter
def fs_group(self, fs_group):
"""
Sets the fs_group of this V1PodSecurityContext.
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw
:param fs_group: The fs_group of this V1PodSecurityContext.
:type: int
"""
self._fs_group = fs_group
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,449 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1PodSpec(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'volumes': 'list[V1Volume]',
'containers': 'list[V1Container]',
'restart_policy': 'str',
'termination_grace_period_seconds': 'int',
'active_deadline_seconds': 'int',
'dns_policy': 'str',
'node_selector': 'object',
'service_account_name': 'str',
'service_account': 'str',
'node_name': 'str',
'host_network': 'bool',
'host_pid': 'bool',
'host_ipc': 'bool',
'security_context': 'V1PodSecurityContext',
'image_pull_secrets': 'list[V1LocalObjectReference]'
}
self.attribute_map = {
'volumes': 'volumes',
'containers': 'containers',
'restart_policy': 'restartPolicy',
'termination_grace_period_seconds': 'terminationGracePeriodSeconds',
'active_deadline_seconds': 'activeDeadlineSeconds',
'dns_policy': 'dnsPolicy',
'node_selector': 'nodeSelector',
'service_account_name': 'serviceAccountName',
'service_account': 'serviceAccount',
'node_name': 'nodeName',
'host_network': 'hostNetwork',
'host_pid': 'hostPID',
'host_ipc': 'hostIPC',
'security_context': 'securityContext',
'image_pull_secrets': 'imagePullSecrets'
}
self._volumes = None
self._containers = None
self._restart_policy = None
self._termination_grace_period_seconds = None
self._active_deadline_seconds = None
self._dns_policy = None
self._node_selector = None
self._service_account_name = None
self._service_account = None
self._node_name = None
self._host_network = None
self._host_pid = None
self._host_ipc = None
self._security_context = None
self._image_pull_secrets = None
@property
def volumes(self):
"""
Gets the volumes of this V1PodSpec.
List of volumes that can be mounted by containers belonging to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md
:return: The volumes of this V1PodSpec.
:rtype: list[V1Volume]
"""
return self._volumes
@volumes.setter
def volumes(self, volumes):
"""
Sets the volumes of this V1PodSpec.
List of volumes that can be mounted by containers belonging to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md
:param volumes: The volumes of this V1PodSpec.
:type: list[V1Volume]
"""
self._volumes = volumes
@property
def containers(self):
"""
Gets the containers of this V1PodSpec.
List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md
:return: The containers of this V1PodSpec.
:rtype: list[V1Container]
"""
return self._containers
@containers.setter
def containers(self, containers):
"""
Sets the containers of this V1PodSpec.
List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/containers.md
:param containers: The containers of this V1PodSpec.
:type: list[V1Container]
"""
self._containers = containers
@property
def restart_policy(self):
"""
Gets the restart_policy of this V1PodSpec.
Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#restartpolicy
:return: The restart_policy of this V1PodSpec.
:rtype: str
"""
return self._restart_policy
@restart_policy.setter
def restart_policy(self, restart_policy):
"""
Sets the restart_policy of this V1PodSpec.
Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#restartpolicy
:param restart_policy: The restart_policy of this V1PodSpec.
:type: str
"""
self._restart_policy = restart_policy
@property
def termination_grace_period_seconds(self):
"""
Gets the termination_grace_period_seconds of this V1PodSpec.
Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
:return: The termination_grace_period_seconds of this V1PodSpec.
:rtype: int
"""
return self._termination_grace_period_seconds
@termination_grace_period_seconds.setter
def termination_grace_period_seconds(self, termination_grace_period_seconds):
"""
Sets the termination_grace_period_seconds of this V1PodSpec.
Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
:param termination_grace_period_seconds: The termination_grace_period_seconds of this V1PodSpec.
:type: int
"""
self._termination_grace_period_seconds = termination_grace_period_seconds
@property
def active_deadline_seconds(self):
"""
Gets the active_deadline_seconds of this V1PodSpec.
Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.
:return: The active_deadline_seconds of this V1PodSpec.
:rtype: int
"""
return self._active_deadline_seconds
@active_deadline_seconds.setter
def active_deadline_seconds(self, active_deadline_seconds):
"""
Sets the active_deadline_seconds of this V1PodSpec.
Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.
:param active_deadline_seconds: The active_deadline_seconds of this V1PodSpec.
:type: int
"""
self._active_deadline_seconds = active_deadline_seconds
@property
def dns_policy(self):
"""
Gets the dns_policy of this V1PodSpec.
Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\".
:return: The dns_policy of this V1PodSpec.
:rtype: str
"""
return self._dns_policy
@dns_policy.setter
def dns_policy(self, dns_policy):
"""
Sets the dns_policy of this V1PodSpec.
Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\".
:param dns_policy: The dns_policy of this V1PodSpec.
:type: str
"""
self._dns_policy = dns_policy
@property
def node_selector(self):
"""
Gets the node_selector of this V1PodSpec.
NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: http://releases.k8s.io/release-1.2/docs/user-guide/node-selection/README.md
:return: The node_selector of this V1PodSpec.
:rtype: object
"""
return self._node_selector
@node_selector.setter
def node_selector(self, node_selector):
"""
Sets the node_selector of this V1PodSpec.
NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: http://releases.k8s.io/release-1.2/docs/user-guide/node-selection/README.md
:param node_selector: The node_selector of this V1PodSpec.
:type: object
"""
self._node_selector = node_selector
@property
def service_account_name(self):
"""
Gets the service_account_name of this V1PodSpec.
ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/release-1.2/docs/design/service_accounts.md
:return: The service_account_name of this V1PodSpec.
:rtype: str
"""
return self._service_account_name
@service_account_name.setter
def service_account_name(self, service_account_name):
"""
Sets the service_account_name of this V1PodSpec.
ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/release-1.2/docs/design/service_accounts.md
:param service_account_name: The service_account_name of this V1PodSpec.
:type: str
"""
self._service_account_name = service_account_name
@property
def service_account(self):
"""
Gets the service_account of this V1PodSpec.
DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.
:return: The service_account of this V1PodSpec.
:rtype: str
"""
return self._service_account
@service_account.setter
def service_account(self, service_account):
"""
Sets the service_account of this V1PodSpec.
DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.
:param service_account: The service_account of this V1PodSpec.
:type: str
"""
self._service_account = service_account
@property
def node_name(self):
"""
Gets the node_name of this V1PodSpec.
NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.
:return: The node_name of this V1PodSpec.
:rtype: str
"""
return self._node_name
@node_name.setter
def node_name(self, node_name):
"""
Sets the node_name of this V1PodSpec.
NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.
:param node_name: The node_name of this V1PodSpec.
:type: str
"""
self._node_name = node_name
@property
def host_network(self):
"""
Gets the host_network of this V1PodSpec.
Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.
:return: The host_network of this V1PodSpec.
:rtype: bool
"""
return self._host_network
@host_network.setter
def host_network(self, host_network):
"""
Sets the host_network of this V1PodSpec.
Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.
:param host_network: The host_network of this V1PodSpec.
:type: bool
"""
self._host_network = host_network
@property
def host_pid(self):
"""
Gets the host_pid of this V1PodSpec.
Use the host's pid namespace. Optional: Default to false.
:return: The host_pid of this V1PodSpec.
:rtype: bool
"""
return self._host_pid
@host_pid.setter
def host_pid(self, host_pid):
"""
Sets the host_pid of this V1PodSpec.
Use the host's pid namespace. Optional: Default to false.
:param host_pid: The host_pid of this V1PodSpec.
:type: bool
"""
self._host_pid = host_pid
@property
def host_ipc(self):
"""
Gets the host_ipc of this V1PodSpec.
Use the host's ipc namespace. Optional: Default to false.
:return: The host_ipc of this V1PodSpec.
:rtype: bool
"""
return self._host_ipc
@host_ipc.setter
def host_ipc(self, host_ipc):
"""
Sets the host_ipc of this V1PodSpec.
Use the host's ipc namespace. Optional: Default to false.
:param host_ipc: The host_ipc of this V1PodSpec.
:type: bool
"""
self._host_ipc = host_ipc
@property
def security_context(self):
"""
Gets the security_context of this V1PodSpec.
SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.
:return: The security_context of this V1PodSpec.
:rtype: V1PodSecurityContext
"""
return self._security_context
@security_context.setter
def security_context(self, security_context):
"""
Sets the security_context of this V1PodSpec.
SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.
:param security_context: The security_context of this V1PodSpec.
:type: V1PodSecurityContext
"""
self._security_context = security_context
@property
def image_pull_secrets(self):
"""
Gets the image_pull_secrets of this V1PodSpec.
ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod
:return: The image_pull_secrets of this V1PodSpec.
:rtype: list[V1LocalObjectReference]
"""
return self._image_pull_secrets
@image_pull_secrets.setter
def image_pull_secrets(self, image_pull_secrets):
"""
Sets the image_pull_secrets of this V1PodSpec.
ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://releases.k8s.io/release-1.2/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod
:param image_pull_secrets: The image_pull_secrets of this V1PodSpec.
:type: list[V1LocalObjectReference]
"""
self._image_pull_secrets = image_pull_secrets
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1PodTemplateSpec(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'metadata': 'V1ObjectMeta',
'spec': 'V1PodSpec'
}
self.attribute_map = {
'metadata': 'metadata',
'spec': 'spec'
}
self._metadata = None
self._spec = None
@property
def metadata(self):
"""
Gets the metadata of this V1PodTemplateSpec.
Standard object's metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:return: The metadata of this V1PodTemplateSpec.
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""
Sets the metadata of this V1PodTemplateSpec.
Standard object's metadata. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#metadata
:param metadata: The metadata of this V1PodTemplateSpec.
:type: V1ObjectMeta
"""
self._metadata = metadata
@property
def spec(self):
"""
Gets the spec of this V1PodTemplateSpec.
Specification of the desired behavior of the pod. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:return: The spec of this V1PodTemplateSpec.
:rtype: V1PodSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
"""
Sets the spec of this V1PodTemplateSpec.
Specification of the desired behavior of the pod. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#spec-and-status
:param spec: The spec of this V1PodTemplateSpec.
:type: V1PodSpec
"""
self._spec = spec
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,274 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Probe(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'_exec': 'V1ExecAction',
'http_get': 'V1HTTPGetAction',
'tcp_socket': 'V1TCPSocketAction',
'initial_delay_seconds': 'int',
'timeout_seconds': 'int',
'period_seconds': 'int',
'success_threshold': 'int',
'failure_threshold': 'int'
}
self.attribute_map = {
'_exec': 'exec',
'http_get': 'httpGet',
'tcp_socket': 'tcpSocket',
'initial_delay_seconds': 'initialDelaySeconds',
'timeout_seconds': 'timeoutSeconds',
'period_seconds': 'periodSeconds',
'success_threshold': 'successThreshold',
'failure_threshold': 'failureThreshold'
}
self.__exec = None
self._http_get = None
self._tcp_socket = None
self._initial_delay_seconds = None
self._timeout_seconds = None
self._period_seconds = None
self._success_threshold = None
self._failure_threshold = None
@property
def _exec(self):
"""
Gets the _exec of this V1Probe.
One and only one of the following should be specified. Exec specifies the action to take.
:return: The _exec of this V1Probe.
:rtype: V1ExecAction
"""
return self.__exec
@_exec.setter
def _exec(self, _exec):
"""
Sets the _exec of this V1Probe.
One and only one of the following should be specified. Exec specifies the action to take.
:param _exec: The _exec of this V1Probe.
:type: V1ExecAction
"""
self.__exec = _exec
@property
def http_get(self):
"""
Gets the http_get of this V1Probe.
HTTPGet specifies the http request to perform.
:return: The http_get of this V1Probe.
:rtype: V1HTTPGetAction
"""
return self._http_get
@http_get.setter
def http_get(self, http_get):
"""
Sets the http_get of this V1Probe.
HTTPGet specifies the http request to perform.
:param http_get: The http_get of this V1Probe.
:type: V1HTTPGetAction
"""
self._http_get = http_get
@property
def tcp_socket(self):
"""
Gets the tcp_socket of this V1Probe.
TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported
:return: The tcp_socket of this V1Probe.
:rtype: V1TCPSocketAction
"""
return self._tcp_socket
@tcp_socket.setter
def tcp_socket(self, tcp_socket):
"""
Sets the tcp_socket of this V1Probe.
TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported
:param tcp_socket: The tcp_socket of this V1Probe.
:type: V1TCPSocketAction
"""
self._tcp_socket = tcp_socket
@property
def initial_delay_seconds(self):
"""
Gets the initial_delay_seconds of this V1Probe.
Number of seconds after the container has started before liveness probes are initiated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:return: The initial_delay_seconds of this V1Probe.
:rtype: int
"""
return self._initial_delay_seconds
@initial_delay_seconds.setter
def initial_delay_seconds(self, initial_delay_seconds):
"""
Sets the initial_delay_seconds of this V1Probe.
Number of seconds after the container has started before liveness probes are initiated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:param initial_delay_seconds: The initial_delay_seconds of this V1Probe.
:type: int
"""
self._initial_delay_seconds = initial_delay_seconds
@property
def timeout_seconds(self):
"""
Gets the timeout_seconds of this V1Probe.
Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:return: The timeout_seconds of this V1Probe.
:rtype: int
"""
return self._timeout_seconds
@timeout_seconds.setter
def timeout_seconds(self, timeout_seconds):
"""
Sets the timeout_seconds of this V1Probe.
Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://releases.k8s.io/release-1.2/docs/user-guide/pod-states.md#container-probes
:param timeout_seconds: The timeout_seconds of this V1Probe.
:type: int
"""
self._timeout_seconds = timeout_seconds
@property
def period_seconds(self):
"""
Gets the period_seconds of this V1Probe.
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
:return: The period_seconds of this V1Probe.
:rtype: int
"""
return self._period_seconds
@period_seconds.setter
def period_seconds(self, period_seconds):
"""
Sets the period_seconds of this V1Probe.
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
:param period_seconds: The period_seconds of this V1Probe.
:type: int
"""
self._period_seconds = period_seconds
@property
def success_threshold(self):
"""
Gets the success_threshold of this V1Probe.
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.
:return: The success_threshold of this V1Probe.
:rtype: int
"""
return self._success_threshold
@success_threshold.setter
def success_threshold(self, success_threshold):
"""
Sets the success_threshold of this V1Probe.
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.
:param success_threshold: The success_threshold of this V1Probe.
:type: int
"""
self._success_threshold = success_threshold
@property
def failure_threshold(self):
"""
Gets the failure_threshold of this V1Probe.
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
:return: The failure_threshold of this V1Probe.
:rtype: int
"""
return self._failure_threshold
@failure_threshold.setter
def failure_threshold(self, failure_threshold):
"""
Sets the failure_threshold of this V1Probe.
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
:param failure_threshold: The failure_threshold of this V1Probe.
:type: int
"""
self._failure_threshold = failure_threshold
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,274 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1RBDVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'monitors': 'list[str]',
'image': 'str',
'fs_type': 'str',
'pool': 'str',
'user': 'str',
'keyring': 'str',
'secret_ref': 'V1LocalObjectReference',
'read_only': 'bool'
}
self.attribute_map = {
'monitors': 'monitors',
'image': 'image',
'fs_type': 'fsType',
'pool': 'pool',
'user': 'user',
'keyring': 'keyring',
'secret_ref': 'secretRef',
'read_only': 'readOnly'
}
self._monitors = None
self._image = None
self._fs_type = None
self._pool = None
self._user = None
self._keyring = None
self._secret_ref = None
self._read_only = None
@property
def monitors(self):
"""
Gets the monitors of this V1RBDVolumeSource.
A collection of Ceph monitors. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The monitors of this V1RBDVolumeSource.
:rtype: list[str]
"""
return self._monitors
@monitors.setter
def monitors(self, monitors):
"""
Sets the monitors of this V1RBDVolumeSource.
A collection of Ceph monitors. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param monitors: The monitors of this V1RBDVolumeSource.
:type: list[str]
"""
self._monitors = monitors
@property
def image(self):
"""
Gets the image of this V1RBDVolumeSource.
The rados image name. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The image of this V1RBDVolumeSource.
:rtype: str
"""
return self._image
@image.setter
def image(self, image):
"""
Sets the image of this V1RBDVolumeSource.
The rados image name. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param image: The image of this V1RBDVolumeSource.
:type: str
"""
self._image = image
@property
def fs_type(self):
"""
Gets the fs_type of this V1RBDVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#rbd
:return: The fs_type of this V1RBDVolumeSource.
:rtype: str
"""
return self._fs_type
@fs_type.setter
def fs_type(self, fs_type):
"""
Sets the fs_type of this V1RBDVolumeSource.
Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#rbd
:param fs_type: The fs_type of this V1RBDVolumeSource.
:type: str
"""
self._fs_type = fs_type
@property
def pool(self):
"""
Gets the pool of this V1RBDVolumeSource.
The rados pool name. Default is rbd. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it.
:return: The pool of this V1RBDVolumeSource.
:rtype: str
"""
return self._pool
@pool.setter
def pool(self, pool):
"""
Sets the pool of this V1RBDVolumeSource.
The rados pool name. Default is rbd. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it.
:param pool: The pool of this V1RBDVolumeSource.
:type: str
"""
self._pool = pool
@property
def user(self):
"""
Gets the user of this V1RBDVolumeSource.
The rados user name. Default is admin. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The user of this V1RBDVolumeSource.
:rtype: str
"""
return self._user
@user.setter
def user(self, user):
"""
Sets the user of this V1RBDVolumeSource.
The rados user name. Default is admin. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param user: The user of this V1RBDVolumeSource.
:type: str
"""
self._user = user
@property
def keyring(self):
"""
Gets the keyring of this V1RBDVolumeSource.
Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The keyring of this V1RBDVolumeSource.
:rtype: str
"""
return self._keyring
@keyring.setter
def keyring(self, keyring):
"""
Sets the keyring of this V1RBDVolumeSource.
Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param keyring: The keyring of this V1RBDVolumeSource.
:type: str
"""
self._keyring = keyring
@property
def secret_ref(self):
"""
Gets the secret_ref of this V1RBDVolumeSource.
SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is empty. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The secret_ref of this V1RBDVolumeSource.
:rtype: V1LocalObjectReference
"""
return self._secret_ref
@secret_ref.setter
def secret_ref(self, secret_ref):
"""
Sets the secret_ref of this V1RBDVolumeSource.
SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is empty. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param secret_ref: The secret_ref of this V1RBDVolumeSource.
:type: V1LocalObjectReference
"""
self._secret_ref = secret_ref
@property
def read_only(self):
"""
Gets the read_only of this V1RBDVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:return: The read_only of this V1RBDVolumeSource.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1RBDVolumeSource.
ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md#how-to-use-it
:param read_only: The read_only of this V1RBDVolumeSource.
:type: bool
"""
self._read_only = read_only
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1ResourceRequirements(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'limits': 'object',
'requests': 'object'
}
self.attribute_map = {
'limits': 'limits',
'requests': 'requests'
}
self._limits = None
self._requests = None
@property
def limits(self):
"""
Gets the limits of this V1ResourceRequirements.
Limits describes the maximum amount of compute resources allowed. More info: http://releases.k8s.io/release-1.2/docs/design/resources.md#resource-specifications
:return: The limits of this V1ResourceRequirements.
:rtype: object
"""
return self._limits
@limits.setter
def limits(self, limits):
"""
Sets the limits of this V1ResourceRequirements.
Limits describes the maximum amount of compute resources allowed. More info: http://releases.k8s.io/release-1.2/docs/design/resources.md#resource-specifications
:param limits: The limits of this V1ResourceRequirements.
:type: object
"""
self._limits = limits
@property
def requests(self):
"""
Gets the requests of this V1ResourceRequirements.
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://releases.k8s.io/release-1.2/docs/design/resources.md#resource-specifications
:return: The requests of this V1ResourceRequirements.
:rtype: object
"""
return self._requests
@requests.setter
def requests(self, requests):
"""
Sets the requests of this V1ResourceRequirements.
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://releases.k8s.io/release-1.2/docs/design/resources.md#resource-specifications
:param requests: The requests of this V1ResourceRequirements.
:type: object
"""
self._requests = requests
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,174 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1SELinuxOptions(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'user': 'str',
'role': 'str',
'type': 'str',
'level': 'str'
}
self.attribute_map = {
'user': 'user',
'role': 'role',
'type': 'type',
'level': 'level'
}
self._user = None
self._role = None
self._type = None
self._level = None
@property
def user(self):
"""
Gets the user of this V1SELinuxOptions.
User is a SELinux user label that applies to the container.
:return: The user of this V1SELinuxOptions.
:rtype: str
"""
return self._user
@user.setter
def user(self, user):
"""
Sets the user of this V1SELinuxOptions.
User is a SELinux user label that applies to the container.
:param user: The user of this V1SELinuxOptions.
:type: str
"""
self._user = user
@property
def role(self):
"""
Gets the role of this V1SELinuxOptions.
Role is a SELinux role label that applies to the container.
:return: The role of this V1SELinuxOptions.
:rtype: str
"""
return self._role
@role.setter
def role(self, role):
"""
Sets the role of this V1SELinuxOptions.
Role is a SELinux role label that applies to the container.
:param role: The role of this V1SELinuxOptions.
:type: str
"""
self._role = role
@property
def type(self):
"""
Gets the type of this V1SELinuxOptions.
Type is a SELinux type label that applies to the container.
:return: The type of this V1SELinuxOptions.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""
Sets the type of this V1SELinuxOptions.
Type is a SELinux type label that applies to the container.
:param type: The type of this V1SELinuxOptions.
:type: str
"""
self._type = type
@property
def level(self):
"""
Gets the level of this V1SELinuxOptions.
Level is SELinux level label that applies to the container.
:return: The level of this V1SELinuxOptions.
:rtype: str
"""
return self._level
@level.setter
def level(self, level):
"""
Sets the level of this V1SELinuxOptions.
Level is SELinux level label that applies to the container.
:param level: The level of this V1SELinuxOptions.
:type: str
"""
self._level = level
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1SecretKeySelector(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'key': 'str'
}
self.attribute_map = {
'name': 'name',
'key': 'key'
}
self._name = None
self._key = None
@property
def name(self):
"""
Gets the name of this V1SecretKeySelector.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1SecretKeySelector.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1SecretKeySelector.
Name of the referent. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1SecretKeySelector.
:type: str
"""
self._name = name
@property
def key(self):
"""
Gets the key of this V1SecretKeySelector.
The key of the secret to select from. Must be a valid secret key.
:return: The key of this V1SecretKeySelector.
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
"""
Sets the key of this V1SecretKeySelector.
The key of the secret to select from. Must be a valid secret key.
:param key: The key of this V1SecretKeySelector.
:type: str
"""
self._key = key
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1SecretVolumeSource(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'secret_name': 'str'
}
self.attribute_map = {
'secret_name': 'secretName'
}
self._secret_name = None
@property
def secret_name(self):
"""
Gets the secret_name of this V1SecretVolumeSource.
Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#secrets
:return: The secret_name of this V1SecretVolumeSource.
:rtype: str
"""
return self._secret_name
@secret_name.setter
def secret_name(self, secret_name):
"""
Sets the secret_name of this V1SecretVolumeSource.
Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#secrets
:param secret_name: The secret_name of this V1SecretVolumeSource.
:type: str
"""
self._secret_name = secret_name
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,224 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1SecurityContext(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'capabilities': 'V1Capabilities',
'privileged': 'bool',
'se_linux_options': 'V1SELinuxOptions',
'run_as_user': 'int',
'run_as_non_root': 'bool',
'read_only_root_filesystem': 'bool'
}
self.attribute_map = {
'capabilities': 'capabilities',
'privileged': 'privileged',
'se_linux_options': 'seLinuxOptions',
'run_as_user': 'runAsUser',
'run_as_non_root': 'runAsNonRoot',
'read_only_root_filesystem': 'readOnlyRootFilesystem'
}
self._capabilities = None
self._privileged = None
self._se_linux_options = None
self._run_as_user = None
self._run_as_non_root = None
self._read_only_root_filesystem = None
@property
def capabilities(self):
"""
Gets the capabilities of this V1SecurityContext.
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
:return: The capabilities of this V1SecurityContext.
:rtype: V1Capabilities
"""
return self._capabilities
@capabilities.setter
def capabilities(self, capabilities):
"""
Sets the capabilities of this V1SecurityContext.
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
:param capabilities: The capabilities of this V1SecurityContext.
:type: V1Capabilities
"""
self._capabilities = capabilities
@property
def privileged(self):
"""
Gets the privileged of this V1SecurityContext.
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
:return: The privileged of this V1SecurityContext.
:rtype: bool
"""
return self._privileged
@privileged.setter
def privileged(self, privileged):
"""
Sets the privileged of this V1SecurityContext.
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
:param privileged: The privileged of this V1SecurityContext.
:type: bool
"""
self._privileged = privileged
@property
def se_linux_options(self):
"""
Gets the se_linux_options of this V1SecurityContext.
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:return: The se_linux_options of this V1SecurityContext.
:rtype: V1SELinuxOptions
"""
return self._se_linux_options
@se_linux_options.setter
def se_linux_options(self, se_linux_options):
"""
Sets the se_linux_options of this V1SecurityContext.
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:param se_linux_options: The se_linux_options of this V1SecurityContext.
:type: V1SELinuxOptions
"""
self._se_linux_options = se_linux_options
@property
def run_as_user(self):
"""
Gets the run_as_user of this V1SecurityContext.
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:return: The run_as_user of this V1SecurityContext.
:rtype: int
"""
return self._run_as_user
@run_as_user.setter
def run_as_user(self, run_as_user):
"""
Sets the run_as_user of this V1SecurityContext.
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:param run_as_user: The run_as_user of this V1SecurityContext.
:type: int
"""
self._run_as_user = run_as_user
@property
def run_as_non_root(self):
"""
Gets the run_as_non_root of this V1SecurityContext.
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:return: The run_as_non_root of this V1SecurityContext.
:rtype: bool
"""
return self._run_as_non_root
@run_as_non_root.setter
def run_as_non_root(self, run_as_non_root):
"""
Sets the run_as_non_root of this V1SecurityContext.
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
:param run_as_non_root: The run_as_non_root of this V1SecurityContext.
:type: bool
"""
self._run_as_non_root = run_as_non_root
@property
def read_only_root_filesystem(self):
"""
Gets the read_only_root_filesystem of this V1SecurityContext.
Whether this container has a read-only root filesystem. Default is false.
:return: The read_only_root_filesystem of this V1SecurityContext.
:rtype: bool
"""
return self._read_only_root_filesystem
@read_only_root_filesystem.setter
def read_only_root_filesystem(self, read_only_root_filesystem):
"""
Sets the read_only_root_filesystem of this V1SecurityContext.
Whether this container has a read-only root filesystem. Default is false.
:param read_only_root_filesystem: The read_only_root_filesystem of this V1SecurityContext.
:type: bool
"""
self._read_only_root_filesystem = read_only_root_filesystem
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,99 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1TCPSocketAction(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'port': 'str'
}
self.attribute_map = {
'port': 'port'
}
self._port = None
@property
def port(self):
"""
Gets the port of this V1TCPSocketAction.
Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
:return: The port of this V1TCPSocketAction.
:rtype: str
"""
return self._port
@port.setter
def port(self, port):
"""
Sets the port of this V1TCPSocketAction.
Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
:param port: The port of this V1TCPSocketAction.
:type: str
"""
self._port = port
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,574 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1Volume(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'host_path': 'V1HostPathVolumeSource',
'empty_dir': 'V1EmptyDirVolumeSource',
'gce_persistent_disk': 'V1GCEPersistentDiskVolumeSource',
'aws_elastic_block_store': 'V1AWSElasticBlockStoreVolumeSource',
'git_repo': 'V1GitRepoVolumeSource',
'secret': 'V1SecretVolumeSource',
'nfs': 'V1NFSVolumeSource',
'iscsi': 'V1ISCSIVolumeSource',
'glusterfs': 'V1GlusterfsVolumeSource',
'persistent_volume_claim': 'V1PersistentVolumeClaimVolumeSource',
'rbd': 'V1RBDVolumeSource',
'flex_volume': 'V1FlexVolumeSource',
'cinder': 'V1CinderVolumeSource',
'cephfs': 'V1CephFSVolumeSource',
'flocker': 'V1FlockerVolumeSource',
'downward_api': 'V1DownwardAPIVolumeSource',
'fc': 'V1FCVolumeSource',
'azure_file': 'V1AzureFileVolumeSource',
'config_map': 'V1ConfigMapVolumeSource'
}
self.attribute_map = {
'name': 'name',
'host_path': 'hostPath',
'empty_dir': 'emptyDir',
'gce_persistent_disk': 'gcePersistentDisk',
'aws_elastic_block_store': 'awsElasticBlockStore',
'git_repo': 'gitRepo',
'secret': 'secret',
'nfs': 'nfs',
'iscsi': 'iscsi',
'glusterfs': 'glusterfs',
'persistent_volume_claim': 'persistentVolumeClaim',
'rbd': 'rbd',
'flex_volume': 'flexVolume',
'cinder': 'cinder',
'cephfs': 'cephfs',
'flocker': 'flocker',
'downward_api': 'downwardAPI',
'fc': 'fc',
'azure_file': 'azureFile',
'config_map': 'configMap'
}
self._name = None
self._host_path = None
self._empty_dir = None
self._gce_persistent_disk = None
self._aws_elastic_block_store = None
self._git_repo = None
self._secret = None
self._nfs = None
self._iscsi = None
self._glusterfs = None
self._persistent_volume_claim = None
self._rbd = None
self._flex_volume = None
self._cinder = None
self._cephfs = None
self._flocker = None
self._downward_api = None
self._fc = None
self._azure_file = None
self._config_map = None
@property
def name(self):
"""
Gets the name of this V1Volume.
Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:return: The name of this V1Volume.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1Volume.
Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/identifiers.md#names
:param name: The name of this V1Volume.
:type: str
"""
self._name = name
@property
def host_path(self):
"""
Gets the host_path of this V1Volume.
HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#hostpath
:return: The host_path of this V1Volume.
:rtype: V1HostPathVolumeSource
"""
return self._host_path
@host_path.setter
def host_path(self, host_path):
"""
Sets the host_path of this V1Volume.
HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#hostpath
:param host_path: The host_path of this V1Volume.
:type: V1HostPathVolumeSource
"""
self._host_path = host_path
@property
def empty_dir(self):
"""
Gets the empty_dir of this V1Volume.
EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#emptydir
:return: The empty_dir of this V1Volume.
:rtype: V1EmptyDirVolumeSource
"""
return self._empty_dir
@empty_dir.setter
def empty_dir(self, empty_dir):
"""
Sets the empty_dir of this V1Volume.
EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#emptydir
:param empty_dir: The empty_dir of this V1Volume.
:type: V1EmptyDirVolumeSource
"""
self._empty_dir = empty_dir
@property
def gce_persistent_disk(self):
"""
Gets the gce_persistent_disk of this V1Volume.
GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:return: The gce_persistent_disk of this V1Volume.
:rtype: V1GCEPersistentDiskVolumeSource
"""
return self._gce_persistent_disk
@gce_persistent_disk.setter
def gce_persistent_disk(self, gce_persistent_disk):
"""
Sets the gce_persistent_disk of this V1Volume.
GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#gcepersistentdisk
:param gce_persistent_disk: The gce_persistent_disk of this V1Volume.
:type: V1GCEPersistentDiskVolumeSource
"""
self._gce_persistent_disk = gce_persistent_disk
@property
def aws_elastic_block_store(self):
"""
Gets the aws_elastic_block_store of this V1Volume.
AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:return: The aws_elastic_block_store of this V1Volume.
:rtype: V1AWSElasticBlockStoreVolumeSource
"""
return self._aws_elastic_block_store
@aws_elastic_block_store.setter
def aws_elastic_block_store(self, aws_elastic_block_store):
"""
Sets the aws_elastic_block_store of this V1Volume.
AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#awselasticblockstore
:param aws_elastic_block_store: The aws_elastic_block_store of this V1Volume.
:type: V1AWSElasticBlockStoreVolumeSource
"""
self._aws_elastic_block_store = aws_elastic_block_store
@property
def git_repo(self):
"""
Gets the git_repo of this V1Volume.
GitRepo represents a git repository at a particular revision.
:return: The git_repo of this V1Volume.
:rtype: V1GitRepoVolumeSource
"""
return self._git_repo
@git_repo.setter
def git_repo(self, git_repo):
"""
Sets the git_repo of this V1Volume.
GitRepo represents a git repository at a particular revision.
:param git_repo: The git_repo of this V1Volume.
:type: V1GitRepoVolumeSource
"""
self._git_repo = git_repo
@property
def secret(self):
"""
Gets the secret of this V1Volume.
Secret represents a secret that should populate this volume. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#secrets
:return: The secret of this V1Volume.
:rtype: V1SecretVolumeSource
"""
return self._secret
@secret.setter
def secret(self, secret):
"""
Sets the secret of this V1Volume.
Secret represents a secret that should populate this volume. More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#secrets
:param secret: The secret of this V1Volume.
:type: V1SecretVolumeSource
"""
self._secret = secret
@property
def nfs(self):
"""
Gets the nfs of this V1Volume.
NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:return: The nfs of this V1Volume.
:rtype: V1NFSVolumeSource
"""
return self._nfs
@nfs.setter
def nfs(self, nfs):
"""
Sets the nfs of this V1Volume.
NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://releases.k8s.io/release-1.2/docs/user-guide/volumes.md#nfs
:param nfs: The nfs of this V1Volume.
:type: V1NFSVolumeSource
"""
self._nfs = nfs
@property
def iscsi(self):
"""
Gets the iscsi of this V1Volume.
ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/examples/iscsi/README.md
:return: The iscsi of this V1Volume.
:rtype: V1ISCSIVolumeSource
"""
return self._iscsi
@iscsi.setter
def iscsi(self, iscsi):
"""
Sets the iscsi of this V1Volume.
ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/release-1.2/examples/iscsi/README.md
:param iscsi: The iscsi of this V1Volume.
:type: V1ISCSIVolumeSource
"""
self._iscsi = iscsi
@property
def glusterfs(self):
"""
Gets the glusterfs of this V1Volume.
Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md
:return: The glusterfs of this V1Volume.
:rtype: V1GlusterfsVolumeSource
"""
return self._glusterfs
@glusterfs.setter
def glusterfs(self, glusterfs):
"""
Sets the glusterfs of this V1Volume.
Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/examples/glusterfs/README.md
:param glusterfs: The glusterfs of this V1Volume.
:type: V1GlusterfsVolumeSource
"""
self._glusterfs = glusterfs
@property
def persistent_volume_claim(self):
"""
Gets the persistent_volume_claim of this V1Volume.
PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
:return: The persistent_volume_claim of this V1Volume.
:rtype: V1PersistentVolumeClaimVolumeSource
"""
return self._persistent_volume_claim
@persistent_volume_claim.setter
def persistent_volume_claim(self, persistent_volume_claim):
"""
Sets the persistent_volume_claim of this V1Volume.
PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://releases.k8s.io/release-1.2/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
:param persistent_volume_claim: The persistent_volume_claim of this V1Volume.
:type: V1PersistentVolumeClaimVolumeSource
"""
self._persistent_volume_claim = persistent_volume_claim
@property
def rbd(self):
"""
Gets the rbd of this V1Volume.
RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md
:return: The rbd of this V1Volume.
:rtype: V1RBDVolumeSource
"""
return self._rbd
@rbd.setter
def rbd(self, rbd):
"""
Sets the rbd of this V1Volume.
RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/release-1.2/examples/rbd/README.md
:param rbd: The rbd of this V1Volume.
:type: V1RBDVolumeSource
"""
self._rbd = rbd
@property
def flex_volume(self):
"""
Gets the flex_volume of this V1Volume.
FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
:return: The flex_volume of this V1Volume.
:rtype: V1FlexVolumeSource
"""
return self._flex_volume
@flex_volume.setter
def flex_volume(self, flex_volume):
"""
Sets the flex_volume of this V1Volume.
FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
:param flex_volume: The flex_volume of this V1Volume.
:type: V1FlexVolumeSource
"""
self._flex_volume = flex_volume
@property
def cinder(self):
"""
Gets the cinder of this V1Volume.
Cinder represents a cinder volume attached and mounted on kubelets host machine More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:return: The cinder of this V1Volume.
:rtype: V1CinderVolumeSource
"""
return self._cinder
@cinder.setter
def cinder(self, cinder):
"""
Sets the cinder of this V1Volume.
Cinder represents a cinder volume attached and mounted on kubelets host machine More info: http://releases.k8s.io/release-1.2/examples/mysql-cinder-pd/README.md
:param cinder: The cinder of this V1Volume.
:type: V1CinderVolumeSource
"""
self._cinder = cinder
@property
def cephfs(self):
"""
Gets the cephfs of this V1Volume.
CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
:return: The cephfs of this V1Volume.
:rtype: V1CephFSVolumeSource
"""
return self._cephfs
@cephfs.setter
def cephfs(self, cephfs):
"""
Sets the cephfs of this V1Volume.
CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
:param cephfs: The cephfs of this V1Volume.
:type: V1CephFSVolumeSource
"""
self._cephfs = cephfs
@property
def flocker(self):
"""
Gets the flocker of this V1Volume.
Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
:return: The flocker of this V1Volume.
:rtype: V1FlockerVolumeSource
"""
return self._flocker
@flocker.setter
def flocker(self, flocker):
"""
Sets the flocker of this V1Volume.
Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
:param flocker: The flocker of this V1Volume.
:type: V1FlockerVolumeSource
"""
self._flocker = flocker
@property
def downward_api(self):
"""
Gets the downward_api of this V1Volume.
DownwardAPI represents downward API about the pod that should populate this volume
:return: The downward_api of this V1Volume.
:rtype: V1DownwardAPIVolumeSource
"""
return self._downward_api
@downward_api.setter
def downward_api(self, downward_api):
"""
Sets the downward_api of this V1Volume.
DownwardAPI represents downward API about the pod that should populate this volume
:param downward_api: The downward_api of this V1Volume.
:type: V1DownwardAPIVolumeSource
"""
self._downward_api = downward_api
@property
def fc(self):
"""
Gets the fc of this V1Volume.
FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
:return: The fc of this V1Volume.
:rtype: V1FCVolumeSource
"""
return self._fc
@fc.setter
def fc(self, fc):
"""
Sets the fc of this V1Volume.
FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
:param fc: The fc of this V1Volume.
:type: V1FCVolumeSource
"""
self._fc = fc
@property
def azure_file(self):
"""
Gets the azure_file of this V1Volume.
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
:return: The azure_file of this V1Volume.
:rtype: V1AzureFileVolumeSource
"""
return self._azure_file
@azure_file.setter
def azure_file(self, azure_file):
"""
Sets the azure_file of this V1Volume.
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
:param azure_file: The azure_file of this V1Volume.
:type: V1AzureFileVolumeSource
"""
self._azure_file = azure_file
@property
def config_map(self):
"""
Gets the config_map of this V1Volume.
ConfigMap represents a configMap that should populate this volume
:return: The config_map of this V1Volume.
:rtype: V1ConfigMapVolumeSource
"""
return self._config_map
@config_map.setter
def config_map(self, config_map):
"""
Sets the config_map of this V1Volume.
ConfigMap represents a configMap that should populate this volume
:param config_map: The config_map of this V1Volume.
:type: V1ConfigMapVolumeSource
"""
self._config_map = config_map
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

View File

@ -0,0 +1,149 @@
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
class V1VolumeMount(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Swagger model
: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 = {
'name': 'str',
'read_only': 'bool',
'mount_path': 'str'
}
self.attribute_map = {
'name': 'name',
'read_only': 'readOnly',
'mount_path': 'mountPath'
}
self._name = None
self._read_only = None
self._mount_path = None
@property
def name(self):
"""
Gets the name of this V1VolumeMount.
This must match the Name of a Volume.
:return: The name of this V1VolumeMount.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this V1VolumeMount.
This must match the Name of a Volume.
:param name: The name of this V1VolumeMount.
:type: str
"""
self._name = name
@property
def read_only(self):
"""
Gets the read_only of this V1VolumeMount.
Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
:return: The read_only of this V1VolumeMount.
:rtype: bool
"""
return self._read_only
@read_only.setter
def read_only(self, read_only):
"""
Sets the read_only of this V1VolumeMount.
Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
:param read_only: The read_only of this V1VolumeMount.
:type: bool
"""
self._read_only = read_only
@property
def mount_path(self):
"""
Gets the mount_path of this V1VolumeMount.
Path within the container at which the volume should be mounted. Must not contain ':'.
:return: The mount_path of this V1VolumeMount.
:rtype: str
"""
return self._mount_path
@mount_path.setter
def mount_path(self, mount_path):
"""
Sets the mount_path of this V1VolumeMount.
Path within the container at which the volume should be mounted. Must not contain ':'.
:param mount_path: The mount_path of this V1VolumeMount.
:type: str
"""
self._mount_path = mount_path
def to_dict(self):
"""
Return model properties 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()
else:
result[attr] = value
return result
def to_str(self):
"""
Return model properties str
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ import uuid
from k8sclient.client import api_client
from k8sclient.client.apis import apiv_api
from k8sclient.client.apis import apisextensionsvbeta_api
from k8sclient.client.apis import apisbatchv_api
from k8sclient.tests import base
@ -210,3 +211,37 @@ class TestK8sclientBeta(base.TestCase):
resp = api.delete_namespaced_deployment(
name='test-deployment', body={}, namespace='default')
class TestK8sclientBatch(base.TestCase):
@unittest.skipUnless(
_is_k8s_running(), "Kubernetes is not available")
def test_job_apis(self):
client = api_client.ApiClient('http://127.0.0.1:8080/')
api = apisbatchv_api.ApisbatchvApi(client)
job_manifest = {
'kind': 'Job',
'spec': {
'template':
{'spec':
{'containers': [
{'image': 'busybox',
'name': 'test-job',
'command': ["sh", "-c", "sleep 5"]
}],
'restartPolicy': 'Never'},
'metadata': {'name': 'test-job'}}},
'apiVersion': 'batch/v1',
'metadata': {'name': 'test-job'}}
resp = api.create_namespaced_job(
body=job_manifest, namespace='default')
self.assertEqual('test-job', resp.metadata.name)
resp = api.read_namespaced_job(
name='test-job', namespace='default')
self.assertEqual('test-job', resp.metadata.name)
resp = api.delete_namespaced_job(
name='test-job', body={}, namespace='default')