3 fYWm@s8dZddlmZddlmZddlZGdddeZdS)z Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git )pformat) iteritemsNc@seZdZdZdTddZeddZejddZedd Zejd d Zed d Z e jd d Z eddZ e jddZ eddZ e jddZ eddZ e jddZ eddZ e jddZ eddZejddZeddZejddZed d!Zejd"d!Zed#d$Zejd%d$Zed&d'Zejd(d'Zed)d*Zejd+d*Zed,d-Zejd.d-Zed/d0Zejd1d0Zed2d3Zejd4d3Zed5d6Zejd7d6Zed8d9Zejd:d9Zed;d<Zejd=d<Zed>d?Zejd@d?ZedAdBZejdCdBZedDdEZejdFdEZedGdHZejdIdHZdJdKZdLdMZdNdOZ dPdQZ!dRdSZ"dS)U V1PodSpeczw NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. NcCsddddddddddddddddd ddddd d d |_d ddddddddddddddddddd d!d"d#d |_||_||_||_||_||_||_||_||_ | |_ | |_ | |_ | |_ | |_||_||_||_||_||_||_||_||_||_||_d$S)%a? V1PodSpec - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. int V1Affinityboolzlist[V1Container]strzlist[V1HostAlias]zlist[V1LocalObjectReference]zdict(str, str)V1PodSecurityContextzlist[V1Toleration]zlist[V1Volume])active_deadline_secondsaffinityautomount_service_account_token containers dns_policy host_aliaseshost_ipc host_networkhost_pidhostnameimage_pull_secretsinit_containers node_name node_selectorrestart_policyscheduler_namesecurity_contextservice_accountservice_account_name subdomain termination_grace_period_seconds tolerationsvolumesactiveDeadlineSecondsr ZautomountServiceAccountTokenr Z dnsPolicyZ hostAliasesZhostIPCZ hostNetworkZhostPIDrZimagePullSecretsZinitContainersnodeNameZ nodeSelectorZ restartPolicyZ schedulerNamesecurityContextZserviceAccountZserviceAccountNamerZterminationGracePeriodSecondsrr N) swagger_types attribute_map_active_deadline_seconds _affinity _automount_service_account_token _containers _dns_policy _host_aliases _host_ipc _host_network _host_pid _hostname_image_pull_secrets_init_containers _node_name_node_selector_restart_policy_scheduler_name_security_context_service_account_service_account_name _subdomain!_termination_grace_period_seconds _tolerations_volumes)selfr r r r rrrrrrrrrrrrrrrrrrr r>U/Users/olari/OneDrive/sandbox/awsBlog2/lambda/kubernetes/client/models/v1_pod_spec.py__init__s   zV1PodSpec.__init__cCs|jS)ao Gets the active_deadline_seconds of this V1PodSpec. Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. :return: The active_deadline_seconds of this V1PodSpec. :rtype: int )r&)r=r>r>r?r ms z!V1PodSpec.active_deadline_secondscCs ||_dS)a Sets the active_deadline_seconds of this V1PodSpec. Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. :param active_deadline_seconds: The active_deadline_seconds of this V1PodSpec. :type: int N)r&)r=r r>r>r?r xs cCs|jS)z Gets the affinity of this V1PodSpec. If specified, the pod's scheduling constraints :return: The affinity of this V1PodSpec. :rtype: V1Affinity )r')r=r>r>r?r s zV1PodSpec.affinitycCs ||_dS)z Sets the affinity of this V1PodSpec. If specified, the pod's scheduling constraints :param affinity: The affinity of this V1PodSpec. :type: V1Affinity N)r')r=r r>r>r?r s cCs|jS)a Gets the automount_service_account_token of this V1PodSpec. AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. :return: The automount_service_account_token of this V1PodSpec. :rtype: bool )r()r=r>r>r?r s z)V1PodSpec.automount_service_account_tokencCs ||_dS)a9 Sets the automount_service_account_token of this V1PodSpec. AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. :param automount_service_account_token: The automount_service_account_token of this V1PodSpec. :type: bool N)r()r=r r>r>r?r s cCs|jS)a2 Gets the containers of this V1PodSpec. List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. :return: The containers of this V1PodSpec. :rtype: list[V1Container] )r))r=r>r>r?r s zV1PodSpec.containerscCs|dkrtd||_dS)a; Sets the containers of this V1PodSpec. List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. :param containers: The containers of this V1PodSpec. :type: list[V1Container] Nz2Invalid value for `containers`, must not be `None`) ValueErrorr))r=r r>r>r?r s cCs|jS)a Gets the dns_policy of this V1PodSpec. Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. :return: The dns_policy of this V1PodSpec. :rtype: str )r*)r=r>r>r?rs zV1PodSpec.dns_policycCs ||_dS)a Sets the dns_policy of this V1PodSpec. Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. :param dns_policy: The dns_policy of this V1PodSpec. :type: str N)r*)r=rr>r>r?rs cCs|jS)a6 Gets the host_aliases of this V1PodSpec. HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. :return: The host_aliases of this V1PodSpec. :rtype: list[V1HostAlias] )r+)r=r>r>r?rs zV1PodSpec.host_aliasescCs ||_dS)aA Sets the host_aliases of this V1PodSpec. HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. :param host_aliases: The host_aliases of this V1PodSpec. :type: list[V1HostAlias] N)r+)r=rr>r>r?rs cCs|jS)z Gets the host_ipc of this V1PodSpec. Use the host's ipc namespace. Optional: Default to false. :return: The host_ipc of this V1PodSpec. :rtype: bool )r,)r=r>r>r?rs zV1PodSpec.host_ipccCs ||_dS)z Sets the host_ipc of this V1PodSpec. Use the host's ipc namespace. Optional: Default to false. :param host_ipc: The host_ipc of this V1PodSpec. :type: bool N)r,)r=rr>r>r?rs cCs|jS)a/ Gets the host_network of this V1PodSpec. Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. :return: The host_network of this V1PodSpec. :rtype: bool )r-)r=r>r>r?rs zV1PodSpec.host_networkcCs ||_dS)a: Sets the host_network of this V1PodSpec. Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. :param host_network: The host_network of this V1PodSpec. :type: bool N)r-)r=rr>r>r?rs cCs|jS)z Gets the host_pid of this V1PodSpec. Use the host's pid namespace. Optional: Default to false. :return: The host_pid of this V1PodSpec. :rtype: bool )r.)r=r>r>r?r's zV1PodSpec.host_pidcCs ||_dS)z Sets the host_pid of this V1PodSpec. Use the host's pid namespace. Optional: Default to false. :param host_pid: The host_pid of this V1PodSpec. :type: bool N)r.)r=rr>r>r?r2s cCs|jS)z Gets the hostname of this V1PodSpec. Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. :return: The hostname of this V1PodSpec. :rtype: str )r/)r=r>r>r?r>s zV1PodSpec.hostnamecCs ||_dS)z Sets the hostname of this V1PodSpec. Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. :param hostname: The hostname of this V1PodSpec. :type: str N)r/)r=rr>r>r?rIs cCs|jS)aW Gets the image_pull_secrets of this V1PodSpec. ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod :return: The image_pull_secrets of this V1PodSpec. :rtype: list[V1LocalObjectReference] )r0)r=r>r>r?rUs zV1PodSpec.image_pull_secretscCs ||_dS)ah Sets the image_pull_secrets of this V1PodSpec. ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod :param image_pull_secrets: The image_pull_secrets of this V1PodSpec. :type: list[V1LocalObjectReference] N)r0)r=rr>r>r?r`s cCs|jS)a Gets the init_containers of this V1PodSpec. List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ :return: The init_containers of this V1PodSpec. :rtype: list[V1Container] )r1)r=r>r>r?rls zV1PodSpec.init_containerscCs ||_dS)a Sets the init_containers of this V1PodSpec. List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ :param init_containers: The init_containers of this V1PodSpec. :type: list[V1Container] N)r1)r=rr>r>r?rws cCs|jS)a@ Gets the node_name of this V1PodSpec. NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. :return: The node_name of this V1PodSpec. :rtype: str )r2)r=r>r>r?rs zV1PodSpec.node_namecCs ||_dS)aH Sets the node_name of this V1PodSpec. NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. :param node_name: The node_name of this V1PodSpec. :type: str N)r2)r=rr>r>r?rs cCs|jS)a Gets the node_selector of this V1PodSpec. NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ :return: The node_selector of this V1PodSpec. :rtype: dict(str, str) )r3)r=r>r>r?rs zV1PodSpec.node_selectorcCs ||_dS)a Sets the node_selector of this V1PodSpec. NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ :param node_selector: The node_selector of this V1PodSpec. :type: dict(str, str) N)r3)r=rr>r>r?rs cCs|jS)aR Gets the restart_policy of this V1PodSpec. Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy :return: The restart_policy of this V1PodSpec. :rtype: str )r4)r=r>r>r?rs zV1PodSpec.restart_policycCs ||_dS)a_ Sets the restart_policy of this V1PodSpec. Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy :param restart_policy: The restart_policy of this V1PodSpec. :type: str N)r4)r=rr>r>r?rs cCs|jS)a Gets the scheduler_name of this V1PodSpec. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. :return: The scheduler_name of this V1PodSpec. :rtype: str )r5)r=r>r>r?rs zV1PodSpec.scheduler_namecCs ||_dS)a! Sets the scheduler_name of this V1PodSpec. If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. :param scheduler_name: The scheduler_name of this V1PodSpec. :type: str N)r5)r=rr>r>r?rs cCs|jS)aM Gets the security_context of this V1PodSpec. SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. :return: The security_context of this V1PodSpec. :rtype: V1PodSecurityContext )r6)r=r>r>r?rs zV1PodSpec.security_contextcCs ||_dS)a\ Sets the security_context of this V1PodSpec. SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. :param security_context: The security_context of this V1PodSpec. :type: V1PodSecurityContext N)r6)r=rr>r>r?rs cCs|jS)a Gets the service_account of this V1PodSpec. DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. :return: The service_account of this V1PodSpec. :rtype: str )r7)r=r>r>r?rs zV1PodSpec.service_accountcCs ||_dS)a Sets the service_account of this V1PodSpec. DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. :param service_account: The service_account of this V1PodSpec. :type: str N)r7)r=rr>r>r?rs cCs|jS)aH Gets the service_account_name of this V1PodSpec. ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ :return: The service_account_name of this V1PodSpec. :rtype: str )r8)r=r>r>r?r s zV1PodSpec.service_account_namecCs ||_dS)a[ Sets the service_account_name of this V1PodSpec. ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ :param service_account_name: The service_account_name of this V1PodSpec. :type: str N)r8)r=rr>r>r?rs cCs|jS)a9 Gets the subdomain of this V1PodSpec. If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. :return: The subdomain of this V1PodSpec. :rtype: str )r9)r=r>r>r?r$s zV1PodSpec.subdomaincCs ||_dS)aA Sets the subdomain of this V1PodSpec. If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. :param subdomain: The subdomain of this V1PodSpec. :type: str N)r9)r=rr>r>r?r/s cCs|jS)a Gets the termination_grace_period_seconds of this V1PodSpec. Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. :return: The termination_grace_period_seconds of this V1PodSpec. :rtype: int )r:)r=r>r>r?r;s z*V1PodSpec.termination_grace_period_secondscCs ||_dS)a Sets the termination_grace_period_seconds of this V1PodSpec. Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. :param termination_grace_period_seconds: The termination_grace_period_seconds of this V1PodSpec. :type: int N)r:)r=rr>r>r?rFs cCs|jS)z Gets the tolerations of this V1PodSpec. If specified, the pod's tolerations. :return: The tolerations of this V1PodSpec. :rtype: list[V1Toleration] )r;)r=r>r>r?rRs zV1PodSpec.tolerationscCs ||_dS)z Sets the tolerations of this V1PodSpec. If specified, the pod's tolerations. :param tolerations: The tolerations of this V1PodSpec. :type: list[V1Toleration] N)r;)r=rr>r>r?r]s cCs|jS)a Gets the volumes of this V1PodSpec. List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes :return: The volumes of this V1PodSpec. :rtype: list[V1Volume] )r<)r=r>r>r?r is zV1PodSpec.volumescCs ||_dS)a Sets the volumes of this V1PodSpec. List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes :param volumes: The volumes of this V1PodSpec. :type: list[V1Volume] N)r<)r=r r>r>r?r ts cCsi}xt|jD]z\}}t||}t|trDttdd|||<qt|dr\|j||<qt|trttdd|j ||<q|||<qW|S)z8 Returns the model properties as a dict cSst|dr|jS|S)Nto_dict)hasattrrB)xr>r>r?sz#V1PodSpec.to_dict..rBcSs&t|ddr"|d|djfS|S)NrBr)rCrB)itemr>r>r?rEs) rr$getattr isinstancelistmaprCrBdictitems)r=resultattr_valuer>r>r?rBs     zV1PodSpec.to_dictcCs t|jS)z@ Returns the string representation of the model )rrB)r=r>r>r?to_strszV1PodSpec.to_strcCs|jS)z* For `print` and `pprint` )rR)r=r>r>r?__repr__szV1PodSpec.__repr__cCst|tsdS|j|jkS)z8 Returns true if both objects are equal F)rIr__dict__)r=otherr>r>r?__eq__s zV1PodSpec.__eq__cCs ||k S)z< Returns true if both objects are not equal r>)r=rUr>r>r?__ne__szV1PodSpec.__ne__)NNNNNNNNNNNNNNNNNNNNNNN)#__name__ __module__ __qualname____doc__r@propertyr setterr r r rrrrrrrrrrrrrrrrrrr rBrRrSrVrWr>r>r>r?rsj U                         r)r[pprintrsixrreobjectrr>r>r>r? s