<commit_before>#!/usr/bin/env python
# -*- coding: utf-8
from __future__ import absolute_import

import six

from .common import ObjectMeta
from ..base import Model
from ..fields import Field, OnceField, ListField


class ServicePort(Model):
    name = Field(six.text_type)
    protocol = Field(six.text_type, "TCP")
    port = Field(int)
    targetPort = Field(six.text_type)
    nodePort = Field(six.text_type)


class ServiceSpec(Model):
    ports = ListField(ServicePort)
    selector = Field(dict)
    clusterIP = OnceField(six.text_type)
    type = Field(six.text_type, "ClusterIP")
    sessionAffinity = Field(six.text_type, "None")


class Service(Model):
    class Meta:
        url_template = "/api/v1/namespaces/{namespace}/services/{name}"

    metadata = Field(ObjectMeta)
    spec = Field(ServiceSpec)<commit_msg>INFRA-923 Add creation of static ip, dns entry for load balancer<commit_after>#!/usr/bin/env python
# -*- coding: utf-8
from __future__ import absolute_import

import six

from .common import ObjectMeta
from ..base import Model
from ..fields import Field, OnceField, ListField


class ServicePort(Model):
    name = Field(six.text_type)
    protocol = Field(six.text_type, "TCP")
    port = Field(int)
    targetPort = Field(six.text_type)
    nodePort = Field(six.text_type)


class ServiceSpec(Model):
    ports = ListField(ServicePort)
    selector = Field(dict)
    clusterIP = OnceField(six.text_type)
    loadBalancerIP = OnceField(six.text_type)
    type = Field(six.text_type, "ClusterIP")
    sessionAffinity = Field(six.text_type, "None")


class Service(Model):
    class Meta:
        url_template = "/api/v1/namespaces/{namespace}/services/{name}"

    metadata = Field(ObjectMeta)
    spec = Field(ServiceSpec)
{'fraction_non_alphanumeric': 0.11307824100513993, 'fraction_numerical': 0.003997715591090805, 'mean_word_length': 3.9213483146067416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '771441', 'n_tokens_mistral': 557, 'n_tokens_neox': 544, 'n_words': 133}