text
stringlengths
29
850k
from django.forms import FloatField, NumberInput, ValidationError from django.test import SimpleTestCase from django.utils import formats, translation from . import FormFieldAssertionsMixin class FloatFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_floatfield_1(self): f = FloatField() self.assertWidgetRendersTo(f, '<input step="any" type="number" name="f" id="id_f" required />') with self.assertRaisesMessage(ValidationError, "'This field is required.'"): f.clean('') with self.assertRaisesMessage(ValidationError, "'This field is required.'"): f.clean(None) self.assertEqual(1.0, f.clean('1')) self.assertIsInstance(f.clean('1'), float) self.assertEqual(23.0, f.clean('23')) self.assertEqual(3.1400000000000001, f.clean('3.14')) self.assertEqual(3.1400000000000001, f.clean(3.14)) self.assertEqual(42.0, f.clean(42)) with self.assertRaisesMessage(ValidationError, "'Enter a number.'"): f.clean('a') self.assertEqual(1.0, f.clean('1.0 ')) self.assertEqual(1.0, f.clean(' 1.0')) self.assertEqual(1.0, f.clean(' 1.0 ')) with self.assertRaisesMessage(ValidationError, "'Enter a number.'"): f.clean('1.0a') self.assertIsNone(f.max_value) self.assertIsNone(f.min_value) with self.assertRaisesMessage(ValidationError, "'Enter a number.'"): f.clean('Infinity') with self.assertRaisesMessage(ValidationError, "'Enter a number.'"): f.clean('NaN') with self.assertRaisesMessage(ValidationError, "'Enter a number.'"): f.clean('-Inf') def test_floatfield_2(self): f = FloatField(required=False) self.assertIsNone(f.clean('')) self.assertIsNone(f.clean(None)) self.assertEqual(1.0, f.clean('1')) self.assertIsNone(f.max_value) self.assertIsNone(f.min_value) def test_floatfield_3(self): f = FloatField(max_value=1.5, min_value=0.5) self.assertWidgetRendersTo( f, '<input step="any" name="f" min="0.5" max="1.5" type="number" id="id_f" required />', ) with self.assertRaisesMessage(ValidationError, "'Ensure this value is less than or equal to 1.5.'"): f.clean('1.6') with self.assertRaisesMessage(ValidationError, "'Ensure this value is greater than or equal to 0.5.'"): f.clean('0.4') self.assertEqual(1.5, f.clean('1.5')) self.assertEqual(0.5, f.clean('0.5')) self.assertEqual(f.max_value, 1.5) self.assertEqual(f.min_value, 0.5) def test_floatfield_widget_attrs(self): f = FloatField(widget=NumberInput(attrs={'step': 0.01, 'max': 1.0, 'min': 0.0})) self.assertWidgetRendersTo( f, '<input step="0.01" name="f" min="0.0" max="1.0" type="number" id="id_f" required />', ) def test_floatfield_localized(self): """ A localized FloatField's widget renders to a text input without any number input specific attributes. """ f = FloatField(localize=True) self.assertWidgetRendersTo(f, '<input id="id_f" name="f" type="text" required />') def test_floatfield_changed(self): f = FloatField() n = 4.35 self.assertFalse(f.has_changed(n, '4.3500')) with translation.override('fr'), self.settings(USE_L10N=True): f = FloatField(localize=True) localized_n = formats.localize_input(n) # -> '4,35' in French self.assertFalse(f.has_changed(n, localized_n))
Thank you to everyone who played along with last month’s challenge, there were lots of great pages! I always enjoy looking out for the challenge-inspired pages while I am browsing through the gallery! Congratulations to October’s winner, the Rafflecopter picked Electra’s colourful Lanterns layout as our winner! Please check your messages over at The Lilypad for details of how to claim your prize Electra. Here’s what the Creative Team members came up with using this template as their inspiration, Amy even scraplifted herself and made another layout! Stop back and leave a comment in the Rafflecopter giveaway below, linking us back to your page by 11.59pm EST 30th November. next article: Easy DIY gift idea: Bookmarks! I was early this month! Thank you!
#!/usr/bin/env python ''' This application is a simple implemnetation of a word counter. It leverages the bottle micro-framework, as well as pymongo. ''' import time from bottle import route, run, response, request, template from bson.json_util import default import pymongo from pymongo.uri_parser import parse_uri import json from statsd import statsd try: import local_settings as config except ImportError: # make default config: non-replset connection # directly to mongo on localhost class config(object): mongo_uri = 'mongodb://localhost' mongo_uri = getattr(config, 'mongo_uri', 'mongodb://localhost') uri_components = parse_uri(mongo_uri) if 'replicaSet' in uri_components['options']: conn = pymongo.ReplicaSetConnection(mongo_uri) else: conn = pymongo.Connection(mongo_uri) db = conn.test @route('/insert/:name') @statsd.timed('fullstack.insert.time', sample_rate=0.5) def insert(name): doc = {'name': name} db.phrases.update(doc, {"$inc":{"count": 1}}, upsert=True) # TODO: Figure out a better place for this - some sort of setup url? db.phrases.ensure_index('name') db.phrases.ensure_index('count') return json.dumps(doc, default=default) @route('/get') @route('/get/:name') @statsd.timed('fullstack.get.time', sample_rate=0.5) def get(name=None): query = {} if name is not None: query['name'] = name response.set_header('Content-Type', 'application/json') return json.dumps(list(db.phrases.find(query)), default=default) @route('/toplist') @statsd.timed('fullstack.toplist.time', sample_rate=0.5) def toplist(name=None): # TODO: Figure out a better place for this - some sort of setup url? db.phrases.ensure_index('name') db.phrases.ensure_index('count') query = db.phrases.find({}, ['count', 'name']).sort('count', -1).limit(10) return template('toplist', toplist=list(query)) # This is because I hate seeing errors for no reason. @route('/favicon.ico') def favicon(): return if __name__ == '__main__': run(host='localhost', port=8080, reloader=True)
WHY did I just do that? and Why all the hate? I have been trying to get over my “thing” about answering the phone. I usually don’t. It’s too much potential for surprise. But for the new year, I’ve been trying to answer it. I’ve been asked out for coffee by a lass in my SZ group. The thing is… I admire her, but she makes me sad at the same time. Why did I answer the phone. I said I’d check my work and get back to her… Now I have to find a way out. I’m not up for the hate. She joined up a bit a go and she’s getting better. She’s kicking this SZ and I’m really glad for her. Like many of people I’ve been reading about and a few I’ve met,; she would like to go into psych work to right the wrongs of therapist and pdocs she’s had to deal with. I am very supportive of her. But lately she’s on this kick about hating “Normals” and if she goes into psych work… she doesn’t feel she should ever have to deal with “Normals”, and how much she doesn’t like “Normals”. First… I’ve really never met a NORMAL. Sure, there are Non-Sz girls, but they have problems too… bipolar, ADD, ADHD, dyslexia, alcohol, drugs, cutting, PTSD, anorexia, on and on. Who is NORMAL? Because my NORMAL kid sis is the one with the journal detailing my insurance information, my prescriptions, my allergy info, my basic medical information, blood type, my med mix, med reactions, my other doctors contact, my other emergency contacts, and on and on. I’m just getting tired of all the “Normal” vs. Sz. Aren’t we all in this together? Why all the hate on the normals? That is so unfortunate that she is approaching it this way. From what I have seen or read it is becoming a more acceptable to count on family input for treatment. She won’t be of much help to her patients with that approach. Maybe she is to early in treatment to understand that her own negativity is getting in the way. We are all in this together. Just tell her you are not comfortable right now with pursuing a relationship outside of the group. That sounds like a really toxic attitude and outlook on life. And it’s impossible to help others with that kind of negativity overtaking your mind. I would definitely keep some distance between myself and anyone with this kind of attitude! Situations like this are hard to deal with. If I were in the same place. Depending on my mood and carnival-quotient, I would probably either RSVP the invitation because ew, outside… or… attempt to discuss the ‘normal’ topic and explain like you did here about your sister as an example. I had something similar once a few years ago, I found out that an online pal was a racist, so I initiated a conversation about why, and tried my best to illustrate examples for why the stance was bogus. In the end, it did not change their mind, but it also did not harm the friendship. If a person is able to discuss it without becoming overwhelmed, or losing their cool, I think a discussion that clearly states your views is always a good thing. However, I know that there are lots of times in which I would not be able to do that without being a nervous wreck afterwards. I know there are other ways to deal with this, but these are just what I might do in a similar situation. No matter how you end up handling the situation, I wholehearteedly agree with your view because it is the logical standpoint that acts in the best interest of everybody,I hope that you can find an equitable solution to this conundrum. If a person is able to discuss it without becoming overwhelmed, or losing their cool, I think a discussion that clearly states your views is always a good thing. However, I know that there are lots of times in which I would not be able to do that without being a nervous wreck afterwards. You’re quote is another factor to consider… Here on my sofa in the quiet morning with my feet up, I can discuss this very calmly and cool headed. I can be very objective. But if I was in public and this gal started in on “Non-SZ” hate… I know I would get my nose out of joint and things would get (as my sis says) “publicly complicated” very quickly. I might not be a gentleman for very long. It may be a good idea to say no to the coffee meeting, it sounds like it would bother you quite a lot if you went and this subject went unaddressed as well, You don’t need any more stress than you already have to deal with. I’m not sure what my therapist would suggest but I think BarbieBF’s suggestion is a very tactful way of saying no. I try to be when I can, but I often am not that tactful and end up standing people up out of indecision. (what we don’t say out loud is, we have to move the car all the way back to our driveway.) She’ll then phone in a credit card to take care of her half of the bill. Or drop the cash off on the way out. She might have had a bad experience or two where so called “normal” people treated her badly or made her feel crappy? Maybe you can talk to her about it. She does need to work with everybody though. normal and mentally ill people in that sense aren’t different. Some you like some you don’t. I think barbie is right just tell her you are not interested in pursing a relationship outside of your group. I have temporarily gotten into that hatred towards the “normies”. It isn’t true hate in my case, it was even people I used to like. Firstly, things in my brain just weren’t right. Mostly it was jealousy that I had to struggle to hard to do my job and function, and also I assume that every normal is ignorant and doesn’t understand. At work, I’d get angry and stressed and start to hate my favourite coworkers for dropping the ball or vanishing from the front line. It wasn’t really me, and I didn’t want to feel that way. I had the awareness, but not the control. I agree with Barbie on the approach. Sometimes, I answer the phone when I don’t feel like talking, and I’m snotty. “Why did I just answer that?” I have a rule now. Don’t feel pressured to answer the phone if it’s not a good time. Let it go to the machine and see who it is. For me i try to fit in with the so called normals but never quite do. I don’t have a lot of people around me that are with mental health problems. A few drinkers but that’s about it. that’s why i like this forum so much! I will say though that everyone has problems, illnesses, issues. they may not “hear or see things” but they still have problems. I don’t want to be judged by anyone for my issues so i’m not going to judge others. I hope all goes well, J. I’ll send you positive vibes. dark sith rounds up all the normals and gives them all a big hug ! A lot of therapists have obseved that schizophrenics tend to rapport with each other. Different theories are put forth on why that might be. I was able to tell her I’m just not up for coffee. I know I won’t handle this negativity well. this came to my mind talking about stereotyping normal versus schizophrenics. This student once went to a professor and asked him how he was doing. He said he liked this class but some other classes he didn’t agree with the how the professors taught. And he was like, " you learn as much from the ones you disagree with as the ones you agree with." might not have said it as good but i think it’s a true statement. You probably learn more. I use to hate “normals” too, it wasn’t so much as it was a dislike. I have to struggle with living a life and being as “normal” seeming as possible in front of everyday people and most are just like la di da i don’t care. I have to admit maybe it’s a jealousy thing. I try so hard to try not to give off a sign that i’m not “normal” and most people going to the store is a walk in the park. I used to hold on to more anger against “normal” people. I am not as angry as I used to be. Sure many normal folks, and when I say normal I mean non SZ people, tend to judge us harshly. But now I know not every normal is going to do this. If they do view me in a negative light, it’s due to ignorance more than anything else. Now instead of feeling anger or resentment, i feel sorry for many of them, those that judge me. I sometimes feel like I am an Astronaut from another dimension or planet and I have lost my way onto this planet called Earth. The normals are alien to me. Just because they are aliens doesn’t make them good nor does it make them bad - just different than me. It’s not delusional thinking, just another way of looking at things.
from itertools import chain import hashlib from django.db import models from django.contrib.postgres.fields import JSONField, ArrayField from django.core.serializers.json import DjangoJSONEncoder from django.urls import reverse from django.utils.translation import gettext as _, get_language from dateutil.parser import parse as dt_parse from elasticsearch.serializer import JSONSerializer from elasticsearch_dsl import Q from ckeditor.fields import RichTextField from easy_thumbnails.fields import ThumbnailerImageField from translitua import translit from catalog.elastic_models import NACPDeclaration from catalog.models import Region class DeclarationsManager(models.Manager): def create_declarations(self, person, declarations): existing_ids = self.filter(person=person).values_list( "declaration_id", flat=True ) for d in declarations: if d._id in existing_ids: continue self.create( person=person, declaration_id=d._id, year=d.intro.declaration_year, corrected=getattr(d.intro, "corrected", False), doc_type=getattr(d.intro, "doc_type", "Щорічна"), obj_ids=list(getattr(d, "obj_ids", [])), user_declarant_id=getattr(d.intro, "user_declarant_id", None), source=d.api_response( fields=[ "guid", "infocard", "raw_source", "unified_source", "related_entities", "guid", "aggregated_data", ] ), ) class LandingPage(models.Model): BODY_TYPES = { "city_council": _("Міська рада"), "regional_council": _("Обласна рада"), "other": _("Інше"), } slug = models.SlugField("Ідентифікатор сторінки", primary_key=True, max_length=100) title = models.CharField("Заголовок сторінки", max_length=200) description = RichTextField("Опис сторінки", blank=True) title_en = models.CharField("Заголовок сторінки [en]", max_length=200, blank=True) description_en = RichTextField("Опис сторінки [en]", blank=True) image = ThumbnailerImageField(blank=True, upload_to="landings") region = models.ForeignKey(Region, blank=True, null=True, on_delete=models.SET_NULL) body_type = models.CharField( "Тип держоргану", blank=True, null=True, choices=BODY_TYPES.items(), max_length=30, ) keywords = models.TextField( "Ключові слова для пошуку в деклараціях (по одному запиту на рядок)", blank=True ) def pull_declarations(self): for p in self.persons.select_related("body").prefetch_related("declarations"): p.pull_declarations() def get_summary(self): persons = {} min_years = [] max_years = [] for p in self.persons.select_related("body").prefetch_related("declarations"): summary = p.get_summary() if "min_year" in summary: min_years.append(summary["min_year"]) if "max_year" in summary: max_years.append(summary["max_year"]) persons[p.pk] = summary return { "max_year": max(max_years), "min_year": min(min_years), "persons": persons, } def __str__(self): return "%s (%s)" % (self.title, self.slug) def get_absolute_url(self): return reverse("landing_page_details", kwargs={"pk": self.pk}) class Meta: verbose_name = "Лендінг-сторінка" verbose_name_plural = "Лендінг-сторінки" class Person(models.Model): body = models.ForeignKey( "LandingPage", verbose_name="Лендінг-сторінка", related_name="persons", on_delete=models.CASCADE, ) name = models.CharField("Ім'я особи", max_length=200) extra_keywords = models.CharField( "Додаткові ключові слова для пошуку", max_length=200, blank=True, help_text="Ключові слова для додаткового звуження пошуку", ) def __str__(self): return "%s (знайдено декларацій: %s)" % (self.name, self.declarations.count()) def get_absolute_url(self): return reverse( "landing_page_person", kwargs={"body_id": self.body_id, "pk": self.pk} ) def pull_declarations(self): def get_search_clause(kwd): if "область" not in kwd: return Q( "multi_match", query=kwd, operator="or", minimum_should_match=1, fields=[ "general.post.region", "general.post.office", "general.post.post", "general.post.actual_region", ], ) else: return Q( "multi_match", query=kwd, fields=["general.post.region", "general.post.actual_region"], ) search_clauses = [ get_search_clause(x) for x in filter(None, map(str.strip, self.body.keywords.split("\n"))) ] q = "{} {}".format(self.name, self.extra_keywords) if search_clauses: for sc in search_clauses: first_pass = ( NACPDeclaration.search() .query( "bool", must=[ Q( "match", general__full_name={"query": q, "operator": "and"}, ) ], should=[sc], minimum_should_match=1, )[:100] .execute() ) if first_pass: break else: first_pass = ( NACPDeclaration.search() .query( "bool", must=[ Q("match", general__full_name={"query": q, "operator": "and"}) ], )[:100] .execute() ) Declaration.objects.create_declarations(self, first_pass) user_declarant_ids = set( filter( None, self.declarations.exclude(exclude=True).values_list( "user_declarant_id", flat=True ), ) ) if user_declarant_ids: second_pass = NACPDeclaration.search().filter( "terms", **{"intro.user_declarant_id": list(user_declarant_ids)} ) second_pass = second_pass.execute() if not user_declarant_ids or not second_pass: obj_ids_to_find = set( chain( *self.declarations.exclude(exclude=True).values_list( "obj_ids", flat=True ) ) ) second_pass = NACPDeclaration.search().query( "bool", must=[ Q("match", general__full_name={"query": q, "operator": "or"}), Q("match", obj_ids=" ".join(list(obj_ids_to_find)[:512])), ], should=[], minimum_should_match=0, )[:100] second_pass = second_pass.execute() Declaration.objects.create_declarations(self, second_pass) @staticmethod def get_flags(aggregated_data): res = [] for f, flag in NACPDeclaration.ENABLED_FLAGS.items(): if str(aggregated_data.get(f, "false")).lower() == "true": res.append( { "flag": f, "text": flag["name"], "description": flag["description"], } ) return res def get_summary(self): result = {"name": self.name, "id": self.pk, "documents": {}} years = {} for d in self.declarations.exclude(doc_type="Форма змін").exclude(exclude=True): if d.year in years: if dt_parse(d.source["infocard"]["created_date"]) > dt_parse( years[d.year].source["infocard"]["created_date"] ): years[d.year] = d else: years[d.year] = d for k in sorted(years.keys()): result["documents"][k] = { "aggregated_data": years[k].source["aggregated_data"], "flags": self.get_flags(years[k].source["aggregated_data"]), "year": k, "infocard": years[k].source["infocard"], } if years: result["min_year"] = min(years.keys()) result["max_year"] = max(years.keys()) return result def get_nodes(self): language = get_language() persons = set() companies = set() name = self.name if language == "en": name = translit(name) for d in self.declarations.exclude(doc_type="Форма змін").exclude(exclude=True): persons |= set(d.source["related_entities"]["people"]["family"]) companies |= set(d.source["related_entities"]["companies"]["owned"]) companies |= set(d.source["related_entities"]["companies"]["related"]) nodes = [{"data": {"id": "root", "label": name}, "classes": ["root", "person"]}] edges = [] for p in persons: id_ = hashlib.sha256(p.encode("utf-8")).hexdigest() if language == "en": p = translit(p) nodes.append({"data": {"id": id_, "label": p}, "classes": ["person"]}) edges.append({"data": {"source": "root", "target": id_}}) for c in companies: id_ = hashlib.sha256(c.encode("utf-8")).hexdigest() nodes.append({"data": {"id": id_, "label": c}, "classes": ["company"]}) edges.append({"data": {"source": "root", "target": id_}}) return {"nodes": nodes, "edges": edges} class Meta: verbose_name = "Фокус-персона" verbose_name_plural = "Фокус-персони" class Declaration(models.Model): person = models.ForeignKey( "Person", verbose_name="Персона", related_name="declarations", on_delete=models.CASCADE, ) declaration_id = models.CharField("Ідентифікатор декларації", max_length=60) user_declarant_id = models.IntegerField( "Ідентифікатор декларанта", null=True, default=None ) year = models.IntegerField("Рік подання декларації") corrected = models.BooleanField("Уточнена декларація") exclude = models.BooleanField("Ігнорувати цей документ", default=False) doc_type = models.CharField("Тип документу", max_length=50) source = JSONField("Машиночитний вміст", default=dict, encoder=DjangoJSONEncoder) obj_ids = ArrayField( models.CharField(max_length=50), verbose_name="Ідентифікатори з декларації", default=list, ) objects = DeclarationsManager() class Meta: verbose_name = "Декларація фокус-персони" verbose_name_plural = "Декларація фокус-персони" index_together = [["year", "corrected", "doc_type", "exclude"]] unique_together = [["person", "declaration_id"]] ordering = ["-year", "-corrected"]
Numerous predinical and dinical studies have shown a correlation between the consumption of moderate amounts of red wine and a reduced risk of cardiovascular complications associated with atherosderosis. Both polyphenoliccomponents and ethanol are responsible for the apparent protectiveeffects of red wine, as they influence different biochemical and cellular processes and thus affect the development and progression of atherosderosis. The polyphenolic compounds of red wine reduce the endothelial dysfunction and thus improve the endothelial function, prevent the oxidation oflow-density lipoproteins (LDL), attenuate proliferation and migration of smooth musde cells, inhibit platelet aggregation and adhesion and also reduce the serum concentration of inflammatory mediators. Ethanol, similarly to polyphenolic compounds of red wine, inhibits platelet aggregation and adhesion, but also increases the levels of high-density lipoproteins (HDL). The present paper describes the main pharmacologically active compounds of redwine and their impact on various processes in the progression and development of atherosderosis.
""" Django settings for nusa project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'lxg(cfz*_vxmt0%!+vbinb^)0l_t5k_&kvq2*oq9^^al-tt-+t' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # The Django sites framework is required 'django.contrib.sites', 'allauth', 'allauth.account', 'allauth.socialaccount', # ... include the providers you want to enable: #'allauth.socialaccount.providers.amazon', #'allauth.socialaccount.providers.angellist', #'allauth.socialaccount.providers.bitbucket', #'allauth.socialaccount.providers.bitly', #'allauth.socialaccount.providers.coinbase', #'allauth.socialaccount.providers.dropbox', 'allauth.socialaccount.providers.facebook', #'allauth.socialaccount.providers.flickr', #'allauth.socialaccount.providers.feedly', #'allauth.socialaccount.providers.github', #'allauth.socialaccount.providers.google', #'allauth.socialaccount.providers.hubic', #'allauth.socialaccount.providers.instagram', #'allauth.socialaccount.providers.linkedin', #'allauth.socialaccount.providers.linkedin_oauth2', #'allauth.socialaccount.providers.openid', #'allauth.socialaccount.providers.persona', #'allauth.socialaccount.providers.soundcloud', #'allauth.socialaccount.providers.stackexchange', #'allauth.socialaccount.providers.tumblr', #'allauth.socialaccount.providers.twitch', #'allauth.socialaccount.providers.twitter', #'allauth.socialaccount.providers.vimeo', #'allauth.socialaccount.providers.vk', #'allauth.socialaccount.providers.weibo', #'allauth.socialaccount.providers.xing', 'elearning', ) SITE_ID = 1 MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) TEMPLATE_CONTEXT_PROCESSORS = ( # Required by allauth template tags "django.core.context_processors.request", # allauth specific context processors "allauth.account.context_processors.account", "allauth.socialaccount.context_processors.socialaccount", 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.media', ) AUTHENTICATION_BACKENDS = ( # Needed to login by username in Django admin, regardless of `allauth` "django.contrib.auth.backends.ModelBackend", # `allauth` specific authentication methods, such as login by e-mail "allauth.account.auth_backends.AuthenticationBackend", ) ROOT_URLCONF = 'nusa.urls' WSGI_APPLICATION = 'nusa.wsgi.application' # Database # https://docs.djangoproject.com/en/dev/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/dev/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/dev/howto/static-files/ STATIC_URL = '/static/' MEDIA_ROOT = 'D:/django/elearning/elearning/media/' MEDIA_URL = '/media/' #setting auth ACCOUNT_AUTHENTICATION_METHOD = "username" ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_EMAIL_VERIFICATION = "optional" ACCOUNT_EMAIL_SUBJECT_PREFIX = "[q4ts]" ACCOUNT_PASSWORD_MIN_LENGTH = 6
Telma Engineering Srl is a company (Engineering Service Bureau) leader in the industry and specializes in the design of printed circuit design of any level, which is mainly for those who design, use and / or manufactures electronics boards. It can perform the service in quick times without detracting from the quality and compliance with existing international standards. The continuing confrontation with the most diverse areas of electronics, and the continuous investment in technology, have enabled the company to grow steadily both in professionalism and in economic strength, not presenting itself as a supplier, but as a valuable partner to customers and demanding more qualified.
# -*- coding: utf-8 -*- from datetime import datetime from sklearn.neighbors import DistanceMetric from django.utils.timezone import utc from meteography.neighbors import NearestNeighbors from meteography.django.broadcaster.models import Prediction from meteography.django.broadcaster.storage import webcam_fs def make_prediction(webcam, params, timestamp): """ Make a prediction using NearestNeighbors algorithm. Parameters ---------- webcam : Webcam instance The source of pictures params : PredictionParams instance The parameters to use to compute the prediction timestamp : int The Unix-Epoch-timestamp (UTC) of when the prediction is made Return ------ Prediction instance """ cam_id = webcam.webcam_id result = None with webcam_fs.get_dataset(cam_id) as dataset: ex_set = dataset.get_set(params.name) new_input = dataset.make_input(ex_set, timestamp) if new_input is not None and len(ex_set.input) > 0: neighbors = NearestNeighbors() neighbors.fit(ex_set.input) output_ref = neighbors.predict(new_input) output = dataset.output_img(ex_set, output_ref) # FIXME reference existing image (data and file) imgpath = webcam_fs.prediction_path(cam_id, params.name, timestamp) result = Prediction(params=params, path=imgpath) result.comp_date = datetime.fromtimestamp(timestamp, utc) result.sci_bytes = output result.create() return result def update_prediction(prediction, real_pic, metric_name='euclidean'): """ Update a prediction after receiving the actual picture from the webcam. Parameters ---------- prediction : Prediction The model object of the prediction to update real_pic : Picture The model object of the actual picture received Return ------ float : the prediction error """ pred_pic = prediction.as_picture() cam_id = prediction.params.webcam.webcam_id if metric_name == 'wminkowski-pca': with webcam_fs.get_dataset(cam_id) as dataset: if 'pca' not in dataset.imgset.feature_sets: raise ValueError("""wminkowski-pca cannnot be used without a PCA feature set""") pca_extractor = dataset.imgset.feature_sets['pca'].extractor weights = pca_extractor.pca.explained_variance_ratio_ pred_data = pca_extractor.extract(pred_pic.pixels) real_data = pca_extractor.extract(real_pic.pixels) metric = DistanceMetric.get_metric('wminkowski', p=2, w=weights) else: pred_data = pred_pic.pixels real_data = real_pic.pixels metric = DistanceMetric.get_metric(metric_name) error = metric.pairwise([pred_data], [real_data])[0] prediction.error = error prediction.save() return error
How to play the revitalised Secret Hunter in the Rise of Shadows expansion. Our Secret Hunter deck list guide features the best Rise of Shadows deck list for Hearthstone (April 2019). Our Secret Hunter guide also contains Mulligan advice, card combos and strategy tips. Secret Hunter is a Hearthstone deck archetype that stormed its way into the metagame following the release of the Karazhan Adventure way back when, and has varied in popularity ever since. While Hunters have always relied heavily on their collection of Secrets to climb the ladder consistently, this particular deck is absolutely stuffed to the brim with these sorts of spells. In our Secret Hunter guide we've got the most powerful version of the deck you can play in Rise of Shadows right now as it tries to establish itself in the new meta. We've also got an overview of the strategy involved, a look at navigating the Mulligan phase correctly, and a breakdown of every combo that exists in the deck. If the deck continues to bound up the tier list we'll keep updating the deck list, and will also expand on all areas of the guide, so that you have the only resource you need for playing it right here! This is the strongest version of Secret Hunter that we're aware of for the current meta. We'll continue updating this over time though, so check back regularly for updates. Secret Hunter is a deck chock full of, er, Secrets, which allow you to keep control over your opponent in the early game. All of these Secrets work to damage and disrupt your opponent’s game plan, either directly through their effects or indirectly by forcing them to make nonoptimal plays in order to play around them. The deck recently got a big bump in power with Subject 9 from the Boomsday expansion. This not only gives you a more consistent way to get to your Secrets, but also provides you with a lot of value by thinning out your deck. Meanwhile, Rastakhan’s Rumble added new hero card Zul'jin. This powerful card repeats all spells you’ve played during the game – including all those Secrets once again! Early game: Use your Secrets to control the early game, choosing which ones to play depending on the type of deck you’re up against. Snipe is a safe choice either way, but you’ll want to prioritise Explosive Trap or Rat Trap against aggro and Freezing Trap if you’re facing control. Ultimately, though, whatever you can do to disrupt their early turns is considered a success. Mid game: Some of your most impactful cards can come down in the mid game. Subject 9 can draw up to five different Secrets from your deck, and considering how many you run here this is bound to get some good value. You also have many very strong removal tools for this stage of the game. Anything your opponent drops can be swiftly batted away by Marked Shot, Wing Blast and Baited Arrow. Try to do what you can to trigger the Overkill effect on the latter for the tempo advantage. Late game: With such a strong mid game you may have already won by this point. Just continue pushing through damage with whichever cards from above you haven’t played yet. Vereesa Windrunner is an interesting new legendary that equips you with Thori'dal, the Stars' Fury when played. This weapon’s damage – and bonus Spell Damage it provides – can be a big boost to your burst finishers like Kill Command. If that doesn’t work you can force your opponent to deal with all of your Secrets again by playing Zul'jin, which gives the deck even more late game reach. It’ll also replay any copies of cards like Unleash the Beast or Animal Companion, giving you a significant board for your opponent to try and deal with once again. 1. Secrets such as Explosive Trap and Rat Trap are perfect for slowing down their early aggression. 2. If they’re sneaking out into the lead just wait for the right time to play Unleash the Hounds and you can wipe out a wide board fairly quickly. 3. Kill Command is best saved for burst damage to finish them off, although it can be used to clear minions in a pinch. 4. Wing Blast is the better minion removal tool though, especially if you’ve manage to discount its cost to one and set yourself up for a big tempo play. 5 If the match is going even later, Unleash the Beast is another perfect catch up card as the Rush mechanic will allow you to trade away one of your opponent’s minions immediately. 1. As with aggro, disrupt their early turns with Secrets. Freezing Trap is particularly good at forcing a single powerful minion back into their hand, while Snipe can kill or take a chunk of health off bigger creatures. 2. The deck runs two copies of Hunter's Mark which are perfect from bringing some of the control deck’s biggest threats down to size. 3. Try to save Kill Command for some surprise burst damage, as if you just use it freely there’s a good chance they’ll be able to heal or Armor up to negate the effect. 4. There’s a greater chance you’ll need Zul'jin to finish out the game against control, so prepare a big pool of spells ready to be recast as well. 1. Animal Companion: Gets you onto the board with a decent minion two times out of three and an OK one every one time. 2. Snipe: Kills most other minions around this level and can put the momentum of the match in your favour. 3. Rat Trap: A better hold against aggro as they’re likely to play this many cards in one turn so early. 4. Subject 9: As it’s such a powerful card in the deck keeping this midgame drop isn’t too silly, plus it’ll fill your hand with Secrets to play. If you want to learn the ways of Secret Hunter then you’ll want to be well aware of these important combos and synergies in the deck. - Hunter's Mark reduces the Health of a target to one, which is easily dealt with by a quick Rapid Fire spell, for example. - Think about when your opponent might be at a point where they can play three cards in a turn to activate Rat Trap. Aggro decks will be able to do this much earlier, whereas that’s less likely against Control. - Any time a friendly Beast dies, however small the victim, your Scavenging Hyena will gain +2 / +1 stats. That makes it a wonderful pairing with Unleash the Hounds. - Try to use Wing Blast after another minion has died on the same turn. Having its cost reduced to one is a huge bonus that also give you room for a strong tempo play on the same turn. - If you've any Beasts on the board, then your Kill Command damage value increases from three points to five. - In order to trigger the Overkill effect on Baited Arrow, the minion you target the spell with needs to have two or fewer Health. - Subject 9 is great for pulling any remaining spells out of your deck and putting them into your hand. This then allows you to keep your Secret train rolling on. - Zul'jin will recast every spell you’ve played throughout the game when he enters the battlefield, so make sure you have enough space for all the Secrets and minions that will hit the board. Explosive Trap: Perfect for dealing with early game aggression: your opponent will be forced to find a way around it, or sacrifice the small minions they already have on board. Freezing Trap: Some more early game delay. If this triggers on the right minion you can seriously disrupt an opponent’s game plan. Rat Trap: More effective against aggro decks that are more likely to be able to afford playing three cards in a single turn. Snipe: Can usually kill off an early drop without issue though some players will be clever enough to avoid it. Marked Shot: Four mana for four damage is about as baseline as you can get, but the extra spell it generates can also be hugely valuable and it pairs well with Zul'jin. Subject 9: Another card that synergises so well with all the Secrets in the deck. You should get a lot of value from the draw effect, but watch your hand size when you play it. Unleash the Beast: A good spell that you’ll want to see activated again with Zul'jin. Vereesa Windrunner: Hard to call this a vital part of the deck, especially in terms of raw stats, but the weapon she provides does bring a substantial Spell Damage bonus that can help you see off a game. Perhaps you can consider a Savannah Highmane in her place if needed. Zul'jin: The new Rastakhan legendary hero card fits elegantly into Secret Hunter as a way to replay all of the Secrets and other spells you’ve cast throughout a match, for a slightly crazy but hugely valuable turn ten play. I've taken out the two Bloodscalps and added The Marsh Queen (hunter quest) and Halazzi. Mulligan the quest (and Halazzi if necessary) into the deck and then save them once drawb. If you're approaching fatigue, empty your hand, drop the quest and and follow with Halazzi. You have 7 1-cost minions and can play them off, follow up with Carnassa and boom, 15 more cards in your deck (and an 8/8 on the board). Gives awesome late game value. Hi guys, this deck list is now fully updated for the Frozen Throne launch. All comments above this one related to an early version of the deck. @Redhawk511 Whoops you are correct, editing in now. In the deck list, you list Explosive Shot (a 5 cost card) in the second position when I believe you intended to include the 2 cost Explosive Trap. @assassin977 Squire! Sorry about that it's fixed now. @assassin977 Do you mean Horserider? To be honest, this deck looks more and more like a concede hunter deck. Unless you draw you essential parts - especially against aggro - you have a lot of dead turns. The drawing part goes for a lot of decks, but especially in this, if you don't have bow, the secrets you need (explosive against aggro) or any Huntresses, you're pretty much dead by turn 6-8. That's my experience at least. Maybe I've drawn like an idiot, but I don't feel like my win is slipping by this easily in other decks. That being said, if you draw like a god, you will win pretty easily, but again, that goes for all decks. @Bedders haha nah, semantics. This whole article was great. In terms of current meta? This build is definately new. @Bedders@Allendroth Thanks for your messages. What I don't like about the recent CoW nerf is that you can't play almost anything in addition of CoW because the 9 mana cost (I mean no traps, no quick shot, etc, even no hero power). So Tracking could become an essential card in hunter decks to choose your next turn card after CoW. @Lokojet Oh and in terms of the nerfs I've just seen these and will cover on the site now. I won't rush to make any changes to the guides though, and will instead let better players than me work this one out first! @Lokojet I think Tracking you look for what you need to make your hand work. If it's a straight Turn 1 play though I would take Cloaked Huntress over just about anything else, but I think there are too many variables to go much deeper than that. @Allendroth Poor choice of words on my part I think. I tend to refer to things in terms of the generally accepted state of the current metagame. I know it's been growing in popularity in deck rankings for a few weeks now, so I suppose I mean it's a relatively new thing to be aware of/play competitively. Thanks for outlining some alternative deck choices too! Theres no way to say this without sounding snoody BUT "Secret" hunter is not new. Far from it. The Trap Hunter archetype has been staring the meta game in the face since blackrock. I have been getting rank 4 or better with minimal effort for well over a year. Players look at hunter as a damage every turn kind of class but it is in fact an incredible control class. The hero power is so effective in this build because even on turns spent setting up control you can deal two damage. This build listed above however is a bit generic in its approach. The Secretkeeper and the Cloaked Huntress are not needed. (I know, sounds crazy right???) and Snipe isnt reliable even if you know the meta. Barnes works great with the Highmanes but to get the most value from him you need to have ONLY the best, NON-battlecry drops in the deck to pull like Ragnaros and Shaarj, Rage Unbound. So I would drop The Curator; why chance pulling a 1/1 taunt with Barnes? Hat Trick works fine as a tech card if Freeze Mage is clogging the ladder but overall its not a great trap for control. Unleash the hounds is a must here and consider snake trap as an early game set up for Misha. More often than not, youll have Loekk to thank for some serious snake and hound damage. Lastly, the Azure Drake doesnt play well here either. The 5 mana slot is heavy, you need those turns for selective removal spells. Drop the Tracking and put in an Explosive Shot for board clear. Trust that Call of the Wild, Ragnaros and Highmanes are enough to finish your opponent. But thank you for covering this topic! Im obviously far too passionate about it LOL! Im gonna go get a life now. What would you suggest for Tracking? I mean priority order? In addition, is the best decision play Tracking in first turns? One more, with the recent nerf, still 2 x Call of the Wild?
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './acq4/util/ColorMapper/CMTemplate.ui' # # Created: Tue Dec 24 01:49:16 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) class Ui_Form(object): def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(264, 249) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setMargin(0) self.gridLayout.setHorizontalSpacing(0) self.gridLayout.setVerticalSpacing(1) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.label = QtGui.QLabel(Form) self.label.setObjectName(_fromUtf8("label")) self.horizontalLayout.addWidget(self.label) self.fileCombo = QtGui.QComboBox(Form) self.fileCombo.setEditable(True) self.fileCombo.setMaxVisibleItems(20) self.fileCombo.setObjectName(_fromUtf8("fileCombo")) self.horizontalLayout.addWidget(self.fileCombo) self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 3) self.saveBtn = FeedbackButton(Form) self.saveBtn.setObjectName(_fromUtf8("saveBtn")) self.gridLayout.addWidget(self.saveBtn, 1, 0, 1, 1) self.saveAsBtn = FeedbackButton(Form) self.saveAsBtn.setObjectName(_fromUtf8("saveAsBtn")) self.gridLayout.addWidget(self.saveAsBtn, 1, 1, 1, 1) self.deleteBtn = FeedbackButton(Form) self.deleteBtn.setObjectName(_fromUtf8("deleteBtn")) self.gridLayout.addWidget(self.deleteBtn, 1, 2, 1, 1) self.tree = TreeWidget(Form) self.tree.setRootIsDecorated(False) self.tree.setObjectName(_fromUtf8("tree")) self.gridLayout.addWidget(self.tree, 2, 0, 1, 3) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): Form.setWindowTitle(_translate("Form", "Form", None)) self.label.setText(_translate("Form", "Color Scheme:", None)) self.saveBtn.setText(_translate("Form", "Save", None)) self.saveAsBtn.setText(_translate("Form", "Save As..", None)) self.deleteBtn.setText(_translate("Form", "Delete", None)) self.tree.headerItem().setText(0, _translate("Form", "arg", None)) self.tree.headerItem().setText(1, _translate("Form", "op", None)) self.tree.headerItem().setText(2, _translate("Form", "min", None)) self.tree.headerItem().setText(3, _translate("Form", "max", None)) self.tree.headerItem().setText(4, _translate("Form", "colors", None)) self.tree.headerItem().setText(5, _translate("Form", "remove", None)) from acq4.pyqtgraph import FeedbackButton, TreeWidget
WIND TUNNELS: As greater restrictions are placed on wind tunnel and CFD work in Formula 1, teams are devising clever new ways to make their aerodynamic test programs more efficient and insightful. INDYCAR AERO DEVELOPMENT: The addition of Chevrolet and Honda’s aero kits may have improved the DW12’s performance, but what have they done for safety and for the spectacle of IndyCar racing? STADIUM SUPER TRUCKS: Three seasons in, Robby Gordon’s Stadium Super Trucks – the series where Supercross meets Monster Jam – is set for expansion into new markets. We investigate Gordon’s off-road formula for success.
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # 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. import uuid from nova import exception from nova import test from nova import utils from nova.tests import utils as test_utils from nova.openstack.common import processutils from novadocker.virt.docker import network import mock class NetworkTestCase(test.NoDBTestCase): @mock.patch.object(utils, 'execute') def test_teardown_delete_network(self, utils_mock): id = "second-id" utils_mock.return_value = ("first-id\nsecond-id\nthird-id\n", None) network.teardown_network(id) utils_mock.assert_called_with('ip', 'netns', 'delete', id, run_as_root=True) @mock.patch.object(utils, 'execute') def test_teardown_network_not_in_list(self, utils_mock): utils_mock.return_value = ("first-id\nsecond-id\nthird-id\n", None) network.teardown_network("not-in-list") utils_mock.assert_called_with('ip', '-o', 'netns', 'list') @mock.patch.object(network, 'LOG') @mock.patch.object(utils, 'execute', side_effect=processutils.ProcessExecutionError) def test_teardown_network_fails(self, utils_mock, log_mock): # Call fails but method should not fail. # Error will be caught and logged. utils_mock.return_value = ("first-id\nsecond-id\nthird-id\n", None) id = "third-id" network.teardown_network(id) log_mock.warning.assert_called_with(mock.ANY, id) def test_find_gateway(self): instance = {'uuid': uuid.uuid4()} network_info = test_utils.get_test_network_info() first_net = network_info[0]['network'] first_net['subnets'][0]['gateway']['address'] = '10.0.0.1' self.assertEqual('10.0.0.1', network.find_gateway(instance, first_net)) def test_cannot_find_gateway(self): instance = {'uuid': uuid.uuid4()} network_info = test_utils.get_test_network_info() first_net = network_info[0]['network'] first_net['subnets'] = [] self.assertRaises(exception.InstanceDeployFailure, network.find_gateway, instance, first_net) def test_find_fixed_ip(self): instance = {'uuid': uuid.uuid4()} network_info = test_utils.get_test_network_info() first_net = network_info[0]['network'] first_net['subnets'][0]['cidr'] = '10.0.0.0/24' first_net['subnets'][0]['ips'][0]['type'] = 'fixed' first_net['subnets'][0]['ips'][0]['address'] = '10.0.1.13' self.assertEqual('10.0.1.13/24', network.find_fixed_ip(instance, first_net)) def test_cannot_find_fixed_ip(self): instance = {'uuid': uuid.uuid4()} network_info = test_utils.get_test_network_info() first_net = network_info[0]['network'] first_net['subnets'] = [] self.assertRaises(exception.InstanceDeployFailure, network.find_fixed_ip, instance, first_net)
The fact that He stands as Son of God and of Man, healed the sick and raised the dead, was even worse blasphemy to their ears than they could comprehend. He had to leave for His purpose on earth to be completed. So dear friend, stand strong. Do not be moved by words of discouragement. Be strong.
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [email protected], All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/llnl/spack # Please also see the NOTICE and LICENSE files for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as # published by the Free Software Foundation) version 2.1, February 1999. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and # conditions of the GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * class Mrbayes(AutotoolsPackage): """MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. MrBayes uses Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.""" homepage = "http://mrbayes.sourceforge.net" url = "https://downloads.sourceforge.net/project/mrbayes/mrbayes/3.2.6/mrbayes-3.2.6.tar.gz" version('3.2.6', '95f9822f24be47b976bf87540b55d1fe') variant('mpi', default=True, description='Enable MPI parallel support') variant('beagle', default=True, description='Enable BEAGLE library for speed benefits') variant('sse', default=True, description='Enable SSE in order to substantially speed up execution') depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') depends_on('m4', type='build') depends_on('libbeagle', when='+beagle') depends_on('mpi', when='+mpi') configure_directory = 'src' def configure_args(self): args = [] if '~beagle' in self.spec: args.append('--with-beagle=no') else: args.append('--with-beagle=%s' % self.spec['libbeagle'].prefix) if '~sse' in self.spec: args.append('--enable-sse=no') else: args.append('--enable-sse=yes') if '~mpi' in self.spec: args.append('--enable-mpi=no') else: args.append('--enable-mpi=yes') return args def install(self, spec, prefix): mkdirp(prefix.bin) with working_dir('src'): install('mb', prefix.bin)
This favorite holiday event features a visit from Santa Claus, holiday music and Christmas carols, cookies, and hot chocolate. The Jackson Hole Chamber of Commerce is pleased to present the Annual Town Square Lighting Ceremony on Friday, November 23rd from 5:00 P.M. -7:00 P.M. on Jackson's Town Square. Witness a breathtaking evening as thousands of LED bulbs bring the famous Antler Arches to life. This favorite holiday event features a visit from Santa Claus, holiday music and carols provided by the Jackson Hole Community Band and Jackson Hole Chorale, and cookies and hot chocolate provided by Albertsons, Smiths, and McDonald’s. The traditional schedule of events features the official lighting at 5:30 P.M., followed by Santa with help from the Jackson Hole Fire & EMS and Police Department until 7:00 P.M. The Town Square Lighting is a kickoff to Winter Windfall, a new annual campaign to promote local holiday shopping within the business community, giving participants the opportunity to win big. Learn more about the program, prizes, and participating businesses. Don’t forget, Saturday November 22nd is Small Business Saturday so make sure to shop and take advantage of the Chamber’s new shopping contest! Calling Volunteers: Would you like to be an elf? Helpers will be needed beginning at 3:15pm for setup prior to the event and to for crowd control during the event. Friends and families are invited to participate together! For more information, please contact Caitlin Colby, Special Events Manager,[email protected] or 307.201.2309.
# coding: utf-8 """ ApivApi.py 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 sys import os # python 2 and python 3 compatibility library from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class ApivApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient() self.api_client = config.api_client def get_api_resources(self, **kwargs): """ get available resources This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_api_resources(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: None If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_api_resources" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json', 'application/yaml']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type=None, auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_component_status(self, **kwargs): """ list objects of kind ComponentStatus This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_component_status(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ComponentStatusList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_component_status" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/componentstatuses'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ComponentStatusList', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_component_status(self, name, **kwargs): """ read the specified ComponentStatus This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_component_status(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the ComponentStatus (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ComponentStatus If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_component_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_component_status`") resource_path = '/api/v1/componentstatuses/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ComponentStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def list_endpoints(self, **kwargs): """ list or watch objects of kind Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_endpoints(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1EndpointsList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_endpoints" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/endpoints'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1EndpointsList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_event(self, **kwargs): """ list or watch objects of kind Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_event(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1EventList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_event" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/events'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1EventList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_limit_range(self, **kwargs): """ list or watch objects of kind LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_limit_range(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1LimitRangeList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_limit_range" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/limitranges'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRangeList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_namespace(self, **kwargs): """ list or watch objects of kind Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_namespace(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1NamespaceList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_namespace" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/namespaces'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1NamespaceList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_namespace(self, body, **kwargs): """ create a Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_namespace(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Namespace body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_namespace`") resource_path = '/api/v1/namespaces'.replace('{format}', 'json') method = 'POST' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_namespace(self, **kwargs): """ delete collection of Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_namespace(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_namespace" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/namespaces'.replace('{format}', 'json') method = 'DELETE' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_binding(self, body, namespace, **kwargs): """ create a Binding This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_binding(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Binding body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Binding If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_binding" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_binding`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_binding`") resource_path = '/api/v1/namespaces/{namespace}/bindings'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Binding', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_endpoints(self, namespace, **kwargs): """ list or watch objects of kind Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_endpoints(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1EndpointsList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1EndpointsList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_endpoints(self, body, namespace, **kwargs): """ create a Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_endpoints(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Endpoints body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Endpoints If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_endpoints`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Endpoints', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_endpoints(self, namespace, **kwargs): """ delete collection of Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_endpoints(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_endpoints(self, namespace, name, **kwargs): """ read the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_endpoints(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Endpoints (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Endpoints If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_endpoints`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Endpoints', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_endpoints(self, body, namespace, name, **kwargs): """ replace the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_endpoints(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Endpoints body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Endpoints (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Endpoints If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoints`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_endpoints`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Endpoints', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_endpoints(self, body, namespace, name, **kwargs): """ delete a Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_endpoints(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Endpoints (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_endpoints`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_endpoints`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_endpoints(self, body, namespace, name, **kwargs): """ partially update the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_endpoints(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Endpoints (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Endpoints If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoints`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_endpoints`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_endpoints`") resource_path = '/api/v1/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Endpoints', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_event(self, namespace, **kwargs): """ list or watch objects of kind Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_event(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1EventList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1EventList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_event(self, body, namespace, **kwargs): """ create a Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_event(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Event body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Event If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_event`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Event', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_event(self, namespace, **kwargs): """ delete collection of Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_event(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_event(self, namespace, name, **kwargs): """ read the specified Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_event(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Event (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Event If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_event`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Event', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_event(self, body, namespace, name, **kwargs): """ replace the specified Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_event(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Event body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Event (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Event If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_event`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_event`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Event', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_event(self, body, namespace, name, **kwargs): """ delete a Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_event(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Event (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_event`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_event`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_event(self, body, namespace, name, **kwargs): """ partially update the specified Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_event(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Event (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Event If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_event`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_event`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_event`") resource_path = '/api/v1/namespaces/{namespace}/events/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Event', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_limit_range(self, namespace, **kwargs): """ list or watch objects of kind LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_limit_range(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1LimitRangeList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRangeList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_limit_range(self, body, namespace, **kwargs): """ create a LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_limit_range(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1LimitRange body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1LimitRange If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_limit_range`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRange', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_limit_range(self, namespace, **kwargs): """ delete collection of LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_limit_range(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_limit_range(self, namespace, name, **kwargs): """ read the specified LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_limit_range(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the LimitRange (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1LimitRange If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_limit_range`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRange', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_limit_range(self, body, namespace, name, **kwargs): """ replace the specified LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_limit_range(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1LimitRange body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the LimitRange (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1LimitRange If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_limit_range`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_limit_range`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRange', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_limit_range(self, body, namespace, name, **kwargs): """ delete a LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_limit_range(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the LimitRange (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_limit_range`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_limit_range`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_limit_range(self, body, namespace, name, **kwargs): """ partially update the specified LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_limit_range(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the LimitRange (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1LimitRange If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_limit_range`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_limit_range`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_limit_range`") resource_path = '/api/v1/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1LimitRange', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_persistent_volume_claim(self, namespace, **kwargs): """ list or watch objects of kind PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_persistent_volume_claim(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PersistentVolumeClaimList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaimList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_persistent_volume_claim(self, body, namespace, **kwargs): """ create a PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_persistent_volume_claim(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolumeClaim body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolumeClaim If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_persistent_volume_claim`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaim', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_persistent_volume_claim(self, namespace, **kwargs): """ delete collection of PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_persistent_volume_claim(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_persistent_volume_claim(self, namespace, name, **kwargs): """ read the specified PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_persistent_volume_claim(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1PersistentVolumeClaim If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_persistent_volume_claim`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaim', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_persistent_volume_claim(self, body, namespace, name, **kwargs): """ replace the specified PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_persistent_volume_claim(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolumeClaim body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolumeClaim If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaim', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_persistent_volume_claim(self, body, namespace, name, **kwargs): """ delete a PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_persistent_volume_claim(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_persistent_volume_claim`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_persistent_volume_claim`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_persistent_volume_claim(self, body, namespace, name, **kwargs): """ partially update the specified PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_persistent_volume_claim(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolumeClaim If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_persistent_volume_claim`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume_claim`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaim', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_persistent_volume_claim_status(self, body, namespace, name, **kwargs): """ replace status of the specified PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_persistent_volume_claim_status(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolumeClaim body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolumeClaim If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_persistent_volume_claim_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim_status`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim_status`") resource_path = '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaim', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_pod(self, namespace, **kwargs): """ list or watch objects of kind Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_pod(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PodList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_pod(self, body, namespace, **kwargs): """ create a Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_pod(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Pod body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_pod`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_pod(self, namespace, **kwargs): """ delete collection of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_pod(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_pod(self, namespace, name, **kwargs): """ read the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_pod(self, body, namespace, name, **kwargs): """ replace the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_pod(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Pod body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_pod(self, body, namespace, name, **kwargs): """ delete a Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_pod(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_pod`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_pod(self, body, namespace, name, **kwargs): """ partially update the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_pod(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_pod`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_pod`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_get_namespaced_pod_attach(self, namespace, name, **kwargs): """ connect GET requests to attach of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_get_namespaced_pod_attach(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'stdin', 'stdout', 'stderr', 'tty', 'container'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_get_namespaced_pod_attach" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_attach`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_attach`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/attach'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'stdin' in params: query_params['stdin'] = params['stdin'] if 'stdout' in params: query_params['stdout'] = params['stdout'] if 'stderr' in params: query_params['stderr'] = params['stderr'] if 'tty' in params: query_params['tty'] = params['tty'] if 'container' in params: query_params['container'] = params['container'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_post_namespaced_pod_attach(self, namespace, name, **kwargs): """ connect POST requests to attach of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_post_namespaced_pod_attach(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'stdin', 'stdout', 'stderr', 'tty', 'container'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_post_namespaced_pod_attach" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_attach`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_attach`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/attach'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'stdin' in params: query_params['stdin'] = params['stdin'] if 'stdout' in params: query_params['stdout'] = params['stdout'] if 'stderr' in params: query_params['stderr'] = params['stderr'] if 'tty' in params: query_params['tty'] = params['tty'] if 'container' in params: query_params['container'] = params['container'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_binding_binding(self, body, namespace, name, **kwargs): """ create binding of a Binding This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_binding_binding(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Binding body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Binding (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Binding If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_binding_binding" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_binding_binding`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_binding_binding`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `create_namespaced_binding_binding`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/binding'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Binding', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_get_namespaced_pod_exec(self, namespace, name, **kwargs): """ connect GET requests to exec of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_get_namespaced_pod_exec(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. :param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true. :param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true. :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. :param str command: Command is the remote command to execute. argv array. Not executed within a shell. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'stdin', 'stdout', 'stderr', 'tty', 'container', 'command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_get_namespaced_pod_exec" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_exec`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_exec`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/exec'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'stdin' in params: query_params['stdin'] = params['stdin'] if 'stdout' in params: query_params['stdout'] = params['stdout'] if 'stderr' in params: query_params['stderr'] = params['stderr'] if 'tty' in params: query_params['tty'] = params['tty'] if 'container' in params: query_params['container'] = params['container'] if 'command' in params: query_params['command'] = params['command'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_post_namespaced_pod_exec(self, namespace, name, **kwargs): """ connect POST requests to exec of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_post_namespaced_pod_exec(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. :param bool stdout: Redirect the standard output stream of the pod for this call. Defaults to true. :param bool stderr: Redirect the standard error stream of the pod for this call. Defaults to true. :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. :param str command: Command is the remote command to execute. argv array. Not executed within a shell. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'stdin', 'stdout', 'stderr', 'tty', 'container', 'command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_post_namespaced_pod_exec" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_exec`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_exec`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/exec'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'stdin' in params: query_params['stdin'] = params['stdin'] if 'stdout' in params: query_params['stdout'] = params['stdout'] if 'stderr' in params: query_params['stderr'] = params['stderr'] if 'tty' in params: query_params['tty'] = params['tty'] if 'container' in params: query_params['container'] = params['container'] if 'command' in params: query_params['command'] = params['command'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_pod_log(self, namespace, name, **kwargs): """ read log of the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_pod_log(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :param str container: The container for which to stream logs. Defaults to only container if there is one container in the pod. :param bool follow: Follow the log stream of the pod. Defaults to false. :param bool previous: Return previous terminated container logs. Defaults to false. :param int since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. :param str since_time: An RFC3339 timestamp from which to show logs. If this value preceeds the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. :param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. :param int tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime :param int limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'container', 'follow', 'previous', 'since_seconds', 'since_time', 'timestamps', 'tail_lines', 'limit_bytes'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_pod_log" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_log`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_pod_log`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/log'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'container' in params: query_params['container'] = params['container'] if 'follow' in params: query_params['follow'] = params['follow'] if 'previous' in params: query_params['previous'] = params['previous'] if 'since_seconds' in params: query_params['sinceSeconds'] = params['since_seconds'] if 'since_time' in params: query_params['sinceTime'] = params['since_time'] if 'timestamps' in params: query_params['timestamps'] = params['timestamps'] if 'tail_lines' in params: query_params['tailLines'] = params['tail_lines'] if 'limit_bytes' in params: query_params['limitBytes'] = params['limit_bytes'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_get_namespaced_pod_portforward(self, namespace, name, **kwargs): """ connect GET requests to portforward of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_get_namespaced_pod_portforward(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_get_namespaced_pod_portforward" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_portforward`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_portforward`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/portforward'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_post_namespaced_pod_portforward(self, namespace, name, **kwargs): """ connect POST requests to portforward of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_post_namespaced_pod_portforward(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_post_namespaced_pod_portforward" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_portforward`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_portforward`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/portforward'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_get_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect GET requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_get_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_get_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_head_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect HEAD requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_head_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_head_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_put_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect PUT requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_put_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_put_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_post_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect POST requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_post_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_post_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_delete_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect DELETE requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_delete_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_delete_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_options_namespaced_pod_proxy(self, namespace, name, **kwargs): """ connect OPTIONS requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_options_namespaced_pod_proxy(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_options_namespaced_pod_proxy" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_get_namespaced_pod_proxy_1(self, namespace, name, path2, **kwargs): """ connect GET requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_get_namespaced_pod_proxy_1(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_get_namespaced_pod_proxy_1" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy_1`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy_1`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_get_namespaced_pod_proxy_1`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_head_namespaced_pod_proxy_2(self, namespace, name, path2, **kwargs): """ connect HEAD requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_head_namespaced_pod_proxy_2(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_head_namespaced_pod_proxy_2" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy_2`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy_2`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_head_namespaced_pod_proxy_2`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_put_namespaced_pod_proxy_3(self, namespace, name, path2, **kwargs): """ connect PUT requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_put_namespaced_pod_proxy_3(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_put_namespaced_pod_proxy_3" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy_3`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy_3`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_put_namespaced_pod_proxy_3`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_post_namespaced_pod_proxy_4(self, namespace, name, path2, **kwargs): """ connect POST requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_post_namespaced_pod_proxy_4(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_post_namespaced_pod_proxy_4" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy_4`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy_4`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_post_namespaced_pod_proxy_4`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_delete_namespaced_pod_proxy_5(self, namespace, name, path2, **kwargs): """ connect DELETE requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_delete_namespaced_pod_proxy_5(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_delete_namespaced_pod_proxy_5" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy_5`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy_5`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_delete_namespaced_pod_proxy_5`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def connect_options_namespaced_pod_proxy_6(self, namespace, name, path2, **kwargs): """ connect OPTIONS requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.connect_options_namespaced_pod_proxy_6(namespace, name, path2, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path2: path to the resource (required) :param str path: Path is the URL path to use for the current proxy request to pod. :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path2', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method connect_options_namespaced_pod_proxy_6" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy_6`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy_6`") # verify the required parameter 'path2' is set if ('path2' not in params) or (params['path2'] is None): raise ValueError("Missing the required parameter `path2` when calling `connect_options_namespaced_pod_proxy_6`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path2' in params: path_params['path'] = params['path2'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_pod_status(self, body, namespace, name, **kwargs): """ replace status of the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_pod_status(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Pod body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Pod If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_pod_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_status`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_status`") resource_path = '/api/v1/namespaces/{namespace}/pods/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Pod', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_pod_template(self, namespace, **kwargs): """ list or watch objects of kind PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_pod_template(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PodTemplateList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplateList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_pod_template(self, body, namespace, **kwargs): """ create a PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_pod_template(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PodTemplate body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PodTemplate If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_pod_template`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplate', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_pod_template(self, namespace, **kwargs): """ delete collection of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_pod_template(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_pod_template(self, namespace, name, **kwargs): """ read the specified PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_pod_template(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PodTemplate (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1PodTemplate If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_template`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplate', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_pod_template(self, body, namespace, name, **kwargs): """ replace the specified PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_pod_template(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PodTemplate body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PodTemplate (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PodTemplate If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_template`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_template`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplate', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_pod_template(self, body, namespace, name, **kwargs): """ delete a PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_pod_template(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PodTemplate (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_pod_template`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_template`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_pod_template(self, body, namespace, name, **kwargs): """ partially update the specified PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_pod_template(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PodTemplate (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PodTemplate If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_template`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_template`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_template`") resource_path = '/api/v1/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplate', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_replication_controller(self, namespace, **kwargs): """ list or watch objects of kind ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_replication_controller(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ReplicationControllerList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationControllerList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_replication_controller(self, body, namespace, **kwargs): """ create a ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_replication_controller(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ReplicationController body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ReplicationController If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_replication_controller`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationController', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_replication_controller(self, namespace, **kwargs): """ delete collection of ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_replication_controller(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_replication_controller(self, namespace, name, **kwargs): """ read the specified ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_replication_controller(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1ReplicationController If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationController', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_replication_controller(self, body, namespace, name, **kwargs): """ replace the specified ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_replication_controller(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ReplicationController body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ReplicationController If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationController', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_replication_controller(self, body, namespace, name, **kwargs): """ delete a ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_replication_controller(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_replication_controller`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_replication_controller`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_replication_controller(self, body, namespace, name, **kwargs): """ partially update the specified ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_replication_controller(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ReplicationController If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationController', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_replication_controller_status(self, body, namespace, name, **kwargs): """ replace status of the specified ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_replication_controller_status(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ReplicationController body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ReplicationController If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_replication_controller_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_status`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller_status`") resource_path = '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationController', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_resource_quota(self, namespace, **kwargs): """ list or watch objects of kind ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_resource_quota(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ResourceQuotaList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuotaList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_resource_quota(self, body, namespace, **kwargs): """ create a ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_resource_quota(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ResourceQuota body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ResourceQuota If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_resource_quota`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuota', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_resource_quota(self, namespace, **kwargs): """ delete collection of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_resource_quota(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_resource_quota(self, namespace, name, **kwargs): """ read the specified ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_resource_quota(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1ResourceQuota If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_quota`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuota', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_resource_quota(self, body, namespace, name, **kwargs): """ replace the specified ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_resource_quota(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ResourceQuota body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ResourceQuota If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuota', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_resource_quota(self, body, namespace, name, **kwargs): """ delete a ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_resource_quota(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_resource_quota`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_quota`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_resource_quota(self, body, namespace, name, **kwargs): """ partially update the specified ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_resource_quota(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ResourceQuota If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_quota`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_quota`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuota', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_resource_quota_status(self, body, namespace, name, **kwargs): """ replace status of the specified ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_resource_quota_status(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ResourceQuota body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ResourceQuota If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_resource_quota_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota_status`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota_status`") resource_path = '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuota', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_secret(self, namespace, **kwargs): """ list or watch objects of kind Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_secret(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1SecretList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1SecretList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_secret(self, body, namespace, **kwargs): """ create a Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_secret(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Secret body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Secret If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_secret`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Secret', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_secret(self, namespace, **kwargs): """ delete collection of Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_secret(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_secret(self, namespace, name, **kwargs): """ read the specified Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_secret(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Secret (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Secret If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_secret`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Secret', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_secret(self, body, namespace, name, **kwargs): """ replace the specified Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_secret(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Secret body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Secret (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Secret If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_secret`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_secret`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Secret', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_secret(self, body, namespace, name, **kwargs): """ delete a Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_secret(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Secret (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_secret`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_secret`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_secret(self, body, namespace, name, **kwargs): """ partially update the specified Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_secret(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Secret (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Secret If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_secret`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_secret`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_secret`") resource_path = '/api/v1/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Secret', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_service_account(self, namespace, **kwargs): """ list or watch objects of kind ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_service_account(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ServiceAccountList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccountList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_service_account(self, body, namespace, **kwargs): """ create a ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_service_account(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ServiceAccount body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ServiceAccount If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_service_account`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccount', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_service_account(self, namespace, **kwargs): """ delete collection of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_service_account(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `deletecollection_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_service_account(self, namespace, name, **kwargs): """ read the specified ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_service_account(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ServiceAccount (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1ServiceAccount If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_service_account`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccount', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_service_account(self, body, namespace, name, **kwargs): """ replace the specified ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_service_account(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1ServiceAccount body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ServiceAccount (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ServiceAccount If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_service_account`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service_account`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccount', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_service_account(self, body, namespace, name, **kwargs): """ delete a ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_service_account(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ServiceAccount (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_service_account`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service_account`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_service_account(self, body, namespace, name, **kwargs): """ partially update the specified ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_service_account(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ServiceAccount (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1ServiceAccount If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_service_account`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service_account`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_service_account`") resource_path = '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccount', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_service(self, namespace, **kwargs): """ list or watch objects of kind Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_service(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ServiceList If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `list_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_service(self, body, namespace, **kwargs): """ create a Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_service(body, namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Service body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Service If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_service`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `create_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Service', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_service(self, namespace, name, **kwargs): """ read the specified Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Service If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `read_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Service', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_service(self, body, namespace, name, **kwargs): """ replace the specified Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_service(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Service body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Service If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_service`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Service', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_service(self, namespace, name, **kwargs): """ delete a Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_service(self, body, namespace, name, **kwargs): """ partially update the specified Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_service(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Service If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_service`") # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_service`") resource_path = '/api/v1/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Service', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_namespace(self, name, **kwargs): """ read the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_namespace(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_namespace`") resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_namespace(self, body, name, **kwargs): """ replace the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_namespace(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Namespace body: (required) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_namespace`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_namespace`") resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_namespace(self, body, name, **kwargs): """ delete a Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_namespace(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_namespace`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_namespace`") resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_namespace(self, body, name, **kwargs): """ partially update the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_namespace(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_namespace`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_namespace`") resource_path = '/api/v1/namespaces/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_namespace_finalize(self, body, name, **kwargs): """ replace finalize of the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_namespace_finalize(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Namespace body: (required) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_namespace_finalize" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_namespace_finalize`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_namespace_finalize`") resource_path = '/api/v1/namespaces/{name}/finalize'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_namespace_status(self, body, name, **kwargs): """ replace status of the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_namespace_status(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Namespace body: (required) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Namespace If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_namespace_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_namespace_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_namespace_status`") resource_path = '/api/v1/namespaces/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Namespace', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_node(self, **kwargs): """ list or watch objects of kind Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_node(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1NodeList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_node" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/nodes'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1NodeList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_node(self, body, **kwargs): """ create a Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_node(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Node body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Node If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_node`") resource_path = '/api/v1/nodes'.replace('{format}', 'json') method = 'POST' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Node', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_node(self, **kwargs): """ delete collection of Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_node(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_node" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/nodes'.replace('{format}', 'json') method = 'DELETE' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_node(self, name, **kwargs): """ read the specified Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1Node If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_node`") resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Node', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_node(self, body, name, **kwargs): """ replace the specified Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_node(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Node body: (required) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Node If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_node`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_node`") resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Node', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_node(self, body, name, **kwargs): """ delete a Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_node(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_node`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_node`") resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_node(self, body, name, **kwargs): """ partially update the specified Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_node(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Node If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_node`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_node`") resource_path = '/api/v1/nodes/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Node', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_node_status(self, body, name, **kwargs): """ replace status of the specified Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_node_status(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1Node body: (required) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1Node If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_node_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_node_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_node_status`") resource_path = '/api/v1/nodes/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1Node', auth_settings=auth_settings, callback=params.get('callback')) return response def list_persistent_volume_claim(self, **kwargs): """ list or watch objects of kind PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_persistent_volume_claim(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PersistentVolumeClaimList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/persistentvolumeclaims'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeClaimList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_namespaced_persistent_volume(self, **kwargs): """ list or watch objects of kind PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_namespaced_persistent_volume(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PersistentVolumeList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/persistentvolumes'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolumeList', auth_settings=auth_settings, callback=params.get('callback')) return response def create_namespaced_persistent_volume(self, body, **kwargs): """ create a PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_namespaced_persistent_volume(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolume body: (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolume If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_namespaced_persistent_volume`") resource_path = '/api/v1/persistentvolumes'.replace('{format}', 'json') method = 'POST' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolume', auth_settings=auth_settings, callback=params.get('callback')) return response def deletecollection_namespaced_persistent_volume(self, **kwargs): """ delete collection of PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.deletecollection_namespaced_persistent_volume(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method deletecollection_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/persistentvolumes'.replace('{format}', 'json') method = 'DELETE' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def read_namespaced_persistent_volume(self, name, **kwargs): """ read the specified PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.read_namespaced_persistent_volume(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :param bool export: Should this value be exported. Export strips fields that a user can not specify. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' :return: V1PersistentVolume If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'export', 'exact'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume`") resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'export' in params: query_params['export'] = params['export'] if 'exact' in params: query_params['exact'] = params['exact'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolume', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_persistent_volume(self, body, name, **kwargs): """ replace the specified PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_persistent_volume(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolume body: (required) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolume If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume`") resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolume', auth_settings=auth_settings, callback=params.get('callback')) return response def delete_namespaced_persistent_volume(self, body, name, **kwargs): """ delete a PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_persistent_volume(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :return: UnversionedStatus If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_namespaced_persistent_volume`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `delete_namespaced_persistent_volume`") resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UnversionedStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def patch_namespaced_persistent_volume(self, body, name, **kwargs): """ partially update the specified PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.patch_namespaced_persistent_volume(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param UnversionedPatch body: (required) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolume If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method patch_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume`") resource_path = '/api/v1/persistentvolumes/{name}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolume', auth_settings=auth_settings, callback=params.get('callback')) return response def replace_namespaced_persistent_volume_status(self, body, name, **kwargs): """ replace status of the specified PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.replace_namespaced_persistent_volume_status(body, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1PersistentVolume body: (required) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :return: V1PersistentVolume If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'name', 'pretty'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method replace_namespaced_persistent_volume_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_status`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_status`") resource_path = '/api/v1/persistentvolumes/{name}/status'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PersistentVolume', auth_settings=auth_settings, callback=params.get('callback')) return response def list_pod(self, **kwargs): """ list or watch objects of kind Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_pod(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PodList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_pod" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/pods'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_pod_template(self, **kwargs): """ list or watch objects of kind PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_pod_template(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1PodTemplateList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_pod_template" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/podtemplates'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1PodTemplateList', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_pod(self, namespace, name, **kwargs): """ proxy GET requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_get_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_pod(self, namespace, name, **kwargs): """ proxy HEAD requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_head_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_pod(self, namespace, name, **kwargs): """ proxy PUT requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_put_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_pod(self, namespace, name, **kwargs): """ proxy POST requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_post_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_pod(self, namespace, name, **kwargs): """ proxy DELETE requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_delete_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_pod(self, namespace, name, **kwargs): """ proxy OPTIONS requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_options_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_pod`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_pod_7(self, namespace, name, path, **kwargs): """ proxy GET requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_pod_7(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_pod_7" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_get_namespaced_pod_7`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_pod_7`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_get_namespaced_pod_7`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_pod_8(self, namespace, name, path, **kwargs): """ proxy HEAD requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_pod_8(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_pod_8" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_head_namespaced_pod_8`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_pod_8`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_head_namespaced_pod_8`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_pod_9(self, namespace, name, path, **kwargs): """ proxy PUT requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_pod_9(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_pod_9" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_put_namespaced_pod_9`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_pod_9`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_put_namespaced_pod_9`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_pod_10(self, namespace, name, path, **kwargs): """ proxy POST requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_pod_10(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_pod_10" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_post_namespaced_pod_10`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_pod_10`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_post_namespaced_pod_10`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_pod_11(self, namespace, name, path, **kwargs): """ proxy DELETE requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_pod_11(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_pod_11" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_delete_namespaced_pod_11`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_pod_11`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_delete_namespaced_pod_11`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_pod_12(self, namespace, name, path, **kwargs): """ proxy OPTIONS requests to Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_pod_12(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_pod_12" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_options_namespaced_pod_12`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_pod_12`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_options_namespaced_pod_12`") resource_path = '/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_service(self, namespace, name, **kwargs): """ proxy GET requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_get_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_service(self, namespace, name, **kwargs): """ proxy HEAD requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_head_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_service(self, namespace, name, **kwargs): """ proxy PUT requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_put_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_service(self, namespace, name, **kwargs): """ proxy POST requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_post_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_service(self, namespace, name, **kwargs): """ proxy DELETE requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_delete_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_service(self, namespace, name, **kwargs): """ proxy OPTIONS requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_options_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_service`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_service_13(self, namespace, name, path, **kwargs): """ proxy GET requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_service_13(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_service_13" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_get_namespaced_service_13`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_service_13`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_get_namespaced_service_13`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_service_14(self, namespace, name, path, **kwargs): """ proxy HEAD requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_service_14(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_service_14" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_head_namespaced_service_14`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_service_14`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_head_namespaced_service_14`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_service_15(self, namespace, name, path, **kwargs): """ proxy PUT requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_service_15(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_service_15" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_put_namespaced_service_15`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_service_15`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_put_namespaced_service_15`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_service_16(self, namespace, name, path, **kwargs): """ proxy POST requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_service_16(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_service_16" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_post_namespaced_service_16`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_service_16`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_post_namespaced_service_16`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_service_17(self, namespace, name, path, **kwargs): """ proxy DELETE requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_service_17(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_service_17" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_delete_namespaced_service_17`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_service_17`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_delete_namespaced_service_17`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_service_18(self, namespace, name, path, **kwargs): """ proxy OPTIONS requests to Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_service_18(namespace, name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_service_18" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `proxy_options_namespaced_service_18`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_service_18`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_options_namespaced_service_18`") resource_path = '/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_node(self, name, **kwargs): """ proxy GET requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_node(self, name, **kwargs): """ proxy HEAD requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_node(self, name, **kwargs): """ proxy PUT requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_node(self, name, **kwargs): """ proxy POST requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_node(self, name, **kwargs): """ proxy DELETE requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_node(self, name, **kwargs): """ proxy OPTIONS requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_node`") resource_path = '/api/v1/proxy/nodes/{name}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_get_namespaced_node_19(self, name, path, **kwargs): """ proxy GET requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_get_namespaced_node_19(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_get_namespaced_node_19" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_get_namespaced_node_19`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_get_namespaced_node_19`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_head_namespaced_node_20(self, name, path, **kwargs): """ proxy HEAD requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_head_namespaced_node_20(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_head_namespaced_node_20" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_head_namespaced_node_20`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_head_namespaced_node_20`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'HEAD' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_put_namespaced_node_21(self, name, path, **kwargs): """ proxy PUT requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_put_namespaced_node_21(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_put_namespaced_node_21" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_put_namespaced_node_21`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_put_namespaced_node_21`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_post_namespaced_node_22(self, name, path, **kwargs): """ proxy POST requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_post_namespaced_node_22(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_post_namespaced_node_22" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_post_namespaced_node_22`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_post_namespaced_node_22`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_delete_namespaced_node_23(self, name, path, **kwargs): """ proxy DELETE requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_delete_namespaced_node_23(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_delete_namespaced_node_23" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_delete_namespaced_node_23`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_delete_namespaced_node_23`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def proxy_options_namespaced_node_24(self, name, path, **kwargs): """ proxy OPTIONS requests to Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.proxy_options_namespaced_node_24(name, path, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str path: path to the resource (required) :return: str If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method proxy_options_namespaced_node_24" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `proxy_options_namespaced_node_24`") # verify the required parameter 'path' is set if ('path' not in params) or (params['path'] is None): raise ValueError("Missing the required parameter `path` when calling `proxy_options_namespaced_node_24`") resource_path = '/api/v1/proxy/nodes/{name}/{path}'.replace('{format}', 'json') method = 'OPTIONS' path_params = {} if 'name' in params: path_params['name'] = params['name'] if 'path' in params: path_params['path'] = params['path'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='str', auth_settings=auth_settings, callback=params.get('callback')) return response def list_replication_controller(self, **kwargs): """ list or watch objects of kind ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_replication_controller(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ReplicationControllerList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_replication_controller" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/replicationcontrollers'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ReplicationControllerList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_resource_quota(self, **kwargs): """ list or watch objects of kind ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_resource_quota(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ResourceQuotaList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_resource_quota" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/resourcequotas'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ResourceQuotaList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_secret(self, **kwargs): """ list or watch objects of kind Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_secret(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1SecretList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_secret" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/secrets'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1SecretList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_service_account(self, **kwargs): """ list or watch objects of kind ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_service_account(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ServiceAccountList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_service_account" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/serviceaccounts'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceAccountList', auth_settings=auth_settings, callback=params.get('callback')) return response def list_service(self, **kwargs): """ list or watch objects of kind Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.list_service(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: V1ServiceList If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_service" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/services'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='V1ServiceList', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_endpoints_list(self, **kwargs): """ watch individual changes to a list of Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_endpoints_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_endpoints_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/endpoints'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_event_list(self, **kwargs): """ watch individual changes to a list of Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_event_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_event_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/events'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_limit_range_list(self, **kwargs): """ watch individual changes to a list of LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_limit_range_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_limit_range_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/limitranges'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_namespace_list(self, **kwargs): """ watch individual changes to a list of Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_namespace_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_namespace_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/namespaces'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_endpoints_list(self, namespace, **kwargs): """ watch individual changes to a list of Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_endpoints_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_endpoints_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_endpoints_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/endpoints'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_endpoints(self, namespace, name, **kwargs): """ watch changes to an object of kind Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_endpoints(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Endpoints (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_endpoints" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_endpoints`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_endpoints`") resource_path = '/api/v1/watch/namespaces/{namespace}/endpoints/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_event_list(self, namespace, **kwargs): """ watch individual changes to a list of Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_event_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_event_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_event_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/events'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_event(self, namespace, name, **kwargs): """ watch changes to an object of kind Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_event(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Event (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_event" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_event`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_event`") resource_path = '/api/v1/watch/namespaces/{namespace}/events/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_limit_range_list(self, namespace, **kwargs): """ watch individual changes to a list of LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_limit_range_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_limit_range_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_limit_range_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/limitranges'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_limit_range(self, namespace, name, **kwargs): """ watch changes to an object of kind LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_limit_range(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the LimitRange (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_limit_range" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_limit_range`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_limit_range`") resource_path = '/api/v1/watch/namespaces/{namespace}/limitranges/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_persistent_volume_claim_list(self, namespace, **kwargs): """ watch individual changes to a list of PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_persistent_volume_claim_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_persistent_volume_claim_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_persistent_volume_claim_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_persistent_volume_claim(self, namespace, name, **kwargs): """ watch changes to an object of kind PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_persistent_volume_claim(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PersistentVolumeClaim (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_persistent_volume_claim" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_persistent_volume_claim`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_persistent_volume_claim`") resource_path = '/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_pod_list(self, namespace, **kwargs): """ watch individual changes to a list of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_pod_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_pod_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_pod_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/pods'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_pod(self, namespace, name, **kwargs): """ watch changes to an object of kind Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_pod(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Pod (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_pod" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_pod`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_pod`") resource_path = '/api/v1/watch/namespaces/{namespace}/pods/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_pod_template_list(self, namespace, **kwargs): """ watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_pod_template_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_pod_template_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_pod_template_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/podtemplates'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_pod_template(self, namespace, name, **kwargs): """ watch changes to an object of kind PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_pod_template(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the PodTemplate (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_pod_template" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_pod_template`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_pod_template`") resource_path = '/api/v1/watch/namespaces/{namespace}/podtemplates/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_replication_controller_list(self, namespace, **kwargs): """ watch individual changes to a list of ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_replication_controller_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_replication_controller_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_replication_controller_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/replicationcontrollers'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_replication_controller(self, namespace, name, **kwargs): """ watch changes to an object of kind ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_replication_controller(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ReplicationController (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_replication_controller" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_replication_controller`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_replication_controller`") resource_path = '/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_resource_quota_list(self, namespace, **kwargs): """ watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_resource_quota_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_resource_quota_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_resource_quota_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/resourcequotas'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_resource_quota(self, namespace, name, **kwargs): """ watch changes to an object of kind ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_resource_quota(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ResourceQuota (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_resource_quota" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_resource_quota`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_resource_quota`") resource_path = '/api/v1/watch/namespaces/{namespace}/resourcequotas/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_secret_list(self, namespace, **kwargs): """ watch individual changes to a list of Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_secret_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_secret_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_secret_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/secrets'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_secret(self, namespace, name, **kwargs): """ watch changes to an object of kind Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_secret(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Secret (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_secret" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_secret`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_secret`") resource_path = '/api/v1/watch/namespaces/{namespace}/secrets/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_service_account_list(self, namespace, **kwargs): """ watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_service_account_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_service_account_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_service_account_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/serviceaccounts'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_service_account(self, namespace, name, **kwargs): """ watch changes to an object of kind ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_service_account(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the ServiceAccount (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_service_account" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_service_account`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_service_account`") resource_path = '/api/v1/watch/namespaces/{namespace}/serviceaccounts/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_service_list(self, namespace, **kwargs): """ watch individual changes to a list of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_service_list(namespace, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_service_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_service_list`") resource_path = '/api/v1/watch/namespaces/{namespace}/services'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_service(self, namespace, name, **kwargs): """ watch changes to an object of kind Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_service(namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str name: name of the Service (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['namespace', 'name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'namespace' is set if ('namespace' not in params) or (params['namespace'] is None): raise ValueError("Missing the required parameter `namespace` when calling `watch_namespaced_service`") # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_service`") resource_path = '/api/v1/watch/namespaces/{namespace}/services/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'namespace' in params: path_params['namespace'] = params['namespace'] if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_namespace(self, name, **kwargs): """ watch changes to an object of kind Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_namespace(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Namespace (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_namespace" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_namespace`") resource_path = '/api/v1/watch/namespaces/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_node_list(self, **kwargs): """ watch individual changes to a list of Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_node_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_node_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/nodes'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_node(self, name, **kwargs): """ watch changes to an object of kind Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_node(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the Node (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_node`") resource_path = '/api/v1/watch/nodes/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_persistent_volume_claim_list(self, **kwargs): """ watch individual changes to a list of PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_persistent_volume_claim_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_persistent_volume_claim_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/persistentvolumeclaims'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_persistent_volume_list(self, **kwargs): """ watch individual changes to a list of PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_persistent_volume_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_persistent_volume_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/persistentvolumes'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_namespaced_persistent_volume(self, name, **kwargs): """ watch changes to an object of kind PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_namespaced_persistent_volume(name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: name of the PersistentVolume (required) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_namespaced_persistent_volume" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError("Missing the required parameter `name` when calling `watch_namespaced_persistent_volume`") resource_path = '/api/v1/watch/persistentvolumes/{name}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_pod_list(self, **kwargs): """ watch individual changes to a list of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_pod_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_pod_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/pods'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_pod_template_list(self, **kwargs): """ watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_pod_template_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_pod_template_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/podtemplates'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_replication_controller_list(self, **kwargs): """ watch individual changes to a list of ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_replication_controller_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_replication_controller_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/replicationcontrollers'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_resource_quota_list(self, **kwargs): """ watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_resource_quota_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_resource_quota_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/resourcequotas'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_secret_list(self, **kwargs): """ watch individual changes to a list of Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_secret_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_secret_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/secrets'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_service_account_list(self, **kwargs): """ watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_service_account_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_service_account_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/serviceaccounts'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response def watch_service_list(self, **kwargs): """ watch individual changes to a list of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.watch_service_list(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str pretty: If 'true', then the output is pretty printed. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. :param int timeout_seconds: Timeout for the list/watch call. :return: JsonWatchEvent If the method is called asynchronously, returns the request thread. """ all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method watch_service_list" % key ) params[key] = val del params['kwargs'] resource_path = '/api/v1/watch/services'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} if 'pretty' in params: query_params['pretty'] = params['pretty'] if 'label_selector' in params: query_params['labelSelector'] = params['label_selector'] if 'field_selector' in params: query_params['fieldSelector'] = params['field_selector'] if 'watch' in params: query_params['watch'] = params['watch'] if 'resource_version' in params: query_params['resourceVersion'] = params['resource_version'] if 'timeout_seconds' in params: query_params['timeoutSeconds'] = params['timeout_seconds'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JsonWatchEvent', auth_settings=auth_settings, callback=params.get('callback')) return response
Orders placed online are generally processed and shipped within three business days if items are in stock. If an ordered product is out of stock you will be notified via email. Please call the store to request expedited service. There is an additional charge for Overnight or 2nd Day orders. Full refunds require an original purchase receipt and will be made to the original method of payment or to an in-store credit within 30 days. Merchandise is fully refundable if in new, saleable condition with original price tags. Without a receipt, merchandise can be exchanged or an in-store credit can be issued for the current value of the item(s). All CLEARANCE merchandise are final sales and cannot be refunded.
# -*- coding: utf-8 -*- from django.views.generic import ListView, CreateView, UpdateView, DeleteView from django.contrib import messages from braces.views import LoginRequiredMixin from .models import Ayudantes class AyudantesMixin(object): @property def success_msg(self): return NotImplemented def get_success_url(self): messages.success(self.request, self.success_msg) return super(AyudantesMixin, self).get_success_url() class AyudantesListView(LoginRequiredMixin, ListView): """ Lista todos los ayudantes """ model = Ayudantes class AyudantesCreateView(LoginRequiredMixin, AyudantesMixin, CreateView): """ Creacion de medico """ model = Ayudantes success_msg = 'El ayudante se agregó correctamente.' class AyudantesUpdateView(LoginRequiredMixin, AyudantesMixin, UpdateView): """ Modificacion de un ayudante """ model = Ayudantes success_msg = 'El ayudante se editó correctamente.' class AyudantesDeleteView(LoginRequiredMixin, DeleteView): """ Eliminar un ayudante """ model = Ayudantes success_url = '/ayudantes/'
You can have confidence in Self Storage Crew to give you the most suitable professional services for Self Storage in Emmett, ID. Our company has a team of experienced contractors and the most advanced technology in the industry to deliver everything that you're looking for. We make certain that you get the very best products and services, the most suitable price, and the finest quality materials. Call us today by dialing 888-739-5110 to begin. At Self Storage Crew, we understand that you want to remain in your price range and reduce costs wherever you are able to. Yet, lowering costs shouldn't ever suggest that you sacrifice excellent quality on Self Storage in Emmett, ID. We provide you with the highest quality while still costing you less. Our mission is to be sure that you have the best products and a end result that holds up throughout the years. That is attainable because we recognize how to save you time and funds on supplies and work. If you wish to save cash, Self Storage Crew is the company to connect with. You can reach our business at 888-739-5110 to learn more. You have to be well informed on the subject of Self Storage in Emmett, ID. We ensure you know what to expect. We will take the unexpected surprises out of the scenario by supplying precise and detailed advice. Start by talking about your project with our client service reps once you dial 888-739-5110. We will respond to your concerns and questions and arrange your preliminary meeting. Our staff will arrive at the arranged time with the necessary resources, and will work together with you during the entire undertaking. You have got many good reasons to look to Self Storage Crew to suit your needs regarding Self Storage in Emmett, ID. We'll be the best option when you need the best cash saving methods, the very best equipment, and the highest rate of client satisfaction. We are aware of your expectations and objectives, and we are here to help you using our practical experience. Dial 888-739-5110 when you require Self Storages in Emmett, and we'll work with you to successfully complete your task.
import logging from typing import Optional from formtools.wizard.views import SessionWizardView from django import http from django.contrib import messages from django.shortcuts import get_object_or_404, redirect, render, reverse from ....auth.decorators import eighth_admin_required from ....users.models import Group from ...forms.admin.activities import HybridActivitySelectionForm from ...forms.admin.blocks import HybridBlockSelectionForm from ...models import EighthBlock, EighthScheduledActivity, EighthSignup, EighthSponsor from ...tasks import eighth_admin_signup_group_task_hybrid from ...utils import get_start_date logger = logging.getLogger(__name__) @eighth_admin_required def activities_without_attendance_view(request): blocks_set = set() for b in EighthBlock.objects.filter( eighthscheduledactivity__in=EighthScheduledActivity.objects.filter(activity__name="z - Hybrid Sticky") ).filter(date__gte=get_start_date(request)): blocks_set.add((str(b.date), b.block_letter[0])) blocks = sorted(list(blocks_set)) block_id = request.GET.get("block", None) block = None if block_id is not None: try: block_id = tuple(block_id.split(",")) block = EighthBlock.objects.filter(date=block_id[0], block_letter__contains=block_id[1]) except (EighthBlock.DoesNotExist, ValueError): pass context = {"blocks": blocks, "chosen_block": block_id, "hybrid_blocks": block} if block is not None: start_date = get_start_date(request) scheduled_activities = None for b in block: if scheduled_activities is not None: scheduled_activities = scheduled_activities | b.eighthscheduledactivity_set.filter( block__date__gte=start_date, attendance_taken=False ).order_by( "-activity__special", "activity__name" ) # float special to top else: scheduled_activities = b.eighthscheduledactivity_set.filter(block__date__gte=start_date, attendance_taken=False).order_by( "-activity__special", "activity__name" ) # float special to top context["scheduled_activities"] = scheduled_activities if request.POST.get("take_attendance_zero", False) is not False: zero_students = scheduled_activities.filter(members=None) signups = EighthSignup.objects.filter(scheduled_activity__in=zero_students) logger.debug(zero_students) if signups.count() == 0: zero_students.update(attendance_taken=True) messages.success(request, "Took attendance for {} empty activities.".format(zero_students.count())) else: messages.error(request, "Apparently there were actually {} signups. Maybe one is no longer empty?".format(signups.count())) return redirect("/eighth/admin/hybrid/no_attendance?block={},{}".format(block_id[0], block_id[1])) if request.POST.get("take_attendance_cancelled", False) is not False: cancelled = scheduled_activities.filter(cancelled=True) signups = EighthSignup.objects.filter(scheduled_activity__in=cancelled) logger.debug(cancelled) logger.debug(signups) signups.update(was_absent=True) cancelled.update(attendance_taken=True) messages.success( request, "Took attendance for {} cancelled activities. {} students marked absent.".format(cancelled.count(), signups.count()) ) return redirect("/eighth/admin/hybrid/no_attendance?block={},{}".format(block_id[0], block_id[1])) context["admin_page_title"] = "Hybrid Activities That Haven't Taken Attendance" return render(request, "eighth/admin/activities_without_attendance_hybrid.html", context) @eighth_admin_required def list_sponsor_view(request): block_id = request.GET.get("block", None) block = None blocks_set = set() for b in EighthBlock.objects.filter( eighthscheduledactivity__in=EighthScheduledActivity.objects.filter(activity__name="z - Hybrid Sticky").filter( block__date__gte=get_start_date(request) ) ): blocks_set.add((str(b.date), b.block_letter[0])) blocks = sorted(list(blocks_set)) if block_id is not None: try: block_id = tuple(block_id.split(",")) block = EighthBlock.objects.filter(date=block_id[0], block_letter__contains=block_id[1]) except (EighthBlock.DoesNotExist, ValueError): pass context = {"blocks": blocks, "chosen_block": block_id, "hybrid_blocks": block} if block is not None: acts = EighthScheduledActivity.objects.filter(block__in=block) lst = {} for sponsor in EighthSponsor.objects.all(): lst[sponsor] = [] for act in acts.prefetch_related("sponsors").prefetch_related("rooms"): for sponsor in act.get_true_sponsors(): lst[sponsor].append(act) lst = sorted(lst.items(), key=lambda x: x[0].name) context["sponsor_list"] = lst context["admin_page_title"] = "Hybrid Sponsor Schedule List" return render(request, "eighth/admin/list_sponsors_hybrid.html", context) class EighthAdminSignUpGroupWizard(SessionWizardView): FORMS = [("block", HybridBlockSelectionForm), ("activity", HybridActivitySelectionForm)] TEMPLATES = {"block": "eighth/admin/sign_up_group.html", "activity": "eighth/admin/sign_up_group.html"} def get_template_names(self): return [self.TEMPLATES[self.steps.current]] def get_form_kwargs(self, step=None): kwargs = {} if step == "block": kwargs.update({"exclude_before_date": get_start_date(self.request)}) if step == "activity": block = self.get_cleaned_data_for_step("block")["block"] kwargs.update({"block": block}) labels = {"block": "Select a block", "activity": "Select an activity"} kwargs.update({"label": labels[step]}) return kwargs def get_context_data(self, form, **kwargs): context = super().get_context_data(form=form, **kwargs) block = self.get_cleaned_data_for_step("block") if block: context.update({"block_obj": (block["block"][2:12], block["block"][16])}) context.update({"admin_page_title": "Sign Up Group", "hybrid": True}) return context def done(self, form_list, **kwargs): form_list = list(form_list) block = form_list[0].cleaned_data["block"] block_set = EighthBlock.objects.filter(date=block[2:12], block_letter__contains=block[16]) virtual_block = block_set.filter(block_letter__contains="V")[0] person_block = block_set.filter(block_letter__contains="P")[0] activity = form_list[1].cleaned_data["activity"] scheduled_activity_virtual = EighthScheduledActivity.objects.get(block=virtual_block, activity=activity) scheduled_activity_person = EighthScheduledActivity.objects.get(block=person_block, activity=activity) try: group = Group.objects.get(id=kwargs["group_id"]) except Group.DoesNotExist as e: raise http.Http404 from e return redirect( reverse("eighth_admin_signup_group_action_hybrid", args=[group.id, scheduled_activity_virtual.id, scheduled_activity_person.id]) ) eighth_admin_signup_group_hybrid_view = eighth_admin_required(EighthAdminSignUpGroupWizard.as_view(EighthAdminSignUpGroupWizard.FORMS)) def eighth_admin_signup_group_action_hybrid(request, group_id, schact_virtual_id, schact_person_id): scheduled_activity_virtual = get_object_or_404(EighthScheduledActivity, id=schact_virtual_id) scheduled_activity_person = get_object_or_404(EighthScheduledActivity, id=schact_person_id) group = get_object_or_404(Group, id=group_id) users = group.user_set.all() if not users.exists(): messages.info(request, "The group you have selected has no members.") return redirect("eighth_admin_dashboard") if "confirm" in request.POST: if request.POST.get("run_in_background"): eighth_admin_signup_group_task_hybrid.delay( user_id=request.user.id, group_id=group_id, schact_virtual_id=schact_virtual_id, schact_person_id=schact_person_id ) messages.success(request, "Group members are being signed up in the background.") return redirect("eighth_admin_dashboard") else: eighth_admin_perform_group_signup( group_id=group_id, schact_virtual_id=schact_virtual_id, schact_person_id=schact_person_id, request=request ) messages.success(request, "Successfully signed up group for activity.") return redirect("eighth_admin_dashboard") return render( request, "eighth/admin/sign_up_group.html", { "admin_page_title": "Confirm Group Signup", "hybrid": True, "scheduled_activity_virtual": scheduled_activity_virtual, "scheduled_activity_person": scheduled_activity_person, "group": group, "users_num": users.count(), }, ) def eighth_admin_perform_group_signup(*, group_id: int, schact_virtual_id: int, schact_person_id: int, request: Optional[http.HttpRequest]): """Performs sign up of all users in a specific group up for a specific scheduled activity. Args: group_id: The ID of the group that should be signed up for the activity. schact_virtual_id: The ID of the EighthScheduledActivity all the virtual users in the group should be signed up for. schact_person_id: The ID of the EighthScheduledActivity all the in-person users in the group should be signed up for. request: If possible, the request object associated with the operation. """ # We assume these exist scheduled_activity_virtual = EighthScheduledActivity.objects.get(id=schact_virtual_id) scheduled_activity_person = EighthScheduledActivity.objects.get(id=schact_person_id) group = Group.objects.get(id=group_id) is_P1_block = "P1" in scheduled_activity_person.block.block_letter virtual_group = Group.objects.get(name="virtual").user_set.all() person_group = Group.objects.get(name="in-person").user_set.all() if is_P1_block: virtual_group = virtual_group.union(Group.objects.get(name="in-person (l-z)").user_set.all()) person_group = person_group.union(Group.objects.get(name="in-person (a-k)").user_set.all()) else: virtual_group = virtual_group.union(Group.objects.get(name="in-person (a-k)").user_set.all()) person_group = person_group.union(Group.objects.get(name="in-person (l-z)").user_set.all()) for user in group.user_set.all(): if user in virtual_group: scheduled_activity_virtual.add_user(user, request=request, force=True, no_after_deadline=True) elif user in person_group: scheduled_activity_person.add_user(user, request=request, force=True, no_after_deadline=True)
The following tokens have been designed through the point based rhino/ grasshopper / karamba / galapagos script to minimise deformation without changing the base period by fixing the domain parameter in which iterations may occur. Three geometrically identical pieces were printed to study the reliability of print in relationship to performance. Another set of three geometrically identical pieces were printed to study the reliability of print in relationship to performance and the effect of evolutionary optimisation. The process of optimization transforms the base TPMS membranes and crystalline grid in such way that humps pattern of deformation is avoided by introduction of singularities at each level.
# -*- coding: utf-8 -*- # (C) 2015, 2016 Daniel Lobato <[email protected]> # 2016 Guido Günther <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from datetime import datetime from collections import defaultdict import json import time try: import requests HAS_REQUESTS = True except ImportError: HAS_REQUESTS = False from ansible.plugins.callback import CallbackBase class CallbackModule(CallbackBase): """ This callback will report facts and reports to Foreman https://theforeman.org/ It makes use of the following environment variables: FOREMAN_URL: URL to the Foreman server FOREMAN_SSL_CERT: X509 certificate to authenticate to Foreman if https is used FOREMAN_SSL_KEY: the corresponding private key FOREMAN_SSL_VERIFY: whether to verify the Foreman certificate It can be set to '1' to verify SSL certificates using the installed CAs or to a path pointing to a CA bundle. Set to '0' to disable certificate checking. """ CALLBACK_VERSION = 2.0 CALLBACK_TYPE = 'notification' CALLBACK_NAME = 'foreman' CALLBACK_NEEDS_WHITELIST = True FOREMAN_URL = os.getenv('FOREMAN_URL', "http://localhost:3000") FOREMAN_SSL_CERT = (os.getenv('FOREMAN_SSL_CERT', "/etc/foreman/client_cert.pem"), os.getenv('FOREMAN_SSL_KEY', "/etc/foreman/client_key.pem")) FOREMAN_SSL_VERIFY = os.getenv('FOREMAN_SSL_VERIFY', "1") FOREMAN_HEADERS = { "Content-Type": "application/json", "Accept": "application/json" } TIME_FORMAT = "%Y-%m-%d %H:%M:%S %f" def __init__(self): super(CallbackModule, self).__init__() self.items = defaultdict(list) self.start_time = int(time.time()) if HAS_REQUESTS: requests_major = int(requests.__version__.split('.')[0]) if requests_major >= 2: self.ssl_verify = self._ssl_verify() else: self._disable_plugin('The `requests` python module is too old.') else: self._disable_plugin('The `requests` python module is not installed.') def _disable_plugin(self, msg): self.disabled = True self._display.warning(msg + ' Disabling the Foreman callback plugin.') def _ssl_verify(self): if self.FOREMAN_SSL_VERIFY.lower() in ["1", "true", "on"]: verify = True elif self.FOREMAN_SSL_VERIFY.lower() in ["0", "false", "off"]: requests.packages.urllib3.disable_warnings() self._display.warning("SSL verification of %s disabled" % self.FOREMAN_URL) verify = False else: # Set ta a CA bundle: verify = self.FOREMAN_SSL_VERIFY return verify def send_facts(self, host, data): """ Sends facts to Foreman, to be parsed by foreman_ansible fact parser. The default fact importer should import these facts properly. """ data["_type"] = "ansible" data["_timestamp"] = datetime.now().strftime(self.TIME_FORMAT) facts = {"name": host, "facts": data, } requests.post(url=self.FOREMAN_URL + '/api/v2/hosts/facts', data=json.dumps(facts), headers=self.FOREMAN_HEADERS, cert=self.FOREMAN_SSL_CERT, verify=self.ssl_verify) def _build_log(self, data): logs = [] for entry in data: source, msg = entry if 'failed' in msg: level = 'err' else: level = 'notice' if 'changed' in msg and msg['changed'] else 'info' logs.append({"log": { 'sources': {'source': source}, 'messages': {'message': json.dumps(msg)}, 'level': level }}) return logs def send_reports(self, stats): """ Send reports to Foreman to be parsed by its config report importer. THe data is in a format that Foreman can handle without writing another report importer. """ status = defaultdict(lambda: 0) metrics = {} for host in stats.processed.keys(): sum = stats.summarize(host) status["applied"] = sum['changed'] status["failed"] = sum['failures'] + sum['unreachable'] status["skipped"] = sum['skipped'] log = self._build_log(self.items[host]) metrics["time"] = {"total": int(time.time()) - self.start_time} now = datetime.now().strftime(self.TIME_FORMAT) report = { "report": { "host": host, "reported_at": now, "metrics": metrics, "status": status, "logs": log, } } # To be changed to /api/v2/config_reports in 1.11. Maybe we # could make a GET request to get the Foreman version & do # this automatically. requests.post(url=self.FOREMAN_URL + '/api/v2/reports', data=json.dumps(report), headers=self.FOREMAN_HEADERS, cert=self.FOREMAN_SSL_CERT, verify=self.ssl_verify) self.items[host] = [] def append_result(self, result): name = result._task.get_name() host = result._host.get_name() self.items[host].append((name, result._result)) # Ansible callback API def v2_runner_on_failed(self, result, ignore_errors=False): self.append_result(result) def v2_runner_on_unreachable(self, result): self.append_result(result) def v2_runner_on_async_ok(self, result, jid): self.append_result(result) def v2_runner_on_async_failed(self, result, jid): self.append_result(result) def v2_playbook_on_stats(self, stats): self.send_reports(stats) def v2_runner_on_ok(self, result): res = result._result module = result._task.action if module == 'setup': host = result._host.get_name() self.send_facts(host, res) else: self.append_result(result)
I-go dai 185 Sensuikan 伊号第百八十五潜水艦, aka I-185 イ185 was a Japanese warship (Submarine first class). The tenth and last unit of Navy large VII type submarines. This page was last modified on 9 March 2019, at 11:01.
import twitter # Authentication parameters - fill manually! You need to create a Twitter app in dev.twitter.com # in order to be given these OAUTH2 parameters for the authentication (mandatory) to your app # Reference: https://aaronparecki.com/oauth-2-simplified/#creating-an-app (general example, but applies for twitter) api = twitter.Api( consumer_key='<consumer_key>', consumer_secret='<consumer_secret>', access_token_key='<access_token_key>', access_token_secret='<access_token_secret>') names_found_file = open('firstnames.txt', 'w') names_found_file.write('#<first_name_if_found>=<username>') sample = 0 for line in open('test/usernames.txt', 'r'): try: names_found_file.write(api.GetUser(screen_name='@' + line).__getattribute__('name') + '=' + line) sample = sample + 1 names_found_file.flush() # Verbose output for debugging print(api.GetUser(screen_name='@' + line).__getattribute__('name') + '=' + line) print(sample) except: names_found_file.write('=' + line) sample = sample + 1 names_found_file.flush() # Verbose outputfor debugging print('=' + line) print(sample) names_found_file.close()
Are you selling your Airconditoner or any other used item? Sell it here for free!. Sorry for the inconvenience, but we cannot find anything for the search word Airconditoner.
import pickle import sqlite3 import Fruit class Main: def __init__(self): self.fruit_list = Fruit.FruitList() self.sqlite_db = None self.run() @staticmethod def print_instructions(): print("Enter the number of an option to complete a task: \n", "1.) Add a new fruit to the system \n", "2.) Remove a fruit from the system \n", "3.) Print all the fruits that exist in the system \n", "4.) Print the description of a specific fruit \n", "5.) Print the Instructions again \n", "6.) Close the program") @staticmethod def connect_db(): rv = sqlite3.connect("db/tomato.db") rv.row_factory = sqlite3.Row return rv def get_db(self): if self.sqlite_db is None: self.sqlite_db = self.connect_db() return self.sqlite_db def close_db(self, error=None): if error: print(error) if self.sqlite_db is not None: self.sqlite_db.close() def init_db(self): db = self.get_db() with open("db/schema.sql", "r") as f: db.cursor().executescript(f.read()) db.commit() print("Database Initialized.") @staticmethod def serialize_object(obj): return pickle.dumps(obj) @staticmethod def deserialize_object(bytes_obj): return pickle.loads(bytes_obj) def load_from_db(self): try: db = self.get_db() cursor = db.execute("SELECT data FROM tomatoes ORDER BY id") data = cursor.fetchone() self.fruit_list = self.deserialize_object(data[0]) print("Loaded FruitList from database.") except (TypeError, sqlite3.OperationalError): self.init_db() def dump_to_db(self): db = self.get_db() data = self.serialize_object(self.fruit_list) db.execute("INSERT OR REPLACE INTO tomatoes (id, data) VALUES (?, ?)", [0, data]) db.commit() print("FruitList saved to database.") def run(self): self.load_from_db() self.print_instructions() name_prompt = "Name of the fruit: \n" while True: try: option = int(input()) except ValueError: option = None print("Invalid input") if option == 1: self.fruit_list.create_fruit() self.dump_to_db() elif option == 2: self.fruit_list.remove_fruit(input(name_prompt)) self.dump_to_db() elif option == 3: print(self.fruit_list) elif option == 4: self.fruit_list.describe_fruit(input(name_prompt)) elif option == 5: self.print_instructions() elif option == 6: break if __name__ == '__main__': Main()
Motherboard Replacement for Zebra Motorola Symbol WT60A0 Condition: Used Remark: If there have any request on the motherboard, please contact us before place order. Otherwise, we will ship the motherboard randomly. Screen Protector Protection Film for Zebra Motorola Symbol WT60A0 Condition: New Size: 7cm X 4.3cm Features: Manufacture item by our own factory. Side Connector Replacement for Zebra Motorola Symbol WT6000, T60A0 Condition: New Remark: $59.9 is for one connector only.
import numpy from maskgen.image_wrap import ImageWrapper import cv2 def transform(img,source,target,**kwargs): pixelWidth = int(kwargs['pixel_width']) pixelHeight = int(kwargs['pixel_height']) x = int(kwargs['crop_x']) y = int(kwargs['crop_y']) cv_image = numpy.array(img) new_img = cv_image[y:-(pixelHeight-y), x:-(pixelWidth-x),:] ImageWrapper(new_img).save(target) return None,None def suffix(): return None def operation(): return { 'category': 'Transform', 'name': 'TransformCrop', 'description':'Crop', 'software':'OpenCV', 'version':cv2.__version__, 'arguments':{'crop_x': {'type': "int[0:100000]", 'description':'upper left corner vertical position'}, 'crop_y': {'type': "int[0:100000]", 'description':'upper left corner horizontal position'}, 'pixel_width': {'type': "int[0:100000]", 'description':'amount of pixels to remove horizontal'}, 'pixel_height': {'type': "int[0:100000]", 'description':'amount of pixels to remove vertically'}}, 'transitions': [ 'image.image' ] }
Praise the Lord. A familiar phrase to many people, especially those in church. But what does it really mean to praise Him? It is not a simple and flippant offhand remark we say as a way of 'thanks' for GOD wants us to truly be grateful for everything He gives us, and call upon Him in truth. It is not just something we do with Psalms, and Hymns and Spiritual Songs making melody in our heart to the Lord; as important a directive as that is. No, praising our Lord is a continual act of worship, awe, blessing and honor which is His due. He is Worthy. We praise Him in our adoration, we praise Him in our obedience to His Word, we praise Him in our testifying about His wondrous works. And when we tell others about what Jesus has done in our life; from Salvation, to providing for us, to caring for our needs, and comfort during trials; we praise His Name and the Psalmist reminds us that the Lord is nigh to all them that call upon Him. If you know Jesus, and have that assurance that comes from the presence of the Spirit within you, tell someone of what GOD has done for you. If you don't know Him; if you don't have that Blessed Hope of a relationship with Jesus Christ by Faith in His finished work on the Cross; I pray that you will receive Him today and praise Him for his Salvation.
# Copyright (c) 2010 John Reese # Licensed under the MIT license import yaml from combine import CombineError MANIFEST_FORMAT = 1 class Manifest: def __init__(self): self.properties = {"manifest-format": MANIFEST_FORMAT} self.actions = [] def __getitem__(self, key): return self.properties[key] def __contains__(self, key): return key in self.properties def add_property(self, name, value): self.properties[name] = value def add_action(self, action): self.actions.append(action) def to_dict(self): """ Generate a dictionary representation of the Manifest object. """ return dict(self.properties, actions=self.actions) @classmethod def from_dict(cls, data): """ Given a dictionary object, generate a new Manifest object. """ format = data["manifest-format"] if (format > MANIFEST_FORMAT or format < 0): raise CombineError("Unsupported manifest format") mft = Manifest() for key, value in data.items(): if key == "actions": for action in value: mft.add_action(dict(action)) else: mft.add_property(key, value) return mft def to_yaml(self): """ Generate a YAML data string representing the Manifest object. """ str = yaml.safe_dump(self.to_dict(), default_flow_style=False) return str @classmethod def from_yaml(cls, str): """ Given a string of YAML data, generate a new Manifest object. """ data = yaml.safe_load(str) return cls.from_dict(data)
Bring Back the Soldiers on Christmas is an original Christmas song written, recorded and produced by Jim Roberti to help raise funds for Mady’s Angels. Recorded in late 2011 into 2012 at New Horizon Music Studios in Stroudsburg, PA, the song features MJ Law on drums, Gary Wehrkamp (who also engineered) on bass guitar and Roberti on guitars, keyboards and vocals. All proceeds from the sales of the cd and iTunes downloads will be donated to Mady’s Angels on behalf of the Roberti family. Another Angel and The Perfect Tree were written for and dedicated to the spirit of Madyson, a little girl who had more compassion and selflessness in her brief 13 years than most people express in their entire lifetime. She was the type of person who looked to be involved. She would volunteer for a variety of fundraising and charity events and was the type of person who would save up her allowance and give it away to a multitude of causes. She was the type of person we should all strive to be. The lyrics for Another Angel were inspired by thoughts and prayers from Madyson’s family and friends, and a prayer by Bono. Mady is an “old soul”, and her memory is tattooed into our hearts forever. The inspiration for The Perfect Tree came from stories told by Mady's parents shortly after her passing. Memories full of love and pride so well deserved. It is about seeing the beauty in everything and forever seeing Mady's beauty everywhere. All proceeds from the songs are being donated to a charity set up in her name, MadysAngels, that will continue to support the causes she cared deeply about. Thank you for listening and thank you for supporting her charity as a way to Pay It Forward.
import os import re from collections import Mapping, OrderedDict, Sequence from six import string_types from .base import Base from .exc import SettingsFileNotFoundError from .types import LocalSetting from .util import NO_DEFAULT as PLACEHOLDER class Loader(Base): def __init__(self, file_name=None, section=None, extender=None): super(Loader, self).__init__(file_name, section, extender) if not os.path.exists(self.file_name): raise SettingsFileNotFoundError(file_name) # Registry of local settings with a value in the settings file self.registry = {} def read_file(self): """Read settings from specified ``section`` of config file.""" parser = self._make_parser() with open(self.file_name) as fp: parser.read_file(fp) extends = parser[self.section].get('extends') settings = OrderedDict() if extends: extends = self._parse_setting(extends, expand_vars=True) if isinstance(extends, str): extends = [extends] for e in reversed(extends): settings.update(self.__class__(e, extender=self).read_file()) settings_from_file = parser[self.section] for k in settings: if k in settings_from_file: del settings[k] settings.update(settings_from_file) return settings def load(self, base_settings): """Merge local settings from file with ``base_settings``. Returns a new OrderedDict containing the base settings and the loaded settings. Ordering is: - base settings - settings from extended file(s), if any - settings from file When a setting is overridden, it gets moved to the end. """ if not os.path.exists(self.file_name): self.print_warning( 'Local settings file `{0}` not found'.format(self.file_name)) return is_upper = lambda k: k == k.upper() settings = OrderedDict((k, v) for (k, v) in base_settings.items() if is_upper(k)) for k, v in self.read_file().items(): names = k.split('.') v = self._parse_setting(v, expand_vars=True) obj = settings for name, next_name in zip(names[:-1], names[1:]): next_name = self._convert_name(next_name) next_is_seq = isinstance(next_name, int) default = [PLACEHOLDER] * (next_name + 1) if next_is_seq else {} if isinstance(obj, Mapping): if name not in obj: obj[name] = default elif isinstance(obj, Sequence): name = int(name) while name >= len(obj): obj.append(PLACEHOLDER) if obj[name] is PLACEHOLDER: obj[name] = default obj = obj[name] name = self._convert_name(names[-1]) try: curr_v = obj[name] except (KeyError, IndexError): pass else: if isinstance(curr_v, LocalSetting): curr_v.value = v self.registry[curr_v] = name obj[name] = v settings.move_to_end(names[0]) settings.pop('extends', None) self._do_interpolation(settings, settings) return settings def _do_interpolation(self, v, settings): if isinstance(v, string_types): v = v.format(**settings) elif isinstance(v, Mapping): for k in v: v[k] = self._do_interpolation(v[k], settings) elif isinstance(v, Sequence): v = v.__class__(self._do_interpolation(item, settings) for item in v) return v def _convert_name(self, name): """Convert ``name`` to int if it looks like an int. Otherwise, return it as is. """ if re.search('^\d+$', name): if len(name) > 1 and name[0] == '0': # Don't treat strings beginning with "0" as ints return name return int(name) return name
Video poker is an amazingly enjoyable pastime that can be simply experienced with Internet access. As a matter of fact, along with electronic poker, Net players can acquire a fair amount of info about video poker. Such info is composed of video poker guides and tactics, analysis, tricks, and a whole lot more. As well, the Internet gives a method for users to play video poker for no charge or, if a gambler prefers, they will be able to certainly participate in real life electronic poker gaming for money. For people hunting for an outstanding, gratis activity, many sites on the internet provide free electronic poker software applications. At same time, numerous shareware electronic poker programs exist that cost minimal fee to use. Alternately, for the aspiring bettor, electronic poker will be able to be bet on on the internet where real stakes are in place-players are able to lay bets and earn beautiful prizes or cold hard money. The payouts for video poker ranges from one online casino to another. Thus, an ardent bettor might gain from setting up an account at many gambling halls delivering video poker, instead of restricting their betting to one poker room. Conversely, for players who are pretty new to the video poker world, it’s best to try your skills at numerous gratuitous video poker websites prior to engaging in gaming that is comprised of actual money. The codes associated with electronic poker are easily paralleled to the rules used at poker rooms. The standards that apply to video poker betting are built absolutely upon the variant of video poker you are wagering on. And so, if you are entirely at ease with the proper way to gamble on poker, gambling on electronic poker is an effortless and effortless transition. The important item to recall when you are betting on any style of poker, whether it is electronic poker or established poker, is that regardless of your skill level is, there is always the chance of not winning the game.
import csp rgb = ['R', 'G', 'B'] d2 = { 'A' : rgb, 'B' : rgb, 'C' : ['R'], 'D' : rgb,} v2 = d2.keys() n2 = {'A' : ['B', 'C', 'D'], 'B' : ['A', 'C', 'D'], 'C' : ['A', 'B'], 'D' : ['A', 'B'],} def constraints(A, a, B, b): if A == B: # e.g. NSW == NSW return True if a == b: # e.g. WA = G and SA = G return False return True c2 = csp.CSP(v2, d2, n2, constraints) c2.label = 'Really Lame' myCSPs = [ { 'csp' : c2, # 'select_unassigned_variable': csp.mrv, # 'order_domain_values': csp.lcv, # 'inference': csp.mac, # 'inference': csp.forward_checking, }, { 'csp' : c2, 'select_unassigned_variable': csp.mrv, # 'order_domain_values': csp.lcv, # 'inference': csp.mac, # 'inference': csp.forward_checking, }, { 'csp' : c2, # 'select_unassigned_variable': csp.mrv, 'order_domain_values': csp.lcv, # 'inference': csp.mac, # 'inference': csp.forward_checking, }, { 'csp' : c2, # 'select_unassigned_variable': csp.mrv, # 'order_domain_values': csp.lcv, 'inference': csp.mac, # 'inference': csp.forward_checking, }, { 'csp' : c2, # 'select_unassigned_variable': csp.mrv, # 'order_domain_values': csp.lcv, # 'inference': csp.mac, 'inference': csp.forward_checking, }, { 'csp' : c2, 'select_unassigned_variable': csp.mrv, 'order_domain_values': csp.lcv, 'inference': csp.mac, # 'inference': csp.forward_checking, }, ]
"The eyesight for an eagle is what thought is to a man." My spiritual sight has height and distance. Father, today's reading below is powerful from any interpretation that my mind chooses to take. What I can't really tell is if the body that Jesus refers to is His resurrected body, where we will all gather around like birds of prey wanting a piece of Him when He comes again in all His glory . . . or if the body is our dead carcass where birds of prey will gather around us once we are taken to be with You. I also wonder if this could also mean 'the dead' who have not experienced Your Grace or Love through their own choice and who have chosen through their own acts not to belong to You. Are they the ones left behind? There are more than three interpretations here but under any account, I want to be with You alive in the spiritual sense, full measure, pressed down, running over, now AND once my body is all used up and physically dead. In any instance, I want to be with You. I give myself to You anyway You want or will have me. I can also see how we could all be the body and Your and Your angels are the eagles picking out who will be taken. This is most certaily a deep Scripture as they all are and this one will likely keep my mind busy for quite some time. One thing I do not want to do is 'miss the boat' in the literal and spiritual sense as those in Noah's time did. Thank You for the depth of awareness You have given me today. I Love You! I'm crazy about You and You are on my mind, all the time. 26 "As it was in the days of Noah, so will it be in the days of the Son of man. 37 And they said to Him, "Where, Lord?" He said to them, "Where the body is (as in where a carcass falls), there the eagles (birds of prey) will be gathered together (to devour it)."
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import unittest from mock import Mock import configobj from diamond.handler.tsdb import TSDBHandler import diamond.handler.tsdb as mod from diamond.metric import Metric # These two methods are used for overriding the TSDBHandler._connect method. # Please check the Test class' setUp and tearDown methods def fake_connect(self): # used for 'we can connect' tests m = Mock() self.socket = m if '__sockets_created' not in self.config: self.config['__sockets_created'] = [m] else: self.config['__sockets_created'].append(m) def fake_bad_connect(self): # used for 'we can not connect' tests self.socket = None class TestTSDBdHandler(unittest.TestCase): def setUp(self): self.__connect_method = mod.TSDBHandler mod.TSDBHandler._connect = fake_connect def tearDown(self): # restore the override mod.TSDBHandler._connect = self.__connect_method def test_single_gauge(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = ('put cpu.cpu_count 1234567 123 hostname=myhostname\n') handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_single_tag_no_space_in_front(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = 'myTag=myValue' metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_single_tag_space_in_front(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ' myTag=myValue' metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_multiple_tag_no_space_in_front(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = 'myTag=myValue mySecondTag=myOtherValue' metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myTag=myValue mySecondTag=myOtherValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_multiple_tag_space_in_front(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ' myTag=myValue mySecondTag=myOtherValue' metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myTag=myValue mySecondTag=myOtherValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_multiple_tag_no_space_in_front_comma(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue', 'mySecondTag=myOtherValue'] metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue mySecondTag=myOtherValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_multiple_tag_no_space_in_front_comma_and_space(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue', 'mySecondTag=myOtherValue myThirdTag=yetAnotherVal'] metric = Metric('servers.myhostname.cpu.cpu_count', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu_count 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue mySecondTag=myOtherValue ' expected_data += 'myThirdTag=yetAnotherVal\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_cpu_metrics_taghandling_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metric = Metric('servers.myhostname.cpu.cpu0.user', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.user 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue cpuId=cpu0\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_cpu_metrics_taghandling_deactivate_so_old_values(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metric = Metric('servers.myhostname.cpu.cpu0.user', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.cpu0.user 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_cpu_metrics_taghandling_aggregate_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metric = Metric('servers.myhostname.cpu.total.user', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.user 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue cpuId=cpu0\n' handler = TSDBHandler(config) handler.process(metric) assert not handler.socket.sendall.called, "should not process" def test_cpu_metrics_taghandling_aggregate_deactivate_so_old_values1(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metric = Metric('servers.myhostname.cpu.total.user', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.total.user 1234567 123 hostname=myhostname' expected_data += ' myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_cpu_metrics_taghandling_aggregate_deactivate_so_old_values2(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = True config['skipAggregates'] = False metric = Metric('servers.myhostname.cpu.total.user', 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put cpu.user 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue cpuId=total\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_haproxy_metrics_taghandling_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metricName = 'servers.myhostname.' metricName += 'haproxy.SOME-BACKEND.SOME-SERVER.bin' metric = Metric(metricName, 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put haproxy.bin 1234567 123 hostname=myhostname ' expected_data += 'myFirstTag=myValue server=SOME-SERVER ' expected_data += 'backend=SOME-BACKEND\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_haproxy_metrics_taghandling_deactivate(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metricName = 'servers.myhostname.' metricName += 'haproxy.SOME-BACKEND.SOME-SERVER.bin' metric = Metric(metricName, 123, raw_value=123, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put haproxy.SOME-BACKEND.SOME-SERVER.bin 1234567 ' expected_data += '123 hostname=myhostname ' expected_data += 'myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_diskspace_metrics_taghandling_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metricName = 'servers.myhostname.' metricName += 'diskspace.MOUNT_POINT.byte_percentfree' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put diskspace.byte_percentfree 1234567 80 ' expected_data += 'hostname=myhostname ' expected_data += 'myFirstTag=myValue mountpoint=MOUNT_POINT\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_diskspace_metrics_taghandling_deactivate(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metricName = 'servers.myhostname.' metricName += 'diskspace.MOUNT_POINT.byte_percentfree' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put diskspace.MOUNT_POINT.byte_percentfree 1234567' expected_data += ' 80 hostname=myhostname ' expected_data += 'myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_iostat_metrics_taghandling_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metricName = 'servers.myhostname.' metricName += 'iostat.DEV.io_in_progress' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put iostat.io_in_progress 1234567 80 ' expected_data += 'hostname=myhostname ' expected_data += 'myFirstTag=myValue device=DEV\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_iostat_metrics_taghandling_deactivate(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metricName = 'servers.myhostname.' metricName += 'iostat.DEV.io_in_progress' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put iostat.DEV.io_in_progress 1234567' expected_data += ' 80 hostname=myhostname ' expected_data += 'myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_network_metrics_taghandling_default(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] metricName = 'servers.myhostname.' metricName += 'network.IF.rx_packets' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put network.rx_packets 1234567 80 ' expected_data += 'hostname=myhostname ' expected_data += 'myFirstTag=myValue interface=IF\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_network_metrics_taghandling_deactivate(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue'] config['cleanMetrics'] = False metricName = 'servers.myhostname.' metricName += 'network.IF.rx_packets' metric = Metric(metricName, 80, raw_value=80, timestamp=1234567, host='myhostname', metric_type='GAUGE') expected_data = 'put network.IF.rx_packets 1234567' expected_data += ' 80 hostname=myhostname ' expected_data += 'myFirstTag=myValue\n' handler = TSDBHandler(config) handler.process(metric) handler.socket.sendall.assert_called_with(expected_data) def test_with_invalid_tag(self): config = configobj.ConfigObj() config['host'] = 'localhost' config['port'] = '9999' config['tags'] = ['myFirstTag=myValue', 'mySecondTag=myOtherValue,myThirdTag=yetAnotherVal'] try: TSDBHandler(config) fail("Expected an exception") except Exception, e: assert(e)
KHS boys's doubles team of Takashi Thomas and Sanjit Lanka, and the girl's doubles team of Sabrina Barnfield and Autrria Compton are competing in the UIL Class 3A state championship at Texas A&M University at College Station . As of today's post, the girls finished 3rd in State and the boys will be playing for the state championship today. Way to Go Bulldogs!
import json import time from datetime import datetime import requests from cache import * class BaseApi: def __init__(self, environment='development'): self.base_url = 'http://pifarm-api.herokuapp.com/v1' if environment == 'development' else 'http://pifarm.apphb.com/v1' self.sessionToken = None self._cache = None class OnlineApi(BaseApi): def connect(self, device_id, serial_number): url = '{0}/auth/login-device'.format(self.base_url) headers = {'content-type': 'application/json'} payload = {'deviceId': device_id, 'serialNumber': serial_number} response = requests.post(url, data=json.dumps(payload), headers=headers) if response.status_code == requests.codes.ok: data = response.json() self.sessionToken = data['sessionToken'] device_model = {'id': data['id'], 'name': data['name'], 'description': data['description'], 'serial_number': data['serialNumber']} return device_model else: response.raise_for_status() def heartbeat(self, device): url = '{0}/devices/{1}/stats'.format(self.base_url, device.id) headers = {'content-type': 'application/json', 'Authorization': 'Bearer ' + self.sessionToken} payload = {'uptime': device.stats.uptime, 'temperature': {'cpu': device.stats.cpu_temperature, 'gpu': device.stats.gpu_temperature}, 'memory': {'total': device.stats.memory_total, 'used': device.stats.memory_used}, 'hdd': {'total': device.stats.hdd_total, 'used': device.stats.hdd_used}, 'at': str(datetime.utcnow())} response = requests.post(url, data=json.dumps(payload), headers=headers) if response.status_code == requests.codes.ok: return True else: response.raise_for_status() class OfflineApi(BaseApi): def connect(self, device_id, serial_number): self._cache = Cache() device_model = {'id': device_id, 'name': 'n/a', 'description': 'n/a', 'serial_number': serial_number} return device_model def heartbeat(self, device): stats = device.stats reading = StatisticsReading(device_id=device.id, uptime=stats.uptime, cpu_temperature=stats.cpu_temperature, gpu_temperature=stats.gpu_temperature, memory_total=stats.memory_total, memory_used=stats.memory_used, hdd_total=stats.hdd_total, hdd_used=stats.hdd_used, at=time.time()) reading.save()
After more than 10 years in production, this remarkable and too often overlooked single has become the star it was always meant to be. Is the oldest entry-level bizjet still best in class? I’m going to admit it right up front: I’ve always admired the Cessna CJ3 from afar but frankly, it’s a bit, (okay, a lot) out of my price range, so it’s a plane that I’ve only dreamed about. But dreams are good, and wow, what an airplane! Cessna understands the old wisdom that when you reduce the price, you appeal to new buyers, and when you add performance, old customers upgrade. The new Citation M2 demonstrates that seriously good things happen when you can do both. Apparently, Blackhawk Modifications of Waco, Texas, has its fingers on the pulse. There’s something almost hypnotic about flying behind turbines. Flying the airplane is easy. Mastering the systems is the challenge. For many pilots, speed is the narcotic that attracted them to the discipline in the first place. There’s something that’s both a little primeval and 21st century about starting a turbine engine. All really great flying adventures begin at dawn,” wrote Stephen Coonts in his cross-country odyssey Cannibal Queen, and those words were all I was thinking about as I drove to the airport with the sun still hiding and the new day before me. Back in 1979, I purchased one of the very first Mooney 231s, my first-ever new airplane. One of the benefits of writing about airplanes for a living is that I’m often entrusted to fly some truly wonderful machines. If you fly most of your flights on the West Coast or rely on your airplane for on-demand business or personal travel to virtually any destination, turbocharging is more than a convenience. As one of the premier general aviation manufacturers, Cessna has always enjoyed something of a utility image. Back in the ’80s, when I was working on the ABC TV show Wide World of Flying, I flew up to Washington State to interview Ken Wheeler, designer of the Wheeler Express homebuilt, and fly his innovative airplane.
# -*- coding: utf-8 -*- from shellstreaming import api from shellstreaming.istream import IncInt from shellstreaming.operator import CountWindow from shellstreaming.ostream import LocalFile OUTPUT_FILE = '/tmp/03_CountWindow.txt' def main(): incint_stream = api.IStream(IncInt, max_records=6) incint_win = api.Operator([incint_stream], CountWindow, 3, slide_size=1, fixed_to=['localhost']) api.OStream(incint_win, LocalFile, OUTPUT_FILE, output_format='json', fixed_to=['localhost']) def test(): import json with open(OUTPUT_FILE) as f: # 1st window event assert(int(json.loads(next(f))['num']) == 0) # 2nd window event assert(int(json.loads(next(f))['num']) == 0) assert(int(json.loads(next(f))['num']) == 1) # 3rd window event assert(int(json.loads(next(f))['num']) == 0) assert(int(json.loads(next(f))['num']) == 1) assert(int(json.loads(next(f))['num']) == 2) # 4th window event assert(int(json.loads(next(f))['num']) == 1) assert(int(json.loads(next(f))['num']) == 2) assert(int(json.loads(next(f))['num']) == 3) # 5th window event assert(int(json.loads(next(f))['num']) == 2) assert(int(json.loads(next(f))['num']) == 3) assert(int(json.loads(next(f))['num']) == 4) # 6th window event assert(int(json.loads(next(f))['num']) == 3) assert(int(json.loads(next(f))['num']) == 4) assert(int(json.loads(next(f))['num']) == 5)
Nigel and I went pike/grayling fishing the other day. It was towards the end of the very cold spell and it was a bit grim. We began by trying to catch bait and within seconds I had a small dace. Normally I'd have considered it too small for pike bait but I had a feeling that we might struggle so I put it in the container. After twenty minutes or half-an-hour with nothing but the odd minnow we decided to give it best. Nigel opted to try for the grayling while I took the one pathetic bait and had a go for a pike. My first spot, usually a banker, was apparently fishless so I moved on. the second place was a deep, bankside hole under an overhanging bramble. I lowered the float in and the bait swam down. the cork jerked. Was that a take? I tightened but there was nothing there. I drew the bait to the surface and as I did so a nice pike loomed up behind it and swept gracefully past - missing it completely. In went the float again and after a couple of minutes the same sort of action was repeated. I tried a third time and once again the pike missed the bait completely. It looked decidedly sluggish. I'm a bit slow on the uptake sometimes but it seemed to me that, in the cold water, the pike just couldn't be bothered with any sort of chase. I walked along to my pal and borrowed half-a-metre of nylon which I made into a dropper and attached a half ounce weight. This was tied to the swivel of my wire trace to construct a simple paternoster. I took the float off and returned to the pike spot. My idea was to pin the bait in one place so that the pike couldn't miss it. Sure enough, after a minute or so, the line tightened and I was in. Nigel had the net and by now was out of earshot so I had to play the pike out, lie down on the muddy bank and slide the fish ashore. After a couple of tries I managed and by now my pal, seeing me in action, had returned. He took a couple of pictures before returning to his float gear. The only other action of the session was when Nigel landed a salmon kelt on his grayling gear. still it was a pleasant afternoon and we didn't blank. The following day was a little bit warmer so I decided to try again. This time I only caught minnows so I decided to try for perch. The minnow was lip hooked on my smallish circle hook but I kept a wire trace just in case. Sure enough after half-an-hour or so I had a bite in mid-river but I could tell at once that it was no perch. After a bit of a tussle I managed to land the pike - not a giant but a beautiful fish nonetheless, nicely hooked on the little circle hook.
# -*- encoding: utf-8 -*- from abjad import * import copy def test_scoretools_Rest___copy___01(): r'''Copy rest. ''' rest_1 = Rest((1, 4)) rest_2 = copy.copy(rest_1) assert isinstance(rest_1, Rest) assert isinstance(rest_2, Rest) assert format(rest_1) == format(rest_2) assert rest_1 is not rest_2 def test_scoretools_Rest___copy___02(): r'''Copy rest with LilyPond multiplier. ''' rest_1 = Rest('r4') attach(Multiplier(1, 2), rest_1) rest_2 = copy.copy(rest_1) assert isinstance(rest_1, Rest) assert isinstance(rest_2, Rest) assert format(rest_1) == format(rest_2) assert rest_1 is not rest_2 def test_scoretools_Rest___copy___03(): r'''Copy rest with LilyPond grob overrides and LilyPond context settings. ''' rest_1 = Rest((1, 4)) override(rest_1).staff.note_head.color = 'red' override(rest_1).accidental.color = 'red' set_(rest_1).tuplet_full_length = True rest_2 = copy.copy(rest_1) assert isinstance(rest_1, Rest) assert isinstance(rest_2, Rest) assert format(rest_1) == format(rest_2) assert rest_1 is not rest_2
A Video Tutorial explaining how to print at the College is available for Faculty and Staff. With Print Anywhere there are two steps you have to consider to print a document. When you send a document to the print servers it will not print out at a printer until you're ready. The print job is sent to our print servers and it waits for you to release it at a pay for print printer. There are 3 different ways to print. The same way you printed from a CPCC networked computer previously is the same way you'll print with PrintAnywhere. The only change is that you'll select one of the following print queues to send your job. These print queues will be automatically installed on every CPCC networked computer. MyPrintCenter (MPC) - you can upload a document to MPC for printing at a pay for print printer. Email Submission - you can email attachments to MPC for printing at a pay for print printer. Use one of the following email addresses to send your print. Multi-Function Devices are printing and copying machines strategically placed throughout buildings. Mainly in the libraries, office suites, and open student areas. The omega printing terminals have been attached to printers in computer classrooms. The omega terminals only support network login. You will not be able to use your employee ID badge to release to your print jobs. Note: Print jobs will be removed from the system after 72 hours. If 72 hours have passed you'll need to print the job again. In person training located in HL310 to review budget process and system funding procedure. Registration in LearnerWeb will be available for registration.
################################################################################# # # Copyright (c) 2013 Genome Research Ltd. # # Author: Irina Colgiu <[email protected]> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program. If not, see <http://www.gnu.org/licenses/>. # ################################################################################# import abc import logging from bson.objectid import ObjectId from serapis.com import constants, utils from serapis.controller import exceptions from serapis.controller.db import models from serapis.controller.logic import models_utils from mongoengine.queryset import DoesNotExist from mongoengine.errors import OperationError ################################################################################# class DataAccess(object): pass class SubmissionDataAccess(DataAccess): @classmethod def build_submission_update_dict(cls, update_dict, submission): update_db_dict = dict() for (field_name, field_val) in update_dict.items(): if field_name == 'files_list': pass # elif field_name == 'hgi_project_list' and field_val: # for prj in field_val: # if not utils.is_hgi_project(prj): # raise ValueError("This project name is not according to HGI_project rules -- "+str(constants.REGEX_HGI_PROJECT)) # if getattr(submission, 'hgi_project_list'): # hgi_projects = submission.hgi_project_list # hgi_projects.extend(field_val) # else: # hgi_projects = field_val # update_db_dict['set__hgi_project_list'] = hgi_projects elif field_name == 'hgi_project' and field_val != None: #for prj in field_val: if not utils.is_hgi_project(field_val): raise ValueError("This project name is not according to HGI_project rules -- "+str(constants.REGEX_HGI_PROJECT)) update_db_dict['set__hgi_project'] = field_val elif field_name == '_is_uploaded_as_serapis' and field_val != None: update_db_dict['set__upload_as_serapis'] = field_val # File-related metadata: elif field_name == 'data_subtype_tags': if getattr(submission, 'data_subtype_tags'): subtypes_dict = submission.data_subtype_tags subtypes_dict.update(field_val) else: subtypes_dict = field_val update_db_dict['set__data_subtype_tags'] = subtypes_dict elif field_name == 'data_type': update_db_dict['set__data_type'] = field_val # TODO: put here the logic around inserting a ref genome elif field_name == 'file_reference_genome_id': models.ReferenceGenome.objects(md5=field_val).get() # Check that the id exists in the RefGenome coll, throw exc update_db_dict['set__file_reference_genome_id'] = field_val # This should be tested if it's ok... elif field_name == 'library_metadata': update_db_dict['set__abstract_library'] = field_val elif field_name == 'study': update_db_dict['set__study'] = field_val elif field_name == 'irods_collection': update_db_dict['set__irods_collection'] = field_val elif field_name == 'file_type': update_db_dict['set__file_type'] = field_val elif field_name == 'sanger_user_id': update_db_dict['set__sanger_user_id'] = field_val else: logging.error("ERROR: KEY not in Submission class declaration!!!!! %s", field_name) return update_db_dict @classmethod def update_submission(cls, update_dict, submission_id, submission=None, nr_retries=constants.MAX_DBUPDATE_RETRIES): ''' Updates an existing submission or creates a new submission if no submission_id is provided. Returns -- 0 if nothing was changed, 1 if the update has happened Throws: ValueError - if the data in update_dict is not correct ''' if submission_id == None: return 0 elif not submission: submission = cls.retrieve_submission(submission_id) i, upd = 0, 0 while i < nr_retries and upd == 0: update_db_dict = cls.build_submission_update_dict(update_dict, submission) upd = models.Submission.objects(id=submission.id, version=submission.version).update_one(**update_db_dict) logging.info("Updating submission...updated? %s", upd) i+=1 return upd @classmethod def insert_submission(cls, submission_data, user_id): ''' Inserts a submission in the DB, but the submission won't have the files_list set, as the files are created after the submission exists. ''' submission = models.Submission() submission.sanger_user_id = user_id submission.submission_date = utils.get_today_date() submission.save() if cls.update_submission(submission_data, submission.id, submission) == 1: return submission.id submission.delete() return None @classmethod def insert_submission_date(cls, submission_id, date): if date != None: return models.Submission.objects(id=submission_id).update_one(set__submission_date=date) return None # !!! This is not ATOMIC!!!! @classmethod def delete_submission(cls, submission_id, submission=None): if not submission: submission = cls.retrieve_submission(submission_id) # 2. Delete the files and the submission models.Submission.objects(id=submission_id).delete() for file_id in submission.files_list: FileDataAccess.delete_submitted_file(file_id) return True @classmethod def update_submission_file_list(cls, submission_id, files_list, submission=None): if not submission: submission = cls.retrieve_submission(submission_id) if not files_list: return cls.delete_submission(submission_id, submission) upd_dict = {"inc__version" : 1, "set__files_list" : files_list} return models.Submission.objects(id=submission_id).update_one(**upd_dict) @classmethod def retrieve_all_user_submissions(cls, user_id): return models.Submission.objects.filter(sanger_user_id=user_id) @classmethod def retrieve_all_submissions(cls): return models.Submission.objects() @classmethod def retrieve_submission(cls, subm_id): return models.Submission.objects(_id=ObjectId(subm_id)).get() @classmethod def retrieve_all_file_ids_for_submission(cls, subm_id): return models.Submission.objects(id=ObjectId(subm_id)).only('files_list').get().files_list @classmethod def retrieve_all_files_for_submission(cls, subm_id): return models.SubmittedFile.objects(submission_id=str(subm_id)) #return [f for f in files] @classmethod def retrieve_submission_date(cls, file_id, submission_id=None): if submission_id == None: submission_id = FileDataAccess.retrieve_submission_id(file_id) return models.Submission.objects(id=ObjectId(submission_id)).only('submission_date').get().submission_date # TODO: if no obj can be found => get() throws an ugly exception! @classmethod def retrieve_submission_upload_as_serapis_flag(cls, submission_id): if not submission_id: return None return models.Submission.objects(id=ObjectId(submission_id)).only('_is_uploaded_as_serapis').get()._is_uploaded_as_serapis @classmethod def retrieve_only_submission_fields(cls, submission_id, fields_list): if not submission_id: return None for field in fields_list: if not field in models.Submission._fields: raise ValueError(message="Not all fields given as parameter exist as fields of a Submission type.") return models.Submission.objects(id=ObjectId(submission_id)).only(*fields_list).get() class FileDataAccess(DataAccess): @classmethod def update_entity(cls, entity_json, crt_ent, sender): has_changed = False for key in entity_json: old_val = getattr(crt_ent, key) if key in constants.ENTITY_META_FIELDS or key == None: continue elif old_val == None or old_val == 'unspecified': setattr(crt_ent, key, entity_json[key]) crt_ent.last_updates_source[key] = sender has_changed = True continue else: if hasattr(crt_ent, key) and entity_json[key] == getattr(crt_ent, key): continue if key not in crt_ent.last_updates_source: crt_ent.last_updates_source[key] = constants.INIT_SOURCE priority_comparison = utils.compare_sender_priority(crt_ent.last_updates_source[key], sender) if priority_comparison >= 0: setattr(crt_ent, key, entity_json[key]) crt_ent.last_updates_source[key] = sender has_changed = True return has_changed @classmethod def check_if_list_has_new_entities(cls, old_entity_list, new_entity_list): ''' old_entity_list = list of entity objects new_entity_list = json list of entities ''' if len(new_entity_list) == 0: return False if len(old_entity_list) == 0 and len(new_entity_list) > 0: return True for new_json_entity in new_entity_list: found = False for old_entity in old_entity_list: if models_utils.EntityModelUtilityFunctions.check_if_entities_are_equal(old_entity, new_json_entity): found = True break if not found: return True return False @classmethod def retrieve_submitted_file(cls, file_id): return models.SubmittedFile.objects(_id=ObjectId(file_id)).get() @classmethod def retrieve_submitted_file_by_submission(cls, submission_id, submission_file_id): # indexes = models.SubmittedFile.objects._collection.index_information() # print "INDEXES::::", [str(i) for i in indexes] return models.SubmittedFile.objects(submission_id=submission_id, file_id=submission_file_id).get() # Works, turned off for testing: #return models.SubmittedFile.objects(submission_id=submission_id, file_id=submission_file_id).hint([('submission_id', 1)]).get() # SFile.objects(submission_id='000').hint([('_cls', 1), ('submission_id', 1)]) #return models.SubmittedFile.objects(submission_id=submission_id, file_id=submission_file_id).get() #.hint([('_id', 1)]) #hint(['_cls_1_submission_id']) _cls_1_submission_id_1 #self.assertEqual(BlogPost.objects.hint([('tags', 1)]).count(), 10) # self.assertEqual(BlogPost.objects.hint([('ZZ', 1)]).count(), 10) @classmethod def retrieve_sample_list(cls, file_id): return models.SubmittedFile.objects(id=ObjectId(file_id)).only('sample_list').get().sample_list @classmethod def retrieve_library_list(cls, file_id): return models.SubmittedFile.objects(id=ObjectId(file_id)).only('library_list').get().library_list @classmethod def retrieve_study_list(cls, file_id): return models.SubmittedFile.objects(id=ObjectId(file_id)).only('study_list').get().study_list @classmethod def retrieve_version(cls, file_id): ''' Returns the list of versions for this file (e.g. [9,1,0,1]).''' return models.SubmittedFile.objects(id=ObjectId(file_id)).only('version').get().version @classmethod def retrieve_SFile_fields_only(cls, file_id, list_of_field_names): ''' Returns a SubmittedFile object which has only the mentioned fields retrieved from DB - from efficiency reasons. The rest of the fields are set to None or default values.''' return models.SubmittedFile.objects(id=ObjectId(file_id)).only(*list_of_field_names).get() @classmethod def retrieve_sample_by_name(cls, sample_name, file_id, submitted_file=None): if submitted_file == None: sample_list = cls.retrieve_sample_list(file_id) else: sample_list = submitted_file.sample_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('name', sample_name, sample_list) @classmethod def retrieve_library_by_name(cls, lib_name, file_id, submitted_file=None): if submitted_file == None: library_list = cls.retrieve_library_list(file_id) else: library_list = submitted_file.library_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('name', lib_name, library_list) @classmethod def retrieve_study_by_name(cls, study_name, file_id, submitted_file=None): if submitted_file == None: study_list = cls.retrieve_study_list(file_id) else: study_list = submitted_file.study_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('name', study_name, study_list) @classmethod def retrieve_sample_by_id(cls, sample_id, file_id, submitted_file=None): if submitted_file == None: sample_list = cls.retrieve_sample_list(file_id) else: sample_list = submitted_file.sample_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('internal_id', int(sample_id), sample_list) @classmethod def retrieve_library_by_id(cls, lib_id, file_id, submitted_file=None): if submitted_file == None: library_list = cls.retrieve_library_list(file_id) else: library_list = submitted_file.library_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('internal_id', int(lib_id), library_list) @classmethod def retrieve_study_by_id(cls, study_id, file_id, submitted_file=None): if submitted_file == None: study_list = cls.retrieve_study_list(file_id) print("STUDY LIST: ", study_list) else: study_list = submitted_file.study_list return models_utils.EntityModelUtilityFunctions.get_entity_by_field('internal_id', int(study_id), study_list) @classmethod def retrieve_submission_id(cls, file_id): return models.SubmittedFile.objects(id=ObjectId(file_id)).only('submission_id').get().submission_id @classmethod def retrieve_sanger_user_id(cls, file_id): #subm_id = models.SubmittedFile.objects(id=ObjectId(file_id)).only('submission_id').get().submission_id subm_id = cls.retrieve_submission_id(file_id) return models.Submission.objects(id=ObjectId(subm_id)).only('sanger_user_id').get().sanger_user_id @classmethod def retrieve_client_file_path(cls, file_id): return models.SubmittedFile.objects(id=file_id).only('file_path_client').get().file_path_client @classmethod def retrieve_file_md5(cls, file_id): return models.SubmittedFile.objects(id=file_id).only('md5').get().md5 @classmethod def retrieve_index_md5(cls, file_id): return models.SubmittedFile.objects(id=file_id).only('index_file_md5').get().index_file_md5 @classmethod def retrieve_tasks_dict(cls, file_id): return models.SubmittedFile.objects(id=file_id).only('tasks').get().tasks #################### AUXILIARY FUNCTIONS - RELATED TO FILE VERSION ############ @classmethod def get_file_version(cls, file_id, submitted_file=None): if submitted_file == None: version = cls.retrieve_version(file_id) return version[0] return submitted_file.version[0] @classmethod def get_sample_version(cls, file_id, submitted_file=None): if submitted_file == None: version = cls.retrieve_version(file_id) return version[1] return submitted_file.version[1] @classmethod def get_library_version(cls, file_id, submitted_file=None): if submitted_file == None: version = cls.retrieve_version(file_id) return version[2] return submitted_file.version[2] @classmethod def get_study_version(cls, file_id, submitted_file=None): if submitted_file == None: version = cls.retrieve_version(file_id) return version[3] return submitted_file.version[3] @classmethod def get_entity_list_version(cls, entity_type, file_id, submitted_file=None): if entity_type not in constants.LIST_OF_ENTITY_TYPES: return None if entity_type == constants.SAMPLE_TYPE: return cls.get_sample_version(file_id, submitted_file) elif entity_type == constants.STUDY_TYPE: return cls.get_study_version(file_id, submitted_file) elif entity_type == constants.LIBRARY_TYPE: return cls.get_library_version(file_id, submitted_file) #------------------------ SEARCH ENTITY --------------------------------- @classmethod def search_JSONEntity_in_list(cls, entity_json, entity_list): ''' Searches for the JSON entity within the entity list. Returns: - the entity if it was found - None if not Throws: exceptions.NoIdentifyingFieldsProvidedException -- if the entity_json doesn't contain any field to identify it. ''' if entity_list == None or len(entity_list) == 0: return None has_ids = models_utils.EntityModelUtilityFunctions.check_if_JSONEntity_has_identifying_fields(entity_json) # This throws an exception if the json entity doesn't have any ids if not has_ids: raise exceptions.NoIdentifyingFieldsProvidedException(faulty_expression=entity_json) for ent in entity_list: if models_utils.EntityModelUtilityFunctions.check_if_entities_are_equal(ent, entity_json) == True: return ent return None @classmethod def search_JSONLibrary_in_list(cls, lib_json, lib_list): return cls.search_JSONEntity_in_list(lib_json, lib_list) @classmethod def search_JSONSample_in_list(cls, sample_json, sample_list): return cls.search_JSONEntity_in_list(sample_json, sample_list) @classmethod def search_JSONStudy_in_list(cls, study_json, study_list): return cls.search_JSONEntity_in_list(study_json, study_list) @classmethod def search_JSONLibrary(cls, lib_json, file_id, submitted_file=None): if submitted_file == None: submitted_file = cls.retrieve_submitted_file(file_id) return cls.search_JSONEntity_in_list(lib_json, submitted_file.library_list) @classmethod def search_JSONSample(cls, sample_json, file_id, submitted_file=None): if submitted_file == None: submitted_file = cls.retrieve_submitted_file(file_id) return cls.search_JSONEntity_in_list(sample_json, submitted_file.sample_list) @classmethod def search_JSONStudy(cls, study_json, file_id, submitted_file=None): if submitted_file == None: submitted_file = cls.retrieve_submitted_file(file_id) return cls.search_JSONEntity_in_list(study_json, submitted_file.study_list) @classmethod def search_JSON_entity(cls, entity_json, entity_type, file_id, submitted_file=None): if submitted_file == None: submitted_file = cls.retrieve_submitted_file(file_id) if entity_type == constants.STUDY_TYPE: return cls.search_JSONEntity_in_list(entity_json, submitted_file.study_list) elif entity_type == constants.LIBRARY_TYPE: return cls.search_JSONEntity_in_list(entity_json, submitted_file.library_list) elif entity_type == constants.SAMPLE_TYPE: return cls.search_JSONEntity_in_list(entity_json, submitted_file.sample_list) return None # ------------------------ INSERTS & UPDATES ----------------------------- # Hackish way of putting the attributes of the abstract lib, in each lib inserted: @classmethod def __update_lib_from_abstract_lib__(cls, library, abstract_lib): if not library: return None for field in models.AbstractLibrary._fields: if hasattr(abstract_lib, field) and getattr(abstract_lib, field) not in [None, "unspecified"]: setattr(library, field, getattr(abstract_lib, field)) return library @classmethod def insert_JSONentity_in_filemeta(cls, entity_json, entity_type, sender, submitted_file): if submitted_file == None or not entity_json or not entity_type: return False if entity_type not in constants.LIST_OF_ENTITY_TYPES: return False if cls.search_JSON_entity(entity_json, entity_type, submitted_file.id, submitted_file) == None: #library = cls.json2library(library_json, sender) entity = models_utils.EntityModelUtilityFunctions.json2entity(entity_json, sender, entity_type) #library = cls.__update_lib_from_abstract_lib__(library, submitted_file.abstract_library) #submitted_file.library_list.append(library) if entity_type == constants.LIBRARY_TYPE: submitted_file.library_list.append(entity) elif entity_type == constants.SAMPLE_TYPE: submitted_file.sample_list.append(entity) elif entity_type == constants.STUDY_TYPE: submitted_file.study_list.append(entity) return True return False @classmethod def insert_library_in_SFObj(cls, library_json, sender, submitted_file): if submitted_file == None or not library_json: return False if cls.search_JSONLibrary(library_json, submitted_file.id, submitted_file) == None: library = models_utils.EntityModelUtilityFunctions.json2library(library_json, sender) library = cls.__update_lib_from_abstract_lib__(library, submitted_file.abstract_library) submitted_file.library_list.append(library) return True return False @classmethod def insert_sample_in_SFObj(cls, sample_json, sender, submitted_file): if submitted_file == None: return False if cls.search_JSONSample(sample_json, submitted_file.id, submitted_file) == None: sample = models_utils.EntityModelUtilityFunctions.json2sample(sample_json, sender) submitted_file.sample_list.append(sample) return True return False @classmethod def insert_study_in_SFObj(cls, study_json, sender, submitted_file): if submitted_file == None: return False if cls.search_JSONStudy(study_json, submitted_file.id, submitted_file) == None: study = models_utils.EntityModelUtilityFunctions.json2study(study_json, sender) submitted_file.study_list.append(study) return True return False ########################## @classmethod def insert_JSONentity_in_db(cls, entity_json, entity_type, sender, file_id, submitted_file): if entity_type not in constants.LIST_OF_ENTITY_TYPES: return False if entity_type == constants.SAMPLE_TYPE: return cls.insert_sample_in_db(entity_json, sender, file_id) elif entity_type == constants.LIBRARY_TYPE: return cls.insert_library_in_db(entity_json, sender, file_id) elif entity_type == constants.STUDY_TYPE: return cls.insert_study_in_db(entity_json, sender, file_id) return False @classmethod def insert_library_in_db(cls, library_json, sender, file_id): submitted_file = cls.retrieve_submitted_file(file_id) inserted = cls.insert_library_in_SFObj(library_json, sender, submitted_file) if inserted == True: library_version = cls.get_library_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__2=library_version).update_one(inc__version__2=1, inc__version__0=1, set__library_list=submitted_file.library_list) return 0 @classmethod def insert_sample_in_db(cls, sample_json, sender, file_id): ''' Inserts in the DB the updated document with the new sample inserted in the sample list. Returns: 1 -- if the insert in the DB was successfully 0 -- if not ''' submitted_file = cls.retrieve_submitted_file(file_id) inserted = cls.insert_sample_in_SFObj(sample_json, sender, submitted_file) if inserted == True: sample_version = cls.get_sample_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__1=sample_version).update_one(inc__version__1=1, inc__version__0=1, set__sample_list=submitted_file.entity_set) return 0 @classmethod def insert_study_in_db(cls, study_json, sender, file_id): submitted_file = cls.retrieve_submitted_file(file_id) inserted = cls.insert_study_in_SFObj(study_json, sender, submitted_file) logging.info("IN STUDY INSERT --> HAS THE STUDY BEEN INSERTED? %s", inserted) #print "HAS THE STUDY BEEN INSERTED????==============", inserted if inserted == True: study_version = cls.get_study_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__3=study_version).update_one(inc__version__3=1, inc__version__0=1, set__study_list=submitted_file.study_list) return 0 #--------------------------------------------------------------- @classmethod # def update_library_in_SFObj(cls, library_json, sender, submitted_file): # if submitted_file == None: # return False # crt_library = cls.search_JSONEntity_in_list(library_json, submitted_file.library_list) # if crt_library == None: # raise exceptions.ResourceNotFoundError(library_json) # #return False # return cls.update_entity(library_json, crt_library, sender) # # @classmethod # def update_sample_in_SFObj(cls, sample_json, sender, submitted_file): # if submitted_file == None: # return False # crt_sample = cls.search_JSONEntity_in_list(sample_json, submitted_file.sample_list) # if crt_sample == None: # raise exceptions.ResourceNotFoundError(sample_json) # #return False # return cls.update_entity(sample_json, crt_sample, sender) # @classmethod # def update_study_in_SFObj(cls, study_json, sender, submitted_file): # if submitted_file == None: # return False # crt_study = cls.search_JSONEntity_in_list(study_json, submitted_file.study_list) # if crt_study == None: # raise exceptions.ResourceNotFoundError(study_json) # #return False # return cls.update_entity(study_json, crt_study, sender) #--------------------------------------------------------------- @classmethod def update_library_in_db(cls, library_json, sender, file_id, library_id=None): ''' Throws: - DoesNotExist exception -- if the file being queried does not exist in the DB - exceptions.NoIdentifyingFieldsProvidedException -- if the library_id isn't provided neither as a parameter, nor in the library_json ''' if library_id == None and models_utils.EntityModelUtilityFunctions.check_if_JSONEntity_has_identifying_fields(library_json) == False: raise exceptions.NoIdentifyingFieldsProvidedException() submitted_file = cls.retrieve_submitted_file(file_id) if library_id != None: library_json['internal_id'] = int(library_id) has_changed = cls.update_library_in_SFObj(library_json, sender, submitted_file) if has_changed == True: lib_list_version = cls.get_library_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__2=lib_list_version).update_one(inc__version__2=1, inc__version__0=1, set__library_list=submitted_file.library_list) return 0 @classmethod def update_sample_in_db(cls, sample_json, sender, file_id, sample_id=None): ''' Updates the metadata for a sample in the DB. Throws: - DoesNotExist exception -- if the file being queried does not exist in the DB - exceptions.NoIdentifyingFieldsProvidedException -- if the sample_id isn't provided neither as a parameter, nor in the sample_json ''' if sample_id == None and models_utils.EntityModelUtilityFunctions.check_if_JSONEntity_has_identifying_fields(sample_json) == False: raise exceptions.NoIdentifyingFieldsProvidedException() submitted_file = cls.retrieve_submitted_file(file_id) if sample_id != None: sample_json['internal_id'] = int(sample_id) has_changed = cls.update_sample_in_SFObj(sample_json, sender, submitted_file) if has_changed == True: sample_list_version = cls.get_sample_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__1=sample_list_version).update_one(inc__version__1=1, inc__version__0=1, set__sample_list=submitted_file.entity_set) return 0 @classmethod def update_study_in_db(cls, study_json, sender, file_id, study_id=None): ''' Throws: - DoesNotExist exception -- if the file being queried does not exist in the DB - exceptions.NoIdentifyingFieldsProvidedException -- if the study_id isn't provided neither as a parameter, nor in the study_json ''' if study_id == None and models_utils.EntityModelUtilityFunctions.check_if_JSONEntity_has_identifying_fields(study_json) == False: raise exceptions.NoIdentifyingFieldsProvidedException() submitted_file = cls.retrieve_submitted_file(file_id) if study_id != None: study_json['internal_id'] = int(study_id) has_changed = cls.update_study_in_SFObj(study_json, sender, submitted_file) if has_changed == True: lib_list_version = cls.get_study_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__3=lib_list_version).update_one(inc__version__3=1, inc__version__0=1, set__study_list=submitted_file.study_list) return 0 #------------------------------------------------------------------------------------ @classmethod def insert_or_update_library_in_SFObj(cls, library_json, sender, submitted_file): if submitted_file == None or library_json == None: return False lib_found = cls.search_JSONEntity_in_list(library_json, submitted_file.library_list) if not lib_found: return cls.insert_library_in_SFObj(library_json, sender, submitted_file) else: return cls.update_entity(library_json, lib_found, sender) # return cls.update_library_in_SFObj(library_json, sender, submitted_file) @classmethod def insert_or_update_sample_in_SFObj(cls, sample_json, sender, submitted_file): if submitted_file == None or sample_json == None: return False sample_found = cls.search_JSONEntity_in_list(sample_json, submitted_file.entity_set) if sample_found == None: return cls.insert_sample_in_SFObj(sample_json, sender, submitted_file) else: return cls.update_entity(sample_json, sample_found, sender) # return cls.update_sample_in_SFObj(sample_json, sender, submitted_file) @classmethod def insert_or_update_study_in_SFObj(cls, study_json, sender, submitted_file): if submitted_file == None or study_json == None: return False study_found = cls.search_JSONEntity_in_list(study_json, submitted_file.study_list) if study_found == None: return cls.insert_study_in_SFObj(study_json, sender, submitted_file) else: return cls.update_entity(study_json, study_found, sender) # return cls.update_study_in_SFObj(study_json, sender, submitted_file) #-------------------------------------------------------------------------------- @classmethod def insert_or_update_library_in_db(cls, library_json, sender, file_id): submitted_file = cls.retrieve_submitted_file(file_id) # done = False # lib_exists = cls.search_JSONEntity_in_list(library_json, submitted_file.library_list) # if lib_exists == None: # done = cls.insert_library_in_SFObj(library_json, sender, submitted_file) # else: # done = cls.update_library_in_SFObj(library_json, sender, submitted_file) done = cls.insert_or_update_library_in_SFObj(library_json, sender, submitted_file) if done == True: lib_list_version = cls.get_library_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__2=lib_list_version).update_one(inc__version__2=1, inc__version__0=1, set__library_list=submitted_file.library_list) @classmethod def insert_or_update_sample_in_db(cls, sample_json, sender, file_id): submitted_file = cls.retrieve_submitted_file(file_id) # done = False # sample_exists = cls.search_JSONEntity_in_list(sample_json, submitted_file.entity_set) # if sample_exists == None: # done = cls.insert_sample_in_db(sample_json, sender, file_id) # else: # done = cls.update_sample_in_db(sample_json, sender, file_id) done = cls.insert_or_update_sample_in_SFObj(sample_json, sender, submitted_file) if done == True: sample_list_version = cls.get_sample_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__1=sample_list_version).update_one(inc__version__1=1, inc__version__0=1, set__sample_list=submitted_file.entity_set) @classmethod def insert_or_update_study_in_db(cls, study_json, sender, file_id): submitted_file = cls.retrieve_submitted_file(file_id) # done = False # study_exists = cls.search_JSONEntity_in_list(study_json, submitted_file.study_list) # if study_exists == None: # done = cls.insert_study_in_db(study_json, sender, file_id) # else: # done = cls.update_study_in_db(study_json, sender, file_id) done = cls.insert_or_update_study_in_SFObj(study_json, sender, submitted_file) if done == True: study_list_version = cls.get_study_version(submitted_file.id, submitted_file) return models.SubmittedFile.objects(id=file_id, version__3=study_list_version).update_one(inc__version__3=1, inc__version__0=1, set__study_list=submitted_file.study_list) #--------------------------------------------------------------------------------- @classmethod def update_library_list(cls, library_list, sender, submitted_file): if submitted_file == None: return False if not hasattr(submitted_file, 'library_list') or not getattr(submitted_file, 'library_list'): submitted_file.library_list = library_list print("IT enters this fct --- update_library_list in data_access.FileDataAccess......................................") return True for library in library_list: cls.insert_or_update_library_in_SFObj(library, sender, submitted_file) return True @classmethod def update_sample_list(cls, sample_list, sender, submitted_file): if submitted_file == None: return False if not hasattr(submitted_file, 'entity_set') or not getattr(submitted_file, 'entity_set'): submitted_file.entity_set = sample_list print("UPDATING SAMPLES LIST WITH update_sample_list...................................") return True for sample in sample_list: cls.insert_or_update_sample_in_SFObj(sample, sender, submitted_file) return True @classmethod def update_study_list(cls, study_list, sender, submitted_file): if submitted_file == None: return False if not hasattr(submitted_file, 'study_list') or not getattr(submitted_file, 'study_list'): submitted_file.study_list = study_list print("Using this fct for updating study........................") return True for study in study_list: cls.insert_or_update_study_in_SFObj(study, sender, submitted_file) return True #------------------------------------------------------------- # @classmethod # def update_and_save_library_list(cls, library_list, sender, file_id): # if library_list == None or len(library_list) == 0: # return False # for library in library_list: # upsert = cls.insert_or_update_library_in_db(library, sender, file_id) # return True # # @classmethod # def update_and_save_sample_list(cls, entity_set, sender, file_id): # if entity_set == None or len(entity_set) == 0: # return False # for sample in entity_set: # upsert = cls.insert_or_update_sample_in_db(sample, sender, file_id) # return True # # @classmethod # def update_and_save_study_list(cls, study_list, sender, file_id): # if study_list == None or len(study_list) == 0: # return False # for study in study_list: # upsert = cls.insert_or_update_study_in_db(study, sender, file_id) # return True @classmethod def __upd_list_of_primary_types__(cls, crt_list, update_list_json): if len(update_list_json) == 0: return crt_set = set(crt_list) new_set = set(update_list_json) res = crt_set.union(new_set) crt_list = list(res) return crt_list @classmethod def build_update_dict(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return None update_db_dict = dict() for (field_name, field_val) in file_updates.items(): if field_val == 'null' or not field_val: pass if field_name in models.SubmittedFile._fields: if field_name in ['submission_id', 'id', '_id', 'version', 'file_type', 'irods_coll', # TODO: make it updatable by user, if file not yet submitted to permanent irods coll 'file_path_client', 'last_updates_source', 'file_mdata_status', 'file_submission_status', 'missing_mandatory_fields_dict']: pass elif field_name == 'library_list': # Crappy way of doing this - to be rewritten -- if I don't "patch" the library, it won't have the attributes from abstract if len(field_val) > 0: #was_updated = cls.update_library_list(field_val, update_source, submitted_file) update_db_dict['set__library_list'] = submitted_file.library_list update_db_dict['inc__version__2'] = 1 #update_db_dict['inc__version__0'] = 1 # #was_updated = cls.update_library_list(field_val, update_source, submitted_file) # update_db_dict['set__library_list'] = file_updates['library_list'] # update_db_dict['inc__version__2'] = 1 update_db_dict['inc__version__0'] = 1 # #logging.info("UPDATE FILE TO SUBMIT --- UPDATING LIBRARY LIST.................................%s ", was_updated) elif field_name == 'sample_list': if len(field_val) > 0: #was_updated = cls.update_sample_list(field_val, update_source, submitted_file) update_db_dict['set__sample_list'] = file_updates['sample_list'] update_db_dict['inc__version__1'] = 1 update_db_dict['inc__version__0'] = 1 #logging.info("UPDATE FILE TO SUBMIT ---UPDATING SAMPLE LIST -- was it updated? %s", was_updated) elif field_name == 'study_list': if len(field_val) > 0: #was_updated = cls.update_study_list(field_val, update_source, submitted_file) update_db_dict['set__study_list'] = file_updates['study_list'] update_db_dict['inc__version__3'] = 1 update_db_dict['inc__version__0'] = 1 #logging.info("UPDATING STUDY LIST - was it updated? %s", was_updated) # Fields that only the workers' PUT req are allowed to modify - donno how to distinguish... elif field_name == 'missing_entities_error_dict': if field_val: for entity_categ, entities in field_val.items(): update_db_dict['add_to_set__missing_entities_error_dict__'+entity_categ] = entities update_db_dict['inc__version__0'] = 1 elif field_name == 'not_unique_entity_error_dict': if field_val: for entity_categ, entities in field_val.items(): #update_db_dict['push_all__not_unique_entity_error_dict'] = entities update_db_dict['add_to_set__not_unique_entity_error_dict__'+entity_categ] = entities update_db_dict['inc__version__0'] = 1 elif field_name == 'header_has_mdata': if update_source == constants.PARSE_HEADER_TASK: update_db_dict['set__header_has_mdata'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'md5': if update_source == constants.CALC_MD5_TASK: update_db_dict['set__md5'] = field_val update_db_dict['inc__version__0'] = 1 logging.debug("UPDATING md5") elif field_name == 'index_file': if update_source == constants.CALC_MD5_TASK: if 'md5' in field_val: update_db_dict['set__index_file__md5'] = field_val['md5'] update_db_dict['inc__version__0'] = 1 else: raise exceptions.MetadataProblemException("Calc md5 task did not return a dict with an md5 field in it!!!") #elif field_name == 'hgi_project_list': elif field_name == 'hgi_project': if update_source == constants.EXTERNAL_SOURCE: #for prj in field_val: if not utils.is_hgi_project(field_val): raise ValueError("This project name is not according to HGI_project rules -- "+str(constants.REGEX_HGI_PROJECT)) # if getattr(submitted_file, 'hgi_project'): # hgi_projects = submitted_file.hgi_project # hgi_projects.extend(field_val) # else: # hgi_projects = field_val update_db_dict['set__hgi_project'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'data_type': if update_source == constants.EXTERNAL_SOURCE: update_db_dict['set__data_type'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'data_subtype_tags': if update_source in [constants.EXTERNAL_SOURCE, constants.PARSE_HEADER_TASK]: # if getattr(submitted_file, 'data_subtype_tags') != None: # subtypes_dict = submitted_file.data_subtype_tags # subtypes_dict.update(field_val) # else: subtypes_dict = field_val update_db_dict['set__data_subtype_tags'] = subtypes_dict update_db_dict['inc__version__0'] = 1 elif field_name == 'abstract_library': if update_source == constants.EXTERNAL_SOURCE: update_db_dict['set__abstract_library'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'file_reference_genome_id': if update_source == constants.EXTERNAL_SOURCE: models.ReferenceGenome.objects(md5=field_val).get() # Check that the id exists in the RefGenome coll, throw exc update_db_dict['set__file_reference_genome_id'] = str(field_val) update_db_dict['inc__version__0'] = 1 elif field_name == 'security_level': update_db_dict['set__security_level'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'pmid_list': update_db_dict['set__pmid_list'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name != None and field_name != "null": logging.info("Key in VARS+++++++++++++++++++++++++====== but not in the special list: %s", field_name) elif field_name == 'reference_genome': #ref_gen = ReferenceGenomeDataAccess.get_or_insert_reference_genome(field_val) # field_val should be a path ref_gen = ReferenceGenomeDataAccess.retrieve_reference_by_path(field_val) if not ref_gen: raise exceptions.ResourceNotFoundException(field_val, "Reference genome not in the DB.") update_db_dict['set__file_reference_genome_id'] = ref_gen.md5 else: logging.error("KEY ERROR RAISED!!! KEY = %s, VALUE = %s", field_name, field_val) # file_specific_upd_dict = None # if submitted_file.file_type == constants.BAM_FILE: # file_specific_upd_dict = cls.build_bam_file_update_dict(file_updates, update_source, file_id, submitted_file) # elif submitted_file.file_type == constants.VCF_FILE: # file_specific_upd_dict = cls.build_vcf_file_update_dict(file_updates, update_source, file_id, submitted_file) # if file_specific_upd_dict: # update_db_dict.update(file_specific_upd_dict) return update_db_dict @classmethod def build_patch_dict(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return None update_db_dict = dict() for (field_name, field_val) in file_updates.items(): if field_val == 'null' or not field_val: pass if field_name in submitted_file._fields: if field_name in ['submission_id', 'id', '_id', 'version', 'file_type', 'irods_coll', # TODO: make it updateble by user, if file not yet submitted to permanent irods coll 'file_path_client', 'last_updates_source', 'file_mdata_status', 'file_submission_status', 'missing_mandatory_fields_dict']: pass elif field_name == 'library_list': if len(field_val) > 0: was_updated = cls.update_library_list(field_val, update_source, submitted_file) update_db_dict['set__library_list'] = submitted_file.library_list update_db_dict['inc__version__2'] = 1 update_db_dict['inc__version__0'] = 1 logging.info("UPDATE FILE TO SUBMIT --- UPDATING LIBRARY LIST.................................%s ", was_updated) elif field_name == 'sample_list': if len(field_val) > 0: was_updated = cls.update_sample_list(field_val, update_source, submitted_file) update_db_dict['set__sample_list'] = submitted_file.sample_list update_db_dict['inc__version__1'] = 1 update_db_dict['inc__version__0'] = 1 logging.info("UPDATE FILE TO SUBMIT ---UPDATING SAMPLE LIST -- was it updated? %s", was_updated) elif field_name == 'study_list': if len(field_val) > 0: was_updated = cls.update_study_list(field_val, update_source, submitted_file) update_db_dict['set__study_list'] = submitted_file.study_list update_db_dict['inc__version__3'] = 1 update_db_dict['inc__version__0'] = 1 logging.info("UPDATING STUDY LIST - was it updated? %s", was_updated) # Fields that only the workers' PUT req are allowed to modify - donno how to distinguish... elif field_name == 'missing_entities_error_dict': if field_val: for entity_categ, entities in field_val.items(): update_db_dict['add_to_set__missing_entities_error_dict__'+entity_categ] = entities update_db_dict['inc__version__0'] = 1 elif field_name == 'not_unique_entity_error_dict': if field_val: for entity_categ, entities in field_val.items(): #update_db_dict['push_all__not_unique_entity_error_dict'] = entities update_db_dict['add_to_set__not_unique_entity_error_dict__'+entity_categ] = entities update_db_dict['inc__version__0'] = 1 elif field_name == 'header_has_mdata': if update_source == constants.PARSE_HEADER_TASK: update_db_dict['set__header_has_mdata'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'md5': if update_source == constants.CALC_MD5_TASK: update_db_dict['set__md5'] = field_val update_db_dict['inc__version__0'] = 1 logging.debug("UPDATING md5") elif field_name == 'index_file': if update_source == constants.CALC_MD5_TASK: if 'md5' in field_val: update_db_dict['set__index_file__md5'] = field_val['md5'] update_db_dict['inc__version__0'] = 1 else: raise exceptions.MetadataProblemException("Calc md5 task did not return a dict with an md5 field in it!!!") #elif field_name == 'hgi_project_list': elif field_name == 'hgi_project': if update_source == constants.EXTERNAL_SOURCE: #for prj in field_val: if not utils.is_hgi_project(field_val): raise ValueError("This project name is not according to HGI_project rules -- "+str(constants.REGEX_HGI_PROJECT)) # if getattr(submitted_file, 'hgi_project'): # hgi_projects = submitted_file.hgi_project # hgi_projects.extend(field_val) # else: # hgi_projects = field_val update_db_dict['set__hgi_project'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'data_type': if update_source == constants.EXTERNAL_SOURCE: update_db_dict['set__data_type'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'data_subtype_tags': if update_source in [constants.EXTERNAL_SOURCE, constants.PARSE_HEADER_TASK]: if getattr(submitted_file, 'data_subtype_tags') != None: subtypes_dict = submitted_file.data_subtype_tags subtypes_dict.update(field_val) else: subtypes_dict = field_val update_db_dict['set__data_subtype_tags'] = subtypes_dict update_db_dict['inc__version__0'] = 1 elif field_name == 'abstract_library': if update_source == constants.EXTERNAL_SOURCE: update_db_dict['set__abstract_library'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'file_reference_genome_id': if update_source == constants.EXTERNAL_SOURCE: models.ReferenceGenome.objects(md5=field_val).get() # Check that the id exists in the RefGenome coll, throw exc update_db_dict['set__file_reference_genome_id'] = str(field_val) update_db_dict['inc__version__0'] = 1 elif field_name == 'security_level': update_db_dict['set__security_level'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'pmid_list': update_db_dict['set__pmid_list'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'irods_test_run_report': update_db_dict['set__irods_test_run_report'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name == 'irods_tests_status': update_db_dict['set__irods_tests_status'] = field_val update_db_dict['inc__version__0'] = 1 elif field_name != None and field_name != "null": logging.info("Key in VARS+++++++++++++++++++++++++====== but not in the special list: %s", field_name) elif field_name == 'reference_genome': #ref_gen = ReferenceGenomeDataAccess.get_or_insert_reference_genome(field_val) # field_val should be a path ref_gen = ReferenceGenomeDataAccess.retrieve_reference_by_path(field_val) if not ref_gen: raise exceptions.ResourceNotFoundException(field_val, "Reference genome not in the DB.") update_db_dict['set__file_reference_genome_id'] = ref_gen.md5 else: logging.error("KEY ERROR RAISED!!! KEY = %s, VALUE = %s", field_name, field_val) # file_specific_upd_dict = None # if submitted_file.file_type == constants.BAM_FILE: # file_specific_upd_dict = cls.build_bam_file_update_dict(file_updates, update_source, file_id, submitted_file) # elif submitted_file.file_type == constants.VCF_FILE: # file_specific_upd_dict = cls.build_vcf_file_update_dict(file_updates, update_source, file_id, submitted_file) # if file_specific_upd_dict: # update_db_dict.update(file_specific_upd_dict) return update_db_dict @classmethod def save_task_patches(cls, file_id, file_updates, update_source, task_id=None, task_status=None, errors=None, nr_retries=constants.MAX_DBUPDATE_RETRIES): upd, i = 0, 0 db_update_dict = {} if task_id: db_update_dict = {"set__tasks_dict__"+task_id+"__status" : task_status} if errors: for e in errors: db_update_dict['add_to_set__file_error_log'] = e while i < nr_retries: submitted_file = cls.retrieve_submitted_file(file_id) field_updates = cls.build_patch_dict(file_updates, update_source, file_id, submitted_file) if field_updates: db_update_dict.update(field_updates) db_update_dict['inc__version__0'] = 1 if len(db_update_dict) > 0: logging.info("UPDATE FILE TO SUBMIT - FILE ID: %s and UPD DICT: %s", str(file_id),str(db_update_dict)) try: upd = models.SubmittedFile.objects(id=file_id, version__0=cls.get_file_version(submitted_file.id, submitted_file)).update_one(**db_update_dict) except Exception as e: print("This exception has been thrown:", str(e)) logging.info("ATOMIC UPDATE RESULT from :%s, NR TRY = %s, WAS THE FILE UPDATED? %s", update_source, i, upd) if upd == 1: break i+=1 return upd @classmethod def save_task_updates(cls, file_id, file_updates, update_source, task_id=None, task_status=None, errors=None, nr_retries=constants.MAX_DBUPDATE_RETRIES): upd, i = 0, 0 db_update_dict = {} if task_id: db_update_dict = {"set__tasks_dict__"+task_id+"__status" : task_status} if errors: for e in errors: db_update_dict['add_to_set__file_error_log'] = e while i < nr_retries: submitted_file = cls.retrieve_submitted_file(file_id) field_updates = cls.build_update_dict(file_updates, update_source, file_id, submitted_file) if field_updates: db_update_dict.update(field_updates) db_update_dict['inc__version__0'] = 1 if len(db_update_dict) > 0: logging.info("UPDATE FILE TO SUBMIT - FILE ID: %s and UPD DICT: %s", str(file_id),str(db_update_dict)) try: upd = models.SubmittedFile.objects(id=file_id, version__0=cls.get_file_version(submitted_file.id, submitted_file)).update_one(**db_update_dict) except OperationError as e: print("Operation error caught---: ", str(e)) logging.error("File duplicate in database %s", str(file_id)) print("MESSAGE of the exception:::::", e.message) print("ARGS of the exception: ::::::::::", e.args) error_message = "File duplicate in database file_id = %s" % str(file_id) raise exceptions.FileAlreadySubmittedException(file_id=str(file_id), message=error_message) logging.info("ATOMIC UPDATE RESULT from :%s, NR TRY = %s, WAS THE FILE UPDATED? %s", update_source, i, upd) if upd == 1: break i+=1 return upd @classmethod def update_data_subtype_tags(cls, file_id, subtype_tags_dict): return models.SubmittedFile.objects(id=file_id).update_one(set__data_subtype_tags=subtype_tags_dict, inc__version__0=1) @classmethod def update_file_ref_genome(cls, file_id, ref_genome_key): # the ref genome key is the md5 return models.SubmittedFile.objects(id=file_id).update_one(set__file_reference_genome_id=ref_genome_key, inc__version__0=1) @classmethod def update_file_data_type(cls, file_id, data_type): return models.SubmittedFile.objects(id=file_id).update_one(set__data_type=data_type, inc__version__0=1) @classmethod def update_file_abstract_library(cls, file_id, abstract_lib): return models.SubmittedFile.objects(id=file_id, abstract_library=None).update_one(set__abstract_library=abstract_lib, inc__version__0=1) @classmethod def update_file_submission_status(cls, file_id, status): upd_dict = {'set__file_submission_status' : status, 'inc__version__0' : 1} return models.SubmittedFile.objects(id=file_id).update_one(**upd_dict) @classmethod def build_file_statuses_updates_dict(cls, file_id, statuses_dict): if not statuses_dict: return 0 upd_dict = dict() for k,v in list(statuses_dict.items()): upd_dict['set__'+k] = v upd_dict['inc__version__0'] = 1 return upd_dict @classmethod def update_file_statuses(cls, file_id, statuses_dict): upd_dict = cls.build_file_statuses_updates_dict(file_id, statuses_dict) return models.SubmittedFile.objects(id=file_id).update_one(**upd_dict) @classmethod def update_file_mdata_status(cls, file_id, status): upd_dict = {'set__file_mdata_status' : status, 'inc__version__0' : 1} return models.SubmittedFile.objects(id=file_id).update_one(**upd_dict) @classmethod def build_file_error_log_update_dict(cls, error_log, file_id=None, submitted_file=None): if file_id == None and submitted_file == None: return None if submitted_file == None: submitted_file = cls.retrieve_submitted_file(file_id) old_error_log = submitted_file.file_error_log if type(error_log) == list: old_error_log.extend(error_log) elif type(error_log) == str or type(error_log) == str: old_error_log.append(error_log) logging.error("IN UPDATE ERROR LOG LIST ------------------- PRINT ERROR LOG LIST:::::::::::: %s", ' '.join(str(it) for it in error_log)) upd_dict = {'set__file_error_log' : old_error_log, 'inc__version__0' : 1} return upd_dict @classmethod def save_update_dict(cls, file_id, file_version, updates_dict, nr_retries=constants.MAX_DBUPDATE_RETRIES): i = 0 upd = 0 while i < nr_retries and upd == 0: i+=1 upd = models.SubmittedFile.objects(id=file_id, version__0=file_version).update_one(**updates_dict) print("UPD ------------ from save_update_dict: ", str(upd)) return upd @classmethod def update_file_error_log(cls, error_log, file_id=None, submitted_file=None): upd_dict = cls.build_file_error_log_update_dict(error_log, file_id, submitted_file) return models.SubmittedFile.objects(id=submitted_file.id, version__0=cls.get_file_version(None, submitted_file)).update_one(**upd_dict) @classmethod def add_task_to_file(cls, file_id, task_id, task_type, task_status, nr_retries=constants.MAX_DBUPDATE_RETRIES): upd_dict = {'set__tasks_dict__'+task_id : {'type' : task_type, 'status' : task_status}, 'inc__version__0' : 1} upd = 0 while nr_retries > 0 and upd == 0: upd = models.SubmittedFile.objects(id=file_id).update_one(**upd_dict) logging.info("ADDING NEW TASK TO TASKS dict %s", upd) return upd @classmethod def update_task_status(cls, file_id, task_id, task_status, errors=None, nr_retries=constants.MAX_DBUPDATE_RETRIES): upd_dict = {'set__tasks_dict__'+task_id+'__status' : task_status, 'inc__version__0' : 1} if errors: for e in errors: upd_dict['add_to_set__file_error_log'] = e upd = 0 while nr_retries > 0 and upd == 0: upd = models.SubmittedFile.objects(id=file_id).update_one(**upd_dict) logging.info("UPDATING TASKS dict %s", upd) return upd # - 2nd elem of the list = version of the list of samples mdata # - 3rd elem of the list = version of the list of libraries mdata # - 4th elem of the list = version of the list of studies mdata # Possible PROBLEM: here I update without taking into account the version of the file. If there was an update in the meantime, # this can lead to loss of information @classmethod def update_file_from_dict(cls, file_id, update_dict, update_type_list=[constants.FILE_FIELDS_UPDATE], nr_retries=constants.MAX_DBUPDATE_RETRIES): db_upd_dict = {} for upd_type in update_type_list: if upd_type == constants.FILE_FIELDS_UPDATE: db_upd_dict['inc__version__0'] = 1 elif upd_type == constants.SAMPLE_UPDATE: db_upd_dict['inc__version__1'] = 1 elif upd_type == constants.LIBRARY_UPDATE: db_upd_dict['inc__version__2'] = 1 elif upd_type == constants.STUDY_UPDATE: db_upd_dict['inc__version__3'] = 1 else: logging.error("Update file fields -- Different updates than the 4 type acccepted? %s", update_type_list) for upd_field, val in list(update_dict.items()): db_upd_dict['set__'+upd_field] = val upd, i = 0, 0 while i < nr_retries and upd == 0: upd = models.SubmittedFile.objects(id=file_id).update_one(**db_upd_dict) return upd # PB: I am not keeping track of submission's version... # PB: I am not returning an error code/ Exception if the hgi-project name is incorrect!!! @classmethod def insert_hgi_project(cls, subm_id, project): if utils.is_hgi_project(project): upd_dict = {'set__hgi_project' : project} return models.Submission.objects(id=subm_id).update_one(**upd_dict) # upd_dict = {'add_to_set__hgi_project_list' : project} # return models.Submission.objects(id=subm_id).update_one(**upd_dict) @classmethod def delete_library(cls, library_id, file_id, file_obj=None): if not file_obj: file_obj = cls.retrieve_SFile_fields_only(file_id, ['library_list', 'version']) new_list = [] found = False for lib in file_obj.library_list: if lib.internal_id != int(library_id): new_list.append(lib) else: found = True if found == True: return models.SubmittedFile.objects(id=file_id, version__2=cls.get_library_version(file_obj.id, file_obj)).update_one(inc__version__2=1, inc__version__0=1, set__library_list=new_list) else: raise exceptions.ResourceNotFoundException(library_id) #sample_id,file_id, file_obj) @classmethod def delete_sample(cls, sample_id, file_id, file_obj=None): if not file_obj: file_obj = cls.retrieve_SFile_fields_only(file_id, ['sample_list', 'version']) new_list = [] found = False for sample in file_obj.entity_set: if sample.internal_id != int(sample_id): new_list.append(sample) else: found = True if found == True: return models.SubmittedFile.objects(id=file_id, version__1=cls.get_sample_version(file_obj.id, file_obj)).update_one(inc__version__1=1, inc__version__0=1, set__sample_list=new_list) else: raise exceptions.ResourceNotFoundException(sample_id) @classmethod def delete_study(cls, study_id, file_id, file_obj=None): if not file_obj: file_obj = cls.retrieve_SFile_fields_only(file_id, ['study_list', 'version']) new_list = [] found = False for study in file_obj.study_list: if study.internal_id != int(study_id): new_list.append(study) else: found = True if found == True: return models.SubmittedFile.objects(id=file_id, version__3=cls.get_study_version(file_obj.id, file_obj)).update_one(inc__version__3=1, inc__version__0=1, set__study_list=new_list) else: raise exceptions.ResourceNotFoundException(study_id) @classmethod def delete_submitted_file(cls, file_id, submitted_file=None): if submitted_file == None: submitted_file = models.SubmittedFile.objects(id=file_id) submitted_file.delete() return True # file_specific_upd_dict = None # if submitted_file.file_type == constants.BAM_FILE: # file_specific_upd_dict = cls.build_bam_file_update_dict(file_updates, update_source, file_id, submitted_file) # elif submitted_file.file_type == constants.VCF_FILE: # file_specific_upd_dict = cls.build_vcf_file_update_dict(file_updates, update_source, file_id, submitted_file) # if file_specific_upd_dict: # update_db_dict.update(file_specific_upd_dict) # return update_db_dict class BAMFileDataAccess(FileDataAccess): @classmethod def build_dict_of_updates(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return None update_db_dict = {} for (field_name, field_val) in file_updates.items(): if field_val == 'null' or not field_val: pass if field_name in submitted_file._fields: if field_name in ['submission_id', 'id', '_id', 'version', 'file_type', 'irods_coll', # TODO: make it updateble by user, if file not yet submitted to permanent irods coll 'file_path_client', 'last_updates_source', 'file_mdata_status', 'file_submission_status', 'missing_mandatory_fields_dict']: pass elif field_name == 'seq_centers': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.seq_centers, field_val) update_db_dict['set__seq_centers'] = updated_list #update_db_dict['inc__version__0'] = 1 elif field_name == 'run_list': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.run_list, field_val) update_db_dict['set__run_list'] = updated_list #update_db_dict['inc__version__0'] = 1 elif field_name == 'platform_list': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.platform_list, field_val) update_db_dict['set__platform_list'] = updated_list elif field_name == 'seq_date_list': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.seq_date_list, field_val) update_db_dict['set__seq_date_list'] = updated_list elif field_name == 'library_well_list': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.library_well_list, field_val) update_db_dict['set__library_well_list'] = updated_list elif field_name == 'multiplex_lib_list': if update_source in [constants.PARSE_HEADER_TASK, constants.EXTERNAL_SOURCE]: updated_list = cls.__upd_list_of_primary_types__(submitted_file.multiplex_lib_list, field_val) update_db_dict['set__multiplex_lib_list'] = updated_list return update_db_dict @classmethod def build_patch_dict(cls, file_updates, update_source, file_id, submitted_file): general_file_patches = super(BAMFileDataAccess, cls).build_patch_dict(file_updates, update_source, file_id, submitted_file) file_specific_patches = cls.build_dict_of_updates(file_updates, update_source, file_id, submitted_file) general_file_patches.update(file_specific_patches) return general_file_patches @classmethod def build_update_dict(cls, file_updates, update_source, file_id, submitted_file): general_file_updates = super(BAMFileDataAccess, cls).build_update_dict(file_updates, update_source, file_id, submitted_file) or {} file_specific_updates = cls.build_dict_of_updates(file_updates, update_source, file_id, submitted_file) general_file_updates.update(file_specific_updates) return general_file_updates class VCFFileDataAccess(FileDataAccess): @classmethod def build_dict_of_updates(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return {} update_db_dict = {} for (field_name, field_val) in file_updates.items(): if field_val == 'null' or not field_val: pass elif field_name == 'used_samtools': update_db_dict['set__used_samtools'] = field_val elif field_name == 'file_format': update_db_dict['set__file_format'] = field_val return update_db_dict @classmethod def build_patch_dict(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return {} general_updates_dict = super(VCFFileDataAccess, cls).build_patch_dict(file_updates, update_source, file_id, submitted_file) file_specific_upd_dict = cls.build_dict_of_updates(file_updates, update_source, file_id, submitted_file) general_updates_dict.update(file_specific_upd_dict) return general_updates_dict @classmethod def build_update_dict(cls, file_updates, update_source, file_id, submitted_file): if not file_updates: return {} general_updates_dict = super(VCFFileDataAccess, cls).build_update_dict(file_updates, update_source, file_id, submitted_file) file_specif_upd_dict = cls.build_dict_of_updates(file_updates, update_source, file_id, submitted_file) general_updates_dict.update(file_specif_upd_dict) return general_updates_dict class ReferenceGenomeDataAccess(DataAccess): # @classmethod # def insert_reference_genome(cls, ref_dict): # ref_genome = models.ReferenceGenome() # if 'name' in ref_dict: # #ref_name = ref_dict['name'] # ref_genome.name = ref_dict['name'] # if 'path' in ref_dict: # ref_genome.paths = [ref_dict['path']] # else: # raise exceptions.NotEnoughInformationProvided(msg="You must provide both the name and the path for the reference genome.") # md5 = utils.calculate_md5(ref_dict['path']) # ref_genome.md5 = md5 # print "REF GENOME TO BE INSERTED::::::::::::", vars(ref_genome) # ref_genome.save() # return ref_genome # @classmethod def insert_into_db(cls, ref_genome_dict): ref_gen = models.ReferenceGenome() if 'name' in ref_genome_dict: ref_gen.name = ref_genome_dict['name'] print("NAME: ", ref_gen.name) if 'path' in ref_genome_dict: ref_gen.paths = [ref_genome_dict['path']] print("PATHS: ", ref_gen.paths) ref_gen.md5 = utils.calculate_md5(ref_genome_dict['path']) print("REF GEN BEFORE ADDING IT: ;:::::::::::::::", vars(ref_gen)) ref_gen.save() return ref_gen #def insert_reference_genome(ref_dict): # ref_genome = models.ReferenceGenome() # if 'name' in ref_dict: # #ref_name = ref_dict['name'] # ref_genome.name = ref_dict['name'] # if 'path' in ref_dict: # if not type(ref_dict['path']) == list: # ref_genome.paths = [ref_dict['path']] # else: # ref_genome.paths = ref_dict # else: # raise exceptions.NotEnoughInformationProvided(msg="You must provide both the name and the path for the reference genome.") ## ref_genome.name = ref_name ## ref_genome.paths = path_list ## # for path in ref_genome.paths: # md5 = calculate_md5(path) # ref_genome.md5 = md5 # ref_genome.save() # return ref_genome @classmethod def retrieve_all(cls): return models.ReferenceGenome.objects() @classmethod def retrieve_reference_by_path(cls, path): try: return models.ReferenceGenome.objects(paths__in=[path]).hint([('paths', 1)]).get() except DoesNotExist: return None @classmethod def retrieve_reference_by_md5(cls, md5): try: found = models.ReferenceGenome.objects.get(pk=md5) return found except DoesNotExist: return None @classmethod def retrieve_reference_by_id(cls, ref_id): return cls.retrieve_reference_by_md5(ref_id) @classmethod def retrieve_reference_by_name(cls, canonical_name): try: return models.ReferenceGenome.objects(name=canonical_name).get() except DoesNotExist: return None # NOT USED< I THINK @classmethod def retrieve_reference_genome(cls, ref_gen_dict): if not ref_gen_dict: raise exceptions.NoIdentifyingFieldsProvidedException("No identifying fields provided for the reference genome.") ref_gen_id_by_name, ref_gen_id_by_path = None, None if 'name' in ref_gen_dict: ref_gen_id_by_name = cls.retrieve_reference_by_name(ref_gen_dict['name']) if 'path' in ref_gen_dict: ref_gen_id_by_path = cls.retrieve_reference_by_path(ref_gen_dict['path']) if ref_gen_id_by_name and ref_gen_id_by_path and ref_gen_id_by_name != ref_gen_id_by_path: raise exceptions.InformationConflictException(msg="The reference genome name "+ref_gen_dict['name'] +"and the path "+ref_gen_dict['path']+" corresponds to different entries in our DB.") if ref_gen_id_by_name: return ref_gen_id_by_name.id if ref_gen_id_by_path: return ref_gen_id_by_path.id return None @classmethod def update(cls, ref_id, ref_dict): old_ref = cls.retrieve_reference_by_id(ref_id) update_dict = {} if 'name' in ref_dict and old_ref.name != ref_dict['name']: update_dict['set__name'] = ref_dict['name'] if 'path' in ref_dict: paths = old_ref.paths paths.append(ref_dict['path']) paths = list(set(paths)) if paths != old_ref.paths: update_dict['set__paths'] = paths if update_dict: update_dict['inc__version'] = 1 updated = models.ReferenceGenome.objects(md5=ref_id, version=old_ref.version).update_one(**update_dict) return updated return None # for (field_name, field_val) in file_updates.iteritems(): # if field_val == 'null' or not field_val: # pass # if field_name in submitted_file._fields: # # # @classmethod # def get_or_insert_reference_genome(cls, file_path): # ''' This function receives a path identifying # a reference file and retrieves it from the database # or inserts it if it's not there. # Parameters: a path(string) # Throws: # - TooMuchInformationProvided exception - when the dict has more than a field # - NotEnoughInformationProvided - when the dict is empty # ''' # if not file_path: # raise exceptions.NotEnoughInformationProvided(msg="ERROR: the path of the reference genome must be provided.") # ref_gen = cls.retrieve_reference_by_path(file_path) # if ref_gen: # return ref_gen # return cls.insert_reference_genome({'path' : file_path}) # # # @classmethod # def get_or_insert_reference_genome_path_and_name(cls, data): # ''' This function receives a dictionary with data identifying # a reference genome and retrieves it from the data base. # Parameters: a dictionary # Throws: # - TooMuchInformationProvided exception - when the dict has more than a field # - NotEnoughInformationProvided - when the dict is empty # ''' # if not 'name' in data and not 'path' in data: # raise exceptions.NotEnoughInformationProvided(msg="ERROR: either the name or the path of the reference genome must be provided.") # ref_gen = cls.retrieve_reference_genome(data) # if ref_gen: # return ref_gen # return cls.insert_reference_genome(data) #
arctic-methane-emergency-group.org -2016 Subaru Forester Msrp Visit the Official Subaru Forester page to see model details, a picture gallery, get price quotes and more. Click and build your 2019 Forester today. 2016 Subaru Forester Msrp specs, prices, options, 2019, 2018 .... Research Subaru prices, specifications, colors, rebates, options, photographs, magazine reviews and more. Cars101.com is an unofficial website. 2016 subaru forester wagon 5d xt touring awd h4 prices .... Research 2016 Subaru Forester Wagon 5D XT Touring AWD H4 prices, used values & Forester Wagon 5D XT Touring AWD H4 pricing, specs and more!
from energy_demand.read_write.narrative_related import crit_dim_var from collections import OrderedDict class TestCritDimensionsVar: def test_crit_in_list(self): crit_in_list = [ {'sig_midpoint': 0, 'value_by': 5, 'diffusion_choice': 'linear', 'fueltype_replace': 0, 'regional_specific': False, 'base_yr': 2015, 'value_ey': 5, 'sig_steepness': 1, 'end_yr': 2050, 'fueltype_new': 0}] actual = crit_dim_var(crit_in_list) expected = True print("AC ULT " + str(actual)) assert actual == expected def test_nested_dict_in_list(self): nested_dict_in_list = [{'key': {'nested_dict': 'a value'}}] actual = crit_dim_var(nested_dict_in_list) expected = False print("AC ULT " + str(actual)) assert actual == expected def test_nested_dict(self): nested_dict = {'key': {'nested_dict': 'a value'}} actual = crit_dim_var(nested_dict) expected = False assert actual == expected nested_dict = {'another_key': {}, 'key': []} actual = crit_dim_var(nested_dict) expected = True assert actual == expected def test_crit_list(self): a_list = [] actual = crit_dim_var(a_list) expected = True assert actual == expected the_bug = {'enduse': [], 'diffusion_type': 'linear', 'default_value': 15.5, 'name': 'ss_t_base_heating', 'sector': True, 'regional_specific': False, 'description': 'Base temperature', 'scenario_value': 15.5} actual = crit_dim_var(the_bug) expected = True assert actual == expected def test_crit_dim_var_ordered(self): the_bug = OrderedDict() the_bug['a'] = {'diffusion_type': 'linear', 'default_value': 15.5, 'name': 'ss_t_base_heating', 'sector': True, 'regional_specific': False, 'description': 'Base temperature', 'scenario_value': 15.5, 'enduse': []} the_bug['b'] = 'vakye' actual = crit_dim_var(the_bug) expected = False assert actual == expected def test_crit_dim_var_buggy(self): fixture = [ {'sig_steepness': 1, 'sector': 'dummy_sector', 'diffusion_choice': 'linear', 'sig_midpoint': 0, 'regional_specific': True, 'base_yr': 2015, 'value_ey': 0.05, 'value_by': 0.05, 'regional_vals_ey': {'W06000023': 0.05, 'W06000010': 0.05}, 'regional_vals_by': {'W06000023': 0.05, 'W06000010': 0.05}, 'end_yr': 2030, 'enduse': [], 'default_by': 0.05 }, {'sig_steepness': 1, 'sector': 'dummy_sector', 'diffusion_choice': 'linear', 'sig_midpoint': 0, 'regional_specific': True, 'base_yr': 2030, 'value_ey': 0.05, 'value_by': 0.05, 'regional_vals_ey': {'W06000023': 0.05, 'W06000010': 0.05}, 'regional_vals_by': {'W06000023': 0.05, 'W06000010': 0.05}, 'end_yr': 2050, 'enduse': [], 'default_by': 0.05 } ] actual = crit_dim_var(fixture) expected = True assert actual == expected
I have degrees in English and English Education. I love people and seeing them "get" an idea, after struggling with it. I have 7 years' teaching experience, ranging from TESOL with 8-12 year-olds to College Composition. Personal Statement : I have degrees in English and English Education. I love people and seeing them "get" an idea, after struggling with it. I have 7 years' teaching experience, ranging from TESOL with 8-12 year-olds to College Composition.
# -*- coding: utf-8 -*- import re from django.core.urlresolvers import reverse class MobileDispatcher(object): def __init__(self): # TODO autodispatch self.dispatch_methods = {} for method_name in dir(self): m = re.match(r'^_dispatch_(.*)$', method_name) if m: dispatch_method = getattr(self, method_name) if hasattr(dispatch_method, '__call__'): self.dispatch_methods[m.group(1)] = dispatch_method pass def dispatch(self, view_func_name, args, kwargs): if view_func_name in self.dispatch_methods: return self.dispatch_methods[view_func_name](args, kwargs) return None @staticmethod def _dispatch_feat_index(args, kwargs): return reverse('feat_index_mobile') @staticmethod def _dispatch_feat_category_list(args, kwargs): return reverse('feat_detail_mobile') @staticmethod def _dispatch_feat_category_detail(args, kwargs): return reverse('feat_category_detail_mobile', kwargs=kwargs) @staticmethod def _dispatch_feats_in_rulebook(args, kwargs): return reverse('feats_in_rulebook_mobile', kwargs={'rulebook_id': kwargs['rulebook_id']}) @staticmethod def _dispatch_feat_detail(args, kwargs): return reverse('feat_detail_mobile', kwargs={'feat_id': kwargs['feat_id']})
dear, I liked your work very much. I have searched for such work for a long time. If you give me this work, I will be very happy and will work very well.
#!/usr/bin/env python import os import sys from glob import glob sys.path.insert(0, os.path.abspath('lib')) from ansible import __version__, __author__ from distutils.core import setup # find library modules from ansible.constants import DEFAULT_MODULE_PATH dirs=os.listdir("./library/") data_files = [] for i in dirs: data_files.append((os.path.join(DEFAULT_MODULE_PATH, i), glob('./library/' + i + '/*'))) setup(name='ansible', version=__version__, description='Radically simple IT automation', author=__author__, author_email='[email protected]', url='http://ansibleworks.com/', license='GPLv3', install_requires=['paramiko', 'jinja2', "PyYAML"], package_dir={ 'ansible': 'lib/ansible' }, packages=[ 'ansible', 'ansible.utils', 'ansible.inventory', 'ansible.inventory.vars_plugins', 'ansible.playbook', 'ansible.runner', 'ansible.runner.action_plugins', 'ansible.runner.lookup_plugins', 'ansible.runner.connection_plugins', 'ansible.runner.filter_plugins', 'ansible.callback_plugins', 'ansible.module_utils' ], scripts=[ 'bin/ansible', 'bin/ansible-playbook', 'bin/ansible-pull', 'bin/ansible-doc', 'bin/ansible-galaxy' ], data_files=data_files )
ERYC is collaborating with Sheriff Megan Heil for two ACT on Drugs events presented by Lynn Reimer. Substance Use Disorder and prevention experts subscribe to a very important theory: TALKING about unwanted behavior three to four years BEFORE the behavior occurs, helps with prevention efforts. Knowing this fact, and knowing that middle school students and high school students will experiment, parents need to get on board with tackling tough topics before they occur. The common response ERYC hears from parents with elementary kids is that “we are not there yet.” We beg to differ and encourage you to educate yourself with facts that you can share at your next family dinner, or long car ride. Join ACT Founder Lynn Reimer for two free informational sessions. Dinner included.
#!/usr/bin/env python __all__ = ['dilidili_download'] from ..common import * #---------------------------------------------------------------------- def dilidili_parser_data_to_stream_types(typ ,vid ,hd2 ,sign): """->list""" parse_url = 'http://player.005.tv/parse.php?xmlurl=null&type={typ}&vid={vid}&hd={hd2}&sign={sign}'.format(typ = typ, vid = vid, hd2 = hd2, sign = sign) html = get_html(parse_url) info = re.search(r'(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})', html).groups() info = [i.strip('{}').split('->') for i in info] info = {i[0]: i [1] for i in info} stream_types = [] for i in zip(info['deft'].split('|'), info['defa'].split('|')): stream_types.append({'id': str(i[1][-1]), 'container': 'mp4', 'video_profile': i[0]}) return stream_types #---------------------------------------------------------------------- def dilidili_parser_data_to_download_url(typ ,vid ,hd2 ,sign): """->str""" parse_url = 'http://player.005.tv/parse.php?xmlurl=null&type={typ}&vid={vid}&hd={hd2}&sign={sign}'.format(typ = typ, vid = vid, hd2 = hd2, sign = sign) html = get_html(parse_url) return match1(html, r'<file><!\[CDATA\[(.+)\]\]></file>') #---------------------------------------------------------------------- def dilidili_download(url, output_dir = '.', merge = False, info_only = False, **kwargs): if re.match(r'http://www.dilidili.com/watch/\w+', url): html = get_html(url) title = match1(html, r'<title>(.+)丨(.+)</title>') #title # player loaded via internal iframe frame_url = re.search(r'<iframe (.+)src="(.+)\" f(.+)</iframe>', html).group(2) #https://player.005.tv:60000/?vid=a8760f03fd:a04808d307&v=yun&sign=a68f8110cacd892bc5b094c8e5348432 html = get_html(frame_url) match = re.search(r'(.+?)var video =(.+?);', html) vid = match1(html, r'var vid="(.+)"') hd2 = match1(html, r'var hd2="(.+)"') typ = match1(html, r'var typ="(.+)"') sign = match1(html, r'var sign="(.+)"') # here s the parser... stream_types = dilidili_parser_data_to_stream_types(typ, vid, hd2, sign) #get best best_id = max([i['id'] for i in stream_types]) url = dilidili_parser_data_to_download_url(typ, vid, best_id, sign) type_ = '' size = 0 type_, ext, size = url_info(url) print_info(site_info, title, type_, size) if not info_only: download_urls([url], title, ext, total_size=None, output_dir=output_dir, merge=merge) site_info = "dilidili" download = dilidili_download download_playlist = playlist_not_supported('dilidili')
Gaddi place mats are handmade & painted in South Africa. They are made using high quality cotton fabric, with steadfast colour paints, and can be safely washed. The Gaddi designs are distinctly African with elegant lines and rich hues, bringing you the best of South African art. Enjoy your piece of Africa!
from .base import BaseIsland from core.islands.mixins import NextPageJsonParameterMixin from urllib import parse __author__ = 'zz' class KoukokuIsland(NextPageJsonParameterMixin, BaseIsland): """ 光驱岛 """ _island_name = 'kukuku' _island_netloc = 'kukuku.cc' _static_root = 'http://static.koukuko.com/h/' json_data = True def get_tips(self, pd): return [thread for thread in pd['data']['threads']] def get_div_link(self, tip): thread_id = tip['id'] suffix = 't' + '/' + str(thread_id) return parse.urljoin(self.root_url, suffix) def get_div_content_text(self, tip): return tip['content'] def get_div_response_num(self, tip): return tip['replyCount'] def get_div_image(self, tip): thumb = tip['thumb'] return self.complete_image_link(thumb) @staticmethod def init_start_url(start_url): if '.json' not in start_url: parts = parse.urlsplit(start_url) path = parts.path + '.json' return parse.urlunsplit((parts.scheme, parts.netloc, path, parts.query, parts.fragment)) class OldKoukukoIsland(KoukokuIsland): """ 旧光驱岛域名 """ _island_netloc = 'h.koukuko.com' _island_name = 'old_koukuko'
This is so important! Thank you for doing this! My son and myself are dyslexic and we had to work through the issues ourselves with limited support from the school system. This a good first step to help children at an early stage. Please consider that many kids struggle academically due to other disabilities like dyscalculia and dysgraphia. These kids get overlooked since they read well and often have very high IQs. Educators need to be taught about these conditions and catch them early too. I am going to learn more about this! Please do a video on dysgraphia, too!!!!!! I support this cause, there are alot of parents around the city and state that does not know their child might have a learning disability and this may be the cause of why they act the way they do, such as not wanting to do homework, failing test when they study hard, completing the work but still have difficulties understanding it. Sometimes it all can mean getting a tutor for your child and other times there may be something more behind it. Being able to know the resources are out there and finding places that can help is very important and can make a huge a difference. Glad to see this. I think you over estimate the ability of the people running the public school system in NY. It’s a disaster. We face an astounding amount of sheer stupidity on a daily basis at our public school. It’s devistating for our child.
# -*- Mode: Python -*- import os import unittest import tempfile import os.path import shutil import warnings try: import fcntl except ImportError: fcntl = None from gi.repository import GLib from gi import PyGIDeprecationWarning class IOChannel(unittest.TestCase): def setUp(self): self.workdir = tempfile.mkdtemp() self.testutf8 = os.path.join(self.workdir, 'testutf8.txt') with open(self.testutf8, 'wb') as f: f.write(u'''hello ♥ world second line À demain!'''.encode('UTF-8')) self.testlatin1 = os.path.join(self.workdir, 'testlatin1.txt') with open(self.testlatin1, 'wb') as f: f.write(b'''hell\xf8 world second line \xc0 demain!''') self.testout = os.path.join(self.workdir, 'testout.txt') def tearDown(self): shutil.rmtree(self.workdir) def test_file_readline_utf8(self): ch = GLib.IOChannel(filename=self.testutf8) self.assertEqual(ch.get_encoding(), 'UTF-8') self.assertTrue(ch.get_close_on_unref()) self.assertEqual(ch.readline(), 'hello ♥ world\n') self.assertEqual(ch.get_buffer_condition(), GLib.IOCondition.IN) self.assertEqual(ch.readline(), 'second line\n') self.assertEqual(ch.readline(), '\n') self.assertEqual(ch.readline(), 'À demain!') self.assertEqual(ch.get_buffer_condition(), 0) self.assertEqual(ch.readline(), '') ch.shutdown(True) def test_file_readline_latin1(self): ch = GLib.IOChannel(filename=self.testlatin1, mode='r') ch.set_encoding('latin1') self.assertEqual(ch.get_encoding(), 'latin1') self.assertEqual(ch.readline(), 'hellø world\n') self.assertEqual(ch.readline(), 'second line\n') self.assertEqual(ch.readline(), '\n') self.assertEqual(ch.readline(), 'À demain!') ch.shutdown(True) def test_file_iter(self): items = [] ch = GLib.IOChannel(filename=self.testutf8) for item in ch: items.append(item) self.assertEqual(len(items), 4) self.assertEqual(items[0], 'hello ♥ world\n') ch.shutdown(True) def test_file_readlines(self): ch = GLib.IOChannel(filename=self.testutf8) lines = ch.readlines() # Note, this really ought to be 4, but the static bindings add an extra # empty one self.assertGreaterEqual(len(lines), 4) self.assertLessEqual(len(lines), 5) self.assertEqual(lines[0], 'hello ♥ world\n') self.assertEqual(lines[3], 'À demain!') if len(lines) == 4: self.assertEqual(lines[4], '') def test_file_read(self): ch = GLib.IOChannel(filename=self.testutf8) with open(self.testutf8, 'rb') as f: self.assertEqual(ch.read(), f.read()) ch = GLib.IOChannel(filename=self.testutf8) with open(self.testutf8, 'rb') as f: self.assertEqual(ch.read(10), f.read(10)) ch = GLib.IOChannel(filename=self.testutf8) with open(self.testutf8, 'rb') as f: self.assertEqual(ch.read(max_count=15), f.read(15)) def test_seek(self): ch = GLib.IOChannel(filename=self.testutf8) ch.seek(2) self.assertEqual(ch.read(3), b'llo') ch.seek(2, 0) # SEEK_SET self.assertEqual(ch.read(3), b'llo') ch.seek(1, 1) # SEEK_CUR, skip the space self.assertEqual(ch.read(3), b'\xe2\x99\xa5') ch.seek(2, 2) # SEEK_END # FIXME: does not work currently # self.assertEqual(ch.read(2), b'n!') # invalid whence value self.assertRaises(ValueError, ch.seek, 0, 3) ch.shutdown(True) def test_file_write(self): ch = GLib.IOChannel(filename=self.testout, mode='w') ch.set_encoding('latin1') ch.write('hellø world\n') ch.shutdown(True) ch = GLib.IOChannel(filename=self.testout, mode='a') ch.set_encoding('latin1') ch.write('À demain!') ch.shutdown(True) with open(self.testout, 'rb') as f: self.assertEqual(f.read().decode('latin1'), u'hellø world\nÀ demain!') def test_file_writelines(self): ch = GLib.IOChannel(filename=self.testout, mode='w') ch.writelines(['foo', 'bar\n', 'baz\n', 'end']) ch.shutdown(True) with open(self.testout, 'r') as f: self.assertEqual(f.read(), 'foobar\nbaz\nend') def test_buffering(self): writer = GLib.IOChannel(filename=self.testout, mode='w') writer.set_encoding(None) self.assertTrue(writer.get_buffered()) self.assertGreater(writer.get_buffer_size(), 10) reader = GLib.IOChannel(filename=self.testout, mode='r') # does not get written immediately on buffering writer.write('abc') self.assertEqual(reader.read(), b'') writer.flush() self.assertEqual(reader.read(), b'abc') # does get written immediately without buffering writer.set_buffered(False) writer.write('def') self.assertEqual(reader.read(), b'def') # writes after buffer overflow writer.set_buffer_size(10) writer.write('0123456789012') self.assertTrue(reader.read().startswith(b'012')) writer.flush() reader.read() # ignore bits written after flushing # closing flushes writer.set_buffered(True) writer.write('ghi') writer.shutdown(True) self.assertEqual(reader.read(), b'ghi') reader.shutdown(True) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_fd_read(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) self.assertNotEqual(ch.get_flags() | GLib.IOFlags.NONBLOCK, 0) self.assertEqual(ch.read(), b'') os.write(w, b'\x01\x02') self.assertEqual(ch.read(), b'\x01\x02') # now test blocking case, after closing the write end ch.set_flags(GLib.IOFlags(ch.get_flags() & ~GLib.IOFlags.NONBLOCK)) os.write(w, b'\x03\x04') os.close(w) self.assertEqual(ch.read(), b'\x03\x04') ch.shutdown(True) @unittest.skipUnless(fcntl, "no fcntl") def test_fd_write(self): (r, w) = os.pipe() fcntl.fcntl(r, fcntl.F_SETFL, fcntl.fcntl(r, fcntl.F_GETFL) | os.O_NONBLOCK) ch = GLib.IOChannel(filedes=w, mode='w') ch.set_encoding(None) ch.set_buffered(False) ch.write(b'\x01\x02') self.assertEqual(os.read(r, 10), b'\x01\x02') # now test blocking case, after closing the write end fcntl.fcntl(r, fcntl.F_SETFL, fcntl.fcntl(r, fcntl.F_GETFL) & ~os.O_NONBLOCK) ch.write(b'\x03\x04') ch.shutdown(True) self.assertEqual(os.read(r, 10), b'\x03\x04') os.close(r) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_deprecated_method_add_watch_no_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True # io_add_watch() method is deprecated, use GLib.io_add_watch with warnings.catch_warnings(record=True) as warn: warnings.simplefilter('always') ch.add_watch(GLib.IOCondition.IN, cb, priority=GLib.PRIORITY_HIGH) self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) ml = GLib.MainLoop() GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_deprecated_method_add_watch_data_priority(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition, data): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) self.assertEqual(data, 'hello') cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True ml = GLib.MainLoop() # io_add_watch() method is deprecated, use GLib.io_add_watch with warnings.catch_warnings(record=True) as warn: warnings.simplefilter('always') id = ch.add_watch(GLib.IOCondition.IN, cb, 'hello', priority=GLib.PRIORITY_HIGH) self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_add_watch_no_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True id = GLib.io_add_watch(ch, GLib.PRIORITY_HIGH, GLib.IOCondition.IN, cb) ml = GLib.MainLoop() self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_add_watch_with_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition, data): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) self.assertEqual(data, 'hello') cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True id = GLib.io_add_watch(ch, GLib.PRIORITY_HIGH, GLib.IOCondition.IN, cb, 'hello') ml = GLib.MainLoop() self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_add_watch_with_multi_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition, data1, data2, data3): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) self.assertEqual(data1, 'a') self.assertEqual(data2, 'b') self.assertEqual(data3, 'c') cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True id = GLib.io_add_watch(ch, GLib.PRIORITY_HIGH, GLib.IOCondition.IN, cb, 'a', 'b', 'c') ml = GLib.MainLoop() self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_deprecated_add_watch_no_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True with warnings.catch_warnings(record=True) as warn: warnings.simplefilter('always') id = GLib.io_add_watch(ch, GLib.IOCondition.IN, cb, priority=GLib.PRIORITY_HIGH) self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) ml = GLib.MainLoop() self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) @unittest.skipIf(os.name == "nt", "NONBLOCK not implemented on Windows") def test_deprecated_add_watch_with_data(self): (r, w) = os.pipe() ch = GLib.IOChannel(filedes=r) ch.set_encoding(None) ch.set_flags(ch.get_flags() | GLib.IOFlags.NONBLOCK) cb_reads = [] def cb(channel, condition, data): self.assertEqual(channel, ch) self.assertEqual(condition, GLib.IOCondition.IN) self.assertEqual(data, 'hello') cb_reads.append(channel.read()) if len(cb_reads) == 2: ml.quit() return True with warnings.catch_warnings(record=True) as warn: warnings.simplefilter('always') id = GLib.io_add_watch(ch, GLib.IOCondition.IN, cb, 'hello', priority=GLib.PRIORITY_HIGH) self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) ml = GLib.MainLoop() self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) def write(): os.write(w, b'a') GLib.idle_add(lambda: os.write(w, b'b') and False) GLib.idle_add(write) GLib.timeout_add(2000, ml.quit) ml.run() self.assertEqual(cb_reads, [b'a', b'b']) def test_backwards_compat_flags(self): with warnings.catch_warnings(): warnings.simplefilter('ignore', PyGIDeprecationWarning) self.assertEqual(GLib.IOCondition.IN, GLib.IO_IN) self.assertEqual(GLib.IOFlags.NONBLOCK, GLib.IO_FLAG_NONBLOCK) self.assertEqual(GLib.IOFlags.IS_SEEKABLE, GLib.IO_FLAG_IS_SEEKABLE) self.assertEqual(GLib.IOStatus.NORMAL, GLib.IO_STATUS_NORMAL)
Tollgate Market Square consisted of a 400,000-square-foot urban retail center. This shopping center was totally renovated and re-tenanted in 1995 and 1996 with a mix of big box stores and smaller retailers. The main tenants are Giant Food, Staples, TJ Maxx, JoAnn Fabrics, Toys 'R' US, Circuit City, Michael's and Barnes & Noble. Several out-parcels have been ground-leased to Outback Steakhouse, Red Lobster, Pizzeria Uno, First Union Bank and Boston Market. This property was sold in 2004.
#!/usr/bin/env python3 ''' Brute Force Attack Agent ''' import sys,os import validators import re, random from furl import * from urllib.parse import urlparse import time, signal from multiprocessing import Process import threading import stomp import re from daemonize import Daemonize from os.path import basename from os.path import basename current_dir = os.path.basename(os.getcwd()) if current_dir == "agents": sys.path.append('../') if current_dir == "Kurgan-Framework": sys.path.append('./') from libs.STOMP import STOMP_Connector from libs.FIPA import FIPAMessage from libs.Transport import Transport import libs.Utils as utl import config as cf from actions.bruteforceAction import BruteForceAction AGENT_NAME="AgentBruteForce" AGENT_ID="6" def agent_status(): mAgent = Transport() mAction = BruteForceAction() mAction.set_mAgent(mAgent) ret = mAction.requestInfo('request','All','agent-status','*') mAction.receive_pkg(mAgent) def get_infra(): mAgent = Transport() mAction = BruteForceAction() mAction.set_mAgent(mAgent) toAgent = "AgentWebInfra" ret = mAction.requestInfo('request',toAgent,'agent-status','*') mAction.receive_pkg(mAgent) def get_url_base(): mAgent = Transport() mAction = BruteForceAction() toAgent = "MasterAgent" mAction.set_mAgent(mAgent) ret = mAction.requestInfo('request',toAgent,'base-url-target','*') mAction.receive_pkg(mAgent) def run_bruteforce(): mAgent = Transport() mAction = BruteForceAction() toAgent = "MasterAgent" mAction.set_mAgent(mAgent) ret = mAction.requestInfo('request',toAgent,'run-bruteforce','*') mAction.receive_pkg(mAgent) def agent_quit(): mAction = BruteForceAction() mAgent = Transport() mAction.set_mAgent(mAgent) mAction.deregister() sys.exit(0) def handler(signum, frame): print("Exiting of execution...", signum); agent_quit() def runAgent(): signal.signal(signal.SIGINT, handler) signal.signal(signal.SIGTERM, handler) print("Loading " + AGENT_NAME + " ...\n") mAgent = Transport() mAction = BruteForceAction() mAction.set_mAgent(mAgent) mAction.registerAgent() fm = FIPAMessage() agent_id=[] while True: time.sleep(1) rcv = mAgent.receive_data_from_agents() if not len(rcv) == 0: fm.parse_pkg(rcv) match = re.search("(agent-name(.)+)(\(\w+\))", rcv) if match: field = match.group(3).lstrip() match2 = re.search("\w+",field) if match2: agt_id = match2.group(0) if agt_id in agent_id: continue else: print("agentID: ", agt_id) agent_id.append(agt_id) print(rcv) mAction.add_available_agent(agt_id) break else: print(rcv) print("Available Agents: ", mAction.get_available_agents()) mAgent = Transport() mAction = BruteForceAction() mAction.set_mAgent(mAgent) mAction.cfp("run-bruteforce", "*") msg_id=[] while True: time.sleep(1) rcv = mAgent.receive_data_from_agents() if not len(rcv) == 0: fm.parse_pkg(rcv) match = re.search("message-id:(.\w+\-\w+)", rcv) if match: message_id = match.group(1).lstrip() if message_id in msg_id: continue else: msg_id.append(message_id) #print(rcv) mAgent.zera_buff() break else: continue #print(rcv) p = Process(target= get_url_base()) p.start() p.join(3) def show_help(): print("Kurgan MultiAgent Framework version ", cf.VERSION) print("Usage: python3 " + __file__ + " <background|foreground>") print("\nExample:\n") print("python3 " + __file__ + " background") exit(0) def run(background=False): if background == True: pid = os.fork() if pid: p = basename(sys.argv[0]) myname, file_extension = os.path.splitext(p) pidfile = '/tmp/%s.pid' % myname daemon = Daemonize(app=myname, pid=pidfile, action=runAgent) daemon.start() print("Agent Loaded.") else: runAgent() def main(args): if args[0] == "foreground": run(background=False) else: if args[0] == "background": run(background=True) else: show_help() exit exit if __name__ == '__main__': if len(sys.argv) == 1: show_help() else: main(sys.argv[1:])
over the bed reading lamps lamp for headboard light s clip on. over the bed reading lamps full size of light lights large led. over the bed reading lamps lamp for light wall mount above. over the bed reading lamps lamp for s c light bedside wall mounted. over the bed reading lamps modern wall lights with integral led light best. over the bed reading lamps shelf above complete with adjustable lights painted inexpensive and from home bedroom shelves. over the bed reading lamps light wall mount bedside lamp low energy chrome with. over the bed reading lamps wall mounted light for bedroom led lights home design ideas. over the bed reading lamps. over the bed reading lamps for bedrooms headboard lamp large size of bedside wall bedroom mount led head. over the bed reading lamps headboard lamp light led above. over the bed reading lamps hotel style led light white surface mounted for bedroom height imperial lighting. over the bed reading lamps holiday inn express hotel suites lights beds with adjustable light below bedside led. over the bed reading lamps lamp clamp light clip power led. over the bed reading lamps lamp bedside target. over the bed reading lamps lamp bedside light for headboard south africa. over the bed reading lamps swing arm light transitional bedroom new bedside amazon. over the bed reading lamps lamp light wall mount bedroom lights headboard. over the bed reading lamps light clamp lights uk. over the bed reading lamps decoration lights lovely adjustable wall lamp archives lakeside light led. over the bed reading lamps best light for bedroom lights led. over the bed reading lamps lights for light fixtures recess mount led headboard wall mounted bedside south africa. over the bed reading lamps clip on bedroom light lamp lighting fixtures design led. over the bed reading lamps lamp headboard large size of wall mounted bedside clamp on. over the bed reading lamps beautiful headboard lamp for light wall sconce bedside pottery barn above. over the bed reading lamps cob led auto car light in indoor wall from lights lighting on group head. over the bed reading lamps wall mounted bedroom lights lamp enchanting bedside headboard. over the bed reading lamps lamp headboard to unique for images bedside ikea. over the bed reading lamps lights fabulous bedside target. over the bed reading lamps a bedroom setting with side table bedside amazon. over the bed reading lamps light flexi. over the bed reading lamps wall lights for bedroom mounted lamp light led.
#--*-- coding: utf-8 --*-- def readLinesFromFile(filename): f = open(filename) lines = f.readlines() f.close() return lines def writeLinesToFile(filename, lines): f = open(filename,'w') for line in lines: f.write(str(line[0]) + ' ' + str(line[1]) + ' ' + str(line[2]) + '\n') f.close() def thirdColumnMerge(lines): ''' 由第三列元素是否相同合并列表 如[[0,1,'A'],[2,3,'A'],[3,4,'A'],[5,6,'B']] 合并成:[[0,4,'A'],[5,6,'B']] ''' newLines = [] t = lines[0][:] for line in lines: if t[2] != line[2]: newLines.append(t) t = line[:] else: t[1] = line[1] return newLines def useTimeInfListFilter(lines, timeInfList = []): ''' 过滤 ''' Lines_new = [] wt = 0 for line in lines: l = float(line[0]) r = float(line[1]) while wt < len(timeInfList): if timeInfList[wt][0] <= l and timeInfList[wt][1] <= l: wt += 1 elif timeInfList[wt][0] > l: if r <= timeInfList[wt][0]: Lines_new.append([l,r,line[2]]) break elif r <= timeInfList[wt][1]: Lines_new.append([l,timeInfList[wt][0],line[2]]) break else: Lines_new.append([l,timeInfList[wt][0],line[2]]) l = timeInfList[wt][1] wt += 1 else: if r <= timeInfList[wt][1]: break else: l = timeInfList[wt][1] wt += 1 return Lines_new timeInfList = [] #用于存储全部时间信息列表 for line in readLinesFromFile('changchun_2.asr'): data = line.split() if(data[-1] == 'sil'): timeInfList.append([float(data[1])/100.0,(float(data[2])+float(data[1]))/100.0]) #print(timeInfList) timeInfList.append([100000.0,100000.0]) #增加结束标志 segLines = readLinesFromFile('changchun_2.seg') #去掉所有所有第三列为'0'的 segLines = [d.split() for d in segLines if d.split()[-1] != '0'] #使用时间信息列表过滤segLines得到segLines_new segLines_new = useTimeInfListFilter(segLines, timeInfList) #print(segLines_new) #合并 segLines = thirdColumnMerge(segLines_new) #print(segLines) writeLinesToFile('segLines.txt',segLines) textGridLines = readLinesFromFile('changchun_2.TextGrid') #去掉所有所有第三列为'""'的 textGridLines = [d.split() for d in textGridLines if d.split()[-1] != '""'] #print(textGridLines) #使用时间信息列表过滤textGridLines得到textGridLines_new textGridLines_new = useTimeInfListFilter(textGridLines, timeInfList) #print(textGridLines_new) #合并 textGridLines = thirdColumnMerge(textGridLines_new) #print(textGridLines) writeLinesToFile('textGridLines.txt',textGridLines)
I think it would be nice if we could manually associate 'failed'/'errored'/'incomplete' downloads with the real corresponding video. I think you mean: even though they aren't. Also, that used to happen to me until I updated PlayLater and now it seems to work fine for the most part. I do agree, though, that being able to manually associate the video with failed/error/or incomplete sounds like a good option to have. This has actually been possible since PlayLater was released. You can right-click any recording and edit the status.
#!/usr/bin/env python # ###################### # Frontend for Pcoords ###################### # (C) 2008 Sebastien Tricaud # 2009 Victor Amaducci # 2009 Gabriel Cavalcante # 2012 Julien Miotte import sys # QT from PyQt4 import QtCore, QtGui from PyQt4.QtGui import QMainWindow # Pcoords import pcoords # UI from pcoordsgui import axisgui, export from pcoordsgui import line_graphics_item from pcoordsgui.pcoords_graphics_scene import myScene from pcoordsgui.build_graphic_dialog import Buildpanel from pcoordsgui.set_width_dialog import buildWidthPanel from pcoordsgui.select_axis_id_dialog import buildSelectIdPanel from pcoordsgui.about_dialog import buildAboutPanel from pcoordsgui.main_window_ui import Ui_MainWindow # check for psyco try: import psyco psyco.full() except ImportError: print 'Running without psyco (http://psyco.sourceforge.net/).' class MainWindow(QMainWindow): """Describes the pcoords main window.""" def __init__(self, pcvfile=None, filters=None, parent=None): """Initialization method.""" QMainWindow.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.scene = QtGui.QGraphicsScene() self.comboboxes = {} self.image = 0 self.comboList = [] self.buttonChange = [] self.axes_number = 0 self.filters = None if pcvfile: self.setPcvFile(pcvfile, filters=filters) else: self.openPcvFile() self.exporter = export.ExportGraph() self.connectSignals() self.show() def setPcvFile(self, pcvfile, filters=None): self.image = pcoords.Image(str(pcvfile), filters) self.setWindowTitle("Pcoords Frontend [%s]" % pcvfile) if filters: self.filters = filters self.destroyComboBoxes() self.paint_ImageView() def connectSignals(self): """Connect the objects to the slots.""" ui = self.ui ui.actionSave.triggered.connect(self.exportToPGDL) ui.actionExport_png.triggered.connect(self.exportToPNG) ui.action_Build.triggered.connect(self.Buildgraphic) ui.action_Open.triggered.connect(self.openPcvFile) ui.action_Quit.triggered.connect(self.close) ui.zoomButtonPlus.clicked.connect(self.plusZoom) ui.zoomButtonLess.clicked.connect(self.plusZoom) ui.axisIncreaseButton.clicked.connect(self.increaseAxisDialog) ui.setWidthButton.clicked.connect(self.changeWidthDialog) ui.QCheckAntiAliasing.clicked.connect(self.antiAliasing) ui.actionUndo.triggered.connect(self.undoProcess) ui.actionRedo.triggered.connect(self.redoProcess) ui.action_About.triggered.connect(self.showCredits) ui.actionZoomin.triggered.connect(self.plusZoom) ui.actionZoomout.triggered.connect(self.lessZoom) ui.actionLine_width.triggered.connect(self.changeWidthDialog) ui.actionViewLayers.toggled.connect(self.viewLayers) ui.actionViewTable.toggled.connect(self.viewTable) def Buildgraphic(self): """Shows the buildpanel.""" test = Buildpanel(self) test.show() def openPcvFile(self): """Opens the PCV file with a QFileDialog.""" self.setPcvFile(get_pcv_filename()) def antiAliasing(self): """Activate or deactivate the anti-aliasing.""" graphics_view = self.ui.graphicsView is_checked = self.ui.QCheckAntiAliasing.isChecked() graphics_view.setRenderHint(QtGui.QPainter.Antialiasing, is_checked) def destroyComboBoxes(self): for each in self.comboList: each.close() for each in self.buttonChange: each.Close() def showCredits(self): """Show the credits in the about dialog.""" panel = buildAboutPanel(pcoords.Version(), self) panel.show() del panel def viewLayers(self, checked): """Display the layers box.""" if checked: self.ui.LayersBox.show() else: self.ui.LayersBox.hide() def viewTable(self, checked): if checked: self.ui.tableWidget.show() else: self.ui.tableWidget.hide() def sortLayers(self): self.ui.layersTreeWidget.sortItems(2, 0) def redoProcess(self): try: if self.scene.countUndo < 0: QtGui.QMessageBox.information( self, self.trUtf8("Redo"), self.trUtf8("There isn't Statement to Redo!") ) else: statementList = self.scene.listUndoStatement cmd = str(statementList[self.scene.countUndo]) strList = cmd.split() command = ''.join(strList[:1]) if command == "COLOR": num = (len(strList) - 1) / 2 for i in range(1, len(strList) - 1, 2): self.scene.brushSelection2(strList[i], strList[i + 1], num) self.scene.countUndo = self.scene.countUndo + 1 elif command == "SHOWALL": num_selected_lines = int(''.join(strList[2:])) for i in range(num_selected_lines): for j in range(self.scene.axes_number - 1): self.scene.hideSelected2(''.join(strList[1:2])) self.scene.countUndo = self.scene.countUndo - 1 cmd = str(statementList[len(statementList) - self.scene.countUndo]) strList = cmd.split() elif command == "HIDE": num_selected_lines = len(strList) for i in range(1, num_selected_lines, 1): self.scene.hideSelected2(strList[i]) self.scene.countUndo = self.scene.countUndo + 1 elif command == "ZOOM+": self.plusZoom2() self.scene.countUndo = self.scene.countUndo + 1 elif command == "ZOOM-": self.lessZoom2() self.scene.countUndo = self.scene.countUndo + 1 elif command == "CHANGE": listParam = [] num_selected_lines = len(strList) for i in range(1, num_selected_lines, 3): listParam.append(strList[i]) listParam.append(strList[i + 1]) listParam.append(strList[i + 2]) self.axisButton.buttonPressed2(listParam) listParam = [] self.scene.countUndo = self.scene.countUndo + 1 elif command == "WIDTH": num_selected_lines = len(strList) - 1 for i in range(1, num_selected_lines, 3): self.scene.changeWidth2(strList[i], strList[i + 1]) self.scene.countUndo = self.scene.countUndo + 1 elif command == "ADDLAYER": self.scene.addLayer(strList[1], strList[2], strList[3]) self.scene.countUndo = self.scene.countUndo + 1 elif command == "REMOVELAYER": self.scene.removeLayer2(strList[1]) self.scene.countUndo = self.scene.countUndo + 1 except: QtGui.QMessageBox.information( self, self.trUtf8("Redo"), self.trUtf8("There isn't Statement to Redo!")) if self.scene.countUndo > (len(statementList) - 1): self.scene.countUndo = len(statementList) - 1 def undoProcess(self): try: if self.scene.countUndo < 0: QtGui.QMessageBox.information( self, self.trUtf8("Undo"), self.trUtf8("There isn't Statement to Undo!")) self.scene.countUndo = 0 else: statementList = self.scene.listUndoStatement cmd = str(statementList[self.scene.countUndo - 1]) strList = cmd.split() command = ''.join(strList[:1]) if command == "COLOR": num = (len(strList) - 1) / 2 for i in range(len(strList) - 1, 1, -2): self.scene.brushSelection2(strList[i - 1], strList[i], num) self.scene.countUndo = self.scene.countUndo - 1 elif command == "SHOWALL": num_selected_lines = int(''.join(strList[2:])) for i in range(num_selected_lines): for j in range(self.scene.axes_number - 1): self.scene.hideSelected2(''.join(strList[1:2])) self.scene.countUndo = self.scene.countUndo + 1 cmd = str(statementList[len(statementList) - self.scene.countUndo]) strList = cmd.split() self.scene.countUndo = self.scene.countUndo + 1 elif command == "HIDE": num_selected_lines = (len(strList) - 1) for i in range(num_selected_lines, 0, -1): self.scene.showAllLines2(strList[i]) self.scene.countUndo = self.scene.countUndo - 1 elif command == "ZOOM+": self.lessZoom2() self.scene.countUndo = self.scene.countUndo - 1 elif command == "ZOOM-": self.plusZoom2() self.scene.countUndo = self.scene.countUndo - 1 elif command == "CHANGE": listParam = [] num_selected_lines = len(strList) for i in range(num_selected_lines - 1, 0, -3): listParam.append(strList[i - 2]) listParam.append(strList[i - 1]) listParam.append(strList[i]) self.axisButton.buttonPressed2(listParam) listParam = [] self.scene.countUndo = self.scene.countUndo - 1 elif command == "WIDTH": num_selected_lines = len(strList) - 1 for i in range(num_selected_lines, 0, -3): self.scene.changeWidth2(strList[i - 2], strList[i - 1]) self.scene.countUndo = self.scene.countUndo - 1 elif command == "ADDLAYER": self.scene.removeLayer2(strList[1]) self.scene.countUndo = self.scene.countUndo - 1 elif command == "REMOVELAYER": i = 1 while not strList[i] and not strList[i]: i += 1 for j in range(i): self.scene.createLayer( strList[1], strList[2 + j], strList[2 + (i - 1)]) self.scene.countUndo = self.scene.countUndo - 1 except: QtGui.QMessageBox.information( self, self.trUtf8("Undo"), self.trUtf8("There isn't Statement to Undo!")) def changeWidthDialog(self): panel = buildWidthPanel(self) panel.show() del panel def increaseAxisDialog(self): panel = buildSelectIdPanel(self) panel.show() del panel def plusZoom(self): self.ui.graphicsView.scale(1.15, 1.15) self.line.decreaseWidth() for i in range(len(self.scene.listUndoStatement) - 1, self.scene.countUndo - 1, -1): del self.scene.listUndoStatement[i] self.scene.listUndoStatement.append("ZOOM+") self.scene.countUndo = len(self.scene.listUndoStatement) def plusZoom2(self): self.ui.graphicsView.scale(1.15, 1.15) self.line.decreaseWidth() def lessZoom(self): self.ui.graphicsView.scale(1 / 1.15, 1 / 1.15) self.line.increaseWidth() for i in range(len(self.scene.listUndoStatement) - 1, self.scene.countUndo - 1, -1): del self.scene.listUndoStatement[i] self.scene.listUndoStatement.append("ZOOM-") self.scene.countUndo = len(self.scene.listUndoStatement) def lessZoom2(self): self.ui.graphicsView.scale(1 / 1.15, 1 / 1.15) self.line.increaseWidth() def empty_ImageView(self): tableHeader = [] self.ui.tableWidget.setHorizontalHeaderLabels(tableHeader) self.ui.tableWidget.horizontalHeader().setResizeMode( QtGui.QListView.Adjust, QtGui.QHeaderView.Interactive) self.ui.tableWidget.verticalHeader().hide() self.ui.tableWidget.setShowGrid(True) self.ui.tableWidget.setSelectionBehavior( QtGui.QAbstractItemView.SelectRows) def exportToPGDL(self): self.exporter.asPGDL(self.image) def exportToPNG(self): self.exporter.asPNG(self.scene) def paint_ImageView(self): self.scene = myScene(self.ui.graphicsView) self.scene.setBackgroundBrush(QtCore.Qt.white) self.scene.getUi(self.ui, self.image) self.ui.graphicsView.setScene(self.scene) self.ui.graphicsView.setDragMode(2) ui = self.ui ui.hideSelectionButton.clicked.connect(self.scene.hideSelected) ui.brushButton.clicked.connect(self.scene.brushSelection) ui.showOnlyButton.clicked.connect(self.scene.hideNotSelected) ui.showAllButton.clicked.connect(self.scene.showAllLines) ui.actionHide.triggered.connect(self.scene.hideSelected) ui.actionBrush.triggered.connect(self.scene.brushSelection) ui.actionShow_only.triggered.connect(self.scene.hideNotSelected) ui.actionShow_all.triggered.connect(self.scene.showAllLines) #Layer Buttons ui.layersTreeWidget.itemClicked.connect(self.scene.selectLayer) ui.sortLayerButton.clicked.connect(self.sortLayers) ui.removeLayerButton.clicked.connect(self.scene.removeLayer) ui.addLayerButton.clicked.connect(self.scene.addLayer) ui.selectLayerButton.clicked.connect(self.scene.doSelectLayer) self.axes_number = len(self.image['axeslist']) i = 0 tableHeader = [] comboList = [] # Handler of engine/ComboBox axis name translate axesDict = {} # Flag for not duplicate lines! dictFull = False while i < self.axes_number: combo = axisgui.AxisName(self.ui, self) combo.show() temp_index = 0 for axis in self.image['axeslist']: #itemlabel = "teste" itemlabel = combo.setItemName( self.image['axes'][axis]['label'], self.image['axes'][axis]['id']) # set the combo names if not dictFull: if (self.image['axes'][axis]['label']): axesDict[self.image['axes'][axis]['label']] = axis #Add translate for dict if it have label else: # Add translate if it not have label axesDict['axis%d' % temp_index] = axis if i == 0: tableHeader.append(itemlabel) self.ui.tableWidget.insertColumn( self.ui.tableWidget.columnCount()) temp_index = temp_index + 1 # Set the flag in first iteration dictFull = True combo.setCurrentIndex(i) comboList.append(combo) i = i + 1 axisWidget = self.ui.axisWidget axisWidget.setup(comboList, axesDict, self.scene) self.scene.getButton(axisWidget) self.ui.horizontalSlider.setPageStep(1) self.ui.horizontalSlider.setMinimum(0) linenb = 0 self.comboList = comboList for self.line in self.image['lines']: linenb = linenb + 1 self.ui.horizontalSlider.setMaximum(linenb / (self.axes_number - 1)) self.ui.horizontalSlider.setValue(linenb / (self.axes_number - 1)) axisgui.addAxes(self.image, self.scene, self.line, self.axes_number, self.ui) self.ui.tableWidget.setHorizontalHeaderLabels(tableHeader) self.ui.tableWidget.horizontalHeader().setResizeMode( QtGui.QListView.Adjust, QtGui.QHeaderView.Interactive) self.ui.tableWidget.verticalHeader().hide() self.ui.tableWidget.setShowGrid(True) self.ui.tableWidget.setSelectionBehavior( QtGui.QAbstractItemView.SelectRows) self.line = line_graphics_item.Line(self.scene, self.image, self.axes_number, self.ui, self.comboList) self.line.addLines(linenb) self.connect(self.ui.horizontalSlider, QtCore.SIGNAL('valueChanged(int)'), self.line.update_lines_view) axisWidget.setLines(self.line, linenb) axisWidget.setImage(self.image) axisWidget.setCurrentEngine(pcoords) axisWidget.setSlider(self.ui.horizontalSlider) self.buttonChange.append(axisWidget) def closeEvent(self, event): self.scene.clearSelection() event.accept()
Assalamu alaikum.. my daughter did her B.com and finished Chartered Account inter. currently she's doing her articleship in a well known company in chennai. She's pretty (very fair) and humble. We are looking for well educated, handsome n religious boy for daughter. We are staying in chennai in our own house. this is Salma and I work in the Private Sector as a Health Care Professional. I belongs to a Middle class, Nuclear family with Orthodox Values. I have completed my M.Sc.. My daughter name is Farzia Tabassum.She has completed B.Sc Bio-Tech and currently pursuing Aalim course. She grew up in a Upper middle class, Joint family - Orthodox.
#!env/bin/python """ Example txzmq client. examples/req_rep.py --method=connect --endpoint=ipc:///tmp/req_rep_sock --mode=req examples/req_rep.py --method=bind --endpoint=ipc:///tmp/req_rep_sock --mode=rep """ import os import sys import time import zmq from optparse import OptionParser from twisted.internet import reactor rootdir = os.path.realpath(os.path.join(os.path.dirname(sys.argv[0]), '..')) sys.path.insert(0, rootdir) os.chdir(rootdir) from txzmq import ZmqEndpoint, ZmqFactory, ZmqREQConnection, ZmqREPConnection, ZmqRequestTimeoutError parser = OptionParser("") parser.add_option("-m", "--method", dest="method", help="0MQ socket connection: bind|connect") parser.add_option("-e", "--endpoint", dest="endpoint", help="0MQ Endpoint") parser.add_option("-M", "--mode", dest="mode", help="Mode: req|rep") parser.set_defaults(method="connect", endpoint="ipc:///tmp/txzmq-pc-demo") (options, args) = parser.parse_args() zf = ZmqFactory() e = ZmqEndpoint(options.method, options.endpoint) if options.mode == "req": s = ZmqREQConnection(zf, e) def produce(): # data = [str(time.time()), socket.gethostname()] data = str(time.time()) print "Requesting %r" % data try: d = s.sendMsg(data, timeout=0.95) def doPrint(reply): print("Got reply: %s" % (reply)) def onTimeout(fail): fail.trap(ZmqRequestTimeoutError) print "Timeout on request, is reply server running?" d.addCallback(doPrint).addErrback(onTimeout) except zmq.error.Again: print "Skipping, no pull consumers..." reactor.callLater(1, produce) reactor.callWhenRunning(reactor.callLater, 1, produce) else: s = ZmqREPConnection(zf, e) def doPrint(messageId, message): print "Replying to %s, %r" % (messageId, message) s.reply(messageId, "%s %r " % (messageId, message)) s.gotMessage = doPrint reactor.run()
I write, edit and shoot content for adventure-travel and motoring publications around the world. Below is a selection of some recent features. South Africa’s Route 62 is a classic. I rode a Royal Enfield 500 up from Cape Town to find the best of it. Germany’s MOTORRAD Magazine pitted two much-loved, twin-cylinder fun machines against one another. An old favourite - the Husqvarna Nuda, and the new kid on the block, the KTM Duke 790. I shot the story. 10 of South Africa’s most challenging mountain passes are in the country’s Eastern Cape provinces. I rode them on a KLR650 and captured the experience for Getaway Magazine. With intensifying discussions about how we’re going to power our vehicles in the future, MOTORRAD Magazine in Germany produced a 31-page special on energy and motorcycles. I photographed a comparison test between six bikes. The Intermot Motorcycle Expo in Cologne Germany was the stage from some exciting new releases for 2019. I attended and reported on it for ZABikers in South Africa. Industry specialists, journalists and engineers give me the lowdown on what to expect from the new BMW R1250 GS. A little-known route through South Africa's Cederberg mountains provides a challenge for even experienced adventures riders. Here's what it's like to ride it. I spent three days on the road finding a route from Johannesburg to Cape Town that would take adventure riders through some of South Africa's most spectacular landscapes. Co-produced Getaway magazine's annual gear guides for 2016 and 2017. The guides feature reviews from professional travellers, the latest gear for a broad range of outdoor activities and tips and techniques to make outdoor lifestyle easier, and more fun. The new Husqvarna Vitpilen 701 has been making huge waves in the street bike scene this year. I rode it through the Black Forest to see what all the noise was about. I travelled to a remote region of Madagascar to cover the inaugural Racing Madagascar trail run series. It was hot and tough, and one of the most incredible adventures I've ever had. The KwaZulu-Natal Province is home to some of the best single-track in the world. I hit them on my favourite hardtail to see which ones came up trumps. There are just two national parks in landlocked Lesotho. I went there to see what sets them apart. You can ride from Cape Town to Mossel Bay almost exclusively on gravel roads. We plotted a route and put KTM's new 1190 and 1050 Adventure bikes to the test. South Africa's Free State province often gets overlooked when it comes to planning a road trip. I took a familiar passenger and the new Nissan Navara to root out its gems. I joined a crew of 10 on the first-ever fatbike tour of Mozambique's southern coastline - three days of sunshine, swimming and cycling along secluded beaches. I joined a desert expedition of double cabs from nine different manufacturers. We put them through their paces in the heat of Namibia to see which one would come out on top. I spent some time with team Vestas Wind during their Cape Town leg of the Volvo Ocean Race to learn about what it takes to compete in the world's toughest yacht race. I love a good backpack. But everyone is different. For this feature I teamed up with four travellers with completely different needs to produce a feature with the best bags for each type of adventure.
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'EntradaAnalisis', fields ['fecha', 'apellido', 'nombre'] db.delete_unique(u'neonatologia_analisis_app_entradaanalisis', ['fecha', 'apellido', 'nombre']) # Adding model 'DeterminacionEstudioNeonatologia' db.create_table(u'neonatologia_analisis_app_determinacionestudioneonatologia', ( (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('nombre', self.gf('django.db.models.fields.CharField')(max_length=25)), ('descripcion', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)), )) db.send_create_signal(u'neonatologia_analisis_app', ['DeterminacionEstudioNeonatologia']) # Deleting field 'EntradaAnalisis.determinacion' db.delete_column(u'neonatologia_analisis_app_entradaanalisis', 'determinacion') # Adding M2M table for field determinacion on 'EntradaAnalisis' m2m_table_name = db.shorten_name(u'neonatologia_analisis_app_entradaanalisis_determinacion') db.create_table(m2m_table_name, ( ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('entradaanalisis', models.ForeignKey(orm[u'neonatologia_analisis_app.entradaanalisis'], null=False)), ('determinacionestudioneonatologia', models.ForeignKey(orm[u'neonatologia_analisis_app.determinacionestudioneonatologia'], null=False)) )) db.create_unique(m2m_table_name, ['entradaanalisis_id', 'determinacionestudioneonatologia_id']) def backwards(self, orm): # Deleting model 'DeterminacionEstudioNeonatologia' db.delete_table(u'neonatologia_analisis_app_determinacionestudioneonatologia') # Adding field 'EntradaAnalisis.determinacion' db.add_column(u'neonatologia_analisis_app_entradaanalisis', 'determinacion', self.gf('django.db.models.fields.CharField')(default='', max_length=50, blank=True), keep_default=False) # Removing M2M table for field determinacion on 'EntradaAnalisis' db.delete_table(db.shorten_name(u'neonatologia_analisis_app_entradaanalisis_determinacion')) # Adding unique constraint on 'EntradaAnalisis', fields ['fecha', 'apellido', 'nombre'] db.create_unique(u'neonatologia_analisis_app_entradaanalisis', ['fecha', 'apellido', 'nombre']) models = { u'auth.group': { 'Meta': {'object_name': 'Group'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) }, u'auth.permission': { 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, u'auth.user': { 'Meta': {'object_name': 'User'}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, u'contenttypes.contenttype': { 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, u'neonatologia_analisis_app.determinacionestudioneonatologia': { 'Meta': {'object_name': 'DeterminacionEstudioNeonatologia'}, 'descripcion': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'nombre': ('django.db.models.fields.CharField', [], {'max_length': '25'}) }, u'neonatologia_analisis_app.entradaanalisis': { 'Meta': {'object_name': 'EntradaAnalisis'}, 'apellido': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 'apellido_madre': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 'created': ('django.db.models.fields.DateTimeField', [], {}), 'created_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'determinacion': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['neonatologia_analisis_app.DeterminacionEstudioNeonatologia']", 'symmetrical': 'False'}), 'domicilio': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), 'estado': ('django.db.models.fields.CharField', [], {'default': "'A'", 'max_length': '1'}), 'etapa': ('django.db.models.fields.CharField', [], {'default': "'INI'", 'max_length': '3'}), 'fecha': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), 'fecha_nacimiento': ('django.db.models.fields.DateField', [], {}), 'fecha_notif_familia': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'laboratorio_obs': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}), 'muestra_fecha_1': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), 'muestra_fecha_2': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), 'muestra_num_1': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'muestra_num_2': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'muestra_texto_2': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'neonatologia_obs': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}), 'nombre': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 'nombre_madre': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 'notificar_trabsoc': ('django.db.models.fields.CharField', [], {'default': "'SI'", 'max_length': '2'}), 'prioridad': ('django.db.models.fields.CharField', [], {'default': "'N'", 'max_length': '1'}), 'sexo': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}), 'telefono': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'trabsoc_obs': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}) }, u'neonatologia_analisis_app.entradaanalisisadjunto': { 'Meta': {'object_name': 'EntradaAnalisisAdjunto'}, 'adjunto': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), 'created': ('django.db.models.fields.DateTimeField', [], {}), 'created_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'entrada_analisis': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['neonatologia_analisis_app.EntradaAnalisis']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) } } complete_apps = ['neonatologia_analisis_app']
Your investment extends beyond devices; we'll help manage all equipment on-site or remotely. In the current education environment, it’s difficult to provide a great education without sufficiently optimized hardware and up-to-date software. Since 2013, K-12 schools have spent a total of 35% of their annual budget on technological services, specifically cloud computing. Managing these services is challenging because of time and money constraints. Your investment in technology extends past the devices themselves—you need to make sure they’re properly updated and maintained, decreasing down time and providing a reliable and effective enhanced learning environment. Virtucom can manage every piece of equipment on-site or remotely—implementing new software updates, creating data backups, performing desktop tunings, and monitoring energy consumption. Once we deploy your hardware and install all necessary software, we function as the administrator for all of your desktops, laptops, and other computing devices. We’re passionate about the services we provide, but we’re even more devoted to the impact our relationship with your school or district has on education. Onsite support allows us to become a part of your community—we’re there so you don’t have to worry about devices, therefore you can focus your efforts and expertise on your students and teachers. When a device breaks down, our expert technicians are accessible and responsive. With remote desktop management, we can resolve glitches quickly and efficiently, without even coming down to your school. Technology can enrich the learning process. Contact us today to see what it can do when it’s properly maintained.
# Copyright (c) Mathias Kaerlev 2012. # This file is part of Anaconda. # Anaconda is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # Anaconda is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with Anaconda. If not, see <http://www.gnu.org/licenses/>. import shutil import zipfile import sys import os def make_zipfile(zip_filename, base_dir): zip = zipfile.ZipFile(zip_filename, 'w', compression = zipfile.ZIP_DEFLATED) cwd = os.getcwd() os.chdir(base_dir) for dirpath, dirnames, filenames in os.walk('.'): for name in filenames: path = os.path.normpath(os.path.join(dirpath, name)) if os.path.isfile(path): zip.write(path, path) zip.close() os.chdir(cwd) return zip_filename path = './dist/%s' % sys.platform if sys.platform == 'darwin': # lipo files so we only get i386 cwd = os.getcwd() os.chdir(path) import subprocess for dirpath, dirnames, filenames in os.walk('.'): for name in filenames: full_path = os.path.normpath(os.path.join(dirpath, name)) if not os.path.isfile(full_path): continue subprocess.call(['lipo', full_path, '-thin', 'i386', '-output', full_path]) os.chdir(cwd) make_zipfile('./dist/%s.zip' % sys.platform, path) shutil.rmtree(path)
Iconic marathon. Iconic city. Top marathon goals right there. Founded in 1981 by a former Olympic champion and inspired by the New York Marathon, London has become the Mecca for runners around the world not just in the UK. Runners will have the joy of passing by some of London’s most famous landmarks including, the London Eye, Tower Bridge, Big Ben and the Houses of Parliament before finishing at Buckingham Palace. I think London is an extra special place for female runners too because it’s where our own running champion, Paula Radcliffe smashed the fastest female marathon time by finishing in 2 hours 15 minutes back in 2003. She is a personal running hero of mine and even though no one has even been close to beating her time, Paula has given the London Marathon some major kudos. If you’re sticking around London afterwards (and I would highly recommend it as it’s one of the best cities on Earth!), here are 30 free things to do in London to get you started. Ever wondered what it’s like to run in the happiest place on Earth? Well, you can actually run a marathon in Walt Disney World Marathon in Florida with all your favourite characters in tow! No matter what your skill level, you’ll be a part of a community of Disney-lovers that will make the run really special. Through the 26.2 mile course you will run through all four of the Walt Disney World theme parks and ESPN Wide World of Sports Complex, with Disney’s most beloved characters cheering you on. What could be better? If you want to take it up a notch, you can join many other runners by completing the marathon in costume. Check out Russell and Kevin the bird from Disney’s Up below, so cute! One of the world’s most famous marathons, the New York City Marathon tops most lists for runners around the globe. Starting at Staten Island and finishing in Central Park you will have the privilege of running your way through New York’s five historic boroughs, Staten Island, Queens, The Bronx, Brooklyn and Manhattan. The New York City Marathon is a favourite amongst runners and for good reason, it’s one of the greatest cities in the world! The marathon has also got a long standing history, celebrating its 60th year in 2018. If you’re looking for inspiration on what to see and do whilst you’re visiting, here is a weekend itinerary to get you started. For anyone that knows me or has followed Footsteps on the Globe for a while, you’ll know that I have a real soft spot for Berlin. So when I found out there was a world-famous marathon that took place here every year (that somehow I didn’t know about!) I had to add it to this list. There are so many marathons that take place in fabulous cities around the world but sometimes you don’t really get to see anything as you’re running, except for the Berlin Marathon. The race starts and ends at the iconic Brandenburg Gate and takes you on a course past some of the cities most famous landmarks. These include: the Reichstag (the seat of German parliament), the Siegessäule (the Victory Column), Tiergarten and the TV Tower in Alexanderplatz. The legend that is Eliud Kipchoge (and one of my personal running heroes!) smashed the marathon world record in Berlin by finishing in two hours, one minute and 39 seconds!! The guy is a machine. If you want to find out more about him, check out the documentary, “Breaking 2” by the National Geographic. They test if it’s physically possible to run a marathon in under 2 hours. It’s a really good watch. I also couldn’t recommend Berlin enough for a cheeky city break, it is the most incredible city. Check out my 12 awesome things to do in Berlin post or video to help you plan your itinerary. The Antarctica Ice Marathon is not one for the faint-hearted. Taking place 80 Degrees South, just a few hundred miles from the South Pole with an average windchill temperature of -20C…this is extreme marathoning at its best. Not even penguins live this far south! Due to the nature of this marathon, preparation takes place across three days. Runners are flown by private jet from Punta Arenas in Chile to the marathon destination at Union Glacier the day before and flown back the day after. It’s not a cheap endeavour costing a whopping €15,000 to take part. But what an incredible once in a lifetime experience and a chance to cross off the seventh continent off your bucket list. Just a heads up, there is also a half marathon you can do instead if you’d rather have the experience but without so much of the distance! The Great Wall Marathon is a true feat of endurance. As well as the challenge of running 26.2 miles, you’ll be climbing 5,163 steps along the way. But, and this is a BIG but (and I cannot lie – heh), no other marathon offers a backdrop as stunning as the Great Wall Marathon. The route leads runners through the lower valley and into the villages where people are cheering and the festive atmosphere is a real energy boost. This is also a great opportunity to knock the Great Wall of China off your bucket list as well. Come on I know it’s on there somewhere. You wouldn’t have thought that a place so well known for partying, drinking and gambling would also be home to one of the oldest marathons in the US, but it is! To be fair, if anywhere is going to make a gruelling 26.2 mile run fun, it’s Vegas baby! The race starts on Las Vegas Boulevard at 4.30pm and you’ll make your way down the strip amongst running Elvis’s and showgirls into downtown Vegas. At mile 10 you’ll pass through the world-famous Fremont Street before heading back towards the strip to finish at The Mirage. As it is the Rock ‘n’ Roll Marathon, you’ll also get to enjoy stands dotted around the course blasting party tunes to keep your spirits up along with the cheering crowds. Plus, there is nowhere better to be post marathon than Las Vegas. Sit by the pool, order some cocktails, do a bit of gambling, see a show…it’s the perfect place to unwind and just enjoy yourself. Dubbed ‘the wildest of the them all’. The Big 5 Marathon in South Africa offers runners the unique experience of running alongside Africa’a ‘Big 5’: elephant, rhino, buffalo, lion and leopard. But it’s not just the ‘Big 5’ that you’ll see along the way, it’s also, zebras, giraffes, antelopes and other animals. Held at the Entabeni Game Reserve, you’ll be running alongside the African wildlife with no fences or rivers separating you from the animals. It’s a truly unique marathon experience and a chance to have the Lion King running party you thought you’d never have! Another one of the world’s greatest cities to grace this list, Tokyo! What is so special about this race is how much you get a feel for the city and Japanese culture whilst running. Unfortunately it’s very very popular which is why only 1 in 10 people out of the average 300,000 who apply are picked to take part. Starting at the Tokyo Metropolitan Government Building in the heart of Tokyo you’ll pass by the famous Shinjuku Station (the busiest in the world), Akihabara (the anime and manga capital of the world) and Asakusa where you’ll swap skyscrapers for traditional Japanese temples. After passing by Asakusa, you will get the chance to see the Tokyo Skytree (the tallest building in Japan) as well Tokyo Tower before heading towards the finishing line at the incredible Imperial Palace. The Tokyo Marathon boasts some of the best cheering crowds in the marathon world and put on traditional performance pieces to keep you entertained throughout. And of course…how could I leave off where marathoning began, Athens. The Athens Marathon follows the same route that the famous messenger, Pheidippides too to deliver the news of the Greeks’ victory over the Persians in 490 BC. Despite being known as one of Athens’ greatest runners, he unfortunately collapsed and died of exhaustion at the end of the 26.2 miles distance. Yet his determination inspired one of the most popular sporting events of the modern age! The course starts at Marathon following the coastline down to Sparta and through the beautiful Pendeli mountains before finishing in Athens. A cheering crowd greets runners in the Panathinaiko stadium for a hero’s finish. Which marathon would you pick from the list? Are there any marathons around the world travellers will love you think were missing from the list? Let me know in the comments! All photos sourced from Flickr unless otherwise stated in the caption.
# -*- coding: utf-8 -*- # # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD, UK # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License v2.0, as published by # the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ## @package ribbon_cluster # A ribbon containing clustering commands. # import os from icon_lib import icon_get from dump_io import dump_io from tb_item_sim_mode import tb_item_sim_mode from tb_item_sun import tb_item_sun from code_ctrl import enable_betafeatures from cal_path import get_css_path #qt from PyQt5.QtWidgets import QMainWindow, QTextEdit, QAction, QApplication from PyQt5.QtGui import QIcon from PyQt5.QtCore import QSize, Qt,QFile,QIODevice from PyQt5.QtWidgets import QWidget,QSizePolicy,QVBoxLayout,QHBoxLayout,QPushButton,QDialog,QFileDialog,QToolBar,QMessageBox, QLineEdit, QToolButton from PyQt5.QtWidgets import QTabWidget from info import sim_info from win_lin import desktop_open #windows from scan import scan_class from help import help_window from error_dlg import error_dlg from server import server_get from fit_window import fit_window from cmp_class import cmp_class from global_objects import global_object_run from util import isfiletype from util import wrap_text class ribbon_cluster(QToolBar): def __init__(self): QToolBar.__init__(self) self.myserver=server_get() self.setToolButtonStyle( Qt.ToolButtonTextUnderIcon) self.setIconSize(QSize(42, 42)) self.cluster_get_data = QAction(icon_get("server_get_data"), wrap_text(_("Cluster get data"),8), self) self.cluster_get_data.triggered.connect(self.callback_cluster_get_data) self.addAction(self.cluster_get_data) self.cluster_get_data.setEnabled(False) self.cluster_copy_src = QAction(icon_get("server_copy_src"), wrap_text(_("Copy src to cluster"),8), self) self.cluster_copy_src.triggered.connect(self.callback_cluster_copy_src) self.addAction(self.cluster_copy_src) self.cluster_copy_src.setEnabled(False) self.cluster_make = QAction(icon_get("server_make"), wrap_text(_("Make on cluster"),6), self) self.cluster_make.triggered.connect(self.callback_cluster_make) self.addAction(self.cluster_make) self.cluster_make.setEnabled(False) self.cluster_clean = QAction(icon_get("server_clean"), wrap_text(_("Clean cluster"),8), self) self.cluster_clean.triggered.connect(self.callback_cluster_clean) self.addAction(self.cluster_clean) self.cluster_clean.setEnabled(False) self.cluster_off = QAction(icon_get("off"), wrap_text(_("Kill all cluster code"),8), self) self.cluster_off.triggered.connect(self.callback_cluster_off) self.addAction(self.cluster_off) self.cluster_off.setEnabled(False) self.cluster_sync = QAction(icon_get("sync"), _("Sync"), self) self.cluster_sync.triggered.connect(self.callback_cluster_sync) self.addAction(self.cluster_sync) self.cluster_sync.setEnabled(False) spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.addWidget(spacer) self.help = QAction(icon_get("internet-web-browser"), _("Help"), self) self.addAction(self.help) def callback_cluster_make(self): self.myserver.cluster_make() def callback_cluster_clean(self): self.myserver.cluster_clean() def callback_cluster_off(self): self.myserver.cluster_quit() self.update() def callback_cluster_sync(self): self.myserver.copy_src_to_cluster_fast() def callback_cluster_sleep(self): self.myserver.sleep() def callback_cluster_poweroff(self): self.myserver.poweroff() def callback_cluster_print_jobs(self): self.myserver.print_jobs() def callback_wol(self, widget, data): self.myserver.wake_nodes() def update(self): if self.myserver.cluster==True: self.cluster_clean.setEnabled(True) self.cluster_make.setEnabled(True) self.cluster_copy_src.setEnabled(True) self.cluster_get_data.setEnabled(True) self.cluster_off.setEnabled(True) self.cluster_sync.setEnabled(True) else: self.cluster_clean.setEnabled(False) self.cluster_make.setEnabled(False) self.cluster_copy_src.setEnabled(False) self.cluster_get_data.setEnabled(False) self.cluster_off.setEnabled(False) self.cluster_sync.setEnabled(False) def setEnabled(self,val): print("") #self.undo.setEnabled(val) def callback_cluster_get_data(self, widget, data=None): self.myserver.cluster_get_data() def callback_cluster_copy_src(self, widget, data=None): self.myserver.copy_src_to_cluster()
When life is terrible, music is always there as a buoy to hold you up or a companion to understand you. It can provide encouragement, escape, respite, validation, catharsis. And man, we needed it in 2016. The year’s music, as it always does, took all shapes and sizes. We welcomed back the beloved (Radiohead, Bon Iver), became acquainted with genre-bending stars-in-the-making (Anderson .Paak, Kaytranada), and entrusted indie rock in the hands of promising young storytellers (Car Seat Headrest, Pinegrove). The very top of the rap food chain graced us with new tracks (Kanye West, Drake, Kendrick Lamar), as well as up-and-coming rappers coming to take their throne (Chance the Rapper, Joey Purp, Kamaiyah, YG, Rae Sremmurd). Knowles sisters dazzled (Beyoncé, Solange), pop stars sizzled (Rihanna, Bruno Mars, Ariana Grande), and recluses reemerged (Frank Ocean, The Avalanches). Rock is not dead, whether you want your proof in classic form (Whitney, Steve Gunn, Angel Olsen), pop form (Chairlift, Japanese Breakfast), or rip-roaring riff form (Sheer Mag, Bent Shapes). And iconic, legendary artists bid their last, brilliant farewells (David Bowie, A Tribe Called Quest). Ten, twenty, fifty years from now, these songs from 2016 will probably remind me of pain, but I think those feelings of pain will be accompanied by the good memories that filled the cracks this year. I hope the songs on this list either made a lasting impact on you this year, or that they will in the coming year as you check them out. I love celebrating good music and sharing in that celebration, so please comment freely about songs you love (or don’t love) and let’s talk about it. One thing of note: I’ve been doing these ‘Best Songs’ lists for 10 years now. My first installment was in 2006, when the top song went to “Crazy” by Gnarls Barkley, a choice that I still stand by. So, happy 10th anniversary! Also, for the second year in a row, my wife Taylor has provided some superb cover art. There are a lot of hidden gems relating to the year in music, so spend some time with it and check it out.
#!/usr/bin/env python import os import argparse from multiprocessing import Process import yaml import json from shared.utils import build_components, build_component, apply_envs from shared.path import Path if __name__ == '__main__': # print "Visit this!" # print "http://wubytes.com/w/grid/example:cpu,swap,memory,procs,networkout,networkin" # print parser = argparse.ArgumentParser() parser.add_argument("--secrets", help="yml file for your secret data", default=None) parser.add_argument("--conf", help="publish the string you use here", default=None) parser.add_argument("--publish", help="publish the string you use here") parser.add_argument("--publisher", help="publish the string you use here", type=build_component) args = parser.parse_args() confpath = args.conf or os.path.join(os.path.dirname(os.path.realpath(__file__)), "conf.yml") conf = yaml.load(open(confpath)) try: default_secret = os.path.join(os.path.dirname(os.path.realpath(__file__)), "secrets.yml") secretspath = args.secrets or default_secret secrets = yaml.load(open(secretspath)) or {} except IOError: if secretspath == default_secret: secrets = {} else: raise environ = dict(os.environ) environ.update(secrets) conf = apply_envs(conf, environ) if args.publisher: publishers=[args.publisher] else: publishers = build_components(conf, "publishers") if args.publish: [p(json.loads(args.publish)) for p in publishers] else: extractors = build_components(conf, "extractors") process = [Process(**extractor(publishers)) for extractor in extractors] [p.start() for p in process] [p.join() for p in process]
Chicago trainers, coaches, teachers and fitness instructors, get ready for what we can only describe as Christmas in August. We have an afternoon of pampering, productivity and sweat planned for you at ENRGi Fitness Chicago starting at 1 pm on August 15. In a recent survey we asked you to fill out, we heard you say you wanted more goal setting options at the #TrainersConnect workshops. On August 15, we’re getting together to go through a big, hairy, audacious goal setting session with Flywheel Master Instructor Will Haley, expert goal setting facilitator at the helm. But first, you’ll have the opportunity to sign up to take professional photos on the rooftop at ENRGi Fitness with the gorgeous Chicago skyline as your backdrop. Even better, if you come to #TrainersConnect early you’ll have the chance to get braids from Blowout Junkie (or, guys, get a clean-up cut from BeSpoke). Whether you come at 1 pm for braids, pampering and to get your newest set of Instagram-worthy photos taken, or you can’t make it until 2 pm for a workout and workshop, your $5 ticket goes straight to the Greater Chicago Food Depository. Where will this thing be? All at ENRGi Fitness Chicago, 215 W. Ohio St. Photos will be on the roof and the workout and workshop will take place inside! What’s the workout going to be like? We’ll take on a fusion of ENRGi’s signature formats, Shredded, a high intensity, low impact strength training circuit, SWAT, where you’ll sweat it out on air bikes, rowers, treadmills, SkiErg’s, and stairs and – if we’re lucky – take the finisher up to the roof for one more skyline view. There’s a lot going on at #TrainersConnect. What exactly is happening when? 1-2 pm: If you signed up for a time slot to take photos on the roof at ENRGi (you’ll do that when you purchase your ticket), you’ll come between 1-2 pm! Before or after your photos, pop into BeSpoke or Blowout Junkie’s chair for some pampering (ladies, Blowout Junkie will be doing braids at your request; gents, BeSpoke will have one stylist on site giving quick clean-ups). 2-2:50 pm: The workout begins inside ENRGi. 3 pm: Fuel up on sweetgreen, who will be there with salads for you! 3-3:45 pm: Will Haley leads us all in a goal setting session. Bring a pencil and paper, you’re going to want to remember what you dream up during this BHAG session! What else do you need to know? If you can only come for the workout and workshop, that’s fine! But remember, your ticket gets you access to everything – taking photos, getting braids and clean-up cuts, the workout and the goal setting workshop. Your Eventbrite ticket will ask you to check a box if you plan to come at 1 pm for photos and pampering. We’ll be in touch with you by August 8 with details on the first hour and what time frame you should plan to take photos in! Ready to get your ticket? Grab one below!
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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 abc import ABCMeta, abstractmethod from collections.abc import Sequence, Set, Mapping from datetime import date, time, datetime, timedelta from functools import reduce from operator import xor as xor_operator from neo4j.conf import iter_items from neo4j.graph import Graph, Node, Relationship, Path from neo4j.packstream import INT64_MIN, INT64_MAX, Structure from neo4j.spatial import Point, hydrate_point, dehydrate_point from neo4j.time import Date, Time, DateTime, Duration from neo4j.time.hydration import ( hydrate_date, dehydrate_date, hydrate_time, dehydrate_time, hydrate_datetime, dehydrate_datetime, hydrate_duration, dehydrate_duration, dehydrate_timedelta, ) map_type = type(map(str, range(0))) class Record(tuple, Mapping): """ A :class:`.Record` is an immutable ordered collection of key-value pairs. It is generally closer to a :py:class:`namedtuple` than to a :py:class:`OrderedDict` inasmuch as iteration of the collection will yield values rather than keys. """ __keys = None def __new__(cls, iterable=()): keys = [] values = [] for key, value in iter_items(iterable): keys.append(key) values.append(value) inst = tuple.__new__(cls, values) inst.__keys = tuple(keys) return inst def __repr__(self): return "<%s %s>" % (self.__class__.__name__, " ".join("%s=%r" % (field, self[i]) for i, field in enumerate(self.__keys))) def __eq__(self, other): """ In order to be flexible regarding comparison, the equality rules for a record permit comparison with any other Sequence or Mapping. :param other: :return: """ compare_as_sequence = isinstance(other, Sequence) compare_as_mapping = isinstance(other, Mapping) if compare_as_sequence and compare_as_mapping: return list(self) == list(other) and dict(self) == dict(other) elif compare_as_sequence: return list(self) == list(other) elif compare_as_mapping: return dict(self) == dict(other) else: return False def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return reduce(xor_operator, map(hash, self.items())) def __getitem__(self, key): if isinstance(key, slice): keys = self.__keys[key] values = super(Record, self).__getitem__(key) return self.__class__(zip(keys, values)) try: index = self.index(key) except IndexError: return None else: return super(Record, self).__getitem__(index) def __getslice__(self, start, stop): key = slice(start, stop) keys = self.__keys[key] values = tuple(self)[key] return self.__class__(zip(keys, values)) def get(self, key, default=None): """ Obtain a value from the record by key, returning a default value if the key does not exist. :param key: a key :param default: default value :return: a value """ try: index = self.__keys.index(str(key)) except ValueError: return default if 0 <= index < len(self): return super(Record, self).__getitem__(index) else: return default def index(self, key): """ Return the index of the given item. :param key: a key :return: index :rtype: int """ if isinstance(key, int): if 0 <= key < len(self.__keys): return key raise IndexError(key) elif isinstance(key, str): try: return self.__keys.index(key) except ValueError: raise KeyError(key) else: raise TypeError(key) def value(self, key=0, default=None): """ Obtain a single value from the record by index or key. If no index or key is specified, the first value is returned. If the specified item does not exist, the default value is returned. :param key: an index or key :param default: default value :return: a single value """ try: index = self.index(key) except (IndexError, KeyError): return default else: return self[index] def keys(self): """ Return the keys of the record. :return: list of key names """ return list(self.__keys) def values(self, *keys): """ Return the values of the record, optionally filtering to include only certain values by index or key. :param keys: indexes or keys of the items to include; if none are provided, all values will be included :return: list of values :rtype: list """ if keys: d = [] for key in keys: try: i = self.index(key) except KeyError: d.append(None) else: d.append(self[i]) return d return list(self) def items(self, *keys): """ Return the fields of the record as a list of key and value tuples :return: a list of value tuples :rtype: list """ if keys: d = [] for key in keys: try: i = self.index(key) except KeyError: d.append((key, None)) else: d.append((self.__keys[i], self[i])) return d return list((self.__keys[i], super(Record, self).__getitem__(i)) for i in range(len(self))) def data(self, *keys): """ Return the keys and values of this record as a dictionary, optionally including only certain values by index or key. Keys provided in the items that are not in the record will be inserted with a value of :const:`None`; indexes provided that are out of bounds will trigger an :exc:`IndexError`. :param keys: indexes or keys of the items to include; if none are provided, all values will be included :return: dictionary of values, keyed by field name :raises: :exc:`IndexError` if an out-of-bounds index is specified """ return RecordExporter().transform(dict(self.items(*keys))) class DataTransformer(metaclass=ABCMeta): """ Abstract base class for transforming data from one form into another. """ @abstractmethod def transform(self, x): """ Transform a value, or collection of values. :param x: input value :return: output value """ class RecordExporter(DataTransformer): """ Transformer class used by the :meth:`.Record.data` method. """ def transform(self, x): if isinstance(x, Node): return self.transform(dict(x)) elif isinstance(x, Relationship): return (self.transform(dict(x.start_node)), x.__class__.__name__, self.transform(dict(x.end_node))) elif isinstance(x, Path): path = [self.transform(x.start_node)] for i, relationship in enumerate(x.relationships): path.append(self.transform(relationship.__class__.__name__)) path.append(self.transform(x.nodes[i + 1])) return path elif isinstance(x, str): return x elif isinstance(x, Sequence): t = type(x) return t(map(self.transform, x)) elif isinstance(x, Set): t = type(x) return t(map(self.transform, x)) elif isinstance(x, Mapping): t = type(x) return t((k, self.transform(v)) for k, v in x.items()) else: return x class DataHydrator: # TODO: extend DataTransformer def __init__(self): super(DataHydrator, self).__init__() self.graph = Graph() self.graph_hydrator = Graph.Hydrator(self.graph) self.hydration_functions = { b"N": self.graph_hydrator.hydrate_node, b"R": self.graph_hydrator.hydrate_relationship, b"r": self.graph_hydrator.hydrate_unbound_relationship, b"P": self.graph_hydrator.hydrate_path, b"X": hydrate_point, b"Y": hydrate_point, b"D": hydrate_date, b"T": hydrate_time, # time zone offset b"t": hydrate_time, # no time zone b"F": hydrate_datetime, # time zone offset b"f": hydrate_datetime, # time zone name b"d": hydrate_datetime, # no time zone b"E": hydrate_duration, } def hydrate(self, values): """ Convert PackStream values into native values. """ def hydrate_(obj): if isinstance(obj, Structure): try: f = self.hydration_functions[obj.tag] except KeyError: # If we don't recognise the structure # type, just return it as-is return obj else: return f(*map(hydrate_, obj.fields)) elif isinstance(obj, list): return list(map(hydrate_, obj)) elif isinstance(obj, dict): return {key: hydrate_(value) for key, value in obj.items()} else: return obj return tuple(map(hydrate_, values)) def hydrate_records(self, keys, record_values): for values in record_values: yield Record(zip(keys, self.hydrate(values))) class DataDehydrator: # TODO: extend DataTransformer @classmethod def fix_parameters(cls, parameters): if not parameters: return {} dehydrator = cls() try: dehydrated, = dehydrator.dehydrate([parameters]) except TypeError as error: value = error.args[0] raise TypeError("Parameters of type {} are not supported".format(type(value).__name__)) else: return dehydrated def __init__(self): self.dehydration_functions = {} self.dehydration_functions.update({ Point: dehydrate_point, Date: dehydrate_date, date: dehydrate_date, Time: dehydrate_time, time: dehydrate_time, DateTime: dehydrate_datetime, datetime: dehydrate_datetime, Duration: dehydrate_duration, timedelta: dehydrate_timedelta, }) # Allow dehydration from any direct Point subclass self.dehydration_functions.update({cls: dehydrate_point for cls in Point.__subclasses__()}) def dehydrate(self, values): """ Convert native values into PackStream values. """ def dehydrate_(obj): try: f = self.dehydration_functions[type(obj)] except KeyError: pass else: return f(obj) if obj is None: return None elif isinstance(obj, bool): return obj elif isinstance(obj, int): if INT64_MIN <= obj <= INT64_MAX: return obj raise ValueError("Integer out of bounds (64-bit signed " "integer values only)") elif isinstance(obj, float): return obj elif isinstance(obj, str): return obj elif isinstance(obj, (bytes, bytearray)): # order is important here - bytes must be checked after str return obj elif isinstance(obj, (list, map_type)): return list(map(dehydrate_, obj)) elif isinstance(obj, dict): if any(not isinstance(key, str) for key in obj.keys()): raise TypeError("Non-string dictionary keys are " "not supported") return {key: dehydrate_(value) for key, value in obj.items()} else: raise TypeError(obj) return tuple(map(dehydrate_, values))
Baptism – What’s the BIG DEAL? One area Baptists and paedobaptists commonly agree is that there are only two ordinances given to the church, contrasted with the seven claimed by the Roman Catholics. While we agree on what these two ordinances are – baptism and the Lord’s Supper – we do not agree on some of the details, particularly as regards baptism. We baptize believers – by submersion. We’re in the minority. Denominations that practice infant baptism include Roman Catholics, Eastern and Oriental Orthodox, Anglicans, Lutherans, Presbyterians, Methodists, some Nazarenes, the United Church of Christ (UCC), Moravian Church, Metropolitan Community Church, Wesleyans, and Episcopalians. There are those who believe baptism is salvific – Church of Christ, Disciples of Christ, and those who hold to Federal Vision. I will not go into that discussion, just know they are out there. Baptists have long loved to call themselves – ourselves – “people of the book”, denoting our claim to being among those who stand on the sure foundation of Scripture and under the authority of Scripture. May this be true of us, as many wise and solid sounding arguments have been marshaled in support of the opposing view of baptism – the sprinkling of little ones. I do not want to spend much time explaining why the paedobaptist view on baptism is wrong, I will appeal to a few of their finest theologians to tell us they are wrong. This entry was posted in Encouragement, Expository Moments, Theology and tagged baby Baptism, baptism, Baptist. Bookmark the permalink. ← America Abandoned By God! Thanks for the message. Just finishing a seminary class on early Church history and it deals at length with this subject. I think it is important for people to understand what and why they believe what they do, and not simply because it is what their church teaches. You’re welcome, my brother. I agree with you – we should never follow traditions without proving them in light of Scripture. The book I mentioned in the message is a most excellent look at church history, available many places for free on-line. Andrew Miller’s Church History or Short Papers on Church History (as each chapter is a short paper). Thanks for your kind comments – and for your excellent defense of the Word on that article you linked to! Regarding Luther – he was used by God, no doubt. He was imperfect, no doubt. He was, as all of are prone to be, trapped in his personal context and he was unwilling to examine his personal presuppositions in light of Scripture. Chapter 37 of Miller’s Church History is a sad look at Martin’s pig-headed clinging to the wooden-headed Roman Catholic view of the Lord’s Supper. Luther’s compromise – consubstantiation – is just as much at war with Scripture as the Roman Catholic doctrine of transubstantiation but requires even more suspension of thought and reason. Christ is physically with the bread and wine but not in it? I don’t think either one is true, but at least the Roman can worship his bread and hold it in his hand – it is physical. The other is a complete magic trick.
# ============================================================================ # # Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved. # www.conceptive.be / [email protected] # # This file is part of the Camelot Library. # # This file may be used under the terms of the GNU General Public # License version 2.0 as published by the Free Software Foundation # and appearing in the file license.txt included in the packaging of # this file. Please review this information to ensure GNU # General Public Licensing requirements will be met. # # If you are unsure which license is appropriate for your use, please # visit www.python-camelot.com or contact [email protected] # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # For use of this library in commercial applications, please contact # [email protected] # # ============================================================================ ''' Created on Jan 7, 2010 @author: tw55413 ''' from PyQt4 import QtCore, QtGui from camelot.core.utils import ugettext_lazy as _ class ProgressPage(QtGui.QWizardPage): """Generic progress page for a wizard. Subclass and reimplement the run method. And within this run method, regulary emit the update_progress_signal and the update_maximum_signal. the update_maximum_signal should have as its single argument an integer value indicating the maximum of the progress bar. the update_progress_signal should two arguments, the first is an integer indicating the current position of the progress bar, and the second is a string telling the user what is going on. If required, set the title and sub_title class attribute to change the text displayed to the user. """ update_progress_signal = QtCore.pyqtSignal(int, str) update_maximum_signal = QtCore.pyqtSignal(int) title = _('Action in progress') sub_title = _('Please wait for completion') def __init__(self, parent=None): super(ProgressPage, self).__init__( parent ) self.update_progress_signal.connect( self.update_progress ) self.update_maximum_signal.connect( self.update_maximum ) self._complete = False self.setTitle(unicode(self.title)) self.setSubTitle(unicode(self.sub_title)) layout = QtGui.QVBoxLayout() progress = QtGui.QProgressBar(self) progress.setObjectName('progress') progress.setMinimum(0) progress.setMaximum(1) label = QtGui.QTextEdit(self) label.setObjectName('label') label.setSizePolicy( QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding ) label.setReadOnly(True) layout.addWidget(progress) layout.addWidget(label) self.setLayout(layout) def isComplete(self): return self._complete @QtCore.pyqtSlot(int) def update_maximum(self, maximum): progress = self.findChild(QtGui.QWidget, 'progress' ) if progress: progress.setMaximum(maximum) @QtCore.pyqtSlot(int, str) def update_progress(self, value, label): progress_widget = self.findChild(QtGui.QWidget, 'progress' ) if progress_widget: progress_widget.setValue(value) label_widget = self.findChild(QtGui.QWidget, 'label' ) if label_widget: label_widget.setHtml(unicode(label)) def exception(self, args): self.finished() from camelot.view.controls.exception import model_thread_exception_message_box model_thread_exception_message_box(args) def finished(self): self._complete = True progress_widget = self.findChild(QtGui.QWidget, 'progress' ) if progress_widget: progress_widget.setMaximum(1) progress_widget.setValue(1) self.completeChanged.emit() def run(self): """ This method contains the actual action, that will be run in the model thread. Reimplement this method, while regulary emiting update_progress_signal and update_maximum_signal to keep the progress bar moving. """ pass def initializePage(self): from camelot.view.model_thread import post post(self.run, self.finished, self.exception)
Back and spinal cord injuries can have a devastating impact on victims. Depending on the type and severity of the injuries, victims can suffer numbness in their extremities, loss of grip strength and decreased function of internal bodily systems. In the most severe cases, victims can suffer partial or complete paralysis. When these injuries happen in car accidents that occur because of another person’s negligence, victims have the right to seek compensation for any losses they suffer as a result. The insurance companies that cover the negligent drivers in these cases will do anything they can to attribute the injuries to something other than your accident or place the blame for the accident on you. These are complex cases that require the attention of a qualified lawyer. Be sure that you have a skilled Colorado personal injury attorney who knows the law and has the ability to protect your rights. At The Paul Wilkinson Law Firm, LLC, my entire practice is focused on representing victims who have been severely injured in auto accidents throughout the Denver metro area and across the Front Range region. I have nearly 20 years of experience resolving auto accident cases, and I understand how back injury or spinal cord injury can impact victims throughout their lives. I take the time to gain a complete understanding of your injuries and seek full compensation for your medical care and future care, assistive medical equipment, loss of income and earning capacity, and any other considerations relevant to your claim. Insurance companies don’t want you to hire an attorney. Their own studies show that it costs them more when you do. There is too much at stake for you to attempt to deal with the insurance company on your own. Contact my Denver office to discuss your case with an attorney.
""" This module contain types, which are special kinds of grammar terminals that represent pre-defined types like int, float, etc. The main goal of theses classes is not to provide functionality (they are basically a Regex) but rather to be identified as Type so that some special treatment is reserved to them, because for inst. the RNN based walker needs to know that there are types so that it predicts a value. """ import re from scipy.stats import poisson from scipy.stats import norm from parsimonious.expressions import Regex class Type(Regex): pass class Int(Type): """ Integer `Type`, defined in an interval [low, high] (low and high are included). """ def __init__(self, low, high): assert type(low) == int and type(high) == int assert low <= high super() self.name = "" self.low = low self.high = high self.re = re.compile("[0-9]+") # TODO do the actual regex self.identity_tuple = (low, high) def uniform_sample(self, rng): # assumes rng is `np.random.Random` rather than `random.Random` return rng.randint(self.low, self.high + 1) @staticmethod def from_str(s): return int(s) class Float(Type): """ Float `Type`, defined in an interval [low, high] (low and high are included) """ def __init__(self, low, high): assert type(low) == float and type(high) == float assert low <= high super() self.name = "" self.low = low self.high = high self.re = re.compile("[0-9]+\.[0-9]+") # TODO do the actual regex self.identity_tuple = (low, high) def uniform_sample(self, rng): return rng.uniform(self.low, self.high) @staticmethod def from_str(s): return float(s)
Izvornik: Proceedings of 7th International Conference on Mechanical Engineering (GEPESZET 2010) / Stepan, Gabor (ur.). - Budapest : Budapest University of Tehnology and Economics, Faculty of Mechanical Engineering , 2010. 732-737 (ISBN: 978-963-313-007-0). Mjesto i datum: Budimpešta, Mađarska, 25-26.05.2010. Paper presents modern cutting processes with emphasis on efficiency and surface cut quality. Beside that, an observation of suitability for application from the standpoint of costs is given. Authors give some practical experience and examples of cutted specimens by modern cutting processes, as well as comparison of different cutting process such as waterjet, wire EDM, plasma and laser from the accuracy, thickness, cutting speed, heat affected zone and material distortion point of view.
from __future__ import absolute_import, print_function, unicode_literals from curdling.web import Server import argparse def parse_args(): parser = argparse.ArgumentParser( description='Share your cheese binaries with your folks') parser.add_argument( 'curddir', metavar='DIRECTORY', help='Path for your cache directory') parser.add_argument( '-d', '--debug', action='store_true', default=False, help='Runs without gevent and enables debug') parser.add_argument( '-H', '--host', default='0.0.0.0', help='Host name to bind') parser.add_argument( '-p', '--port', type=int, default=8000, help='Port to bind') parser.add_argument( '-u', '--user-db', help='An htpasswd-compatible file saying who can access your curd server') return parser.parse_args() def main(): args = parse_args() server = Server(args.curddir, args.user_db) server.start(args.host, args.port, args.debug) if __name__ == '__main__': main()
Pay as you go; this is a term many of us are familiar with as consumer trends shift towards only paying for the portion of a product used rather than the product as a whole. This has given way to companies with missions based around renting out premium goods to increase accessibility. Companies such as Zip Car are great examples of this as they only charge members for the amount of time they use a car making it easier for people to navigate life without owning a vehicle of their own. Leasing is based on a similar principle as it allows you to pay for the portion of the vehicles’ life you will be using rather than the total cost, providing the consumer with more car for less money. With leasing, your dollar will stretch further than finance payments will, on average, be around $150 more per month than a lease on the exact same vehicle. Other advantages include tax incentives as well as the ability to lease a vehicle through a business using pre-tax dollars. These can all add up to decrease the amount leaving your bank account as you drive off in a new vehicle. One of the major benefits of leasing is being able to put little to no money down. Putting money down can be nice, especially if it helps get to a monthly payment that you are more comfortable with, but it is not necessary. On the other end, for clients financing I often suggest putting between 10% and 20% down on a vehicle so when it comes time to trade it in, often at 36 months (which is also very common lease term), the chances of having positive equity in the vehicle will be greater as you have paid for more of the vehicle’s life than you have used leaving you with positive equity. This is another aspect that completely disappears with leasing as fluctuations in the market are irrelevant as you will always have the ability to walk away from the vehicle. A common concern of leasing candidates is that they are too hard on their vehicles and are worried about the expenses that can come if there is wear and tear that is not considered ‘normal’. This should not be a major concern as there are many programs that will cover these expenses. For example, Lincoln offers ‘Wear Care’ which can only cost a couple dollars a month and can protect you against a vast range of possible wear. Having a set cash flow each month is also much easier with leasing as you will not need to account for maintenance and repairs that crop up as a vehicle ages. With the majority of costly repairs occurring after warranties have run out, there becomes a need to set aside a ‘car repair fund,’ so when they do occur, the cost doesn’t completely disrupt your monthly cash flow. These contingency budgets disappear with leasing as a leased vehicle will always be under warranty; meaning you get the best years of a vehicle without the expensive repairs that come once a vehicle is no longer under manufacturer warranty. With the average consumer owning a vehicle for 36 months, the benefits of owning a vehicle outright don’t really apply. A vehicle is worth purchasing if it is a long-term purchase that you plan on keeping once it is fully paid off. However, with the increasingly complicated technologies being packed into vehicles today, it is making less sense to own a vehicle as repairing and replacing electronics can cost thousands when the vehicle warranty has run out. Automobile technology is evolving faster than ever inside and out with smaller, more efficient combustion engines that are quickly going out of fashion as they make way for all electric motors. While engines have been making strides towards efficiency, convenience features have been striving to anticipate virtually any need or desire you could have while on the road. Need cooled and heated cup holders, what about massaging seats, is on-board WIFI a must for trips to the cabin, do you want your car to Parallel Park itself? The good news is these are readily available features with new ones flooding the market at on a nearly daily basis. So, if you like to have a set budget, prefer lower payments, don’t like to put money down, or just never want to worry about whether you will have costly repairs, leasing may be just the thing for you.
import numpy from .Board import Board class LocalBoard(Board): """ Represents a traditional 3x3 tic tac toe board """ def __init__(self): Board.__init__(self) self.board = numpy.ones((3, 3)) * Board.EMPTY self.cats_game = False def check_cell(self, row, col): """ Overrides Board.check_cell """ if row < 0 or row > 2 or col < 0 or col > 2: raise Exception("Requested cell is out of bounds") return self.board[row][col] def make_move(self, move): """ Overrides Board.make_move """ if self.board[move.row][move.col] != Board.EMPTY: raise Exception("You cannot make a move in an occupied slot") self.board[move.row][move.col] = move.player self.total_moves += 1 self.check_board_completed(move.row, move.col) if self.total_moves == 9 and self.winner != Board.X and self.winner != Board.O: self.cats_game = True def clone(self): new_local_board = LocalBoard() new_local_board.board = numpy.copy(self.board) new_local_board.cats_game = self.cats_game new_local_board.board_completed = self.board_completed new_local_board.total_moves = self.total_moves new_local_board.winner = self.winner return new_local_board def __str__(self): representation = "" for row in [0, 1, 2]: for col in [0, 1, 2]: if self.board[row][col] == Board.O: representation += "O" elif self.board[row][col] == Board.X: representation += "x" else: representation += "_" if row != 2: representation += "\n" return representation
Don’t miss Friday’s deadline – enter the UK Social Media Comms Awards 2016! Be sure you don’t miss out on your entry submission to the UK Social Media Awards – the sun may not be shining this summer, but when you have a winning entry up your sleeve, your success keeps you nice and warm despite the unending drizzle! Back for the 7th year, the UK Social Media Communications Awards is a vibrant celebration of the most creative and innovative individuals and companies in the social media industry. Driving amazing campaigns through social media? You need to be part of the UK Social Media Awards! Whether you work in-house, or you are part of a digital agency, the #somecomms are all about creativity and making an impact! The awards categories are tailored to reflect all elements of the social media sphere – including Best Use of Twitter, Best Business Blog, Use of Social Media in a Crisis, and Best Viral Campaign. We even have specialist categories rewarding public sector and not-for-profit campaigns! The awards is taking place at The Emirates Stadium on 3rd November, and is an ideal opportunity to showcase your talent and grow your client list, as well as to celebrate your hard work with other high-flying social media professionals. Enter before Friday 15th July to join us for a sumptuous 3 course dinner, drinks and entertainment hosted by Ted Robbins. Once your entry form is submitted to the site, our esteemed panel of judges, featuring experts from top players in the marketing industry, and some of the UK’s biggest brands, will review your entry. It’s an ideal way to showcase your creativity and innovation to industry experts – and to increase your brand profile on a national level! Last year’s winners include great brands like Cubaka & Lidl, Spirit Social & Get Fit with Davina, and Perfect Communications & Citroen – make sure you’re in the running for 2016 – submit before Friday 15th July! If you have any questions about the entry process, your eligibility, or details about the event, please get in touch with Event Manager Elle Kersh on 01706 828855 or by emailing [email protected] – we can’t wait to see your entries!
#!/usr/bin/env python from setuptools import setup, find_packages import os import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def get_data_dirs(path, patterns): data_dirs = [(rt+"/"+dn+"/") for rt, ds, fs in os.walk(path) for dn in ds] data_dir_patterns = [] for pat in patterns: data_dir_patterns += [(dn+pat)[len(path)+1:] for dn in data_dirs] return data_dir_patterns # Add /usr/local/include to the path for macs, fixes easy_install for several packages (like gevent and pyyaml) if sys.platform == 'darwin': os.environ['C_INCLUDE_PATH'] = '/usr/local/include' VERSION = read("VERSION").strip() # See http://pythonhosted.org/setuptools/setuptools.html # noinspection PyPackageRequirements setup( name='scioncc', version=VERSION, description='Scientific Observatory Network Capability Container', long_description=read('README'), url='https://www.github.com/scionrep/scioncc/wiki', download_url='https://github.com/scionrep/scioncc/releases', license='BSD', author='SciON Contributors', author_email='[email protected]', keywords=['scion', 'pyon', 'ion'], classifiers=['Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Environment :: Web Environment', 'Topic :: Internet', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Scientific/Engineering', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Application Frameworks'], packages=find_packages('src') + find_packages('.'), package_dir={'': 'src', 'interface': 'interface', 'defs': 'defs'}, include_package_data=True, package_data={ '': ['*.yml', '*.txt'] + get_data_dirs("defs", ["*.yml", "*.sql", "*.xml"]) + get_data_dirs("src/ion/process/ui", ["*.css", "*.js"]), }, entry_points={ 'nose.plugins.0.10': [ 'timer_plugin=pyon.util.testing.timer_plugin:TestTimer', 'greenletleak=pyon.util.testing.greenlet_plugin:GreenletLeak', 'gevent_profiler=pyon.util.testing.nose_gevent_profiler:TestGeventProfiler', ], 'console_scripts': [ 'pycc=scripts.pycc:entry', 'control_cc=scripts.control_cc:main', 'generate_interfaces=scripts.generate_interfaces:main', 'store_interfaces=scripts.store_interfaces:main', 'clear_db=pyon.datastore.clear_db_util:main', 'coverage=scripts.coverage:main', ] }, dependency_links=[], install_requires=[ # NOTE: Install order is bottom to top! Lower level dependencies need to be down 'setuptools', # Advanced packages 'pyproj==1.9.4', # For geospatial calculations 'numpy==1.9.2', # HTTP related packages 'flask-socketio==0.4.1', 'flask-oauthlib==0.9.1', 'Flask==0.10.1', 'requests==2.5.3', # Basic container packages 'graypy==0.2.11', # For production logging (used by standard logger config) 'ipython==3.2.3', 'readline==6.2.4.1', # For IPython shell 'ndg-xacml==0.5.1', # For policy rule engine 'psutil==2.1.3', # For host and process stats 'python-dateutil==2.4.2', 'bcrypt==1.0.1', # For password authentication 'python-daemon==2.0.5', 'simplejson==3.6.5', 'msgpack-python==0.4.7', 'pyyaml==3.10', 'pika==0.9.5', # NEED THIS VERSION. Messaging stack tweaked to this version 'zope.interface==4.1.1', 'psycopg2==2.5.4', # PostgreSQL driver 'gevent==1.0.2', 'greenlet==0.4.9', # Pin dependent libraries (better in buildout/versions?) 'httplib2==0.9.2', 'pyzmq==15.4.0', # For IPython manhole 'cffi==0.9.2', 'oauthlib==0.7.2', 'six==1.9.0', # Test support 'nose==1.1.2', 'mock==0.8', 'coverage==4.0', # Code coverage ], extras_require={ 'utils': [ 'xlrd==0.9.3', # For Excel file read (dev tools) 'xlwt==0.7.5', # For Excel file write (dev tools) ], 'data': [ 'h5py==2.5.0', 'Cython==0.23.4', ], } )
Building a cohesive, efficient workforce is the goal of every small business owner. Hiring the right employee is no easy task, not to mention the added pressures that small companies face. In a small company each employee is crucial to the culture and success of your business. So how do you know you have the right person for the job? Consider using a personality test to assist in your employment processes. Personalities are set. They don’t change over time and usually end up shining through at some point or another, no matter how hidden they may seem. Personality tests provide employers huge amounts of insight on each of their employees. Perhaps you have an employee who you know can become more engaged or produce at a higher level. A personality test can help you crack the code for that individual enabling you to provide new motivations. Knowing your employees’ personalities allows you to fully understanding their unique range of talents and strengths. Setting employees in the right roles and projects from the beginning will set them and your company,up for success, while building a confident and productive workforce at the same time. Personality tests are also a great way to tell if a new hire will thrive in a certain type of role. The benefit of having new hires take a simple 10 minute test is to ensure the right person is matched to the company as well as the position they are applying for. Many candidates have a great interview style, but might not do well in the position based on the primary job duties while others who don’t interview quite as well might be a perfect match. Tests also pair your business culture with the candidate’s personality to add insight as to whether your company is the right place for that person. There are many different kinds of personality tests out there, but look for one that focuses on individuals in the workplace. At MidwestHR we recommend using Omnia or DISC and use them in our employment decisions too! These tests are developed and analyzed by psychological professionals and boast an accuracy rate of 93%. They also offer some peace of mind while navigating the employment “jungle”. Keep in mind, the personality test shouldn’t be the only thing taken into consideration while hiring, but should be added to the rest of the information gathered in the process; resumes, interviews, skills set, education, references, etc. Many companies who use personality tests see lower turnover and higher employee satisfaction. Keep in mind the benefits of personality tests in your next hiring decision and with your current employees. Knowing how individuals will react to tasks, stressors and the office environment will get you three steps ahead and set you up for continued success.
import mock import unittest from flask import Flask from flask.ext.testing import TestCase from flask_watchman import Watchman, Environment class TestWatchman(TestCase): """ Test flask apps that are using class based views """ def create_app(self): app = Flask(__name__, static_folder=None) Watchman(app, environment={}) app.config.setdefault('APP_LOGGING', 'MY LOGGING') return app def test_watchman_routes_exist(self): """ Test that the routes added exist """ r = self.client.options('/version') self.assertStatus(r, 200) r = self.client.options('/environment') self.assertStatus(r, 200) @mock.patch('flask_watchman.subprocess') def test_version_route_works(self, mocked_subprocess): """ Tests that the version route works """ process = mock.Mock() process.communicate.side_effect = [ ['latest-release', 'error'], ['latest-commit', 'error'] ] mocked_subprocess.Popen.return_value = process r = self.client.get('/version') self.assertStatus(r, 200) self.assertTrue(mocked_subprocess.Popen.called) self.assertEqual( r.json['commit'], 'latest-commit' ) self.assertEqual( r.json['release'], 'latest-release' ) @mock.patch('flask_watchman.os.environ') def test_environment_route_works(self, mocked_environ): """ Tests that the environment route works """ mocked_environ.keys.return_value = ['OS_SHELL'] mocked_environ.get.return_value = '/bin/favourite-shell' r = self.client.get('/environment') self.assertStatus(r, 200) self.assertEqual( r.json['os']['OS_SHELL'], '/bin/favourite-shell' ) self.assertEqual( r.json['app']['APP_LOGGING'], 'MY LOGGING' ) class TestWatchmanScopes(unittest.TestCase): def tearDown(self): """ Hack to cleanup class attributes set in the tests """ for key in ['scopes', 'decorators', 'rate_limit']: try: delattr(Environment, key) except AttributeError: pass def test_adding_scopes_to_routes(self): """ Check the behaviour when scopes are specified """ app = Flask(__name__, static_folder=None) environment = { 'scopes': ['adsws:internal'], } with self.assertRaises(AttributeError): getattr(Environment, 'scopes') getattr(Environment, 'rate_limit') getattr(Environment, 'decorators') Watchman(app, environment=environment) self.assertEqual(Environment.scopes, ['adsws:internal']) self.assertIsInstance(Environment.decorators, list) self.assertIsInstance(Environment.rate_limit, list) def test_empty_scopes(self): """ Check the behaviour when empty scopes are requested """ app = Flask(__name__, static_folder=None) environment = { 'scopes': [], } with self.assertRaises(AttributeError): getattr(Environment, 'scopes') getattr(Environment, 'rate_limit') print getattr(Environment, 'decorators') Watchman(app, environment=environment) self.assertEqual(Environment.scopes, []) self.assertIsInstance(Environment.decorators, list) self.assertIsInstance(Environment.rate_limit, list) def test_no_scopes(self): """ Check the behaviour when no scopes are requested at all """ app = Flask(__name__, static_folder=None) with self.assertRaises(AttributeError): getattr(Environment, 'scopes') getattr(Environment, 'rate_limit') getattr(Environment, 'decorators') Watchman(app) with self.assertRaises(AttributeError): getattr(Environment, 'scopes') getattr(Environment, 'decorators') getattr(Environment, 'rate_limit') if __name__ == '__main__': unittest.main(verbosity=2)
Lock in a great price for Park Lane Boutique Aparthotel – rated 9.3 by recent guests! We had two rooms. One slept 3 and a single for my adult nephew. The single room was clean but it smelled. The largeer room was perfect l, plenty of space, a balcony with partial sea views, but best of all Asma, the desk clerk was a sweet heart and very helpful. locations was also near plenty of restaurants and bus station, to get around the island. The breakfast was exceptional. There were many options to satisfy everyone. I loved everything! Breakfast is amazing (freshly cooked options, including pancakes, eggs benedict and omelette), the rooms are clean and spacious, the bed is super comfortable and the staff is AMAZING. Location is very convenient as it's right next to the bus terminal. Highly recommend this hotel! Excellent location, breakfast was fantastic and all the staff were amazing. Wonderful place to stay. Comfortable beds, great location, block away from the main bus terminal and public transportation. Spacious room and warm, friendly, professional staff. Park Lane Boutique Aparthotel This rating is a reflection of how the property compares to the industry standard when it comes to price, facilities and services available. It's based on a self-evaluation by the property. Use this rating to help choose your stay! One of our best sellers in St. Paul's Bay! Park Lane Aparthotel is located on the Qawra peninsula with views of St.Paul’s Bay. It has a rooftop pool and terrace with panoramic views of the Mediterranean and offers free Wi-Fi and air-conditioned accommodations. The studios and apartments include a kitchenette, a private bathroom and satellite TV. Rooms also come with tea/coffee making facilities and a small fridge. A continental breakfast, including a cooked-to-order breakfast, is served daily. The Park Lane also has a bar serving drinks throughout the day. These can be enjoyed on the furnished patio. Guests can relax in the lobby where there is a wide-screen TV. Staff can provide information and assistance on booking tours and trips throughout the island. The property is directly opposite Bugibba Bus Station. A shuttle service to/from Luqa Airport can be arranged on request. This property is also rated for the best value in St. Paul's Bay! Guests are getting more for their money when compared to other properties in this city. When would you like to stay at Park Lane Boutique Aparthotel? This modern open-plan studio features a furnished balcony, an LCD TV, and free Wi-Fi. It has a kitchenette, air conditioning, and a private bathroom with a hairdryer. All studios have a double bed. Spacious and modern, this air-conditioned apartment has a sitting/dining area with a kitchenette, free Wi-Fi, and a satellite flat-screen TV. The private bathroom includes free toiletries and a hairdryer, and the shower is in a separate room. This single room is equipped with a double bed, a fridge, tea and coffee making facilities and a private bathroom. It is air conditioned, has free WiFi, an LCD satellite TV and a window featuring an inland view. This spacious apartment is fully-equipped with kitchenette, dining area, private bathroom and a furnished balcony. It is fully air-conditioned, has free Wi-Fi and a satellite flat-screen TV. It has twin beds and a comfortable sofa bed. This open-plan studio features a furnished balcony, a kitchenette and a private bathroom with a bath. It includes air-conditioning, an LCD TV and free WiFi. All studios come with twin beds. This air-conditioned penthouse is on the 5th floor with furnished private terrace and views. It includes a kitchenette, dining area, lounge and private bathroom. It has free Wi-Fi and LCD satellite TV. Hi, my name is Andrea and I've been running this hotel ever since my family took up the venture 14 years ago. Running this hotel is so much more than a job to me; it is a challenge and my dream. In a small hotel like ours, staff numbers are few and formalities drop - we work as a family and our guests form part of the family. In fact, what makes our hotel stand out is how much we are ready to do and how far we will go out of our way to make your stay as easy and pleasant as possible! House Rules Park Lane Boutique Aparthotel takes special requests – add in the next step! Park Lane Boutique Aparthotel accepts these cards and reserves the right to temporarily hold an amount prior to arrival. Please note that the name of the credit card's holder has to correspond with the guest's name. The rooftop pool is open from April until October. Please inform Park Lane Boutique Aparthotel of your expected arrival time in advance. You can use the Special Requests box when booking, or contact the property directly using the contact details in your confirmation. Not one thing to note. Location hasn’t a sea view compared to some others places but it’s close to everything within almost 10mn walking. We were there beginning of April so we couldn’t take advantage of the swimming pool. I stayed 4 nights at the Parklane hotel and I can only recommend you to stay there. Staff is so welcoming and nice that you’ll feel quickly like home. The continental breakfast is excellent. The apartment was super clean and spacious and the bathroom was quite large and well equipped. WiFi was excellent for a free WiFi. To be honest, this is the best place in terms of quality price you could stay in San Pauli. Thanks Maya and the team ! You made us feeling happy and like home. We’ll definitely come back during the summer season ! The Bathroom is dated. If you have long hair, bring your own hairdryer. The one provided in the bathroom was terrible. The Hotel Staff was extremly friendly and helpfull. Breakfast was good. I liked the posibilitie of the cooked to order brakfast options. The location is good for exploring the Islands. Beds were very comftorable. Exceeded all expectations. The staff at this hotel are first class, friendly, upbeat and welcoming! Highly recommended. Wi-Fi was awful here throughout the stay, thankfully we could use our mobile data plans from the UK in Malta at no extra cost so we had access to the internet throughout the stay. Good location, very close to the bus station and the beach. Lovely, friendly staff, nice room. The very warm welcom service and the morning breakfest . The location is perfect if you are interested in touring the Island, as the bus Station is across the street. Everything was perfect. The staffs were ever so helpful and the rooms were great. Bathroom. Dark and open shower with a broken shower head. Balcony and front desk service. We could hear all the noise of the street and neighbors, in the first days the works in the street began at 06:30. For two days we woke up with a strange smell in the room. The kitchen and bathroom don't have ventilation. At check-out the "Manager" was very rude at the request of the Eco Tax, was the only one, the rest of the staff is very friendly. The breakfast is excellent and the staff are very friendly. The hotel is very close to the bus station, several markets and restaurants. Very Friendly. Close to the Bus terminal that connects you almost to everywhere on Malta. Quite and clean rooms.
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'fj1.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.formLayoutWidget = QtWidgets.QWidget(self.centralwidget) self.formLayoutWidget.setGeometry(QtCore.QRect(270, 30, 181, 509)) self.formLayoutWidget.setObjectName("formLayoutWidget") self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) self.formLayout.setContentsMargins(0, 0, 0, 0) self.formLayout.setObjectName("formLayout") self.capsDropLabel = QtWidgets.QLabel(self.formLayoutWidget) self.capsDropLabel.setObjectName("capsDropLabel") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.capsDropLabel) self.capsDropSlider = QtWidgets.QSlider(self.formLayoutWidget) self.capsDropSlider.setFocusPolicy(QtCore.Qt.NoFocus) self.capsDropSlider.setMaximum(1) self.capsDropSlider.setPageStep(1) self.capsDropSlider.setTracking(False) self.capsDropSlider.setOrientation(QtCore.Qt.Horizontal) self.capsDropSlider.setTickPosition(QtWidgets.QSlider.NoTicks) self.capsDropSlider.setObjectName("capsDropSlider") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.capsDropSlider) self.ipcLabel = QtWidgets.QLabel(self.formLayoutWidget) self.ipcLabel.setObjectName("ipcLabel") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.ipcLabel) self.ipcSlider = QtWidgets.QSlider(self.formLayoutWidget) self.ipcSlider.setMaximum(1) self.ipcSlider.setOrientation(QtCore.Qt.Horizontal) self.ipcSlider.setObjectName("ipcSlider") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.ipcSlider) self.netfilterLabel = QtWidgets.QLabel(self.formLayoutWidget) self.netfilterLabel.setObjectName("netfilterLabel") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.netfilterLabel) self.netfilterSlider = QtWidgets.QSlider(self.formLayoutWidget) self.netfilterSlider.setMaximum(1) self.netfilterSlider.setOrientation(QtCore.Qt.Horizontal) self.netfilterSlider.setObjectName("netfilterSlider") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.netfilterSlider) self.machineIDLabel = QtWidgets.QLabel(self.formLayoutWidget) self.machineIDLabel.setObjectName("machineIDLabel") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.machineIDLabel) self.machineIDSlider = QtWidgets.QSlider(self.formLayoutWidget) self.machineIDSlider.setMaximum(1) self.machineIDSlider.setOrientation(QtCore.Qt.Horizontal) self.machineIDSlider.setObjectName("machineIDSlider") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.machineIDSlider) self.nodvdLabel = QtWidgets.QLabel(self.formLayoutWidget) self.nodvdLabel.setObjectName("nodvdLabel") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.nodvdLabel) self.nodvdSlider = QtWidgets.QSlider(self.formLayoutWidget) self.nodvdSlider.setMaximum(1) self.nodvdSlider.setOrientation(QtCore.Qt.Horizontal) self.nodvdSlider.setObjectName("nodvdSlider") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.nodvdSlider) self.nomountLabel = QtWidgets.QLabel(self.formLayoutWidget) self.nomountLabel.setObjectName("nomountLabel") self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.nomountLabel) self.nomountSlider = QtWidgets.QSlider(self.formLayoutWidget) self.nomountSlider.setMaximum(1) self.nomountSlider.setOrientation(QtCore.Qt.Horizontal) self.nomountSlider.setObjectName("nomountSlider") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.nomountSlider) self.notvLabel = QtWidgets.QLabel(self.formLayoutWidget) self.notvLabel.setObjectName("notvLabel") self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.notvLabel) self.notvSlider = QtWidgets.QSlider(self.formLayoutWidget) self.notvSlider.setMaximum(1) self.notvSlider.setOrientation(QtCore.Qt.Horizontal) self.notvSlider.setObjectName("notvSlider") self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.notvSlider) self.nosoundLabel = QtWidgets.QLabel(self.formLayoutWidget) self.nosoundLabel.setObjectName("nosoundLabel") self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.nosoundLabel) self.nosoundSlider = QtWidgets.QSlider(self.formLayoutWidget) self.nosoundSlider.setMaximum(1) self.nosoundSlider.setOrientation(QtCore.Qt.Horizontal) self.nosoundSlider.setObjectName("nosoundSlider") self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.nosoundSlider) self.novideoLabel = QtWidgets.QLabel(self.formLayoutWidget) self.novideoLabel.setObjectName("novideoLabel") self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.novideoLabel) self.novideoSlider = QtWidgets.QSlider(self.formLayoutWidget) self.novideoSlider.setMaximum(1) self.novideoSlider.setOrientation(QtCore.Qt.Horizontal) self.novideoSlider.setObjectName("novideoSlider") self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.novideoSlider) self.nogroupsLabel = QtWidgets.QLabel(self.formLayoutWidget) self.nogroupsLabel.setObjectName("nogroupsLabel") self.formLayout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.nogroupsLabel) self.nogroupsSlider = QtWidgets.QSlider(self.formLayoutWidget) self.nogroupsSlider.setMaximum(1) self.nogroupsSlider.setOrientation(QtCore.Qt.Horizontal) self.nogroupsSlider.setObjectName("nogroupsSlider") self.formLayout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.nogroupsSlider) self.nonewprivsLabel = QtWidgets.QLabel(self.formLayoutWidget) self.nonewprivsLabel.setObjectName("nonewprivsLabel") self.formLayout.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.nonewprivsLabel) self.nonewprivsSlider = QtWidgets.QSlider(self.formLayoutWidget) self.nonewprivsSlider.setMaximum(1) self.nonewprivsSlider.setOrientation(QtCore.Qt.Horizontal) self.nonewprivsSlider.setObjectName("nonewprivsSlider") self.formLayout.setWidget(10, QtWidgets.QFormLayout.FieldRole, self.nonewprivsSlider) self.norootLabel = QtWidgets.QLabel(self.formLayoutWidget) self.norootLabel.setObjectName("norootLabel") self.formLayout.setWidget(11, QtWidgets.QFormLayout.LabelRole, self.norootLabel) self.norootSlider = QtWidgets.QSlider(self.formLayoutWidget) self.norootSlider.setMaximum(1) self.norootSlider.setOrientation(QtCore.Qt.Horizontal) self.norootSlider.setObjectName("norootSlider") self.formLayout.setWidget(11, QtWidgets.QFormLayout.FieldRole, self.norootSlider) self.noshellLabel = QtWidgets.QLabel(self.formLayoutWidget) self.noshellLabel.setObjectName("noshellLabel") self.formLayout.setWidget(12, QtWidgets.QFormLayout.LabelRole, self.noshellLabel) self.noshellSlider = QtWidgets.QSlider(self.formLayoutWidget) self.noshellSlider.setMaximum(1) self.noshellSlider.setOrientation(QtCore.Qt.Horizontal) self.noshellSlider.setObjectName("noshellSlider") self.formLayout.setWidget(12, QtWidgets.QFormLayout.FieldRole, self.noshellSlider) self.seccompLabel = QtWidgets.QLabel(self.formLayoutWidget) self.seccompLabel.setObjectName("seccompLabel") self.formLayout.setWidget(13, QtWidgets.QFormLayout.LabelRole, self.seccompLabel) self.seccompSlider = QtWidgets.QSlider(self.formLayoutWidget) self.seccompSlider.setMaximum(1) self.seccompSlider.setOrientation(QtCore.Qt.Horizontal) self.seccompSlider.setObjectName("seccompSlider") self.formLayout.setWidget(13, QtWidgets.QFormLayout.FieldRole, self.seccompSlider) self.mdweLabel = QtWidgets.QLabel(self.formLayoutWidget) self.mdweLabel.setObjectName("mdweLabel") self.formLayout.setWidget(14, QtWidgets.QFormLayout.LabelRole, self.mdweLabel) self.mdweSlider = QtWidgets.QSlider(self.formLayoutWidget) self.mdweSlider.setMaximum(1) self.mdweSlider.setOrientation(QtCore.Qt.Horizontal) self.mdweSlider.setObjectName("mdweSlider") self.formLayout.setWidget(14, QtWidgets.QFormLayout.FieldRole, self.mdweSlider) self.tracelogLabel = QtWidgets.QLabel(self.formLayoutWidget) self.tracelogLabel.setObjectName("tracelogLabel") self.formLayout.setWidget(15, QtWidgets.QFormLayout.LabelRole, self.tracelogLabel) self.tracelogSlider = QtWidgets.QSlider(self.formLayoutWidget) self.tracelogSlider.setMaximum(1) self.tracelogSlider.setOrientation(QtCore.Qt.Horizontal) self.tracelogSlider.setObjectName("tracelogSlider") self.formLayout.setWidget(15, QtWidgets.QFormLayout.FieldRole, self.tracelogSlider) self.noexecHomeLabel = QtWidgets.QLabel(self.formLayoutWidget) self.noexecHomeLabel.setObjectName("noexecHomeLabel") self.formLayout.setWidget(16, QtWidgets.QFormLayout.LabelRole, self.noexecHomeLabel) self.noexecHomeSlider = QtWidgets.QSlider(self.formLayoutWidget) self.noexecHomeSlider.setMaximum(1) self.noexecHomeSlider.setOrientation(QtCore.Qt.Horizontal) self.noexecHomeSlider.setObjectName("noexecHomeSlider") self.formLayout.setWidget(16, QtWidgets.QFormLayout.FieldRole, self.noexecHomeSlider) self.noexecTmpLabel = QtWidgets.QLabel(self.formLayoutWidget) self.noexecTmpLabel.setObjectName("noexecTmpLabel") self.formLayout.setWidget(17, QtWidgets.QFormLayout.LabelRole, self.noexecTmpLabel) self.noexecTmpSlider = QtWidgets.QSlider(self.formLayoutWidget) self.noexecTmpSlider.setMaximum(1) self.noexecTmpSlider.setOrientation(QtCore.Qt.Horizontal) self.noexecTmpSlider.setObjectName("noexecTmpSlider") self.formLayout.setWidget(17, QtWidgets.QFormLayout.FieldRole, self.noexecTmpSlider) self.quietLabel = QtWidgets.QLabel(self.formLayoutWidget) self.quietLabel.setObjectName("quietLabel") self.formLayout.setWidget(18, QtWidgets.QFormLayout.LabelRole, self.quietLabel) self.quietSlider = QtWidgets.QSlider(self.formLayoutWidget) self.quietSlider.setMaximum(1) self.quietSlider.setOrientation(QtCore.Qt.Horizontal) self.quietSlider.setObjectName("quietSlider") self.formLayout.setWidget(18, QtWidgets.QFormLayout.FieldRole, self.quietSlider) self.genOptionsLabel = QtWidgets.QLabel(self.centralwidget) self.genOptionsLabel.setGeometry(QtCore.QRect(300, 10, 111, 17)) self.genOptionsLabel.setObjectName("genOptionsLabel") self.formLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget) self.formLayoutWidget_2.setGeometry(QtCore.QRect(630, 40, 161, 482)) self.formLayoutWidget_2.setObjectName("formLayoutWidget_2") self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget_2) self.formLayout_2.setContentsMargins(0, 0, 0, 0) self.formLayout_2.setObjectName("formLayout_2") self.homeLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.homeLabel.setObjectName("homeLabel") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.homeLabel) self.horizontalSlider_24 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_24.setMaximum(1) self.horizontalSlider_24.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_24.setObjectName("horizontalSlider_24") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_24) self.devLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.devLabel.setObjectName("devLabel") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.devLabel) self.horizontalSlider_19 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_19.setMaximum(1) self.horizontalSlider_19.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_19.setObjectName("horizontalSlider_19") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_19) self.tmpLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.tmpLabel.setObjectName("tmpLabel") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.tmpLabel) self.horizontalSlider_20 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_20.setMaximum(1) self.horizontalSlider_20.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_20.setObjectName("horizontalSlider_20") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_20) self.etcLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.etcLabel.setObjectName("etcLabel") self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.etcLabel) self.horizontalSlider_21 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_21.setMaximum(1) self.horizontalSlider_21.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_21.setObjectName("horizontalSlider_21") self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_21) self.etcBrowser = QtWidgets.QTextBrowser(self.formLayoutWidget_2) self.etcBrowser.setObjectName("etcBrowser") self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.SpanningRole, self.etcBrowser) self.binLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.binLabel.setObjectName("binLabel") self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.binLabel) self.horizontalSlider_23 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_23.setMaximum(1) self.horizontalSlider_23.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_23.setObjectName("horizontalSlider_23") self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_23) self.binBrowser = QtWidgets.QTextBrowser(self.formLayoutWidget_2) self.binBrowser.setObjectName("binBrowser") self.formLayout_2.setWidget(6, QtWidgets.QFormLayout.SpanningRole, self.binBrowser) self.libLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.libLabel.setObjectName("libLabel") self.formLayout_2.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.libLabel) self.horizontalSlider_22 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_22.setMaximum(1) self.horizontalSlider_22.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_22.setObjectName("horizontalSlider_22") self.formLayout_2.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_22) self.libBrowser = QtWidgets.QTextBrowser(self.formLayoutWidget_2) self.libBrowser.setObjectName("libBrowser") self.formLayout_2.setWidget(8, QtWidgets.QFormLayout.SpanningRole, self.libBrowser) self.optLabel = QtWidgets.QLabel(self.formLayoutWidget_2) self.optLabel.setObjectName("optLabel") self.formLayout_2.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.optLabel) self.horizontalSlider_25 = QtWidgets.QSlider(self.formLayoutWidget_2) self.horizontalSlider_25.setMaximum(1) self.horizontalSlider_25.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_25.setObjectName("horizontalSlider_25") self.formLayout_2.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.horizontalSlider_25) self.optBrowser = QtWidgets.QTextBrowser(self.formLayoutWidget_2) self.optBrowser.setObjectName("optBrowser") self.formLayout_2.setWidget(10, QtWidgets.QFormLayout.SpanningRole, self.optBrowser) self.privateLabel = QtWidgets.QLabel(self.centralwidget) self.privateLabel.setGeometry(QtCore.QRect(660, 20, 121, 20)) self.privateLabel.setObjectName("privateLabel") self.formLayoutWidget_3 = QtWidgets.QWidget(self.centralwidget) self.formLayoutWidget_3.setGeometry(QtCore.QRect(460, 260, 160, 80)) self.formLayoutWidget_3.setObjectName("formLayoutWidget_3") self.formLayout_3 = QtWidgets.QFormLayout(self.formLayoutWidget_3) self.formLayout_3.setContentsMargins(0, 0, 0, 0) self.formLayout_3.setObjectName("formLayout_3") self.x11Slider = QtWidgets.QSlider(self.formLayoutWidget_3) self.x11Slider.setMaximum(1) self.x11Slider.setPageStep(1) self.x11Slider.setOrientation(QtCore.Qt.Horizontal) self.x11Slider.setObjectName("x11Slider") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.x11Slider) self.xephyrButton = QtWidgets.QRadioButton(self.formLayoutWidget_3) self.xephyrButton.setObjectName("xephyrButton") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.xephyrButton) self.xorgButton = QtWidgets.QRadioButton(self.formLayoutWidget_3) self.xorgButton.setObjectName("xorgButton") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.xorgButton) self.xpraButton = QtWidgets.QRadioButton(self.formLayoutWidget_3) self.xpraButton.setObjectName("xpraButton") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.xpraButton) self.xvfbButton = QtWidgets.QRadioButton(self.formLayoutWidget_3) self.xvfbButton.setObjectName("xvfbButton") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.xvfbButton) self.x11Label = QtWidgets.QLabel(self.formLayoutWidget_3) self.x11Label.setObjectName("x11Label") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.x11Label) self.graphicsLabel = QtWidgets.QLabel(self.centralwidget) self.graphicsLabel.setGeometry(QtCore.QRect(480, 240, 121, 20)) self.graphicsLabel.setObjectName("graphicsLabel") self.auditProgressBar = QtWidgets.QProgressBar(self.centralwidget) self.auditProgressBar.setGeometry(QtCore.QRect(460, 490, 118, 23)) self.auditProgressBar.setProperty("value", 24) self.auditProgressBar.setObjectName("auditProgressBar") self.auditPushButton = QtWidgets.QPushButton(self.centralwidget) self.auditPushButton.setGeometry(QtCore.QRect(470, 520, 101, 25)) self.auditPushButton.setObjectName("auditPushButton") self.programListWidget = QtWidgets.QListWidget(self.centralwidget) self.programListWidget.setGeometry(QtCore.QRect(10, 30, 211, 501)) self.programListWidget.setObjectName("programListWidget") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.capsDropLabel.setText(_translate("MainWindow", "Drop all capabilities")) self.ipcLabel.setText(_translate("MainWindow", "IPC restriction")) self.netfilterLabel.setText(_translate("MainWindow", "Network filter")) self.machineIDLabel.setText(_translate("MainWindow", "Random machine ID")) self.nodvdLabel.setText(_translate("MainWindow", "Hide DVDs")) self.nomountLabel.setText(_translate("MainWindow", "Hide external drives")) self.notvLabel.setText(_translate("MainWindow", "Hide TV devices")) self.nosoundLabel.setText(_translate("MainWindow", "No audio/microphone")) self.novideoLabel.setText(_translate("MainWindow", "No webcam")) self.nogroupsLabel.setText(_translate("MainWindow", "No groups")) self.nonewprivsLabel.setText(_translate("MainWindow", "No new privileges")) self.norootLabel.setText(_translate("MainWindow", "No root")) self.noshellLabel.setText(_translate("MainWindow", "No shell")) self.seccompLabel.setText(_translate("MainWindow", "Use seccomp filter")) self.mdweLabel.setText(_translate("MainWindow", "Hardened seccomp")) self.tracelogLabel.setText(_translate("MainWindow", "Log violation attempts")) self.noexecHomeLabel.setText(_translate("MainWindow", "Noexec home folder")) self.noexecTmpLabel.setText(_translate("MainWindow", "Noexec /tmp")) self.quietLabel.setText(_translate("MainWindow", "Disable output")) self.genOptionsLabel.setText(_translate("MainWindow", "General Options")) self.homeLabel.setText(_translate("MainWindow", "Private /home")) self.devLabel.setText(_translate("MainWindow", "Private /dev")) self.tmpLabel.setText(_translate("MainWindow", "Private /tmp")) self.etcLabel.setText(_translate("MainWindow", "Private /etc")) self.binLabel.setText(_translate("MainWindow", "Private /bin")) self.libLabel.setText(_translate("MainWindow", "Private /lib")) self.optLabel.setText(_translate("MainWindow", "Private /opt")) self.privateLabel.setText(_translate("MainWindow", "Private Filesystem")) self.xephyrButton.setText(_translate("MainWindow", "xephyr")) self.xorgButton.setText(_translate("MainWindow", "xorg")) self.xpraButton.setText(_translate("MainWindow", "xpra")) self.xvfbButton.setText(_translate("MainWindow", "xvfb")) self.x11Label.setText(_translate("MainWindow", "X11 Isolation")) self.graphicsLabel.setText(_translate("MainWindow", "Graphics Sandbox")) self.auditPushButton.setText(_translate("MainWindow", "Audit Profile")) if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_())
Our standard 12 hour meeting package for groups of 10 persons or more is shown below with an indication of price. We would love to make a tailored offer for you that meets your needs and budget! Package price € 124,50 p.p.
import numpy as np import bisect class Hertz(float): def __init__(self, hz): try: self.hz = hz.hz except AttributeError: self.hz = hz def __neg__(self): return Hertz(-self.hz) def __add__(self, other): try: other = other.hz except AttributeError: pass return Hertz(self.hz + other) def __float__(self): return self.hz Hz = Hertz # TODO: What commonalities can be factored out of this class and TimeSlice? class FrequencyBand(object): """ Represents an interval, or band of frequencies in hertz (cycles per second) Args: start_hz (float): The lower bound of the frequency band in hertz stop_hz (float): The upper bound of the frequency band in hertz Examples:: >>> import zounds >>> band = zounds.FrequencyBand(500, 1000) >>> band.center_frequency 750.0 >>> band.bandwidth 500 """ def __init__(self, start_hz, stop_hz): super(FrequencyBand, self).__init__() if stop_hz <= start_hz: raise ValueError('stop_hz must be greater than start_hz') self.stop_hz = stop_hz self.start_hz = start_hz def __eq__(self, other): try: return \ self.start_hz == other.start_hz \ and self.stop_hz == other.stop_hz except AttributeError: return super(FrequencyBand, self).__eq__(other) def __hash__(self): return (self.__class__.__name__, self.start_hz, self.stop_hz).__hash__() def intersect(self, other): """ Return the intersection between this frequency band and another. Args: other (FrequencyBand): the instance to intersect with Examples:: >>> import zounds >>> b1 = zounds.FrequencyBand(500, 1000) >>> b2 = zounds.FrequencyBand(900, 2000) >>> intersection = b1.intersect(b2) >>> intersection.start_hz, intersection.stop_hz (900, 1000) """ lowest_stop = min(self.stop_hz, other.stop_hz) highest_start = max(self.start_hz, other.start_hz) return FrequencyBand(highest_start, lowest_stop) @classmethod def audible_range(cls, samplerate): return FrequencyBand(Hz(20), Hz(samplerate.nyquist)) def bandwidth_ratio(self, other): return other.bandwidth / self.bandwidth def intersection_ratio(self, other): intersection = self.intersect(other) return self.bandwidth_ratio(intersection) @staticmethod def from_start(start_hz, bandwidth_hz): """ Produce a :class:`FrequencyBand` instance from a lower bound and bandwidth Args: start_hz (float): the lower bound of the desired FrequencyBand bandwidth_hz (float): the bandwidth of the desired FrequencyBand """ return FrequencyBand(start_hz, start_hz + bandwidth_hz) @staticmethod def from_center(center_hz, bandwidth_hz): half_bandwidth = bandwidth_hz / 2 return FrequencyBand( center_hz - half_bandwidth, center_hz + half_bandwidth) @property def bandwidth(self): """ The span of this frequency band, in hertz """ return self.stop_hz - self.start_hz @property def center_frequency(self): return self.start_hz + (self.bandwidth / 2) def __repr__(self): return '''FrequencyBand( start_hz={start_hz}, stop_hz={stop_hz}, center={center}, bandwidth={bandwidth})'''.format( start_hz=self.start_hz, stop_hz=self.stop_hz, center=self.center_frequency, bandwidth=self.bandwidth) class FrequencyScale(object): """ Represents a set of frequency bands with monotonically increasing start frequencies Args: frequency_band (FrequencyBand): A band representing the entire span of this scale. E.g., one might want to generate a scale spanning the entire range of human hearing by starting with :code:`FrequencyBand(20, 20000)` n_bands (int): The number of bands in this scale always_even (bool): when converting frequency slices to integer indices that numpy can understand, should the slice size always be even? See Also: :class:`~zounds.spectral.LinearScale` :class:`~zounds.spectral.GeometricScale` """ def __init__(self, frequency_band, n_bands, always_even=False): super(FrequencyScale, self).__init__() self.always_even = always_even self.n_bands = n_bands self.frequency_band = frequency_band self._bands = None self._starts = None self._stops = None @property def bands(self): """ An iterable of all bands in this scale """ if self._bands is None: self._bands = self._compute_bands() return self._bands @property def band_starts(self): if self._starts is None: self._starts = [b.start_hz for b in self.bands] return self._starts @property def band_stops(self): if self._stops is None: self._stops = [b.stop_hz for b in self.bands] return self._stops def _compute_bands(self): raise NotImplementedError() def __len__(self): return self.n_bands @property def center_frequencies(self): """ An iterable of the center frequencies of each band in this scale """ return (band.center_frequency for band in self) @property def bandwidths(self): """ An iterable of the bandwidths of each band in this scale """ return (band.bandwidth for band in self) def ensure_overlap_ratio(self, required_ratio=0.5): """ Ensure that every adjacent pair of frequency bands meets the overlap ratio criteria. This can be helpful in scenarios where a scale is being used in an invertible transform, and something like the `constant overlap add constraint <https://ccrma.stanford.edu/~jos/sasp/Constant_Overlap_Add_COLA_Cases.html>`_ must be met in order to not introduce artifacts in the reconstruction. Args: required_ratio (float): The required overlap ratio between all adjacent frequency band pairs Raises: AssertionError: when the overlap ratio for one or more adjacent frequency band pairs is not met """ msg = \ 'band {i}: ratio must be at least {required_ratio} but was {ratio}' for i in range(0, len(self) - 1): b1 = self[i] b2 = self[i + 1] try: ratio = b1.intersection_ratio(b2) except ValueError: ratio = 0 if ratio < required_ratio: raise AssertionError(msg.format(**locals())) @property def Q(self): """ The quality factor of the scale, or, the ratio of center frequencies to bandwidths """ return np.array(list(self.center_frequencies)) \ / np.array(list(self.bandwidths)) @property def start_hz(self): """ The lower bound of this frequency scale """ return self.frequency_band.start_hz @property def stop_hz(self): """ The upper bound of this frequency scale """ return self.frequency_band.stop_hz def _basis(self, other_scale, window): weights = np.zeros((len(self), len(other_scale))) for i, band in enumerate(self): band_slice = other_scale.get_slice(band) slce = weights[i, band_slice] slce[:] = window * np.ones(len(slce)) return weights def apply(self, time_frequency_repr, window): basis = self._basis(time_frequency_repr.dimensions[-1].scale, window) transformed = np.dot(basis, time_frequency_repr.T).T return transformed def __eq__(self, other): return \ self.__class__ == other.__class__ \ and self.frequency_band == other.frequency_band \ and self.n_bands == other.n_bands def __iter__(self): return iter(self.bands) def _construct_scale_from_slice(self, bands): freq_band = FrequencyBand(bands[0].start_hz, bands[-1].stop_hz) return self.__class__(freq_band, len(bands)) def get_slice(self, frequency_band): """ Given a frequency band, and a frequency dimension comprised of n_samples, return a slice using integer indices that may be used to extract only the frequency samples that intersect with the frequency band """ index = frequency_band if isinstance(index, slice): types = { index.start.__class__, index.stop.__class__, index.step.__class__ } if Hertz not in types: return index try: start = Hertz(0) if index.start is None else index.start if start < Hertz(0): start = self.stop_hz + start stop = self.stop_hz if index.stop is None else index.stop if stop < Hertz(0): stop = self.stop_hz + stop frequency_band = FrequencyBand(start, stop) except (ValueError, TypeError): pass start_index = bisect.bisect_left( self.band_stops, frequency_band.start_hz) stop_index = bisect.bisect_left( self.band_starts, frequency_band.stop_hz) if self.always_even and (stop_index - start_index) % 2: # KLUDGE: This is simple, but it may make sense to choose move the # upper *or* lower bound, based on which one introduces a lower # error stop_index += 1 return slice(start_index, stop_index) def __getitem__(self, index): try: # index is an integer or slice bands = self.bands[index] except TypeError: # index is a frequency band bands = self.bands[self.get_slice(index)] if isinstance(bands, FrequencyBand): return bands return self._construct_scale_from_slice(bands) def __str__(self): cls = self.__class__.__name__ return '{cls}(band={self.frequency_band}, n_bands={self.n_bands})' \ .format(**locals()) def __repr__(self): return self.__str__() class LinearScale(FrequencyScale): """ A linear frequency scale with constant bandwidth. Appropriate for use with transforms whose coefficients also lie on a linear frequency scale, e.g. the FFT or DCT transforms. Args: frequency_band (FrequencyBand): A band representing the entire span of this scale. E.g., one might want to generate a scale spanning the entire range of human hearing by starting with :code:`FrequencyBand(20, 20000)` n_bands (int): The number of bands in this scale always_even (bool): when converting frequency slices to integer indices that numpy can understand, should the slice size always be even? Examples: >>> from zounds import FrequencyBand, LinearScale >>> scale = LinearScale(FrequencyBand(20, 20000), 10) >>> scale LinearScale(band=FrequencyBand( start_hz=20, stop_hz=20000, center=10010.0, bandwidth=19980), n_bands=10) >>> scale.Q array([ 0.51001001, 1.51001001, 2.51001001, 3.51001001, 4.51001001, 5.51001001, 6.51001001, 7.51001001, 8.51001001, 9.51001001]) """ def __init__(self, frequency_band, n_bands, always_even=False): super(LinearScale, self).__init__(frequency_band, n_bands, always_even) @staticmethod def from_sample_rate(sample_rate, n_bands, always_even=False): """ Return a :class:`~zounds.spectral.LinearScale` instance whose upper frequency bound is informed by the nyquist frequency of the sample rate. Args: sample_rate (SamplingRate): the sample rate whose nyquist frequency will serve as the upper frequency bound of this scale n_bands (int): the number of evenly-spaced frequency bands """ fb = FrequencyBand(0, sample_rate.nyquist) return LinearScale(fb, n_bands, always_even=always_even) def _compute_bands(self): freqs = np.linspace( self.start_hz, self.stop_hz, self.n_bands, endpoint=False) # constant, non-overlapping bandwidth bandwidth = freqs[1] - freqs[0] return tuple(FrequencyBand(f, f + bandwidth) for f in freqs) # class LogScale(FrequencyScale): # def __init__(self, frequency_band, n_bands, always_even=False): # super(LogScale, self).__init__( # frequency_band, n_bands, always_even=always_even) # # def _compute_bands(self): # center_freqs = np.logspace( # np.log10(self.start_hz), # np.log10(self.stop_hz), # self.n_bands + 1) # # variable bandwidth # bandwidths = np.diff(center_freqs) # return tuple(FrequencyBand.from_center(cf, bw) # for (cf, bw) in zip(center_freqs[:-1], bandwidths)) class GeometricScale(FrequencyScale): """ A constant-Q scale whose center frequencies progress geometrically rather than linearly Args: start_center_hz (int): the center frequency of the first band in the scale stop_center_hz (int): the center frequency of the last band in the scale bandwidth_ratio (float): the center frequency to bandwidth ratio n_bands (int): the total number of bands Examples: >>> from zounds import GeometricScale >>> scale = GeometricScale(20, 20000, 0.05, 10) >>> scale GeometricScale(band=FrequencyBand( start_hz=19.5, stop_hz=20500.0, center=10259.75, bandwidth=20480.5), n_bands=10) >>> scale.Q array([ 20., 20., 20., 20., 20., 20., 20., 20., 20., 20.]) >>> list(scale.center_frequencies) [20.000000000000004, 43.088693800637671, 92.831776672255558, 200.00000000000003, 430.88693800637651, 928.31776672255558, 2000.0000000000005, 4308.8693800637648, 9283.1776672255564, 20000.000000000004] """ def __init__( self, start_center_hz, stop_center_hz, bandwidth_ratio, n_bands, always_even=False): self.__bands = [ FrequencyBand.from_center(cf, cf * bandwidth_ratio) for cf in np.geomspace(start_center_hz, stop_center_hz, num=n_bands) ] band = FrequencyBand(self.__bands[0].start_hz, self.__bands[-1].stop_hz) super(GeometricScale, self).__init__( band, n_bands, always_even=always_even) self.start_center_hz = start_center_hz self.stop_center_hz = stop_center_hz self.bandwidth_ratio = bandwidth_ratio def _construct_scale_from_slice(self, bands): return ExplicitScale(bands) def __eq__(self, other): return \ super(GeometricScale, self).__eq__(other) \ and self.start_center_hz == other.start_center_hz \ and self.stop_center_hz == other.stop_center_hz \ and self.bandwidth_ratio == other.bandwidth_ratio def _compute_bands(self): return self.__bands class ExplicitScale(FrequencyScale): """ A scale where the frequency bands are provided explicitly, rather than computed Args: bands (list of FrequencyBand): The explicit bands used by this scale See Also: :class:`~zounds.spectral.FrequencyAdaptive` """ def __init__(self, bands): bands = list(bands) frequency_band = FrequencyBand(bands[0].start_hz, bands[-1].stop_hz) super(ExplicitScale, self).__init__( frequency_band, len(bands), always_even=False) self._bands = bands def _construct_scale_from_slice(self, bands): return ExplicitScale(bands) def _compute_bands(self): return self._bands def __eq__(self, other): return all([a == b for (a, b) in zip(self, other)]) class Bark(Hertz): def __init__(self, bark): self.bark = bark super(Bark, self).__init__(Bark.to_hz(bark)) @staticmethod def to_hz(bark): return 300. * ((np.e ** (bark / 6.0)) - (np.e ** (-bark / 6.))) @staticmethod def to_bark(hz): return 6. * np.log((hz / 600.) + np.sqrt((hz / 600.) ** 2 + 1)) def equivalent_rectangular_bandwidth(hz): return (0.108 * hz) + 24.7 class BarkScale(FrequencyScale): def __init__(self, frequency_band, n_bands): super(BarkScale, self).__init__(frequency_band, n_bands) def _compute_bands(self): start = Bark.to_bark(self.frequency_band.start_hz) stop = Bark.to_bark(self.frequency_band.stop_hz) barks = np.linspace(start, stop, self.n_bands) center_frequencies_hz = Bark.to_hz(barks) bandwidths = equivalent_rectangular_bandwidth(center_frequencies_hz) return [ FrequencyBand.from_center(c, b) for c, b in zip(center_frequencies_hz, bandwidths)] class Mel(Hertz): def __init__(self, mel): self.mel = mel super(Mel, self).__init__(Mel.to_hz(mel)) @staticmethod def to_hz(mel): return 700 * ((np.e ** (mel / 1127)) - 1) @staticmethod def to_mel(hz): return 1127 * np.log(1 + (hz / 700)) class MelScale(FrequencyScale): def __init__(self, frequency_band, n_bands): super(MelScale, self).__init__(frequency_band, n_bands) def _compute_bands(self): start = Mel.to_mel(self.frequency_band.start_hz) stop = Mel.to_mel(self.frequency_band.stop_hz) mels = np.linspace(start, stop, self.n_bands) center_frequencies_hz = Mel.to_hz(mels) bandwidths = equivalent_rectangular_bandwidth(center_frequencies_hz) return [ FrequencyBand.from_center(c, b) for c, b in zip(center_frequencies_hz, bandwidths)] class ChromaScale(FrequencyScale): def __init__(self, frequency_band): self._a440 = 440. self._a = 2 ** (1 / 12.) super(ChromaScale, self).__init__(frequency_band, n_bands=12) def _compute_bands(self): raise NotImplementedError() def get_slice(self, frequency_band): raise NotImplementedError() def _semitones_to_hz(self, semitone): return self._a440 * (self._a ** semitone) def _hz_to_semitones(self, hz): """ Convert hertz into a number of semitones above or below some reference value, in this case, A440 """ return np.log(hz / self._a440) / np.log(self._a) def _basis(self, other_scale, window): basis = np.zeros((self.n_bands, len(other_scale))) # for each tone in the twelve-tone scale, generate narrow frequency # bands for every octave of that note that falls within the frequency # band. start_semitones = \ int(np.round(self._hz_to_semitones(self.frequency_band.start_hz))) stop_semitones = \ int(np.round(self._hz_to_semitones(self.frequency_band.stop_hz))) semitones = np.arange(start_semitones - 1, stop_semitones) hz = self._semitones_to_hz(semitones) bands = [] for i in range(0, len(semitones) - 2): fh, mh, lh = hz[i: i + 3] bands.append(FrequencyBand(fh, lh)) for semitone, band in zip(semitones, bands): slce = other_scale.get_slice(band) chroma_index = semitone % self.n_bands slce = basis[chroma_index, slce] slce[:] += np.ones(len(slce)) * window return basis
Views of natural landscape, golf course, blue ocean, and the island of Maui! As you enter our condo, you are greeted by a vintage Hawaiian Aloha! Journal your vacation from our desk with ocean and golf course views. Baths have upgraded cabinets, counters, w/tile throughout. Soaking tub & shower. Spectacular views of the ocean! Enjoy this walk in shower with soaking tub and tons of storage. Third bath includes shower and upgrades. Pack light! Fisher Paykel washer and dryer included! Amenity center offers both an infinity pool and a children's pool. BBQ Center for family reunions or multiple families who travel together! please allow us to present you with something better than the traditional Hawaiian lei: the gift of a FREE NIGHT when you book at least an 8-night stay at our lovely, home, located within the gates of the exclusive Wai'ula'ula development at the Mauna Kea Resort. (Free night not available during Thanksgiving and Christmas rental periods). You'll be staying in Unit L-201, a glorious 3 bedroom, oceanview home. YOUR ENTIRE PARTY gets FREE, UNLIMITED ACCESS to the plush Mauna Kea and Hapuna Resorts, with their pools, beaches, gyms and parking. SUNSETS AND MEMORIES GO ON FOREVER! You are so welcome to enjoy our Big Island Mauna Kea, Wai'ula'ula Home (at the quiet end of the property, free from traffic and annoying headlights of cars coming and going.) Consider this spectacular property, as we do: our home-away-from home! We’ve spared no expense in lovingly furnishing our home with tasteful, comfortable furniture and collector’s art on the walls. But we know you don’t come to Hawaii to stay inside! From the lanai terrace of your home-away-from home on the Big Island, you and your family will make memories that – like our sunsets -- will last forever, as you relax in top-of-the-line Brown and Jordan furniture. Grill your favorite foods on our gorgeous Viking Stainless Steel built in Grill. And when you’re not chilling on the lanai, enjoy the safest, sandiest beaches in Hawaii, at the Mauna Kea or Hapuna Prince Hotels where you can swim, surf or sunbathe. Prefer to work out on state-of-the-art fitness equipment and then plunge in our amenity center’s infinite pool or hot tub? Come on over. It’s only a 5-minute walk! And you can use the grill and tables there for a family luau! HAVE A SECOND HONEYMOON OR BRING THE KIDS! You and your family or guests will enjoy two spacious master suites with extra comfortable king-size beds, made up with silky-soft, 600-thread count Egyptian cotton sheets. And there’s a 3rd bedroom furnished with two comfy double beds. Each bedroom has its own wide screen TV with almost as many cable channels as grains of sand on the Mauna Kea Beach! OUR GREAT ROOM IS GREAT! Recessed lighting, coffered ceilings, and a roomy dining area are only the beginning. After a day at the beach, pool or sightseeing, there’s nothing like coming to your home-away-from home to enjoy dinner, followed by a quiet evening of reading from the many books in our library, playing the popular games we provide, or just plopping down on the comfy sectional and watching the massive 50” flat screen TV with Movie-theater quality Surround Sound, fed by a bazillion cable channels, the Blu-ray DVD player or listen to your playlist on your own Apple device. STAY CONNECTED. We’re working vacationers too! So we provide you with FREE wireless or wired high-speed internet. There’s even a spacious desk and comfortable chair in one of the master bedrooms – if you can take your eyes off the ocean right out the window! FREE REGISTRATION FEE and FREE RESORT MEMBERSHIP IS INCLUDED for the Mauna Key Resort and Hapuna Resort, entitling you and your family to use those facilities' lovely beaches, pools and gyms. You'll have access to meticulously-maintained tennis courts, two Championship golf courses, and the safest, sandiest beaches on the Big Island! It's our pleasure to offer these memberships FREE of charge. This is our 3rd stay and we will be back. We just returned from 8 day family vacation with our children and grandchildren. This was our second time staying at the property. The views are fabulous, the grounds are immaculate and well landscaped and the house is extremely comfortable and well stocked. Our family visited Mauna Kea or Hapuna beach hotels every day. Loved having access. We will be back. Oh, my goodness. You are way too kind, but we really appreciate your kudos. It's an honor to pamper you and your family! Our large family just got back from 10 days at this condo. It was perfect. It was spacious, comfortable beds and couch, the lanai was an awesome place to spend each morning and night, and the kitchen was well stocked for the many meals/BBQs we had. Our kids (10, 7, 4) all loved the infinity pool, which was never too busy even over spring break. And we used the access to Mauna Kea and Hapuna Beach hotels almost daily, switching between the two for their great beaches. All in all it was easy check in / out, and we would absolutely recommend this to our closest friends and family. It is easy to see why there are so many 5-star reviews. Thanks Richard - we can only hope to be back some day!! Next time we will stay longer! Just returned from a weeks stay at this property. The only problem we had was that we didn't want to leave! Thanks Richard for sharing your beautiful home. This was our second trip to the Big Island and we would love to rent your property again, only next time it will be for two weeks! Richard was incredibly welcoming and helpful. Condo was everything promised and more. Oh, my. Such praise. Not sure I deserve it, but you are so very kind to say it! This was our second visit to this condo with our family of grown children and once again, it did not disappoint! Richard was wonderful to work with and the condo was clean and appointed beautifully! We toured the Island, swam, used the fitness center near the condo and also the gorgeous beaches and amenities at the Mauna Kea and Hapuna Resorts. We are hoping to go back again if all of our schedules align. A great time was had by all! The unit was well-appointed and very clean. We spent most of the time at the Hapuna or Mauna Kea which is a short drive down the road. Getting signing privileges at the resorts was easy to setup and very convenient. The owner, Richard, is very responsive and the trip went without a hitch. Wow, Julie, you flatter me. So kind of you to be our guests. Please come back, anytime! We choose the property for the resort access to the best swimming beaches in Hawaii, and because it is newer built with a lot of space and both modern and comfortable. We had a few options to choose from and we selected this unit for the competitive price and the owner prompt response. We found Richard to be very easy to work with, much appreciated! Wake up in the morning, jogging, breakfast, tennis, beach, lunch, pool, beach, sunset, dinner, trips around the island, sleep and get ready for the next day. I can do this every day for the rest of my life. We will be back! We are humbled by your review and honored by your visit. Please cone again anytime! What a wonderful way to go on vacation, where the biggest decision of the day is whether to go to Hapuna or Mauna Kea for a day at the beach. This was a wonderful home for R&R, where you could comfortably relax, have lots of room to find a quiet space, and enjoy the slower pace of the islands. The pool at the complex is stunning, and a special treat after a day at the beach. The option of a very active vacation with golf, tennis, hiking, swimming, working out, or sight seeing is also a choice that is available. Richard was a pleasure to work with, and the home is beautifully furnished and equipped with anything you might need for your vacation stay. There are so many things to do in this area, but we found reading a book at the beach, swimming in the ocean and enjoying dinner at some of the local restaurants was at the top of our list. We enjoyed a truly relaxing vacation at this lovely home, and we hope to return again in the future. We had a fantastic stay in this large apartment. The apartment is very generously equipped, especially in the kitchen. We loved being able to cook up a storm and enjoy eating outside on the fantastic lanai. We had 4 adults and 4 children and there was a great amount of space for us all love being there. Richard is great to deal with, always quick to respond, very genuine and accomodating. I can truly say that the actual property was better than the photos posted! We were a group of 7 (2 grandparents, 2 parents and 3 kids). It was very roomy and everyone had their own space. Cooking/barbecuing was so easy. Everything we needed was there including many pantry staples. We really enjoyed using both resorts, however, we mostly played at Mauna Kea. It was so nice to just walk up, get towels and relax. Thanks for opening up your property to share. We made some great memories. Let’s just say, all the 5-star ratings you see are very well-deserved. Richard is professional, responsive, and truly cares that you have a great stay in his home. The home itself is beautiful and still yet very comfortable. Everything from the appliances, the fixtures, the artwork, the spacious showers, made this home such a joy. We honestly didn’t want to leave. If this home is available, book it now. You won't be disappointed. We spent 10 days with our 6-month old, and it was the perfect place for a longer stay. My sister and brother-in-law joined us for 4 nights, and they were able to have their own area since there is a second master suite on the other side of the condo from our suite and the bedroom we used for our daughter's crib. It is great for a family! The great room and master suites are very spacious and clean with modern amenities, like flat screen TVs and good WiFi. The kitchen has all the tools you need to make great meals to eat on the lanai. The view is as advertised in the photos - beautiful and great in the morning with even better sunsets in the evening. The pool is quiet and a short walk (or 30 second drive, with parking) from the condo. The condo pool is perfect for kids and families, but we drove down to both hotel beaches and pools (Mauna Kea and Hapuna Prince) to mix it up, and it was easy to use with the Club access cards that come with the condo. We did some shopping for food to cook, and found that it was worth the extra 10 mins or so to go to the Islands Gourmet grocery store in the Waikoloa Beach development, instead of Foodland Farms in Mauna Lani. If you drive up to Waikoloa Village there is a huge supermarket that is good to stock up, called Waikoloa Village Market. The owner was very responsive when planning our trip and we thoroughly enjoyed the getaway. We highly recommend staying here, and we plan to go back someday! Our family has been visiting the Big Island for many years and this was by far the most comfortable, beautiful place we ever stayed. The condo not only looked impeccable but was also very cozy with a big comfortable sectional in front of a wide-screen TV and beds that you'd expect in a 5-star hotel. The owner provided very considerate touches like a Keurig coffee machine in the kitchen; shampoo, conditioner and soap in all the showers; and beach towels, sand toys and boogie boards galore. The ocean views and breezes on the lanai were magical. The owner was a joy to work with. And the resort amenities at the Mauna Kea and Hapuna Prince were exceptional. Wai'Ula'Ula is the perfect location to access the beautiful Mauna Kea and Hapuna beaches. The condo was clean, well-equipped and a nice location within the development. We hope to return soon and I can't give a stronger recommendation than that! This condo was squeaky clean, quiet (well, the birds do wake up early) and with smashingly glorious Pacific views, including whale tails visible. The kitchen has more cutlery and dishes than you'll ever need, and the Viking outdoor BBQ was a great discovery for us. Very comfortable beds and great showers. We did take advantage of our beach and pool privileges at the Mauna Kea and Haipanu (sp?) hotels. Set in the middle of a beautiful golf course. The owner was very helpful pre-arrival, in making sure we knew all we needed to make our stay as enjoyable as it was. We were two couples, and we had more room than we needed. 'Enjoyed it. Richard's home was absolutely perfect for our family. The 3 bedrooms were spacious and well appointed as were the 3 full bathrooms. We enjoyed mornings and evenings on the lanai and our only regret was not getting fresh fish to grill there. The views of ocean and mountains embrace you as the soft island breezes blow through the home. (Love how the Lanai wall opens up completely!) We will recommend Richard's home to friends and family looking to enjoy the Big Island in luxury and free of the commotion of the big hotels. Having full resort access to the Mauna Kea and the Hapuna Prince was the cherry on top. The beaches were perfect! We also enjoyed dining at the Sunday Brunch and the Hawaiian Luau at the Mauna Kea. Each was a treat worth repeating. Thank you Richard for sharing your home. We are hooked and will be back. Reviewed by Lynn Marie M. My review has already been posted. Reviewed by Jacques from Calgary, Alberta, Canada. Jan and I and 3 family members spent a wonderful holiday in Richard's home. Five adults were very comfortably accommodated in 3 well appointed bedrooms - 2 with large ensuite bathrooms and a 3rd hallway bathroom with a large shower for the 5th adult. The condo is attractively furnished and decorated and overlooks the 11th fairway of the Hapuna Prince golf course. We had lovely views of Kawaihae Bay and actually observed all sorts of seasonal whale activity from the lanai. The lanai also provided for some stunning sunsets, relaxed morning coffees and some great evening barbeques. The kitchen is equipped with efficient high end appliances and all of the comforts of home. Richard has graciously enrolled in the member services arrangement offered by both the Mauna Kea and Hapuna Prince hotels which meant our entire party had full access to both facilities including their first class beaches, restaurants and golf courses. The Wai Alu Alu community amenity centre was extremely handy with a lovely pool and small but well equipped gym - a 5 minute walk from the condo. It is a bit of a drive to the major services in Kona but we found it was very convenient to shop in Waimea and Waikoloa Village - both a short 15-20 minute drive from Wai Alu Alu. In fact there are great lunch and dinner options in Waimea including Merriman's and Pau. Our guests had a truly wonderful Hawaii experience. Jan and I enjoyed our best ever winter escape in Richard's lovely home with all of its associated amenities. Throughout, Richard was very helpful and responsive to any queries we sent his way. We have already contacted him about a repeat visit next year !!! So absolutely no hesitation in recommending Richard's home as a very welcoming and stylish Big Island winter retreat. You honor us with your kind review! Please come back anytime! We loved the equal master suites, the AC for both areas, the linens, towels, bathrooms, sofa, lanai and barbecue....all with wonderful views!! The dishwasher and coffee pot should be upgraded, and a garage door opener would have been helpful. Thanks so much for being our honored guest. We'll work on getting a better coffee maker. I don't know what happened to the garage door opener! Perhaps the last guest walked off with it. We'll get it replaced pronto! Please come again! We had a wonderful time in this beautiful unit with our grown children. The owner was very personable and responsive to our requests. The views were spectacular, from the ocean to the snow capped Mauna Kea. The lanai was lovely for breakfast, lunch and dinner and the BBQ on the lanai was an added bonus. The unit was very well appointed from the kitchen, bedrooms and bathrooms to the boogie boards in the garage. (It is located on the 2nd floor without an elevator, if that is a consideration for your needs.) Bedrooms were very large in size with extremely comfortable beds. The washer/dryer also was handy and helped immensely so that we were able to bring the minimal amount of clothing for travel. The amenity center was an easy walk away with a nice pool, workout room and BBQ area. The ability to access the two hotels nearby, Hapuna Beach and Mauna Kea, with their incredible beaches, pools, restaurants and facilities made for a very pleasant way to spend the days. I would recommend having a car so that you will be able to take advantage of everything else that the Big Island has to offer, too. I highly recommend this VRBO unit without any hesitation and hope that we will be back again in the near future. While this was our third trip to the big island, it was our first experience with VRBO and we were thrilled when we arrived. Check in was easy. The unit is great, has an amazing view and everything you would ever need. The amenity center is within easy walking distance and has a lovely pool and gym. And for movie watching the tv and surround sound are excellent. The owner is responsive to any request and very pleasant. The beaches of Mauna Kea and Hapuna are THE best! We took advantage of the amenity package this unit offers and spent time at both beaches, using the towels and chairs the hotels provide...it was all so easy. We would definitely recommend this unit and the big island for anyone wanting an awesome vacation! We stayed at this unit for a week with 2 kids ages 12 and 8. Right from the inquiry stages, my interaction with Richard has been excellent, prompt and informative. Unit itself exceeded our expectations (we are picky travelers !!), superb kitchen, equipped with everything you need and then some !! Beds are superior and so are the pillows which are important to us. Views from the lanai is so serene. Great appliances, tv comes with Netflix and other such services !!!! Lots of closet space.. I can go on and on :) Lovely unit. Our only gripe was with Gail, who is the manager from Hapuna Prince hotel. She didn't make any effort to help us since we were there during hurricane. In fact, when I called her, she said she won't be working that day !!!! Don't get me wrong, she was pleasant, but just not going out of her way to make the guests welcome. If at all there is any suggestion, may be kitchen could use a nice tall garbage can with a closure (one of those steel ones) !! That's about it. Unit also has access to Mauna Kea resort and Hapuna Price Hotel, both of which we totally loved for their beach and pool. Will go back in a heart beat. Very quite and lovely place to stay on the island. We stayed here during the week of our wedding. This condo was beautiful and nicely furnished. It was spacious and the rooms were quite large, we felt like we could fit more people. The owner Richard sent me an email mid week just to make sure everything is okay, which we really appreciated. Definitely would've liked to stay longer. My family of four spoiled ourselves in this luxurious condo. My husband and I were able to relax in the master suite while my kids each had their own bedroom and bathroom. What a treat. This condo would easily work for two families or a family with kids and grandparents. There was not one thing that I would change about our Big Island stay. The condo has all of the amenities that you could ask for and more. The full size washer and dryer is a very nice perk and the boogie boards and cooler in the garage were a bonus. It is also decorated beautifully. Having access to both the Hapuna Prince and the Mauna Kea (two of the most beautiful beaches I have ever been to) was key. You need a car to get to ther resorts, but the infinity pool in the condo area couldn't be beat. Most times, we had it to ourselves. I was a little surprised that the Kohala Coast shut down pretty early during the week, but once we realized that, we just adjusted our planning accordingly. We can't wait to return to this condo on the Big Island. I give it my highest recommendation. Overall this place is great. It has great views and is very nice. The owner has done a great job of tastefully decorating the condo and it is very welcoming. The owner also does a good job of connecting you with the right people on property should there be any issues. The lanai is perfect for having a great meal outside. Literally, over the week that we were there, we never ate at the table inside. The access to both the beaches and pools at Mauna Kea and Hapuna is great! The kids loved having the boogie boards that are included with the condo for guest use to take down to the beach. A couple of comments to be aware of: 1) the check in process is not intuitive. The guy at the guard station at the entrance to the Hapuna Beach Hotel and Resort property sent us straight to the house, which you cannot get access to without first checking in at the Hapuna Beach Hotel front desk. Seems like he should know otherwise. 2) the wifi router had just been changed and the information in all of the materials had not been updated. We updated it in the information book that is on property with the correct password, etc. Still could never get a great signal from it (2-3 bars at most). Overall, we had a great time and would recommend highly. Thanks for sharing your property with us! In short, if you want a beautiful condo that is private and quiet, this is the place to stay. We will be back. With access to the Mauna Kea beach, life can't get much better. There is a definite "wow" factor immediately upon entering. The pictures and descriptions simply hadn't prepared me for what we were in for. Everything is high end and very thoughtfully laid out. The access to the Mauna Kea and the Hapuna was a very welcome bonus. The second floor location was the only drawback, but when you see the views it affords you, the concerns are abated. Other than that, superlatives all around. It was a wonderful experience and I would do it again. Our family of five stayed here for our spring vacation and we were thoroughly impressed. The unit was the perfect size for us and it was exactly as described as being in new condition with great furniture, high end linens and appliances. Having the amenity package was a huge bonus as we spent a lot of time using the facilities at the Mauna Kea and Hapuna Prince hotels. Another highlight is the use of the clubhouse, gym, and pool that are walking distance to the unit. We spent an evening there with another family for cocktails and a BBQ while the kids swam. The owners were very helpful and responsive before, during, and after our stay. Would highly recommend it to anyone, especially a family, as an alternative to renting one or two hotel rooms. When we walked in the door of the home, my grandson said, "We get to stay here? It's so nice." That sums up our whole week. The owner was very helpful every step of the way, from making reservation to including access to Mauna Kea and Hapuna Beach resorts, (which everyone loved.) The views, amenities, updates finishes are all as described, and the home is immaculate and well kept. Loved our stay, we hope to go again soon. We had a fabulous time at this rental. The place was clean and absolutely gorgeous. My husband and I and our 9-year old stayed with my sister and her two young children and it was the perfect size for us. The place is decorated very tastefully and you know you are in Hawai'i, which we loved. The lay-out was great as we never felt we were in each other's space when we needed a bit of down-time yet there was lots of together space in the open concept kitchen, dining and lounge area. The check-in was seamless and the staff that we dealt with for the rental were wonderful and accommodating. The fitness centre with the pool was lovely, especially the outdoor shower. Our only complaint would be that the basics, like salt and pepper, were absent from the kitchen and that some of the kitchen utensils were dirty when we arrived. Perhaps just missed after the last guest and really, pretty minor compared to all the plusses. Having access to both the Hapuna and Mauna Kea beaches and pools was wonderful and just a two minute drive. Nice to be close to beautiful Waimea as well. Would definitely recommend this rental. Thanks for a wonderful stay! We stayed at this condo for 8 days and it was exactly as advertised. It was beautiful on the inside with high end appliances, granite kitchen, and very well furnished. We loaded up on groceries at Costco and had plenty of room in the fridge and freezer to put stuff. The bathrooms were beautiful and high end as well. The lanai (balcony) was spacious with a great view of the golf course and ocean, and had a Wolf gas grill that cooked very well. The complex is very well maintained, and the community center/pool is a 3-5 minute walk from the condo, and also very nice, with an infinity pool, a kids pool, and a hot tub. My kids spent a lot of time there. The Hapuna Prince Beach hotel is beautiful, and renting this condo gives you 2 guest passes and 2 kid passes to the Hapuna Prince and Mauna Kea hotels, so you can use their pools, beach chairs, etc. All you do is give the staff at the desk your name and they will give you towels, rent you beach stuff (boogie boards, etc.), and provide chairs. Hapuna beach is absolutely amazing, with beautiful sand and no rocks. Richard delivered as promised and was a good host. 7 of us stayed at his condo, my wife and 2 kids, my in-laws, and my aunt, and everyone was very happy with the accommodations. Richard even had some beach toys in his garage as well as a cooler and allowed us to borrow both during our trip. The only downside to the location as a whole is that you are a bit isolated, as you are 30 miles north of Kona, and about 10 miles from Waimea (the closest sizable town). So, sightseeing takes a bit more effort if you wish to see the southern parts of the island and Hawaii Volcano National Park. However, you are close to sights on the north side of the island. All in all, this was a luxurious and comfortable place to stay, with wifi, cable, and flat panel TVs in all the rooms. My wife loved the soaking tub in the master bedroom (and there are 2 master bedrooms) and one regular bedroom. The bathrooms were huge and spacious. There was also a full size washer and dryer and ironing board in the condo as well. For anyone with a family, this is a great place to stay, as you will save money over a hotel and have all the amenities of home during your stay. I'd I would happily stay here again. This was our family's 4th trip to the Kona Coast and our 2nd time at the Mauna Kea/Hapuna Prince. I can't overstate how happy we were with this condo. It's huge, yet we filled it with kids ages 3-11 and will do it again next year (ages plus 1 year!!). The condo is beautifully decorated, completely stocked and ideally located for families who like to spend days alternating between the beach and the pool (with the occasional umbrella'ed cocktail). There are no nicer beaches for boogie boarding and swimming on Kona than Hapuna and Mauna Kea and the beach side pools are perfect for the younger kids. This condo is only a 5 minute drive to both Resorts and has a smaller infinity pool (and work out facility) that's only a 5 minute walk. I just sent the link to 2 people from my work who are looking for a rental for 3 couples without kids, because it will be perfect for a grown up getaway as well. Thanks for letting us rent your amazing home. Condo exceeded our expectations. Great views of golf course, ocean, Kohala Mountain and Maui on clear days. Really enjoyed having access to both resort's beaches, pools, and fitness centers. Would absolutely stay here again. When we weren't watching it from the Hapuna Prince beach or pool, we watched the sun set from our balcony. This condo is in tip top shape and includes many amenities. Three generations of family had only positive comments about this accommodation. Thanks so much! Awesome HUGE CONDO! VERY CLEAN AND ALL WORKS WELL! CLOSE TO 2 OF THE BEST HOTELS & BEACHES! We all arrived on Dec 17 th for 2 weeks. 2 kids 20 & 16 plus us Adults. We love this area and the condo with the Amenity Package is great! Close like 3 minutes to all beaches at the Hapuna Hotel and Mauna Kea Hotel. Also access to all their restaurants and Valet as well as beach towels and Chairs. The BBQ is wonderful and brand new like everything else. WiFi great! View is beautiful here. We would came back in a nano second. This condo is beautiful, comfortable & spacious. It has a full kitchen with everything you'd need if you lived here full time -- or everything you want if, like us, you like to come with the family and do lots of cooking in. It has beautiful furniture & great beds, especially in the two master suites, plus a large lanai with comfortable seating & a big table for eating or reading, or just enjoying the clean air. The lanai also has a large, vented gas grill (which we loved, & used often). The owner's listing descriptions were accurate & the photos accurately reflected the property's appearance & amenities -- except that the photos couldn't do it justice. It has a great 2nd floor location, which catches wonderful breezes through spacious windows, and looks out over a lovely golf course to a wide view of the beautiful blue Pacific Ocean, from multiple perspectives. The condo & the entire complex are clean as a whistle & beautifully maintained. And being associated with the 5-Star Mauna Kea & Hapuna Prince Resorts, staying here entitles you to avail yourself of all their amenities, including easy parking, 5 minutes away, just down the hill, for two of the best beaches on the island (with attentive beach guys & gals providing towels & beach chaises with umbrellas, no charge, at the Mauna Kea, & great lunches & bar service available at the grill right on the beach). The Kohala Coast is a perfect location -- about 1/2 hour north of Kona Airport, only 10 minutes south of the tiny town of Kawaihea (with a dive shop, a great little farmer's market & don't-miss restaurants like Cafe Pesto & the Seafood Bar & Grill), 1/2 hour south of the cool, funky little town of Hawi (great BBQ at the corner "Chuck Wagon"!), & less than 1/2 hour from the mountain town of Waimea, with its beautiful rolling green hills, great shops & restaurants (massive, delicious breakfasts at the Hawaiian Style Cafe, & delicious, upscale dining at Merriman's). We were here with several grown kids for two weeks, over Thanksgiving, & loved every minute of it. We will definitely go back again, & we wholeheartedly recommend this condo & this location to anyone & everyone! Mauna Kea is a fun place to stay with two hotels, two golf courses, tennis courts, two beaches that are each a little different, and several rooming options. We love the Wai Ula Ula condos (our second stay). We really enjoyed our stay at this second floor condo. It is located right off of the 11th fairway of the Hapuna golf course. Close enough to the pool to walk and far enough to be very private. Pool is great for younger kids or adults who want to relax. May be a relatively new rental as the only condiments were salt and pepper. Be prepared to purchase everything you need for your stay for cooking. That said, it is in like new condition and there are lots of options for cooking. Great range inside, though we used the barbecue on the lanai for all of our dinners. Would absolutely stay here again. Perfect for families or for two couples with kids with the layout of 2 masters and a third room with two beds and three bathrooms overall. Appreciate Richard's assistance in getting everything set and ready for our stay. Thank you. Better than a 5 star hotel! This property was perfect for our family! We were traveling with two young children and 4 adults and we all had more than enough room. The property seems brand new, perfectly appointed and professionally decorated. The view is beautiful and we enjoyed breakfast outside on the lanai each morning, saw goats roam across the golf course each afternoon and the sun set each evening. The walk to the pool was easy, the beach was gorgeous and the beds were heavenly, all in all perfection! This was our first VRBO experience, so we didn't know what to expect. The property is absolutely gorgeous, the accommodations were top notch-luxury at its finest. We traveled to the Big Island on a family vacation. We were 5 adults and 2 children. This condo had it all for our great family get-away. The two master suites were perfect for us. There was plenty of room to spread out and find a private spot to do our own thing, or come together and just hang out. The retractable wall was a plus, since we love to watch the sunsets at night. With so many of us, we loved that we could do laundry everyday without leaving home. The kitchen was well appointed and two-three of us could work side-by-side in it. The workout room and pool were just a short walk up the road. Both hotel properties were lovely. The owner was very responsive to any questions we had. This is their home too, and the pride of ownership is everywhere you look. Thanks for the memories. Pictures are exactly what you see when you step into this condo. The beds were super comfortable, the lanai gorgeous to sit at in the mornings & evenings, the newly installed grill a pleasure to use. Plenty of space for a larger group of people. Mauna Kea Beach is our favorite and having access to the property parking was "icing on the cake". Use of the beach chairs, umbrellas & towels were a blessing. Just go & enjoy with no worries what to bring. Location is close to the nearby grocery store. Use of exercise amenity center was a great for our athletic crew. We would highly recommend staying here. It was SUPERB! We had a wonderful time at this beautiful three bedroom condo. The pictures do not do this property justice as the ocean views were spectular. The lanai is incredible and the rest of the unit had tons of room for our family to spread out. The amenity center (with workout room, pool and grill) and the access to the to oceanside hotels was a huge plus. We hope to return at some point in the future. This was our first time to the Big Island and we love this location and place we stayed. The condo was everything that was promised and was very spacious with 3 large bedrooms and 3 full bathrooms and a wonder view of the beach!! The amenities available at the Hapuna Prince HoteI and the Mauna Kea were great and both offered an awesome beach, beach chairs and umbrellas. I would recommend this wonderful condo to anyone wanting to go to the Big Island and have already.
import numpy as np from featureflow import Node from scipy.fftpack import dct from scipy.stats.mstats import gmean from .functional import fft, mdct from .frequencyscale import LinearScale, ChromaScale, BarkScale from .weighting import AWeighting from .tfrepresentation import FrequencyDimension from .frequencyadaptive import FrequencyAdaptive from zounds.core import ArrayWithUnits, IdentityDimension from zounds.nputil import safe_log from zounds.timeseries import audio_sample_rate from .sliding_window import HanningWindowingFunc class FrequencyWeighting(Node): """ `FrequencyWeighting` is a processing node that expects to be passed an :class:`~zounds.core.ArrayWithUnits` instance whose last dimension is a :class:`~zounds.spectral.FrequencyDimension` Args: weighting (FrequencyWeighting): the frequency weighting to apply needs (Node): a processing node on which this node depends whose last dimension is a :class:`~zounds.spectral.FrequencyDimension` """ def __init__(self, weighting=None, needs=None): super(FrequencyWeighting, self).__init__(needs=needs) self.weighting = weighting def _process(self, data): yield data * self.weighting class FFT(Node): """ A processing node that performs an FFT of a real-valued signal Args: axis (int): The axis over which the FFT should be computed padding_samples (int): number of zero samples to pad each window with before applying the FFT needs (Node): a processing node on which this one depends See Also: :class:`~zounds.synthesize.FFTSynthesizer` """ def __init__(self, needs=None, axis=-1, padding_samples=0): super(FFT, self).__init__(needs=needs) self._axis = axis self._padding_samples = padding_samples def _process(self, data): yield fft(data, axis=self._axis, padding_samples=self._padding_samples) class DCT(Node): """ A processing node that performs a Type II Discrete Cosine Transform (https://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II) of the input Args: axis (int): The axis over which to perform the DCT transform needs (Node): a processing node on which this one depends See Also: :class:`~zounds.synthesize.DctSynthesizer` """ def __init__(self, axis=-1, scale_always_even=False, needs=None): super(DCT, self).__init__(needs=needs) self.scale_always_even = scale_always_even self._axis = axis def _process(self, data): transformed = dct(data, norm='ortho', axis=self._axis) sr = audio_sample_rate( int(data.shape[1] / data.dimensions[0].duration_in_seconds)) scale = LinearScale.from_sample_rate( sr, transformed.shape[-1], always_even=self.scale_always_even) yield ArrayWithUnits( transformed, [data.dimensions[0], FrequencyDimension(scale)]) class DCTIV(Node): """ A processing node that performs a Type IV Discrete Cosine Transform (https://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-IV) of the input Args: needs (Node): a processing node on which this one depends See Also: :class:`~zounds.synthesize.DCTIVSynthesizer` """ def __init__(self, scale_always_even=False, needs=None): super(DCTIV, self).__init__(needs=needs) self.scale_always_even = scale_always_even def _process_raw(self, data): l = data.shape[1] tf = np.arange(0, l) z = np.zeros((len(data), l * 2)) z[:, :l] = (data * np.exp(-1j * np.pi * tf / 2 / l)).real z = np.fft.fft(z)[:, :l] raw = np.sqrt(2 / l) * \ (z * np.exp(-1j * np.pi * (tf + 0.5) / 2 / l)).real return raw def _process(self, data): raw = self._process_raw(data) sr = audio_sample_rate( int(data.shape[1] / data.dimensions[0].duration_in_seconds)) scale = LinearScale.from_sample_rate( sr, data.shape[1], always_even=self.scale_always_even) yield ArrayWithUnits( raw, [data.dimensions[0], FrequencyDimension(scale)]) class MDCT(Node): """ A processing node that performs a modified discrete cosine transform (https://en.wikipedia.org/wiki/Modified_discrete_cosine_transform) of the input. This is really just a lapped version of the DCT-IV transform Args: needs (Node): a processing node on which this one depends See Also: :class:`~zounds.synthesize.MDCTSynthesizer` """ def __init__(self, needs=None): super(MDCT, self).__init__(needs=needs) def _process(self, data): transformed = mdct(data) sr = audio_sample_rate(data.dimensions[1].samples_per_second) scale = LinearScale.from_sample_rate(sr, transformed.shape[1]) yield ArrayWithUnits( transformed, [data.dimensions[0], FrequencyDimension(scale)]) class FrequencyAdaptiveTransform(Node): """ A processing node that expects to receive the input from a frequency domain transformation (e.g. :class:`~zounds.spectral.FFT`), and produces a :class:`~zounds.spectral.FrequencyAdaptive` instance where time resolution can vary by frequency. This is similar to, but not precisely the same as ideas introduced in: * `A quasi-orthogonal, invertible, and perceptually relevant time-frequency transform for audio coding <https://hal-amu.archives-ouvertes.fr/hal-01194806/document>`_ * `A FRAMEWORK FOR INVERTIBLE, REAL-TIME CONSTANT-Q TRANSFORMS <http://www.univie.ac.at/nonstatgab/pdf_files/dogrhove12_amsart.pdf>`_ Args: transform (function): the transform to be applied to each frequency band scale (FrequencyScale): the scale used to take frequency band slices window_func (numpy.ndarray): the windowing function to apply each band before the transform is applied check_scale_overlap_ratio (bool): If this feature is to be used for resynthesis later, ensure that each frequency band overlaps with the previous one by at least half, to ensure artifact-free synthesis See Also: :class:`~zounds.spectral.FrequencyAdaptive` :class:`~zounds.synthesize.FrequencyAdaptiveDCTSynthesizer` :class:`~zounds.synthesize.FrequencyAdaptiveFFTSynthesizer` """ def __init__( self, transform=None, scale=None, window_func=None, check_scale_overlap_ratio=False, needs=None): super(FrequencyAdaptiveTransform, self).__init__(needs=needs) if check_scale_overlap_ratio: try: scale.ensure_overlap_ratio(0.5) except AssertionError as e: raise ValueError(*e.args) self._window_func = window_func or np.ones self._scale = scale self._transform = transform def _process_band(self, data, band): try: raw_coeffs = data[:, band] except IndexError: raise ValueError( 'data must have FrequencyDimension as its last dimension, ' 'but it was {dim}'.format(dim=data.dimensions[-1])) window = self._window_func(raw_coeffs.shape[1]) return self._transform(raw_coeffs * window[None, :], norm='ortho') def _process(self, data): yield FrequencyAdaptive( [self._process_band(data, band) for band in self._scale], data.dimensions[0], self._scale) class BaseScaleApplication(Node): def __init__(self, scale, window, needs=None): super(BaseScaleApplication, self).__init__(needs=needs) self.window = window self.scale = scale def _new_dim(self): return FrequencyDimension(self.scale) def _preprocess(self, data): return data def _process(self, data): x = self._preprocess(data) x = self.scale.apply(x, self.window) yield ArrayWithUnits( x, data.dimensions[:-1] + (self._new_dim(),)) class Chroma(BaseScaleApplication): def __init__( self, frequency_band, window=HanningWindowingFunc(), needs=None): super(Chroma, self).__init__( ChromaScale(frequency_band), window, needs=needs) def _new_dim(self): return IdentityDimension() def _preprocess(self, data): return np.abs(data) * AWeighting() class BarkBands(BaseScaleApplication): def __init__( self, frequency_band, n_bands=100, window=HanningWindowingFunc(), needs=None): super(BarkBands, self).__init__( BarkScale(frequency_band, n_bands), window, needs=needs) def _preprocess(self, data): return np.abs(data) class SpectralCentroid(Node): """ Indicates where the "center of mass" of the spectrum is. Perceptually, it has a robust connection with the impression of "brightness" of a sound. It is calculated as the weighted mean of the frequencies present in the signal, determined using a Fourier transform, with their magnitudes as the weights... -- http://en.wikipedia.org/wiki/Spectral_centroid """ def __init__(self, needs=None): super(SpectralCentroid, self).__init__(needs=needs) def _first_chunk(self, data): self._bins = np.arange(1, data.shape[-1] + 1) self._bins_sum = np.sum(self._bins) return data def _process(self, data): data = np.abs(data) yield (data * self._bins).sum(axis=1) / self._bins_sum class SpectralFlatness(Node): """ Spectral flatness or tonality coefficient, also known as Wiener entropy, is a measure used in digital signal processing to characterize an audio spectrum. Spectral flatness is typically measured in decibels, and provides a way to quantify how tone-like a sound is, as opposed to being noise-like. The meaning of tonal in this context is in the sense of the amount of peaks or resonant structure in a power spectrum, as opposed to flat spectrum of a white noise. A high spectral flatness indicates that the spectrum has a similar amount of power in all spectral bands - this would sound similar to white noise, and the graph of the spectrum would appear relatively flat and smooth. A low spectral flatness indicates that the spectral power is concentrated in a relatively small number of bands - this would typically sound like a mixture of sine waves, and the spectrum would appear "spiky"... -- http://en.wikipedia.org/wiki/Spectral_flatness """ def __init__(self, needs=None): super(SpectralFlatness, self).__init__(needs=needs) def _process(self, data): data = np.abs(data) mean = data.mean(axis=1) mean[mean == 0] = -1e5 flatness = gmean(data, axis=1) / mean yield ArrayWithUnits(flatness, data.dimensions[:1]) class BFCC(Node): """ Bark frequency cepstral coefficients """ def __init__(self, needs=None, n_coeffs=13, exclude=1): super(BFCC, self).__init__(needs=needs) self._n_coeffs = n_coeffs self._exclude = exclude def _process(self, data): data = np.abs(data) bfcc = dct(safe_log(data), axis=1) \ [:, self._exclude: self._exclude + self._n_coeffs] yield ArrayWithUnits( bfcc.copy(), [data.dimensions[0], IdentityDimension()])
Another SpaceX refuelling mission to the International Space Station (ISS) has launched successfully but another attempt to land its launcher safely on a floating "drone ship" narrowly failed when it tipped over on landing. The Falcon 9 launched from Cape Canaveral in Florida on 14 April, carrying 4,000 lbs (1,800 kg) of supplies for the orbiting space station, including food and scientific equipment. The unmanned spaceship is expected to reach the ISS on Friday. However, SpaceX chief executive Elon Musk expressed disappointment that another attempt to safely land the rocket launcher on the floating dock - dubbed "Just Read the Instructions" by SpaceX - failed, albeit by the narrowest of margins. A video on the SpaceX Twitter feed shows the moment the rocket slowly descends, rockets blazing, towards the ship, but then begins to topple over. According to the SpaceX website, " Falcon 9's first stage attempted a precision landing on our autonomous spaceport drone ship named 'Just Read the Instructions' as part of an ongoing attempt to land and recover a rocket after it completes its primary mission. The stage made it to the drone ship and landed, but excess lateral velocity caused it to tip over." Musk wrote on Twitter: "Ascent successful. Dragon en route to Space Station. Rocket landed on droneship, but too hard for survival." Managing to safely land a launcher to enable its reuse is considered essential in order to make space flight cheaper for future generations, but so far the feat has proved elusive. In January another SpaceX launcher landed heavily on its floating dock and was lost, also damaging the ship. Then Elon Musk tweeted: "Close, but no cigar." NASA handed SpaceX the contract to supply cargo to the ISS when the shuttle was taken out of service. A freighter system owned by a competitor, Orbital Sciences Corporation, exploded just after launching last October.
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import descriptive import itertools import Pmf import random import risk import thinkstats def ComputeRow(n, probs): """Multiplies out a row of a table. Args: n: sum of the elements in the row prob: sequence of float probabilities """ row = [n * prob for prob in probs] return row def SimulateRow(n, probs): """Generates a random row of a table. Chooses all but the last element at random, then chooses the last element to make the sums work. Args: n: sum of the elements in the row prob: sequence of float probabilities """ row = [Binomial(n, prob) for prob in probs] row[-1] += n - sum(row) return row def Binomial(n, prob): """Returns a random sample from a binomial distribution. Args: n: int number of trials prob: float probability Returns: int: number of successes """ t = [1 for _ in range(n) if random.random() < prob] return sum(t) def ComputeRows(firsts, others, funcs, probs=None, row_func=ComputeRow): """Computes a table suitable for use with chi-squared stats. There are three uses of this function: 1) To compute observed values, use probs=None and row_func=ComputeRow 2) To compute expected values, provide probs from the pooled data, and row_func=ComputeRow 3) To generate random values, provide pooled probs, and row_func=SimulateRow Returns: row of rows of float values """ rows = [] for table in [firsts, others]: n = len(table) row_probs = probs or [func(table.pmf) for func in funcs] row = row_func(n, row_probs) rows.append(row) return rows def ChiSquared(expected, observed): """Compute the Chi-squared statistic for two tables. Args: expected: row of rows of values observed: row of rows of values Returns: float chi-squared statistic """ it = zip(itertools.chain(*expected), itertools.chain(*observed)) t = [(obs - exp)**2 / exp for exp, obs in it] return sum(t) def Test(pool, firsts, others, num_trials=1000): # collect the functions from risk.py that take Pmfs and compute # various probabilities funcs = [risk.ProbEarly, risk.ProbOnTime, risk.ProbLate] # get the observed frequency in each bin print 'observed' observed = ComputeRows(firsts, others, funcs, probs=None) print observed # compute the expected frequency in each bin tables = [firsts, others] probs = [func(pool.pmf) for func in funcs] print 'expected' expected = ComputeRows(firsts, others, funcs, probs=probs) print expected # compute the chi-squared stat print 'chi-squared' threshold = ChiSquared(expected, observed) print threshold print 'simulated %d trials' % num_trials chi2s = [] count = 0 for _ in range(num_trials): simulated = ComputeRows(firsts, others, funcs, probs=probs, row_func=SimulateRow) chi2 = ChiSquared(expected, simulated) chi2s.append(chi2) if chi2 >= threshold: count += 1 print 'max chi2' print max(chi2s) pvalue = 1.0 * count / num_trials print 'p-value' print pvalue return pvalue def main(): # get the data pool, firsts, others = descriptive.MakeTables() Test(pool, firsts, others, num_trials=1000) if __name__ == "__main__": main()
Heather Cox of #BGWD worked with John Berl, owner and operator of Custom Concessions, to bring his outdated HTML website up to date with a New Website created with WordPress! Good bye are the days of pinching and dragging on your phone to see his website! With this new responsive website, Custom Concessions now has a mobile responsive website, easy to contact buttons and fully optimized for search engine usage! Click Here to View the Brand New Custom Concessions Website created by #BGWD!
import os import re import logging logger = logging.getLogger(__name__) class Loader: def __init__(self, basedir): self.basedir = basedir self.ipattern = re.compile(r'^\\i\s+(.+?)\s*$', re.U | re.M) self.irpattern = re.compile(r'^\\ir\s+(.+?)\s*$', re.U | re.M) def load(self, path): filename = os.path.join(self.basedir, path) script = self._read(filename) script = self._preproceed(filename, script) return script def _read(self, path): with open(path) as h: return h.read() def _preproceed(self, path, script): imatch = self.ipattern.search(script) irmatch = self.irpattern.search(script) while imatch or irmatch: if imatch: script = self._preproceed_i(path, script, imatch) elif irmatch: script = self._preproceed_ir(path, script, irmatch) imatch = self.ipattern.search(script) irmatch = self.irpattern.search(script) return script def _preproceed_i(self, path, script, match): filename = match.group(1) if filename != os.path.abspath(filename): filename = os.path.join(self.basedir, match.group(1)) return self._include(path, script, match, filename) def _preproceed_ir(self, path, script, match): filename = match.group(1) if filename != os.path.abspath(filename): dirname = os.path.dirname(path) filename = os.path.join(dirname, match.group(1)) return self._include(path, script, match, filename) def _include(self, path, script, match, filename): if not os.path.isfile(filename): raise IOError("Script: %s: line: %s: file %s not found" % (path, match.group(0), filename)) return script[:match.start()] + \ self._read(filename) + \ script[match.end():]
Today, most intellectuals agree that (a) Christianity has profoundly influenced western culture; (b) members from different cultures experience many aspects of the world differently; (c) the empirical and theoretical study of both culture and religion emerged within the West.The present study argues that these truisms have implications for the conceptualization of religion and culture. More specifically, the thesis is that non-western cultures and religions differ from the descriptions prevalent in the West, and it is also explained why this has been the case. The author proposes novel analyses of religion, the Roman &apos;religio&apos;, the construction of &apos;religions&apos; in India, and the nature of cultural differences. Religion is important to the West because the constitution and the identity of western culture is tied to the dynamic of Christianity as a religion.
import os import re import sys import pymongo # Looks for local baby names directory and outputs a dictionary in the format year: "name,sex,num_occurrence". def get_data(): data = {} names = os.getcwd() + '/names' if os.path.exists(names): names_dir = os.listdir(names) for yob in names_dir: if yob[-4:] == '.txt': year = re.search(r'\d\d\d\d', yob) with open(names + '/' + yob) as txt: data[year.group()] = re.findall(r'\S+', txt.read()) return data return "names directory not found!" # Cleans up data for friendly JSON output def fix_data(data): fixed_data = {} temp = {} for year in data: id = 0 for value in data[year]: name = re.search(r'\w+', value).group() sex = re.search(r'(,)(\w+)', value).group()[1] num_occurrence = re.search(r'\d+', value).group() temp[id] = {"name": name, "sex": sex, "num_occurrence": num_occurrence} id += 1 fixed_data[year] = temp.values() return fixed_data # Outputs fixed_data to MongoDB def sendto_mongo(fixed_data): connection = pymongo.Connection("mongodb://localhost", safe=True) db = connection.social_security_data baby_names = db.baby_names for year in fixed_data: try: baby_names.insert({"_id": year, "info": fixed_data[year]}) except: print "Unexpected error:", sys.exc_info()[0] if __name__ == '__main__': data = get_data() fixed_data = fix_data(data) sendto_mongo(fixed_data)
The Light and Darkness War – Now Read This! During the 1980s the American comics scene enjoyed an astounding proliferation of new titles and companies in the wake of the creation of the Direct Sales Market. With publishers able to firm-sale straight to retail outlets rather than overprint and accept returned copies from non-specialised vendors, the industry was able to support less generic titles and creators could experiment without losing their shirts. In response Marvel Comics developed a line of creator-owned properties at the height of the subsequent publishing explosion, launching a number of idiosyncratic, impressive series in a variety of formats under the watchful, canny eye of Editor Archie Goodwin. The delightfully disparate line was dubbed Epic Comics and the results reshaped the industry. Conceived and created by author, poet and comics scribe Tom Veitch (Legion of Charlies, Antlers in the Treetops, Animal Man, Star Wars: Dark Empire) and Cam Kennedy (Fighting Mann, Judge Dredd, Batman, Star Wars: Dark Empire) The Light and Darkness War originally ran from October 1988 to September 1989, just as that period of exuberant creative freedom was giving way to a marketplace dominated by reductive exploitation led by speculators. Following heartfelt reminiscences and an appreciation in the ‘Foreword by Commander Mike Beidler, USN, Retired’ the astounding fable introduces paraplegic Vietnam war veteran Lazarus Jones, a broken, troubled warrior for whom the fighting never ended. Home when he should have died with his inseparable friends, plagued with red-hot memories of beloved comrades lost when their Huey went down, by 1978 the wheelchair-bound wreck of a man is in a most parlous state. Shattered by what will one day be designated Post Traumatic Stress Disorder, Laz cannot help making life hell for his devoted wife Chris. His miserable existence takes an even darker turn when Jones begins seeing visions of long-gone Huff, Slaw and Engle all calling him to join them. And thus begins a fantastic adventure as the half-man is restored to perfect health and reunited with those who know him best. The catch is that this afterlife is like nothing any holy book ever promised. It’s a vast cosmos of painful, unrelenting physicality where strange alien species commingle and Earth’s dead continue much as they had before. Miraculously and joyously restored, Laz eagerly rejoins Engle, Slaw and Huff in the only thing he was ever good at. Manning a flying boat armed with light-powered weapons he becomes part of a vast force perpetually defying an unimaginable wave of invading evil from the Outer Darkness. For five hundred years however the genius da Vinci has created weapons that have checked the rapid advance and held the invaders to a tenuous stalemate, but Deadsiders are tirelessly patient and resort to inexorably taking worlds one at a time. Stationed on besieged world Black Gate, Laz and the “Light Gang” are unable to prevent libidinous Lord Na from infiltrating and overcoming the planetary defences, but at least they save Governor Nethon’s daughter Lasha from becoming the conqueror’s latest power-supplying plaything. Although gradually winning the war for the dark, Na is impatient for a faster outcome. To achieve that end he had his necromancers rediscover an ancient, long-forgotten way to contact the Earth realm and dupes millionaire arms-dealer and devout Satanist Niles Odom into creating a device to physically bridge the dimensions. The unwitting dupe building Odom’s bridge is Nicky Tesla, a brilliant physicist whose intellect rivals that of his dead uncle Nikola, the wizard of electricity who once astounded the world. With his clairvoyant girlfriend Delpha little Nicky has used his uncle’s old researches to complete an inter-realm gate for crazy-rich Odom, but when an army of zombies come through it and abduct him and Delpha nobody is prepared for what follows. They soon find themselves trapped on their birth-world, just as whole and hale as the day they died… and where Jones still languishes somewhere in a hospital bed. Also included in this gloriously fulsome chronicle is a sketch-&-developmental art ‘Background Briefing’ by Veitch & Kennedy, discussing the Underground Comic origins and antecedents of the story as well as the history, physics and metaphysics of the Light and Darkness War and a potent overview and personal recollection from Stephen R. Bissette, ‘Endless War: The Life, Loss and Afterlife of Lazarus Jones’. Fast paced, suspenseful, astonishingly imaginative and utterly beautiful to behold, the complex tale of Laz’s team and their struggle, how two generations of Tesla reshape a war that has been waged forever, and how in the end only love and devotion can battle overwhelming evil is a masterpiece of graphic endeavour and one no lover of fantasy fiction should miss. The Light and Darkness War is ™ and © 2015 Tom Veitch & Cam Kennedy. All rights reserved.