Checkout generated k8s client
Change-Id: If7b7edb4dcef3595f6c5e239adfe2e3f9af2e0ac Partially-Implements: blueprint kubernetes-v1
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into sdk package
|
||||
from .models.v1_node import V1Node
|
||||
from .models.v1_persistent_volume_claim_list import V1PersistentVolumeClaimList
|
||||
from .models.v1_object_field_selector import V1ObjectFieldSelector
|
||||
from .models.v1_se_linux_options import V1SELinuxOptions
|
||||
from .models.v1_container_state_running import V1ContainerStateRunning
|
||||
from .models.v1_volume_mount import V1VolumeMount
|
||||
from .models.v1_persistent_volume_claim_spec import V1PersistentVolumeClaimSpec
|
||||
from .models.v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource
|
||||
from .models.v1_namespace_status import V1NamespaceStatus
|
||||
from .models.v1_resource_quota_spec import V1ResourceQuotaSpec
|
||||
from .models.v1_namespace_spec import V1NamespaceSpec
|
||||
from .models.v1_persistent_volume import V1PersistentVolume
|
||||
from .models.v1_persistent_volume_status import V1PersistentVolumeStatus
|
||||
from .models.v1_endpoints_list import V1EndpointsList
|
||||
from .models.v1_git_repo_volume_source import V1GitRepoVolumeSource
|
||||
from .models.v1_capabilities import V1Capabilities
|
||||
from .models.v1_node_condition import V1NodeCondition
|
||||
from .models.v1_pod_template_list import V1PodTemplateList
|
||||
from .models.v1_local_object_reference import V1LocalObjectReference
|
||||
from .models.v1_resource_quota_status import V1ResourceQuotaStatus
|
||||
from .models.v1_exec_action import V1ExecAction
|
||||
from .models.v1_object_meta import V1ObjectMeta
|
||||
from .models.api_patch import ApiPatch
|
||||
from .models.v1_limit_range_spec import V1LimitRangeSpec
|
||||
from .models.v1_iscsi_volume_source import V1ISCSIVolumeSource
|
||||
from .models.v1_empty_dir_volume_source import V1EmptyDirVolumeSource
|
||||
from .models.v1_node_list import V1NodeList
|
||||
from .models.v1_persistent_volume_claim import V1PersistentVolumeClaim
|
||||
from .models.v1_namespace_list import V1NamespaceList
|
||||
from .models.v1_service_account import V1ServiceAccount
|
||||
from .models.v1_node_address import V1NodeAddress
|
||||
from .models.v1_namespace import V1Namespace
|
||||
from .models.v1_list_meta import V1ListMeta
|
||||
from .models.v1_persistent_volume_claim_volume_source import V1PersistentVolumeClaimVolumeSource
|
||||
from .models.v1_persistent_volume_claim_status import V1PersistentVolumeClaimStatus
|
||||
from .models.v1_resource_quota_list import V1ResourceQuotaList
|
||||
from .models.v1_endpoint_subset import V1EndpointSubset
|
||||
from .models.v1_secret_volume_source import V1SecretVolumeSource
|
||||
from .models.v1_env_var_source import V1EnvVarSource
|
||||
from .models.v1_load_balancer_ingress import V1LoadBalancerIngress
|
||||
from .models.v1_service import V1Service
|
||||
from .models.v1_service_account_list import V1ServiceAccountList
|
||||
from .models.v1_limit_range_list import V1LimitRangeList
|
||||
from .models.v1_endpoints import V1Endpoints
|
||||
from .models.v1_delete_options import V1DeleteOptions
|
||||
from .models.v1_volume import V1Volume
|
||||
from .models.v1_probe import V1Probe
|
||||
from .models.v1_capability import V1Capability
|
||||
from .models.v1_replication_controller import V1ReplicationController
|
||||
from .models.v1_limit_range import V1LimitRange
|
||||
from .models.v1_pod_status import V1PodStatus
|
||||
from .models.v1_pod_spec import V1PodSpec
|
||||
from .models.v1_container_port import V1ContainerPort
|
||||
from .models.v1_event_list import V1EventList
|
||||
from .models.v1_resource_quota import V1ResourceQuota
|
||||
from .models.v1_lifecycle import V1Lifecycle
|
||||
from .models.v1_node_status import V1NodeStatus
|
||||
from .models.v1_glusterfs_volume_source import V1GlusterfsVolumeSource
|
||||
from .models.v1_handler import V1Handler
|
||||
from .models.v1_replication_controller_spec import V1ReplicationControllerSpec
|
||||
from .models.v1_event_source import V1EventSource
|
||||
from .models.v1_status_cause import V1StatusCause
|
||||
from .models.v1_pod_condition import V1PodCondition
|
||||
from .models.v1_rbd_volume_source import V1RBDVolumeSource
|
||||
from .models.v1_status import V1Status
|
||||
from .models.v1_pod_template import V1PodTemplate
|
||||
from .models.v1_service_status import V1ServiceStatus
|
||||
from .models.v1_nfs_volume_source import V1NFSVolumeSource
|
||||
from .models.v1_endpoint_port import V1EndpointPort
|
||||
from .models.v1_tcp_socket_action import V1TCPSocketAction
|
||||
from .models.v1_http_get_action import V1HTTPGetAction
|
||||
from .models.v1_status_details import V1StatusDetails
|
||||
from .models.v1_load_balancer_status import V1LoadBalancerStatus
|
||||
from .models.v1_secret_list import V1SecretList
|
||||
from .models.v1_container import V1Container
|
||||
from .models.v1_persistent_volume_spec import V1PersistentVolumeSpec
|
||||
from .models.v1_replication_controller_status import V1ReplicationControllerStatus
|
||||
from .models.v1_finalizer_name import V1FinalizerName
|
||||
from .models.v1_service_port import V1ServicePort
|
||||
from .models.v1_component_condition import V1ComponentCondition
|
||||
from .models.v1_component_status_list import V1ComponentStatusList
|
||||
from .models.v1_host_path_volume_source import V1HostPathVolumeSource
|
||||
from .models.json_watch_event import JsonWatchEvent
|
||||
from .models.v1_binding import V1Binding
|
||||
from .models.v1_container_state_terminated import V1ContainerStateTerminated
|
||||
from .models.v1_security_context import V1SecurityContext
|
||||
from .models.v1_container_state import V1ContainerState
|
||||
from .models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
|
||||
from .models.v1_container_status import V1ContainerStatus
|
||||
from .models.v1_replication_controller_list import V1ReplicationControllerList
|
||||
from .models.v1_secret import V1Secret
|
||||
from .models.v1_event import V1Event
|
||||
from .models.v1_env_var import V1EnvVar
|
||||
from .models.v1_resource_requirements import V1ResourceRequirements
|
||||
from .models.v1_persistent_volume_access_mode import V1PersistentVolumeAccessMode
|
||||
from .models.v1_component_status import V1ComponentStatus
|
||||
from .models.v1_limit_range_item import V1LimitRangeItem
|
||||
from .models.v1_pod_template_spec import V1PodTemplateSpec
|
||||
from .models.v1_pod_list import V1PodList
|
||||
from .models.v1_service_list import V1ServiceList
|
||||
from .models.v1_persistent_volume_list import V1PersistentVolumeList
|
||||
from .models.v1_object_reference import V1ObjectReference
|
||||
from .models.v1_container_state_waiting import V1ContainerStateWaiting
|
||||
from .models.v1_node_system_info import V1NodeSystemInfo
|
||||
from .models.v1_service_spec import V1ServiceSpec
|
||||
from .models.v1_pod import V1Pod
|
||||
from .models.v1_node_spec import V1NodeSpec
|
||||
from .models.v1_endpoint_address import V1EndpointAddress
|
||||
|
||||
# import apis into sdk package
|
||||
from .apis.apiv_api import ApivApi
|
||||
|
||||
# import ApiClient
|
||||
from .api_client import ApiClient
|
||||
|
||||
from .configuration import Configuration
|
||||
|
||||
configuration = Configuration()
|
||||
@@ -0,0 +1,560 @@
|
||||
# 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 __future__ import absolute_import
|
||||
from . import models
|
||||
from .rest import RESTClient
|
||||
from .rest import ApiException
|
||||
|
||||
import os
|
||||
import re
|
||||
import urllib
|
||||
import json
|
||||
import mimetypes
|
||||
import random
|
||||
import tempfile
|
||||
import threading
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import date
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
from six import iteritems
|
||||
|
||||
try:
|
||||
# for python3
|
||||
from urllib.parse import quote
|
||||
except ImportError:
|
||||
# for python2
|
||||
from urllib import quote
|
||||
|
||||
from .configuration import Configuration
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
"""
|
||||
Generic API client for Swagger client library builds.
|
||||
|
||||
Swagger generic API client. This client handles the client-
|
||||
server communication, and is invariant across implementations. Specifics of
|
||||
the methods and models for each application are generated from the Swagger
|
||||
templates.
|
||||
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
https://github.com/swagger-api/swagger-codegen
|
||||
Do not edit the class manually.
|
||||
|
||||
:param host: The base path for the server to call.
|
||||
:param header_name: a header to pass when making calls to the API.
|
||||
:param header_value: a header value to pass when making calls to the API.
|
||||
"""
|
||||
def __init__(self, host=Configuration().host,
|
||||
header_name=None, header_value=None, cookie=None):
|
||||
|
||||
"""
|
||||
Constructor of the class.
|
||||
"""
|
||||
self.default_headers = {}
|
||||
if header_name is not None:
|
||||
self.default_headers[header_name] = header_value
|
||||
self.host = host
|
||||
self.cookie = cookie
|
||||
# Set default User-Agent.
|
||||
self.user_agent = 'Python-Swagger'
|
||||
|
||||
@property
|
||||
def user_agent(self):
|
||||
"""
|
||||
Gets user agent.
|
||||
"""
|
||||
return self.default_headers['User-Agent']
|
||||
|
||||
@user_agent.setter
|
||||
def user_agent(self, value):
|
||||
"""
|
||||
Sets user agent.
|
||||
"""
|
||||
self.default_headers['User-Agent'] = value
|
||||
|
||||
def set_default_header(self, header_name, header_value):
|
||||
self.default_headers[header_name] = header_value
|
||||
|
||||
def __call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
|
||||
# headers parameters
|
||||
header_params = header_params or {}
|
||||
header_params.update(self.default_headers)
|
||||
if self.cookie:
|
||||
header_params['Cookie'] = self.cookie
|
||||
if header_params:
|
||||
header_params = self.sanitize_for_serialization(header_params)
|
||||
|
||||
# path parameters
|
||||
if path_params:
|
||||
path_params = self.sanitize_for_serialization(path_params)
|
||||
for k, v in iteritems(path_params):
|
||||
replacement = quote(str(self.to_path_value(v)))
|
||||
resource_path = resource_path.\
|
||||
replace('{' + k + '}', replacement)
|
||||
|
||||
# query parameters
|
||||
if query_params:
|
||||
query_params = self.sanitize_for_serialization(query_params)
|
||||
query_params = {k: self.to_path_value(v)
|
||||
for k, v in iteritems(query_params)}
|
||||
|
||||
# post parameters
|
||||
if post_params:
|
||||
post_params = self.prepare_post_parameters(post_params, files)
|
||||
post_params = self.sanitize_for_serialization(post_params)
|
||||
|
||||
# auth setting
|
||||
self.update_params_for_auth(header_params, query_params, auth_settings)
|
||||
|
||||
# body
|
||||
if body:
|
||||
body = self.sanitize_for_serialization(body)
|
||||
|
||||
# request url
|
||||
url = self.host + resource_path
|
||||
|
||||
# perform request and return response
|
||||
response_data = self.request(method, url,
|
||||
query_params=query_params,
|
||||
headers=header_params,
|
||||
post_params=post_params, body=body)
|
||||
|
||||
self.last_response = response_data
|
||||
|
||||
# deserialize response data
|
||||
if response_type:
|
||||
deserialized_data = self.deserialize(response_data, response_type)
|
||||
else:
|
||||
deserialized_data = None
|
||||
|
||||
if callback:
|
||||
callback(deserialized_data)
|
||||
else:
|
||||
return deserialized_data
|
||||
|
||||
def to_path_value(self, obj):
|
||||
"""
|
||||
Takes value and turn it into a string suitable for inclusion in
|
||||
the path, by url-encoding.
|
||||
|
||||
:param obj: object or string value.
|
||||
|
||||
:return string: quoted value.
|
||||
"""
|
||||
if type(obj) == list:
|
||||
return ','.join(obj)
|
||||
else:
|
||||
return str(obj)
|
||||
|
||||
def sanitize_for_serialization(self, obj):
|
||||
"""
|
||||
Builds a JSON POST object.
|
||||
|
||||
If obj is None, return None.
|
||||
If obj is str, int, float, bool, return directly.
|
||||
If obj is datetime.datetime, datetime.date
|
||||
convert to string in iso8601 format.
|
||||
If obj is list, santize each element in the list.
|
||||
If obj is dict, return the dict.
|
||||
If obj is swagger model, return the properties dict.
|
||||
|
||||
:param obj: The data to serialize.
|
||||
:return: The serialized form of data.
|
||||
"""
|
||||
if isinstance(obj, type(None)):
|
||||
return None
|
||||
elif isinstance(obj, (str, int, float, bool, tuple)):
|
||||
return obj
|
||||
elif isinstance(obj, list):
|
||||
return [self.sanitize_for_serialization(sub_obj)
|
||||
for sub_obj in obj]
|
||||
elif isinstance(obj, (datetime, date)):
|
||||
return obj.isoformat()
|
||||
else:
|
||||
if isinstance(obj, dict):
|
||||
obj_dict = obj
|
||||
else:
|
||||
# Convert model obj to dict except
|
||||
# attributes `swagger_types`, `attribute_map`
|
||||
# and attributes which value is not None.
|
||||
# Convert attribute name to json key in
|
||||
# model definition for request.
|
||||
obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
|
||||
for attr, _ in iteritems(obj.swagger_types)
|
||||
if getattr(obj, attr) is not None}
|
||||
|
||||
return {key: self.sanitize_for_serialization(val)
|
||||
for key, val in iteritems(obj_dict)}
|
||||
|
||||
def deserialize(self, response, response_type):
|
||||
"""
|
||||
Deserializes response into an object.
|
||||
|
||||
:param response: RESTResponse object to be deserialized.
|
||||
:param response_type: class literal for
|
||||
deserialzied object, or string of class name.
|
||||
|
||||
:return: deserialized object.
|
||||
"""
|
||||
# handle file downloading
|
||||
# save response body into a tmp file and return the instance
|
||||
if "file" == response_type:
|
||||
return self.__deserialize_file(response)
|
||||
|
||||
# fetch data from response object
|
||||
try:
|
||||
data = json.loads(response.data)
|
||||
except ValueError:
|
||||
data = response.data
|
||||
|
||||
return self.__deserialize(data, response_type)
|
||||
|
||||
def __deserialize(self, data, klass):
|
||||
"""
|
||||
Deserializes dict, list, str into an object.
|
||||
|
||||
:param data: dict, list or str.
|
||||
:param klass: class literal, or string of class name.
|
||||
|
||||
:return: object.
|
||||
"""
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if klass.startswith('list['):
|
||||
sub_kls = re.match('list\[(.*)\]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
for sub_data in data]
|
||||
|
||||
if klass.startswith('dict('):
|
||||
sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2)
|
||||
return {k: self.__deserialize(v, sub_kls)
|
||||
for k, v in iteritems(data)}
|
||||
|
||||
# convert str to class
|
||||
# for native types
|
||||
if klass in ['int', 'float', 'str', 'bool',
|
||||
"date", 'datetime', "object"]:
|
||||
klass = eval(klass)
|
||||
# for model types
|
||||
else:
|
||||
klass = eval('models.' + klass)
|
||||
|
||||
if klass in [int, float, str, bool]:
|
||||
return self.__deserialize_primitive(data, klass)
|
||||
elif klass == object:
|
||||
return self.__deserialize_object()
|
||||
elif klass == date:
|
||||
return self.__deserialize_date(data)
|
||||
elif klass == datetime:
|
||||
return self.__deserialize_datatime(data)
|
||||
else:
|
||||
return self.__deserialize_model(data, klass)
|
||||
|
||||
def call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, callback=None):
|
||||
"""
|
||||
Makes the HTTP request and return the deserialized data.
|
||||
|
||||
:param resource_path: Path to method endpoint.
|
||||
:param method: Method to call.
|
||||
:param path_params: Path parameters in the url.
|
||||
:param query_params: Query parameters in the url.
|
||||
:param header_params: Header parameters to be
|
||||
placed in the request header.
|
||||
:param body: Request body.
|
||||
:param post_params dict: Request post form parameters,
|
||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
||||
:param auth_settings list: Auth Settings names for the request.
|
||||
:param response: Response data type.
|
||||
:param files dict: key -> filename, value -> filepath,
|
||||
for `multipart/form-data`.
|
||||
:param callback function: Callback function for asynchronous request.
|
||||
If provide this parameter,
|
||||
the request will be called asynchronously.
|
||||
:return:
|
||||
If provide parameter callback,
|
||||
the request will be called asynchronously.
|
||||
The method will return the request thread.
|
||||
If parameter callback is None,
|
||||
then the method will return the response directly.
|
||||
"""
|
||||
if callback is None:
|
||||
return self.__call_api(resource_path, method,
|
||||
path_params, query_params, header_params,
|
||||
body, post_params, files,
|
||||
response_type, auth_settings, callback)
|
||||
else:
|
||||
thread = threading.Thread(target=self.__call_api,
|
||||
args=(resource_path, method,
|
||||
path_params, query_params,
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type, auth_settings,
|
||||
callback))
|
||||
thread.start()
|
||||
return thread
|
||||
|
||||
def request(self, method, url, query_params=None, headers=None,
|
||||
post_params=None, body=None):
|
||||
"""
|
||||
Makes the HTTP request using RESTClient.
|
||||
"""
|
||||
if method == "GET":
|
||||
return RESTClient.GET(url,
|
||||
query_params=query_params,
|
||||
headers=headers)
|
||||
elif method == "HEAD":
|
||||
return RESTClient.HEAD(url,
|
||||
query_params=query_params,
|
||||
headers=headers)
|
||||
elif method == "POST":
|
||||
return RESTClient.POST(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
body=body)
|
||||
elif method == "PUT":
|
||||
return RESTClient.PUT(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
body=body)
|
||||
elif method == "PATCH":
|
||||
return RESTClient.PATCH(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
body=body)
|
||||
elif method == "DELETE":
|
||||
return RESTClient.DELETE(url,
|
||||
query_params=query_params,
|
||||
headers=headers)
|
||||
else:
|
||||
raise ValueError(
|
||||
"http method must be `GET`, `HEAD`,"
|
||||
" `POST`, `PATCH`, `PUT` or `DELETE`."
|
||||
)
|
||||
|
||||
def prepare_post_parameters(self, post_params=None, files=None):
|
||||
"""
|
||||
Builds form parameters.
|
||||
|
||||
:param post_params: Normal form parameters.
|
||||
:param files: File parameters.
|
||||
:return: Form parameters with files.
|
||||
"""
|
||||
params = {}
|
||||
|
||||
if post_params:
|
||||
params.update(post_params)
|
||||
|
||||
if files:
|
||||
for k, v in iteritems(files):
|
||||
if not v:
|
||||
continue
|
||||
|
||||
with open(v, 'rb') as f:
|
||||
filename = os.path.basename(f.name)
|
||||
filedata = f.read()
|
||||
mimetype = mimetypes.\
|
||||
guess_type(filename)[0] or 'application/octet-stream'
|
||||
params[k] = tuple([filename, filedata, mimetype])
|
||||
|
||||
return params
|
||||
|
||||
def select_header_accept(self, accepts):
|
||||
"""
|
||||
Returns `Accept` based on an array of accepts provided.
|
||||
|
||||
:param accepts: List of headers.
|
||||
:return: Accept (e.g. application/json).
|
||||
"""
|
||||
if not accepts:
|
||||
return
|
||||
|
||||
accepts = list(map(lambda x: x.lower(), accepts))
|
||||
|
||||
if 'application/json' in accepts:
|
||||
return 'application/json'
|
||||
else:
|
||||
return ', '.join(accepts)
|
||||
|
||||
def select_header_content_type(self, content_types):
|
||||
"""
|
||||
Returns `Content-Type` based on an array of content_types provided.
|
||||
|
||||
:param content_types: List of content-types.
|
||||
:return: Content-Type (e.g. application/json).
|
||||
"""
|
||||
if not content_types:
|
||||
return 'application/json'
|
||||
|
||||
content_types = list(map(lambda x: x.lower(), content_types))
|
||||
|
||||
if 'application/json' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
return content_types[0]
|
||||
|
||||
def update_params_for_auth(self, headers, querys, auth_settings):
|
||||
"""
|
||||
Updates header and query params based on authentication setting.
|
||||
|
||||
:param headers: Header parameters dict to be updated.
|
||||
:param querys: Query parameters dict to be updated.
|
||||
:param auth_settings: Authentication setting identifiers list.
|
||||
"""
|
||||
config = Configuration()
|
||||
|
||||
if not auth_settings:
|
||||
return
|
||||
|
||||
for auth in auth_settings:
|
||||
auth_setting = config.auth_settings().get(auth)
|
||||
if auth_setting:
|
||||
if auth_setting['in'] == 'header':
|
||||
headers[auth_setting['key']] = auth_setting['value']
|
||||
elif auth_setting['in'] == 'query':
|
||||
querys[auth_setting['key']] = auth_setting['value']
|
||||
else:
|
||||
raise ValueError(
|
||||
'Authentication token must be in `query` or `header`'
|
||||
)
|
||||
|
||||
def __deserialize_file(self, response):
|
||||
"""
|
||||
Saves response body into a file in (the defined) temporary folder,
|
||||
using the filename from the `Content-Disposition` header if provided,
|
||||
otherwise a random filename.
|
||||
|
||||
:param response: RESTResponse.
|
||||
:return: file path.
|
||||
"""
|
||||
config = Configuration()
|
||||
|
||||
fd, path = tempfile.mkstemp(dir=config.temp_folder_path)
|
||||
os.close(fd)
|
||||
os.remove(path)
|
||||
|
||||
content_disposition = response.getheader("Content-Disposition")
|
||||
if content_disposition:
|
||||
filename = re.\
|
||||
search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\
|
||||
group(1)
|
||||
path = os.path.join(os.path.dirname(path), filename)
|
||||
|
||||
with open(path, "w") as f:
|
||||
f.write(response.data)
|
||||
|
||||
return path
|
||||
|
||||
def __deserialize_primitive(self, data, klass):
|
||||
"""
|
||||
Deserializes string to primitive type.
|
||||
|
||||
:param data: str.
|
||||
:param klass: class literal.
|
||||
|
||||
:return: int, float, str, bool.
|
||||
"""
|
||||
try:
|
||||
value = klass(data)
|
||||
except UnicodeEncodeError:
|
||||
value = unicode(data)
|
||||
except TypeError:
|
||||
value = data
|
||||
return value
|
||||
|
||||
def __deserialize_object(self):
|
||||
"""
|
||||
Deserializes empty object.
|
||||
|
||||
:return: object.
|
||||
"""
|
||||
return object()
|
||||
|
||||
def __deserialize_date(self, string):
|
||||
"""
|
||||
Deserializes string to date.
|
||||
|
||||
:param string: str.
|
||||
:return: date.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string).date()
|
||||
except ImportError:
|
||||
return string
|
||||
except ValueError:
|
||||
raise ApiException(
|
||||
status=0,
|
||||
reason="Failed to parse `{0}` into a date object"
|
||||
.format(string)
|
||||
)
|
||||
|
||||
def __deserialize_datatime(self, string):
|
||||
"""
|
||||
Deserializes string to datetime.
|
||||
|
||||
The string should be in iso8601 datetime format.
|
||||
|
||||
:param string: str.
|
||||
:return: datetime.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string)
|
||||
except ImportError:
|
||||
return string
|
||||
except ValueError:
|
||||
raise ApiException(
|
||||
status=0,
|
||||
reason="Failed to parse `{0}` into a datetime object".
|
||||
format(string)
|
||||
)
|
||||
|
||||
def __deserialize_model(self, data, klass):
|
||||
"""
|
||||
Deserializes list or dict to model.
|
||||
|
||||
:param data: dict, list.
|
||||
:param klass: class literal.
|
||||
:return: model object.
|
||||
"""
|
||||
instance = klass()
|
||||
|
||||
for attr, attr_type in iteritems(instance.swagger_types):
|
||||
if data is not None \
|
||||
and instance.attribute_map[attr] in data\
|
||||
and isinstance(data, (list, dict)):
|
||||
value = data[instance.attribute_map[attr]]
|
||||
setattr(instance, attr, self.__deserialize(value, attr_type))
|
||||
|
||||
return instance
|
||||
@@ -0,0 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import apis into api package
|
||||
from .apiv_api import ApivApi
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,169 @@
|
||||
# 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 __future__ import absolute_import
|
||||
import base64
|
||||
import urllib3
|
||||
|
||||
try:
|
||||
import httplib
|
||||
except ImportError:
|
||||
# for python3
|
||||
import http.client as httplib
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
||||
|
||||
def singleton(cls, *args, **kw):
|
||||
instances = {}
|
||||
|
||||
def _singleton():
|
||||
if cls not in instances:
|
||||
instances[cls] = cls(*args, **kw)
|
||||
return instances[cls]
|
||||
return _singleton
|
||||
|
||||
|
||||
@singleton
|
||||
class Configuration(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
https://github.com/swagger-api/swagger-codegen
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Constructor
|
||||
"""
|
||||
# Default Base url
|
||||
self.host = "https://127.0.0.1:6443/"
|
||||
# Default api client
|
||||
self.api_client = None
|
||||
# Temp file folder for download
|
||||
self.temp_folder_path = None
|
||||
|
||||
# Authentication Settings
|
||||
# dict to store API key(s)
|
||||
self.api_key = {}
|
||||
# dict to store API prefix (e.g. Bearer)
|
||||
self.api_key_prefix = {}
|
||||
# Username for HTTP basic authentication
|
||||
self.username = ""
|
||||
# Password for HTTP basic authentication
|
||||
self.password = ""
|
||||
|
||||
# Logging Settings
|
||||
self.logging_format = '%(asctime)s %(levelname)s %(message)s'
|
||||
# Debug file location
|
||||
self.__logging_file = None
|
||||
# Debug switch
|
||||
self.__debug = False
|
||||
self.init_logger()
|
||||
|
||||
def init_logger(self):
|
||||
"""
|
||||
Initializes logger settings.
|
||||
"""
|
||||
self.logger = logging.getLogger()
|
||||
formatter = logging.Formatter(self.logging_format)
|
||||
stream_handler = logging.StreamHandler()
|
||||
stream_handler.setFormatter(formatter)
|
||||
self.logger.addHandler(stream_handler)
|
||||
if self.__debug:
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
else:
|
||||
self.logger.setLevel(logging.WARNING)
|
||||
if self.__logging_file:
|
||||
file_handler = logging.FileHandler(self.__logging_file)
|
||||
file_handler.setFormatter(formatter)
|
||||
self.logger.addFilter(file_handler)
|
||||
|
||||
@property
|
||||
def logging_file(self):
|
||||
return self.__logging_file
|
||||
|
||||
@logging_file.setter
|
||||
def logging_file(self, value):
|
||||
self.__logging_file = value
|
||||
if self.__logging_file:
|
||||
formater = logging.Formatter(self.logging_format)
|
||||
file_handler = logging.FileHandler(self.__logging_file)
|
||||
file_handler.setFormatter(formater)
|
||||
self.logger.addHandler(file_handler)
|
||||
|
||||
@property
|
||||
def debug(self):
|
||||
return self.__debug
|
||||
|
||||
@debug.setter
|
||||
def debug(self, value):
|
||||
self.__debug = value
|
||||
if self.__debug:
|
||||
# if debug status is True, turn on debug logging
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
# turn on httplib debug
|
||||
httplib.HTTPConnection.debuglevel = 1
|
||||
else:
|
||||
# if debug status is False, turn off debug logging,
|
||||
# setting log level to default `logging.WARNING`
|
||||
self.logger.setLevel(logging.WARNING)
|
||||
|
||||
def get_api_key_with_prefix(self, identifier):
|
||||
"""
|
||||
Gets API key (with prefix if set).
|
||||
|
||||
:param identifier: The identifier of apiKey.
|
||||
:return: The token for api key authentication.
|
||||
"""
|
||||
if self.api_key.get(identifier) and self.api_key_prefix.get(identifier):
|
||||
return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier]
|
||||
elif self.api_key.get(identifier):
|
||||
return self.api_key[identifier]
|
||||
|
||||
def get_basic_auth_token(self):
|
||||
"""
|
||||
Gets basic auth header string.
|
||||
|
||||
:return: The token for basic HTTP authentication.
|
||||
"""
|
||||
return urllib3.util.make_headers(basic_auth=self.username + ':' + self.password)\
|
||||
.get('authorization')
|
||||
|
||||
def auth_settings(self):
|
||||
"""
|
||||
Gets Auth Settings dict for api client.
|
||||
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
return {
|
||||
}
|
||||
|
||||
def to_debug_report(self):
|
||||
"""
|
||||
Gets the essential information for debugging.
|
||||
|
||||
:return: The report for debugging.
|
||||
"""
|
||||
return "Python SDK Debug Report:\n"\
|
||||
"OS: {env}\n"\
|
||||
"Python Version: {pyversion}\n"\
|
||||
"Version of the API: v1\n"\
|
||||
"SDK Package Version: 1.0.0".\
|
||||
format(env=sys.platform, pyversion=sys.version)
|
||||
@@ -0,0 +1,111 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
from .v1_node import V1Node
|
||||
from .v1_persistent_volume_claim_list import V1PersistentVolumeClaimList
|
||||
from .v1_object_field_selector import V1ObjectFieldSelector
|
||||
from .v1_se_linux_options import V1SELinuxOptions
|
||||
from .v1_container_state_running import V1ContainerStateRunning
|
||||
from .v1_volume_mount import V1VolumeMount
|
||||
from .v1_persistent_volume_claim_spec import V1PersistentVolumeClaimSpec
|
||||
from .v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource
|
||||
from .v1_namespace_status import V1NamespaceStatus
|
||||
from .v1_resource_quota_spec import V1ResourceQuotaSpec
|
||||
from .v1_namespace_spec import V1NamespaceSpec
|
||||
from .v1_persistent_volume import V1PersistentVolume
|
||||
from .v1_persistent_volume_status import V1PersistentVolumeStatus
|
||||
from .v1_endpoints_list import V1EndpointsList
|
||||
from .v1_git_repo_volume_source import V1GitRepoVolumeSource
|
||||
from .v1_capabilities import V1Capabilities
|
||||
from .v1_node_condition import V1NodeCondition
|
||||
from .v1_pod_template_list import V1PodTemplateList
|
||||
from .v1_local_object_reference import V1LocalObjectReference
|
||||
from .v1_resource_quota_status import V1ResourceQuotaStatus
|
||||
from .v1_exec_action import V1ExecAction
|
||||
from .v1_object_meta import V1ObjectMeta
|
||||
from .api_patch import ApiPatch
|
||||
from .v1_limit_range_spec import V1LimitRangeSpec
|
||||
from .v1_iscsi_volume_source import V1ISCSIVolumeSource
|
||||
from .v1_empty_dir_volume_source import V1EmptyDirVolumeSource
|
||||
from .v1_node_list import V1NodeList
|
||||
from .v1_persistent_volume_claim import V1PersistentVolumeClaim
|
||||
from .v1_namespace_list import V1NamespaceList
|
||||
from .v1_service_account import V1ServiceAccount
|
||||
from .v1_node_address import V1NodeAddress
|
||||
from .v1_namespace import V1Namespace
|
||||
from .v1_list_meta import V1ListMeta
|
||||
from .v1_persistent_volume_claim_volume_source import V1PersistentVolumeClaimVolumeSource
|
||||
from .v1_persistent_volume_claim_status import V1PersistentVolumeClaimStatus
|
||||
from .v1_resource_quota_list import V1ResourceQuotaList
|
||||
from .v1_endpoint_subset import V1EndpointSubset
|
||||
from .v1_secret_volume_source import V1SecretVolumeSource
|
||||
from .v1_env_var_source import V1EnvVarSource
|
||||
from .v1_load_balancer_ingress import V1LoadBalancerIngress
|
||||
from .v1_service import V1Service
|
||||
from .v1_service_account_list import V1ServiceAccountList
|
||||
from .v1_limit_range_list import V1LimitRangeList
|
||||
from .v1_endpoints import V1Endpoints
|
||||
from .v1_delete_options import V1DeleteOptions
|
||||
from .v1_volume import V1Volume
|
||||
from .v1_probe import V1Probe
|
||||
from .v1_capability import V1Capability
|
||||
from .v1_replication_controller import V1ReplicationController
|
||||
from .v1_limit_range import V1LimitRange
|
||||
from .v1_pod_status import V1PodStatus
|
||||
from .v1_pod_spec import V1PodSpec
|
||||
from .v1_container_port import V1ContainerPort
|
||||
from .v1_event_list import V1EventList
|
||||
from .v1_resource_quota import V1ResourceQuota
|
||||
from .v1_lifecycle import V1Lifecycle
|
||||
from .v1_node_status import V1NodeStatus
|
||||
from .v1_glusterfs_volume_source import V1GlusterfsVolumeSource
|
||||
from .v1_handler import V1Handler
|
||||
from .v1_replication_controller_spec import V1ReplicationControllerSpec
|
||||
from .v1_event_source import V1EventSource
|
||||
from .v1_status_cause import V1StatusCause
|
||||
from .v1_pod_condition import V1PodCondition
|
||||
from .v1_rbd_volume_source import V1RBDVolumeSource
|
||||
from .v1_status import V1Status
|
||||
from .v1_pod_template import V1PodTemplate
|
||||
from .v1_service_status import V1ServiceStatus
|
||||
from .v1_nfs_volume_source import V1NFSVolumeSource
|
||||
from .v1_endpoint_port import V1EndpointPort
|
||||
from .v1_tcp_socket_action import V1TCPSocketAction
|
||||
from .v1_http_get_action import V1HTTPGetAction
|
||||
from .v1_status_details import V1StatusDetails
|
||||
from .v1_load_balancer_status import V1LoadBalancerStatus
|
||||
from .v1_secret_list import V1SecretList
|
||||
from .v1_container import V1Container
|
||||
from .v1_persistent_volume_spec import V1PersistentVolumeSpec
|
||||
from .v1_replication_controller_status import V1ReplicationControllerStatus
|
||||
from .v1_finalizer_name import V1FinalizerName
|
||||
from .v1_service_port import V1ServicePort
|
||||
from .v1_component_condition import V1ComponentCondition
|
||||
from .v1_component_status_list import V1ComponentStatusList
|
||||
from .v1_host_path_volume_source import V1HostPathVolumeSource
|
||||
from .json_watch_event import JsonWatchEvent
|
||||
from .v1_binding import V1Binding
|
||||
from .v1_container_state_terminated import V1ContainerStateTerminated
|
||||
from .v1_security_context import V1SecurityContext
|
||||
from .v1_container_state import V1ContainerState
|
||||
from .v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
|
||||
from .v1_container_status import V1ContainerStatus
|
||||
from .v1_replication_controller_list import V1ReplicationControllerList
|
||||
from .v1_secret import V1Secret
|
||||
from .v1_event import V1Event
|
||||
from .v1_env_var import V1EnvVar
|
||||
from .v1_resource_requirements import V1ResourceRequirements
|
||||
from .v1_persistent_volume_access_mode import V1PersistentVolumeAccessMode
|
||||
from .v1_component_status import V1ComponentStatus
|
||||
from .v1_limit_range_item import V1LimitRangeItem
|
||||
from .v1_pod_template_spec import V1PodTemplateSpec
|
||||
from .v1_pod_list import V1PodList
|
||||
from .v1_service_list import V1ServiceList
|
||||
from .v1_persistent_volume_list import V1PersistentVolumeList
|
||||
from .v1_object_reference import V1ObjectReference
|
||||
from .v1_container_state_waiting import V1ContainerStateWaiting
|
||||
from .v1_node_system_info import V1NodeSystemInfo
|
||||
from .v1_service_spec import V1ServiceSpec
|
||||
from .v1_pod import V1Pod
|
||||
from .v1_node_spec import V1NodeSpec
|
||||
from .v1_endpoint_address import V1EndpointAddress
|
||||
@@ -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 ApiPatch(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()
|
||||
@@ -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()
|
||||
+174
@@ -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 PD resource in AWS; see http://releases.k8s.io/v1.0.4/docs/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 PD resource in AWS; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
file system type to mount, such as ext4, xfs, ntfs; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
file system type to mount, such as ext4, xfs, ntfs; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
partition on the disk to mount (e.g., '1' for /dev/sda1); if omitted the plain device name (e.g., /dev/sda) will be mounted; see http://releases.k8s.io/v1.0.4/docs/volumes.md#awselasticblockstore
|
||||
|
||||
:return: The partition of this V1AWSElasticBlockStoreVolumeSource.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._partition
|
||||
|
||||
@partition.setter
|
||||
def partition(self, partition):
|
||||
"""
|
||||
Sets the partition of this V1AWSElasticBlockStoreVolumeSource.
|
||||
partition on the disk to mount (e.g., '1' for /dev/sda1); if omitted the plain device name (e.g., /dev/sda) will be mounted; see http://releases.k8s.io/v1.0.4/docs/volumes.md#awselasticblockstore
|
||||
|
||||
:param partition: The partition of this V1AWSElasticBlockStoreVolumeSource.
|
||||
:type: int
|
||||
"""
|
||||
self._partition = partition
|
||||
|
||||
@property
|
||||
def read_only(self):
|
||||
"""
|
||||
Gets the read_only of this V1AWSElasticBlockStoreVolumeSource.
|
||||
read-only if true, read-write otherwise (false or unspecified); see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
read-only if true, read-write otherwise (false or unspecified); see http://releases.k8s.io/v1.0.4/docs/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()
|
||||
@@ -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 V1Binding(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',
|
||||
'target': 'V1ObjectReference'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'kind': 'kind',
|
||||
'api_version': 'apiVersion',
|
||||
'metadata': 'metadata',
|
||||
'target': 'target'
|
||||
}
|
||||
|
||||
self._kind = None
|
||||
self._api_version = None
|
||||
self._metadata = None
|
||||
self._target = None
|
||||
|
||||
@property
|
||||
def kind(self):
|
||||
"""
|
||||
Gets the kind of this V1Binding.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1Binding.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1Binding.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1Binding.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1Binding.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1Binding.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1Binding.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1Binding.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1Binding.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1Binding.
|
||||
:rtype: V1ObjectMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1Binding.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1Binding.
|
||||
:type: V1ObjectMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def target(self):
|
||||
"""
|
||||
Gets the target of this V1Binding.
|
||||
an object to bind to
|
||||
|
||||
:return: The target of this V1Binding.
|
||||
:rtype: V1ObjectReference
|
||||
"""
|
||||
return self._target
|
||||
|
||||
@target.setter
|
||||
def target(self, target):
|
||||
"""
|
||||
Sets the target of this V1Binding.
|
||||
an object to bind to
|
||||
|
||||
:param target: The target of this V1Binding.
|
||||
:type: V1ObjectReference
|
||||
"""
|
||||
self._target = target
|
||||
|
||||
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()
|
||||
@@ -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.
|
||||
droped 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.
|
||||
droped 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()
|
||||
@@ -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()
|
||||
@@ -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 V1ComponentCondition(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',
|
||||
'message': 'str',
|
||||
'error': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'type': 'type',
|
||||
'status': 'status',
|
||||
'message': 'message',
|
||||
'error': 'error'
|
||||
}
|
||||
|
||||
self._type = None
|
||||
self._status = None
|
||||
self._message = None
|
||||
self._error = None
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Gets the type of this V1ComponentCondition.
|
||||
type of component condition, currently only Healthy
|
||||
|
||||
:return: The type of this V1ComponentCondition.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type):
|
||||
"""
|
||||
Sets the type of this V1ComponentCondition.
|
||||
type of component condition, currently only Healthy
|
||||
|
||||
:param type: The type of this V1ComponentCondition.
|
||||
:type: str
|
||||
"""
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
"""
|
||||
Gets the status of this V1ComponentCondition.
|
||||
current status of this component condition, one of True, False, Unknown
|
||||
|
||||
:return: The status of this V1ComponentCondition.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._status
|
||||
|
||||
@status.setter
|
||||
def status(self, status):
|
||||
"""
|
||||
Sets the status of this V1ComponentCondition.
|
||||
current status of this component condition, one of True, False, Unknown
|
||||
|
||||
:param status: The status of this V1ComponentCondition.
|
||||
:type: str
|
||||
"""
|
||||
self._status = status
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
"""
|
||||
Gets the message of this V1ComponentCondition.
|
||||
health check message received from the component
|
||||
|
||||
:return: The message of this V1ComponentCondition.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._message
|
||||
|
||||
@message.setter
|
||||
def message(self, message):
|
||||
"""
|
||||
Sets the message of this V1ComponentCondition.
|
||||
health check message received from the component
|
||||
|
||||
:param message: The message of this V1ComponentCondition.
|
||||
:type: str
|
||||
"""
|
||||
self._message = message
|
||||
|
||||
@property
|
||||
def error(self):
|
||||
"""
|
||||
Gets the error of this V1ComponentCondition.
|
||||
error code from health check attempt (if any)
|
||||
|
||||
:return: The error of this V1ComponentCondition.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._error
|
||||
|
||||
@error.setter
|
||||
def error(self, error):
|
||||
"""
|
||||
Sets the error of this V1ComponentCondition.
|
||||
error code from health check attempt (if any)
|
||||
|
||||
:param error: The error of this V1ComponentCondition.
|
||||
:type: str
|
||||
"""
|
||||
self._error = error
|
||||
|
||||
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()
|
||||
@@ -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 V1ComponentStatus(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',
|
||||
'conditions': 'list[V1ComponentCondition]'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'kind': 'kind',
|
||||
'api_version': 'apiVersion',
|
||||
'metadata': 'metadata',
|
||||
'conditions': 'conditions'
|
||||
}
|
||||
|
||||
self._kind = None
|
||||
self._api_version = None
|
||||
self._metadata = None
|
||||
self._conditions = None
|
||||
|
||||
@property
|
||||
def kind(self):
|
||||
"""
|
||||
Gets the kind of this V1ComponentStatus.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1ComponentStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1ComponentStatus.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1ComponentStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1ComponentStatus.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1ComponentStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1ComponentStatus.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1ComponentStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1ComponentStatus.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1ComponentStatus.
|
||||
:rtype: V1ObjectMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1ComponentStatus.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1ComponentStatus.
|
||||
:type: V1ObjectMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def conditions(self):
|
||||
"""
|
||||
Gets the conditions of this V1ComponentStatus.
|
||||
list of component conditions observed
|
||||
|
||||
:return: The conditions of this V1ComponentStatus.
|
||||
:rtype: list[V1ComponentCondition]
|
||||
"""
|
||||
return self._conditions
|
||||
|
||||
@conditions.setter
|
||||
def conditions(self, conditions):
|
||||
"""
|
||||
Sets the conditions of this V1ComponentStatus.
|
||||
list of component conditions observed
|
||||
|
||||
:param conditions: The conditions of this V1ComponentStatus.
|
||||
:type: list[V1ComponentCondition]
|
||||
"""
|
||||
self._conditions = conditions
|
||||
|
||||
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()
|
||||
@@ -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 V1ComponentStatusList(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': 'V1ListMeta',
|
||||
'items': 'list[V1ComponentStatus]'
|
||||
}
|
||||
|
||||
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 V1ComponentStatusList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1ComponentStatusList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1ComponentStatusList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1ComponentStatusList.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1ComponentStatusList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1ComponentStatusList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1ComponentStatusList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1ComponentStatusList.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1ComponentStatusList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1ComponentStatusList.
|
||||
:rtype: V1ListMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1ComponentStatusList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1ComponentStatusList.
|
||||
:type: V1ListMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def items(self):
|
||||
"""
|
||||
Gets the items of this V1ComponentStatusList.
|
||||
list of component status objects
|
||||
|
||||
:return: The items of this V1ComponentStatusList.
|
||||
:rtype: list[V1ComponentStatus]
|
||||
"""
|
||||
return self._items
|
||||
|
||||
@items.setter
|
||||
def items(self, items):
|
||||
"""
|
||||
Sets the items of this V1ComponentStatusList.
|
||||
list of component status objects
|
||||
|
||||
:param items: The items of this V1ComponentStatusList.
|
||||
:type: list[V1ComponentStatus]
|
||||
"""
|
||||
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()
|
||||
@@ -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 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'
|
||||
}
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Gets the name of this V1Container.
|
||||
name of the container; must be a DNS_LABEL and unique within the pod; 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; must be a DNS_LABEL and unique within the pod; 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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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; cannot be updated; variable references $(VAR_NAME) are expanded using the container's 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; see http://releases.k8s.io/v1.0.4/docs/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; cannot be updated; variable references $(VAR_NAME) are expanded using the container's 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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's 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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's 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; see http://releases.k8s.io/v1.0.4/docs/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; defaults to image's default; 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; defaults to image's default; 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; 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; 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; see http://releases.k8s.io/v1.0.4/docs/compute_resources.md
|
||||
|
||||
: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; see http://releases.k8s.io/v1.0.4/docs/compute_resources.md
|
||||
|
||||
: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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
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.
|
||||
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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/security_context.md
|
||||
|
||||
:param security_context: The security_context of this V1Container.
|
||||
:type: V1SecurityContext
|
||||
"""
|
||||
self._security_context = security_context
|
||||
|
||||
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()
|
||||
@@ -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.
|
||||
name for the port that can be referred to by services; must be an IANA_SVC_NAME and unique within the pod
|
||||
|
||||
:return: The name of this V1ContainerPort.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""
|
||||
Sets the name of this V1ContainerPort.
|
||||
name for the port that can be referred to by services; must be an IANA_SVC_NAME and unique within the pod
|
||||
|
||||
: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; 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; 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
|
||||
|
||||
: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
|
||||
|
||||
: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; TCP if unspecified
|
||||
|
||||
: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; TCP if unspecified
|
||||
|
||||
:param protocol: The protocol of this V1ContainerPort.
|
||||
:type: str
|
||||
"""
|
||||
self._protocol = protocol
|
||||
|
||||
@property
|
||||
def host_ip(self):
|
||||
"""
|
||||
Gets the host_ip of this V1ContainerPort.
|
||||
host IP to bind the 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.
|
||||
host IP to bind the 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()
|
||||
@@ -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 V1ContainerState(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 = {
|
||||
'waiting': 'V1ContainerStateWaiting',
|
||||
'running': 'V1ContainerStateRunning',
|
||||
'terminated': 'V1ContainerStateTerminated'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'waiting': 'waiting',
|
||||
'running': 'running',
|
||||
'terminated': 'terminated'
|
||||
}
|
||||
|
||||
self._waiting = None
|
||||
self._running = None
|
||||
self._terminated = None
|
||||
|
||||
@property
|
||||
def waiting(self):
|
||||
"""
|
||||
Gets the waiting of this V1ContainerState.
|
||||
details about a waiting container
|
||||
|
||||
:return: The waiting of this V1ContainerState.
|
||||
:rtype: V1ContainerStateWaiting
|
||||
"""
|
||||
return self._waiting
|
||||
|
||||
@waiting.setter
|
||||
def waiting(self, waiting):
|
||||
"""
|
||||
Sets the waiting of this V1ContainerState.
|
||||
details about a waiting container
|
||||
|
||||
:param waiting: The waiting of this V1ContainerState.
|
||||
:type: V1ContainerStateWaiting
|
||||
"""
|
||||
self._waiting = waiting
|
||||
|
||||
@property
|
||||
def running(self):
|
||||
"""
|
||||
Gets the running of this V1ContainerState.
|
||||
details about a running container
|
||||
|
||||
:return: The running of this V1ContainerState.
|
||||
:rtype: V1ContainerStateRunning
|
||||
"""
|
||||
return self._running
|
||||
|
||||
@running.setter
|
||||
def running(self, running):
|
||||
"""
|
||||
Sets the running of this V1ContainerState.
|
||||
details about a running container
|
||||
|
||||
:param running: The running of this V1ContainerState.
|
||||
:type: V1ContainerStateRunning
|
||||
"""
|
||||
self._running = running
|
||||
|
||||
@property
|
||||
def terminated(self):
|
||||
"""
|
||||
Gets the terminated of this V1ContainerState.
|
||||
details about a terminated container
|
||||
|
||||
:return: The terminated of this V1ContainerState.
|
||||
:rtype: V1ContainerStateTerminated
|
||||
"""
|
||||
return self._terminated
|
||||
|
||||
@terminated.setter
|
||||
def terminated(self, terminated):
|
||||
"""
|
||||
Sets the terminated of this V1ContainerState.
|
||||
details about a terminated container
|
||||
|
||||
:param terminated: The terminated of this V1ContainerState.
|
||||
:type: V1ContainerStateTerminated
|
||||
"""
|
||||
self._terminated = terminated
|
||||
|
||||
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()
|
||||
@@ -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 V1ContainerStateRunning(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 = {
|
||||
'started_at': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'started_at': 'startedAt'
|
||||
}
|
||||
|
||||
self._started_at = None
|
||||
|
||||
@property
|
||||
def started_at(self):
|
||||
"""
|
||||
Gets the started_at of this V1ContainerStateRunning.
|
||||
time at which the container was last (re-)started
|
||||
|
||||
:return: The started_at of this V1ContainerStateRunning.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._started_at
|
||||
|
||||
@started_at.setter
|
||||
def started_at(self, started_at):
|
||||
"""
|
||||
Sets the started_at of this V1ContainerStateRunning.
|
||||
time at which the container was last (re-)started
|
||||
|
||||
:param started_at: The started_at of this V1ContainerStateRunning.
|
||||
:type: str
|
||||
"""
|
||||
self._started_at = started_at
|
||||
|
||||
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()
|
||||
@@ -0,0 +1,249 @@
|
||||
# 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 V1ContainerStateTerminated(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 = {
|
||||
'exit_code': 'int',
|
||||
'signal': 'int',
|
||||
'reason': 'str',
|
||||
'message': 'str',
|
||||
'started_at': 'str',
|
||||
'finished_at': 'str',
|
||||
'container_id': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'exit_code': 'exitCode',
|
||||
'signal': 'signal',
|
||||
'reason': 'reason',
|
||||
'message': 'message',
|
||||
'started_at': 'startedAt',
|
||||
'finished_at': 'finishedAt',
|
||||
'container_id': 'containerID'
|
||||
}
|
||||
|
||||
self._exit_code = None
|
||||
self._signal = None
|
||||
self._reason = None
|
||||
self._message = None
|
||||
self._started_at = None
|
||||
self._finished_at = None
|
||||
self._container_id = None
|
||||
|
||||
@property
|
||||
def exit_code(self):
|
||||
"""
|
||||
Gets the exit_code of this V1ContainerStateTerminated.
|
||||
exit status from the last termination of the container
|
||||
|
||||
:return: The exit_code of this V1ContainerStateTerminated.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._exit_code
|
||||
|
||||
@exit_code.setter
|
||||
def exit_code(self, exit_code):
|
||||
"""
|
||||
Sets the exit_code of this V1ContainerStateTerminated.
|
||||
exit status from the last termination of the container
|
||||
|
||||
:param exit_code: The exit_code of this V1ContainerStateTerminated.
|
||||
:type: int
|
||||
"""
|
||||
self._exit_code = exit_code
|
||||
|
||||
@property
|
||||
def signal(self):
|
||||
"""
|
||||
Gets the signal of this V1ContainerStateTerminated.
|
||||
signal from the last termination of the container
|
||||
|
||||
:return: The signal of this V1ContainerStateTerminated.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._signal
|
||||
|
||||
@signal.setter
|
||||
def signal(self, signal):
|
||||
"""
|
||||
Sets the signal of this V1ContainerStateTerminated.
|
||||
signal from the last termination of the container
|
||||
|
||||
:param signal: The signal of this V1ContainerStateTerminated.
|
||||
:type: int
|
||||
"""
|
||||
self._signal = signal
|
||||
|
||||
@property
|
||||
def reason(self):
|
||||
"""
|
||||
Gets the reason of this V1ContainerStateTerminated.
|
||||
(brief) reason from the last termination of the container
|
||||
|
||||
:return: The reason of this V1ContainerStateTerminated.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._reason
|
||||
|
||||
@reason.setter
|
||||
def reason(self, reason):
|
||||
"""
|
||||
Sets the reason of this V1ContainerStateTerminated.
|
||||
(brief) reason from the last termination of the container
|
||||
|
||||
:param reason: The reason of this V1ContainerStateTerminated.
|
||||
:type: str
|
||||
"""
|
||||
self._reason = reason
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
"""
|
||||
Gets the message of this V1ContainerStateTerminated.
|
||||
message regarding the last termination of the container
|
||||
|
||||
:return: The message of this V1ContainerStateTerminated.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._message
|
||||
|
||||
@message.setter
|
||||
def message(self, message):
|
||||
"""
|
||||
Sets the message of this V1ContainerStateTerminated.
|
||||
message regarding the last termination of the container
|
||||
|
||||
:param message: The message of this V1ContainerStateTerminated.
|
||||
:type: str
|
||||
"""
|
||||
self._message = message
|
||||
|
||||
@property
|
||||
def started_at(self):
|
||||
"""
|
||||
Gets the started_at of this V1ContainerStateTerminated.
|
||||
time at which previous execution of the container started
|
||||
|
||||
:return: The started_at of this V1ContainerStateTerminated.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._started_at
|
||||
|
||||
@started_at.setter
|
||||
def started_at(self, started_at):
|
||||
"""
|
||||
Sets the started_at of this V1ContainerStateTerminated.
|
||||
time at which previous execution of the container started
|
||||
|
||||
:param started_at: The started_at of this V1ContainerStateTerminated.
|
||||
:type: str
|
||||
"""
|
||||
self._started_at = started_at
|
||||
|
||||
@property
|
||||
def finished_at(self):
|
||||
"""
|
||||
Gets the finished_at of this V1ContainerStateTerminated.
|
||||
time at which the container last terminated
|
||||
|
||||
:return: The finished_at of this V1ContainerStateTerminated.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._finished_at
|
||||
|
||||
@finished_at.setter
|
||||
def finished_at(self, finished_at):
|
||||
"""
|
||||
Sets the finished_at of this V1ContainerStateTerminated.
|
||||
time at which the container last terminated
|
||||
|
||||
:param finished_at: The finished_at of this V1ContainerStateTerminated.
|
||||
:type: str
|
||||
"""
|
||||
self._finished_at = finished_at
|
||||
|
||||
@property
|
||||
def container_id(self):
|
||||
"""
|
||||
Gets the container_id of this V1ContainerStateTerminated.
|
||||
container's ID in the format 'docker://<container_id>'
|
||||
|
||||
:return: The container_id of this V1ContainerStateTerminated.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._container_id
|
||||
|
||||
@container_id.setter
|
||||
def container_id(self, container_id):
|
||||
"""
|
||||
Sets the container_id of this V1ContainerStateTerminated.
|
||||
container's ID in the format 'docker://<container_id>'
|
||||
|
||||
:param container_id: The container_id of this V1ContainerStateTerminated.
|
||||
:type: str
|
||||
"""
|
||||
self._container_id = container_id
|
||||
|
||||
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()
|
||||
@@ -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 V1ContainerStateWaiting(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'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'reason': 'reason'
|
||||
}
|
||||
|
||||
self._reason = None
|
||||
|
||||
@property
|
||||
def reason(self):
|
||||
"""
|
||||
Gets the reason of this V1ContainerStateWaiting.
|
||||
(brief) reason the container is not yet running, such as pulling its image
|
||||
|
||||
:return: The reason of this V1ContainerStateWaiting.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._reason
|
||||
|
||||
@reason.setter
|
||||
def reason(self, reason):
|
||||
"""
|
||||
Sets the reason of this V1ContainerStateWaiting.
|
||||
(brief) reason the container is not yet running, such as pulling its image
|
||||
|
||||
:param reason: The reason of this V1ContainerStateWaiting.
|
||||
:type: str
|
||||
"""
|
||||
self._reason = reason
|
||||
|
||||
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()
|
||||
@@ -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 V1ContainerStatus(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',
|
||||
'state': 'V1ContainerState',
|
||||
'last_state': 'V1ContainerState',
|
||||
'ready': 'bool',
|
||||
'restart_count': 'int',
|
||||
'image': 'str',
|
||||
'image_id': 'str',
|
||||
'container_id': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'name': 'name',
|
||||
'state': 'state',
|
||||
'last_state': 'lastState',
|
||||
'ready': 'ready',
|
||||
'restart_count': 'restartCount',
|
||||
'image': 'image',
|
||||
'image_id': 'imageID',
|
||||
'container_id': 'containerID'
|
||||
}
|
||||
|
||||
self._name = None
|
||||
self._state = None
|
||||
self._last_state = None
|
||||
self._ready = None
|
||||
self._restart_count = None
|
||||
self._image = None
|
||||
self._image_id = None
|
||||
self._container_id = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Gets the name of this V1ContainerStatus.
|
||||
name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated
|
||||
|
||||
:return: The name of this V1ContainerStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""
|
||||
Sets the name of this V1ContainerStatus.
|
||||
name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated
|
||||
|
||||
:param name: The name of this V1ContainerStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
"""
|
||||
Gets the state of this V1ContainerStatus.
|
||||
details about the container's current condition
|
||||
|
||||
:return: The state of this V1ContainerStatus.
|
||||
:rtype: V1ContainerState
|
||||
"""
|
||||
return self._state
|
||||
|
||||
@state.setter
|
||||
def state(self, state):
|
||||
"""
|
||||
Sets the state of this V1ContainerStatus.
|
||||
details about the container's current condition
|
||||
|
||||
:param state: The state of this V1ContainerStatus.
|
||||
:type: V1ContainerState
|
||||
"""
|
||||
self._state = state
|
||||
|
||||
@property
|
||||
def last_state(self):
|
||||
"""
|
||||
Gets the last_state of this V1ContainerStatus.
|
||||
details about the container's last termination condition
|
||||
|
||||
:return: The last_state of this V1ContainerStatus.
|
||||
:rtype: V1ContainerState
|
||||
"""
|
||||
return self._last_state
|
||||
|
||||
@last_state.setter
|
||||
def last_state(self, last_state):
|
||||
"""
|
||||
Sets the last_state of this V1ContainerStatus.
|
||||
details about the container's last termination condition
|
||||
|
||||
:param last_state: The last_state of this V1ContainerStatus.
|
||||
:type: V1ContainerState
|
||||
"""
|
||||
self._last_state = last_state
|
||||
|
||||
@property
|
||||
def ready(self):
|
||||
"""
|
||||
Gets the ready of this V1ContainerStatus.
|
||||
specifies whether the container has passed its readiness probe
|
||||
|
||||
:return: The ready of this V1ContainerStatus.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._ready
|
||||
|
||||
@ready.setter
|
||||
def ready(self, ready):
|
||||
"""
|
||||
Sets the ready of this V1ContainerStatus.
|
||||
specifies whether the container has passed its readiness probe
|
||||
|
||||
:param ready: The ready of this V1ContainerStatus.
|
||||
:type: bool
|
||||
"""
|
||||
self._ready = ready
|
||||
|
||||
@property
|
||||
def restart_count(self):
|
||||
"""
|
||||
Gets the restart_count of this V1ContainerStatus.
|
||||
the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed
|
||||
|
||||
:return: The restart_count of this V1ContainerStatus.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._restart_count
|
||||
|
||||
@restart_count.setter
|
||||
def restart_count(self, restart_count):
|
||||
"""
|
||||
Sets the restart_count of this V1ContainerStatus.
|
||||
the number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed
|
||||
|
||||
:param restart_count: The restart_count of this V1ContainerStatus.
|
||||
:type: int
|
||||
"""
|
||||
self._restart_count = restart_count
|
||||
|
||||
@property
|
||||
def image(self):
|
||||
"""
|
||||
Gets the image of this V1ContainerStatus.
|
||||
image of the container; see http://releases.k8s.io/v1.0.4/docs/images.md
|
||||
|
||||
:return: The image of this V1ContainerStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._image
|
||||
|
||||
@image.setter
|
||||
def image(self, image):
|
||||
"""
|
||||
Sets the image of this V1ContainerStatus.
|
||||
image of the container; see http://releases.k8s.io/v1.0.4/docs/images.md
|
||||
|
||||
:param image: The image of this V1ContainerStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._image = image
|
||||
|
||||
@property
|
||||
def image_id(self):
|
||||
"""
|
||||
Gets the image_id of this V1ContainerStatus.
|
||||
ID of the container's image
|
||||
|
||||
:return: The image_id of this V1ContainerStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._image_id
|
||||
|
||||
@image_id.setter
|
||||
def image_id(self, image_id):
|
||||
"""
|
||||
Sets the image_id of this V1ContainerStatus.
|
||||
ID of the container's image
|
||||
|
||||
:param image_id: The image_id of this V1ContainerStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._image_id = image_id
|
||||
|
||||
@property
|
||||
def container_id(self):
|
||||
"""
|
||||
Gets the container_id of this V1ContainerStatus.
|
||||
container's ID in the format 'docker://<container_id>'; see http://releases.k8s.io/v1.0.4/docs/container-environment.md#container-information
|
||||
|
||||
:return: The container_id of this V1ContainerStatus.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._container_id
|
||||
|
||||
@container_id.setter
|
||||
def container_id(self, container_id):
|
||||
"""
|
||||
Sets the container_id of this V1ContainerStatus.
|
||||
container's ID in the format 'docker://<container_id>'; see http://releases.k8s.io/v1.0.4/docs/container-environment.md#container-information
|
||||
|
||||
:param container_id: The container_id of this V1ContainerStatus.
|
||||
:type: str
|
||||
"""
|
||||
self._container_id = container_id
|
||||
|
||||
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()
|
||||
@@ -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 of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/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 of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/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 to wait before deleting this object; 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 to wait before deleting this object; 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()
|
||||
@@ -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.
|
||||
type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/v1.0.4/docs/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()
|
||||
@@ -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 V1EndpointAddress(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 = {
|
||||
'ip': 'str',
|
||||
'target_ref': 'V1ObjectReference'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'ip': 'ip',
|
||||
'target_ref': 'targetRef'
|
||||
}
|
||||
|
||||
self._ip = None
|
||||
self._target_ref = None
|
||||
|
||||
@property
|
||||
def ip(self):
|
||||
"""
|
||||
Gets the ip of this V1EndpointAddress.
|
||||
IP address of the endpoint
|
||||
|
||||
:return: The ip of this V1EndpointAddress.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._ip
|
||||
|
||||
@ip.setter
|
||||
def ip(self, ip):
|
||||
"""
|
||||
Sets the ip of this V1EndpointAddress.
|
||||
IP address of the endpoint
|
||||
|
||||
:param ip: The ip of this V1EndpointAddress.
|
||||
:type: str
|
||||
"""
|
||||
self._ip = ip
|
||||
|
||||
@property
|
||||
def target_ref(self):
|
||||
"""
|
||||
Gets the target_ref of this V1EndpointAddress.
|
||||
reference to object providing the endpoint
|
||||
|
||||
:return: The target_ref of this V1EndpointAddress.
|
||||
:rtype: V1ObjectReference
|
||||
"""
|
||||
return self._target_ref
|
||||
|
||||
@target_ref.setter
|
||||
def target_ref(self, target_ref):
|
||||
"""
|
||||
Sets the target_ref of this V1EndpointAddress.
|
||||
reference to object providing the endpoint
|
||||
|
||||
:param target_ref: The target_ref of this V1EndpointAddress.
|
||||
:type: V1ObjectReference
|
||||
"""
|
||||
self._target_ref = target_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()
|
||||
@@ -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 V1EndpointPort(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',
|
||||
'port': 'int',
|
||||
'protocol': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'name': 'name',
|
||||
'port': 'port',
|
||||
'protocol': 'protocol'
|
||||
}
|
||||
|
||||
self._name = None
|
||||
self._port = None
|
||||
self._protocol = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Gets the name of this V1EndpointPort.
|
||||
name of this port
|
||||
|
||||
:return: The name of this V1EndpointPort.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""
|
||||
Sets the name of this V1EndpointPort.
|
||||
name of this port
|
||||
|
||||
:param name: The name of this V1EndpointPort.
|
||||
:type: str
|
||||
"""
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def port(self):
|
||||
"""
|
||||
Gets the port of this V1EndpointPort.
|
||||
port number of the endpoint
|
||||
|
||||
:return: The port of this V1EndpointPort.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._port
|
||||
|
||||
@port.setter
|
||||
def port(self, port):
|
||||
"""
|
||||
Sets the port of this V1EndpointPort.
|
||||
port number of the endpoint
|
||||
|
||||
:param port: The port of this V1EndpointPort.
|
||||
:type: int
|
||||
"""
|
||||
self._port = port
|
||||
|
||||
@property
|
||||
def protocol(self):
|
||||
"""
|
||||
Gets the protocol of this V1EndpointPort.
|
||||
protocol for this port; must be UDP or TCP; TCP if unspecified
|
||||
|
||||
:return: The protocol of this V1EndpointPort.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._protocol
|
||||
|
||||
@protocol.setter
|
||||
def protocol(self, protocol):
|
||||
"""
|
||||
Sets the protocol of this V1EndpointPort.
|
||||
protocol for this port; must be UDP or TCP; TCP if unspecified
|
||||
|
||||
:param protocol: The protocol of this V1EndpointPort.
|
||||
:type: str
|
||||
"""
|
||||
self._protocol = protocol
|
||||
|
||||
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()
|
||||
@@ -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 V1EndpointSubset(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 = {
|
||||
'addresses': 'list[V1EndpointAddress]',
|
||||
'ports': 'list[V1EndpointPort]'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'addresses': 'addresses',
|
||||
'ports': 'ports'
|
||||
}
|
||||
|
||||
self._addresses = None
|
||||
self._ports = None
|
||||
|
||||
@property
|
||||
def addresses(self):
|
||||
"""
|
||||
Gets the addresses of this V1EndpointSubset.
|
||||
IP addresses which offer the related ports
|
||||
|
||||
:return: The addresses of this V1EndpointSubset.
|
||||
:rtype: list[V1EndpointAddress]
|
||||
"""
|
||||
return self._addresses
|
||||
|
||||
@addresses.setter
|
||||
def addresses(self, addresses):
|
||||
"""
|
||||
Sets the addresses of this V1EndpointSubset.
|
||||
IP addresses which offer the related ports
|
||||
|
||||
:param addresses: The addresses of this V1EndpointSubset.
|
||||
:type: list[V1EndpointAddress]
|
||||
"""
|
||||
self._addresses = addresses
|
||||
|
||||
@property
|
||||
def ports(self):
|
||||
"""
|
||||
Gets the ports of this V1EndpointSubset.
|
||||
port numbers available on the related IP addresses
|
||||
|
||||
:return: The ports of this V1EndpointSubset.
|
||||
:rtype: list[V1EndpointPort]
|
||||
"""
|
||||
return self._ports
|
||||
|
||||
@ports.setter
|
||||
def ports(self, ports):
|
||||
"""
|
||||
Sets the ports of this V1EndpointSubset.
|
||||
port numbers available on the related IP addresses
|
||||
|
||||
:param ports: The ports of this V1EndpointSubset.
|
||||
:type: list[V1EndpointPort]
|
||||
"""
|
||||
self._ports = ports
|
||||
|
||||
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()
|
||||
@@ -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 V1Endpoints(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',
|
||||
'subsets': 'list[V1EndpointSubset]'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'kind': 'kind',
|
||||
'api_version': 'apiVersion',
|
||||
'metadata': 'metadata',
|
||||
'subsets': 'subsets'
|
||||
}
|
||||
|
||||
self._kind = None
|
||||
self._api_version = None
|
||||
self._metadata = None
|
||||
self._subsets = None
|
||||
|
||||
@property
|
||||
def kind(self):
|
||||
"""
|
||||
Gets the kind of this V1Endpoints.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1Endpoints.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1Endpoints.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1Endpoints.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1Endpoints.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1Endpoints.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1Endpoints.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1Endpoints.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1Endpoints.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1Endpoints.
|
||||
:rtype: V1ObjectMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1Endpoints.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1Endpoints.
|
||||
:type: V1ObjectMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def subsets(self):
|
||||
"""
|
||||
Gets the subsets of this V1Endpoints.
|
||||
sets of addresses and ports that comprise a service
|
||||
|
||||
:return: The subsets of this V1Endpoints.
|
||||
:rtype: list[V1EndpointSubset]
|
||||
"""
|
||||
return self._subsets
|
||||
|
||||
@subsets.setter
|
||||
def subsets(self, subsets):
|
||||
"""
|
||||
Sets the subsets of this V1Endpoints.
|
||||
sets of addresses and ports that comprise a service
|
||||
|
||||
:param subsets: The subsets of this V1Endpoints.
|
||||
:type: list[V1EndpointSubset]
|
||||
"""
|
||||
self._subsets = subsets
|
||||
|
||||
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()
|
||||
@@ -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 V1EndpointsList(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': 'V1ListMeta',
|
||||
'items': 'list[V1Endpoints]'
|
||||
}
|
||||
|
||||
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 V1EndpointsList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1EndpointsList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1EndpointsList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1EndpointsList.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1EndpointsList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1EndpointsList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1EndpointsList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1EndpointsList.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1EndpointsList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1EndpointsList.
|
||||
:rtype: V1ListMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1EndpointsList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1EndpointsList.
|
||||
:type: V1ListMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def items(self):
|
||||
"""
|
||||
Gets the items of this V1EndpointsList.
|
||||
list of endpoints
|
||||
|
||||
:return: The items of this V1EndpointsList.
|
||||
:rtype: list[V1Endpoints]
|
||||
"""
|
||||
return self._items
|
||||
|
||||
@items.setter
|
||||
def items(self, items):
|
||||
"""
|
||||
Sets the items of this V1EndpointsList.
|
||||
list of endpoints
|
||||
|
||||
:param items: The items of this V1EndpointsList.
|
||||
:type: list[V1Endpoints]
|
||||
"""
|
||||
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()
|
||||
@@ -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.
|
||||
value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles 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
|
||||
|
||||
:return: The value of this V1EnvVar.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._value
|
||||
|
||||
@value.setter
|
||||
def value(self, value):
|
||||
"""
|
||||
Sets the value of this V1EnvVar.
|
||||
value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles 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
|
||||
|
||||
: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()
|
||||
@@ -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 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'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'field_ref': 'fieldRef'
|
||||
}
|
||||
|
||||
self._field_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
|
||||
|
||||
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()
|
||||
@@ -0,0 +1,324 @@
|
||||
# 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 V1Event(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',
|
||||
'involved_object': 'V1ObjectReference',
|
||||
'reason': 'str',
|
||||
'message': 'str',
|
||||
'source': 'V1EventSource',
|
||||
'first_timestamp': 'str',
|
||||
'last_timestamp': 'str',
|
||||
'count': 'int'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'kind': 'kind',
|
||||
'api_version': 'apiVersion',
|
||||
'metadata': 'metadata',
|
||||
'involved_object': 'involvedObject',
|
||||
'reason': 'reason',
|
||||
'message': 'message',
|
||||
'source': 'source',
|
||||
'first_timestamp': 'firstTimestamp',
|
||||
'last_timestamp': 'lastTimestamp',
|
||||
'count': 'count'
|
||||
}
|
||||
|
||||
self._kind = None
|
||||
self._api_version = None
|
||||
self._metadata = None
|
||||
self._involved_object = None
|
||||
self._reason = None
|
||||
self._message = None
|
||||
self._source = None
|
||||
self._first_timestamp = None
|
||||
self._last_timestamp = None
|
||||
self._count = None
|
||||
|
||||
@property
|
||||
def kind(self):
|
||||
"""
|
||||
Gets the kind of this V1Event.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1Event.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1Event.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1Event.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1Event.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1Event.
|
||||
:rtype: V1ObjectMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1Event.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1Event.
|
||||
:type: V1ObjectMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def involved_object(self):
|
||||
"""
|
||||
Gets the involved_object of this V1Event.
|
||||
object this event is about
|
||||
|
||||
:return: The involved_object of this V1Event.
|
||||
:rtype: V1ObjectReference
|
||||
"""
|
||||
return self._involved_object
|
||||
|
||||
@involved_object.setter
|
||||
def involved_object(self, involved_object):
|
||||
"""
|
||||
Sets the involved_object of this V1Event.
|
||||
object this event is about
|
||||
|
||||
:param involved_object: The involved_object of this V1Event.
|
||||
:type: V1ObjectReference
|
||||
"""
|
||||
self._involved_object = involved_object
|
||||
|
||||
@property
|
||||
def reason(self):
|
||||
"""
|
||||
Gets the reason of this V1Event.
|
||||
short, machine understandable string that gives the reason for the transition into the object's current status
|
||||
|
||||
:return: The reason of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._reason
|
||||
|
||||
@reason.setter
|
||||
def reason(self, reason):
|
||||
"""
|
||||
Sets the reason of this V1Event.
|
||||
short, machine understandable string that gives the reason for the transition into the object's current status
|
||||
|
||||
:param reason: The reason of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._reason = reason
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
"""
|
||||
Gets the message of this V1Event.
|
||||
human-readable description of the status of this operation
|
||||
|
||||
:return: The message of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._message
|
||||
|
||||
@message.setter
|
||||
def message(self, message):
|
||||
"""
|
||||
Sets the message of this V1Event.
|
||||
human-readable description of the status of this operation
|
||||
|
||||
:param message: The message of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._message = message
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""
|
||||
Gets the source of this V1Event.
|
||||
component reporting this event
|
||||
|
||||
:return: The source of this V1Event.
|
||||
:rtype: V1EventSource
|
||||
"""
|
||||
return self._source
|
||||
|
||||
@source.setter
|
||||
def source(self, source):
|
||||
"""
|
||||
Sets the source of this V1Event.
|
||||
component reporting this event
|
||||
|
||||
:param source: The source of this V1Event.
|
||||
:type: V1EventSource
|
||||
"""
|
||||
self._source = source
|
||||
|
||||
@property
|
||||
def first_timestamp(self):
|
||||
"""
|
||||
Gets the first_timestamp of this V1Event.
|
||||
the time at which the event was first recorded
|
||||
|
||||
:return: The first_timestamp of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._first_timestamp
|
||||
|
||||
@first_timestamp.setter
|
||||
def first_timestamp(self, first_timestamp):
|
||||
"""
|
||||
Sets the first_timestamp of this V1Event.
|
||||
the time at which the event was first recorded
|
||||
|
||||
:param first_timestamp: The first_timestamp of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._first_timestamp = first_timestamp
|
||||
|
||||
@property
|
||||
def last_timestamp(self):
|
||||
"""
|
||||
Gets the last_timestamp of this V1Event.
|
||||
the time at which the most recent occurance of this event was recorded
|
||||
|
||||
:return: The last_timestamp of this V1Event.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._last_timestamp
|
||||
|
||||
@last_timestamp.setter
|
||||
def last_timestamp(self, last_timestamp):
|
||||
"""
|
||||
Sets the last_timestamp of this V1Event.
|
||||
the time at which the most recent occurance of this event was recorded
|
||||
|
||||
:param last_timestamp: The last_timestamp of this V1Event.
|
||||
:type: str
|
||||
"""
|
||||
self._last_timestamp = last_timestamp
|
||||
|
||||
@property
|
||||
def count(self):
|
||||
"""
|
||||
Gets the count of this V1Event.
|
||||
the number of times this event has occurred
|
||||
|
||||
:return: The count of this V1Event.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._count
|
||||
|
||||
@count.setter
|
||||
def count(self, count):
|
||||
"""
|
||||
Sets the count of this V1Event.
|
||||
the number of times this event has occurred
|
||||
|
||||
:param count: The count of this V1Event.
|
||||
:type: int
|
||||
"""
|
||||
self._count = count
|
||||
|
||||
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()
|
||||
@@ -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 V1EventList(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': 'V1ListMeta',
|
||||
'items': 'list[V1Event]'
|
||||
}
|
||||
|
||||
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 V1EventList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1EventList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1EventList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1EventList.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1EventList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1EventList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1EventList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1EventList.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1EventList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1EventList.
|
||||
:rtype: V1ListMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1EventList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1EventList.
|
||||
:type: V1ListMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def items(self):
|
||||
"""
|
||||
Gets the items of this V1EventList.
|
||||
list of events
|
||||
|
||||
:return: The items of this V1EventList.
|
||||
:rtype: list[V1Event]
|
||||
"""
|
||||
return self._items
|
||||
|
||||
@items.setter
|
||||
def items(self, items):
|
||||
"""
|
||||
Sets the items of this V1EventList.
|
||||
list of events
|
||||
|
||||
:param items: The items of this V1EventList.
|
||||
:type: list[V1Event]
|
||||
"""
|
||||
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()
|
||||
@@ -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 V1EventSource(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 = {
|
||||
'component': 'str',
|
||||
'host': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'component': 'component',
|
||||
'host': 'host'
|
||||
}
|
||||
|
||||
self._component = None
|
||||
self._host = None
|
||||
|
||||
@property
|
||||
def component(self):
|
||||
"""
|
||||
Gets the component of this V1EventSource.
|
||||
component that generated the event
|
||||
|
||||
:return: The component of this V1EventSource.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._component
|
||||
|
||||
@component.setter
|
||||
def component(self, component):
|
||||
"""
|
||||
Sets the component of this V1EventSource.
|
||||
component that generated the event
|
||||
|
||||
:param component: The component of this V1EventSource.
|
||||
:type: str
|
||||
"""
|
||||
self._component = component
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
"""
|
||||
Gets the host of this V1EventSource.
|
||||
name of the host where the event is generated
|
||||
|
||||
:return: The host of this V1EventSource.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._host
|
||||
|
||||
@host.setter
|
||||
def host(self, host):
|
||||
"""
|
||||
Sets the host of this V1EventSource.
|
||||
name of the host where the event is generated
|
||||
|
||||
:param host: The host of this V1EventSource.
|
||||
:type: str
|
||||
"""
|
||||
self._host = host
|
||||
|
||||
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()
|
||||
@@ -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 line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd, not run inside a 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 line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd, not run inside a 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()
|
||||
@@ -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 V1FinalizerName(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()
|
||||
+174
@@ -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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
file system type to mount, such as ext4, xfs, ntfs; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
file system type to mount, such as ext4, xfs, ntfs; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
partition on the disk to mount (e.g., '1' for /dev/sda1); if omitted the plain device name (e.g., /dev/sda) will be mounted; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
partition on the disk to mount (e.g., '1' for /dev/sda1); if omitted the plain device name (e.g., /dev/sda) will be mounted; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
read-only if true, read-write otherwise (false or unspecified); see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
read-only if true, read-write otherwise (false or unspecified); see http://releases.k8s.io/v1.0.4/docs/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()
|
||||
@@ -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 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'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'repository': 'repository',
|
||||
'revision': 'revision'
|
||||
}
|
||||
|
||||
self._repository = None
|
||||
self._revision = 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
|
||||
|
||||
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()
|
||||
@@ -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.
|
||||
gluster hosts endpoints name; see http://releases.k8s.io/v1.0.4/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.
|
||||
gluster hosts endpoints name; see http://releases.k8s.io/v1.0.4/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 to gluster volume; see http://releases.k8s.io/v1.0.4/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 to gluster volume; see http://releases.k8s.io/v1.0.4/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.
|
||||
glusterfs volume to be mounted with read-only permissions; see http://releases.k8s.io/v1.0.4/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.
|
||||
glusterfs volume to be mounted with read-only permissions; see http://releases.k8s.io/v1.0.4/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()
|
||||
@@ -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.
|
||||
exec-based handler
|
||||
|
||||
:return: The _exec of this V1Handler.
|
||||
:rtype: V1ExecAction
|
||||
"""
|
||||
return self.__exec
|
||||
|
||||
@_exec.setter
|
||||
def _exec(self, _exec):
|
||||
"""
|
||||
Sets the _exec of this V1Handler.
|
||||
exec-based handler
|
||||
|
||||
:param _exec: The _exec of this V1Handler.
|
||||
:type: V1ExecAction
|
||||
"""
|
||||
self.__exec = _exec
|
||||
|
||||
@property
|
||||
def http_get(self):
|
||||
"""
|
||||
Gets the http_get of this V1Handler.
|
||||
HTTP-based handler
|
||||
|
||||
: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.
|
||||
HTTP-based handler
|
||||
|
||||
: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.
|
||||
TCP-based handler; 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.
|
||||
TCP-based handler; 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()
|
||||
@@ -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; see http://releases.k8s.io/v1.0.4/docs/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; see http://releases.k8s.io/v1.0.4/docs/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()
|
||||
@@ -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 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'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'path': 'path',
|
||||
'port': 'port',
|
||||
'host': 'host',
|
||||
'scheme': 'scheme'
|
||||
}
|
||||
|
||||
self._path = None
|
||||
self._port = None
|
||||
self._host = None
|
||||
self._scheme = 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.
|
||||
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 V1HTTPGetAction.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._port
|
||||
|
||||
@port.setter
|
||||
def port(self, port):
|
||||
"""
|
||||
Sets the port of this V1HTTPGetAction.
|
||||
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 V1HTTPGetAction.
|
||||
:type: str
|
||||
"""
|
||||
self._port = port
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
"""
|
||||
Gets the host of this V1HTTPGetAction.
|
||||
hostname to connect to; defaults to pod IP
|
||||
|
||||
:return: The host of this V1HTTPGetAction.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._host
|
||||
|
||||
@host.setter
|
||||
def host(self, host):
|
||||
"""
|
||||
Sets the host of this V1HTTPGetAction.
|
||||
hostname to connect to; defaults to pod IP
|
||||
|
||||
:param host: The host of this V1HTTPGetAction.
|
||||
:type: str
|
||||
"""
|
||||
self._host = host
|
||||
|
||||
@property
|
||||
def scheme(self):
|
||||
"""
|
||||
Gets the scheme of this V1HTTPGetAction.
|
||||
scheme to connect with, must be HTTP or HTTPS, 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 connect with, must be HTTP or HTTPS, defaults to HTTP
|
||||
|
||||
:param scheme: The scheme of this V1HTTPGetAction.
|
||||
:type: str
|
||||
"""
|
||||
self._scheme = scheme
|
||||
|
||||
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()
|
||||
@@ -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 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',
|
||||
'fs_type': 'str',
|
||||
'read_only': 'bool'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'target_portal': 'targetPortal',
|
||||
'iqn': 'iqn',
|
||||
'lun': 'lun',
|
||||
'fs_type': 'fsType',
|
||||
'read_only': 'readOnly'
|
||||
}
|
||||
|
||||
self._target_portal = None
|
||||
self._iqn = None
|
||||
self._lun = None
|
||||
self._fs_type = None
|
||||
self._read_only = None
|
||||
|
||||
@property
|
||||
def target_portal(self):
|
||||
"""
|
||||
Gets the target_portal of this V1ISCSIVolumeSource.
|
||||
iSCSI target portal
|
||||
|
||||
: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
|
||||
|
||||
: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.
|
||||
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.
|
||||
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 fs_type(self):
|
||||
"""
|
||||
Gets the fs_type of this V1ISCSIVolumeSource.
|
||||
file system type to mount, such as ext4, xfs, ntfs
|
||||
|
||||
: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.
|
||||
file system type to mount, such as ext4, xfs, ntfs
|
||||
|
||||
: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.
|
||||
read-only if true, read-write otherwise (false or unspecified)
|
||||
|
||||
: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.
|
||||
read-only if true, read-write otherwise (false or unspecified)
|
||||
|
||||
: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()
|
||||
@@ -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.
|
||||
called immediately after a container is started; 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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
called immediately after a container is started; 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; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
called before a container is terminated; the container is terminated after the handler completes; other management of the container blocks until the hook completes; see http://releases.k8s.io/v1.0.4/docs/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.
|
||||
called before a container is terminated; the container is terminated after the handler completes; other management of the container blocks until the hook completes; see http://releases.k8s.io/v1.0.4/docs/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()
|
||||
@@ -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 V1LimitRange(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': 'V1LimitRangeSpec'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'kind': 'kind',
|
||||
'api_version': 'apiVersion',
|
||||
'metadata': 'metadata',
|
||||
'spec': 'spec'
|
||||
}
|
||||
|
||||
self._kind = None
|
||||
self._api_version = None
|
||||
self._metadata = None
|
||||
self._spec = None
|
||||
|
||||
@property
|
||||
def kind(self):
|
||||
"""
|
||||
Gets the kind of this V1LimitRange.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1LimitRange.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1LimitRange.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1LimitRange.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1LimitRange.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1LimitRange.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1LimitRange.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1LimitRange.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1LimitRange.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1LimitRange.
|
||||
:rtype: V1ObjectMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1LimitRange.
|
||||
standard object metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1LimitRange.
|
||||
:type: V1ObjectMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def spec(self):
|
||||
"""
|
||||
Gets the spec of this V1LimitRange.
|
||||
spec defines the limits enforced; http://releases.k8s.io/v1.0.4/docs/api-conventions.md#spec-and-status
|
||||
|
||||
:return: The spec of this V1LimitRange.
|
||||
:rtype: V1LimitRangeSpec
|
||||
"""
|
||||
return self._spec
|
||||
|
||||
@spec.setter
|
||||
def spec(self, spec):
|
||||
"""
|
||||
Sets the spec of this V1LimitRange.
|
||||
spec defines the limits enforced; http://releases.k8s.io/v1.0.4/docs/api-conventions.md#spec-and-status
|
||||
|
||||
:param spec: The spec of this V1LimitRange.
|
||||
:type: V1LimitRangeSpec
|
||||
"""
|
||||
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()
|
||||
@@ -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 V1LimitRangeItem(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',
|
||||
'max': 'str',
|
||||
'min': 'str',
|
||||
'default': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'type': 'type',
|
||||
'max': 'max',
|
||||
'min': 'min',
|
||||
'default': 'default'
|
||||
}
|
||||
|
||||
self._type = None
|
||||
self._max = None
|
||||
self._min = None
|
||||
self._default = None
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Gets the type of this V1LimitRangeItem.
|
||||
type of resource that this limit applies to
|
||||
|
||||
:return: The type of this V1LimitRangeItem.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type):
|
||||
"""
|
||||
Sets the type of this V1LimitRangeItem.
|
||||
type of resource that this limit applies to
|
||||
|
||||
:param type: The type of this V1LimitRangeItem.
|
||||
:type: str
|
||||
"""
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def max(self):
|
||||
"""
|
||||
Gets the max of this V1LimitRangeItem.
|
||||
max usage constraints on this kind by resource name
|
||||
|
||||
:return: The max of this V1LimitRangeItem.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._max
|
||||
|
||||
@max.setter
|
||||
def max(self, max):
|
||||
"""
|
||||
Sets the max of this V1LimitRangeItem.
|
||||
max usage constraints on this kind by resource name
|
||||
|
||||
:param max: The max of this V1LimitRangeItem.
|
||||
:type: str
|
||||
"""
|
||||
self._max = max
|
||||
|
||||
@property
|
||||
def min(self):
|
||||
"""
|
||||
Gets the min of this V1LimitRangeItem.
|
||||
min usage constraints on this kind by resource name
|
||||
|
||||
:return: The min of this V1LimitRangeItem.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._min
|
||||
|
||||
@min.setter
|
||||
def min(self, min):
|
||||
"""
|
||||
Sets the min of this V1LimitRangeItem.
|
||||
min usage constraints on this kind by resource name
|
||||
|
||||
:param min: The min of this V1LimitRangeItem.
|
||||
:type: str
|
||||
"""
|
||||
self._min = min
|
||||
|
||||
@property
|
||||
def default(self):
|
||||
"""
|
||||
Gets the default of this V1LimitRangeItem.
|
||||
default values on this kind by resource name if omitted
|
||||
|
||||
:return: The default of this V1LimitRangeItem.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._default
|
||||
|
||||
@default.setter
|
||||
def default(self, default):
|
||||
"""
|
||||
Sets the default of this V1LimitRangeItem.
|
||||
default values on this kind by resource name if omitted
|
||||
|
||||
:param default: The default of this V1LimitRangeItem.
|
||||
:type: str
|
||||
"""
|
||||
self._default = default
|
||||
|
||||
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()
|
||||
@@ -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 V1LimitRangeList(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': 'V1ListMeta',
|
||||
'items': 'list[V1LimitRange]'
|
||||
}
|
||||
|
||||
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 V1LimitRangeList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:return: The kind of this V1LimitRangeList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._kind
|
||||
|
||||
@kind.setter
|
||||
def kind(self, kind):
|
||||
"""
|
||||
Sets the kind of this V1LimitRangeList.
|
||||
kind of object, in CamelCase; cannot be updated; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#types-kinds
|
||||
|
||||
:param kind: The kind of this V1LimitRangeList.
|
||||
:type: str
|
||||
"""
|
||||
self._kind = kind
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
"""
|
||||
Gets the api_version of this V1LimitRangeList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:return: The api_version of this V1LimitRangeList.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._api_version
|
||||
|
||||
@api_version.setter
|
||||
def api_version(self, api_version):
|
||||
"""
|
||||
Sets the api_version of this V1LimitRangeList.
|
||||
version of the schema the object should have; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#resources
|
||||
|
||||
:param api_version: The api_version of this V1LimitRangeList.
|
||||
:type: str
|
||||
"""
|
||||
self._api_version = api_version
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
"""
|
||||
Gets the metadata of this V1LimitRangeList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:return: The metadata of this V1LimitRangeList.
|
||||
:rtype: V1ListMeta
|
||||
"""
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
"""
|
||||
Sets the metadata of this V1LimitRangeList.
|
||||
standard list metadata; see http://releases.k8s.io/v1.0.4/docs/api-conventions.md#metadata
|
||||
|
||||
:param metadata: The metadata of this V1LimitRangeList.
|
||||
:type: V1ListMeta
|
||||
"""
|
||||
self._metadata = metadata
|
||||
|
||||
@property
|
||||
def items(self):
|
||||
"""
|
||||
Gets the items of this V1LimitRangeList.
|
||||
items is a list of LimitRange objects; see http://releases.k8s.io/v1.0.4/docs/design/admission_control_limit_range.md
|
||||
|
||||
:return: The items of this V1LimitRangeList.
|
||||
:rtype: list[V1LimitRange]
|
||||
"""
|
||||
return self._items
|
||||
|
||||
@items.setter
|
||||
def items(self, items):
|
||||
"""
|
||||
Sets the items of this V1LimitRangeList.
|
||||
items is a list of LimitRange objects; see http://releases.k8s.io/v1.0.4/docs/design/admission_control_limit_range.md
|
||||
|
||||
:param items: The items of this V1LimitRangeList.
|
||||
:type: list[V1LimitRange]
|
||||
"""
|
||||
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()
|
||||
@@ -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 V1LimitRangeSpec(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': 'list[V1LimitRangeItem]'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'limits': 'limits'
|
||||
}
|
||||
|
||||
self._limits = None
|
||||
|
||||
@property
|
||||
def limits(self):
|
||||
"""
|
||||
Gets the limits of this V1LimitRangeSpec.
|
||||
limits is the list of LimitRangeItem objects that are enforced
|
||||
|
||||
:return: The limits of this V1LimitRangeSpec.
|
||||
:rtype: list[V1LimitRangeItem]
|
||||
"""
|
||||
return self._limits
|
||||
|
||||
@limits.setter
|
||||
def limits(self, limits):
|
||||
"""
|
||||
Sets the limits of this V1LimitRangeSpec.
|
||||
limits is the list of LimitRangeItem objects that are enforced
|
||||
|
||||
:param limits: The limits of this V1LimitRangeSpec.
|
||||
:type: list[V1LimitRangeItem]
|
||||
"""
|
||||
self._limits = limits
|
||||
|
||||
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()
|
||||
@@ -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 V1ListMeta(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 V1ListMeta.
|
||||
URL for the object; populated by the system, read-only
|
||||
|
||||
:return: The self_link of this V1ListMeta.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._self_link
|
||||
|
||||
@self_link.setter
|
||||
def self_link(self, self_link):
|
||||
"""
|
||||
Sets the self_link of this V1ListMeta.
|
||||
URL for the object; populated by the system, read-only
|
||||
|
||||
:param self_link: The self_link of this V1ListMeta.
|
||||
:type: str
|
||||
"""
|
||||
self._self_link = self_link
|
||||
|
||||
@property
|
||||
def resource_version(self):
|
||||
"""
|
||||
Gets the resource_version of this V1ListMeta.
|
||||
string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system, read-only; value must be treated as opaque by clients and passed unmodified back to the server: http://releases.k8s.io/v1.0.4/docs/api-conventions.md#concurrency-control-and-consistency
|
||||
|
||||
:return: The resource_version of this V1ListMeta.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._resource_version
|
||||
|
||||
@resource_version.setter
|
||||
def resource_version(self, resource_version):
|
||||
"""
|
||||
Sets the resource_version of this V1ListMeta.
|
||||
string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system, read-only; value must be treated as opaque by clients and passed unmodified back to the server: http://releases.k8s.io/v1.0.4/docs/api-conventions.md#concurrency-control-and-consistency
|
||||
|
||||
:param resource_version: The resource_version of this V1ListMeta.
|
||||
: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()
|
||||
@@ -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 V1LoadBalancerIngress(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 = {
|
||||
'ip': 'str',
|
||||
'hostname': 'str'
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'ip': 'ip',
|
||||
'hostname': 'hostname'
|
||||
}
|
||||
|
||||
self._ip = None
|
||||
self._hostname = None
|
||||
|
||||
@property
|
||||
def ip(self):
|
||||
"""
|
||||
Gets the ip of this V1LoadBalancerIngress.
|
||||
IP address of ingress point
|
||||
|
||||
:return: The ip of this V1LoadBalancerIngress.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._ip
|
||||
|
||||
@ip.setter
|
||||
def ip(self, ip):
|
||||
"""
|
||||
Sets the ip of this V1LoadBalancerIngress.
|
||||
IP address of ingress point
|
||||
|
||||
:param ip: The ip of this V1LoadBalancerIngress.
|
||||
:type: str
|
||||
"""
|
||||
self._ip = ip
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
"""
|
||||
Gets the hostname of this V1LoadBalancerIngress.
|
||||
hostname of ingress point
|
||||
|
||||
:return: The hostname of this V1LoadBalancerIngress.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._hostname
|
||||
|
||||
@hostname.setter
|
||||
def hostname(self, hostname):
|
||||
"""
|
||||
Sets the hostname of this V1LoadBalancerIngress.
|
||||
hostname of ingress point
|
||||
|
||||
:param hostname: The hostname of this V1LoadBalancerIngress.
|
||||
:type: str
|
||||
"""
|
||||
self._hostname = hostname
|
||||
|
||||
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
| ||||