def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return Services( apiVersion=data.get('apiVersion', None), resourceVersion=data.get('resourceVersion', None), items = [Service.newFromDict(item) for item in (data.get('items',{}) if (data.get('items',{}) is not None) else {})], creationTimestamp=data.get('creationTimestamp', None), selfLink=data.get('selfLink', None), kind=data.get('kind', None), )
def addServiceFromFile(self,filename): ob=Service.newFromJsonFile(filename) return self.postService(ob.toDict())
def addServiceFromFile(self, filename): ob = Service.newFromJsonFile(filename) return self.postService(ob.toDict())
def getService(self,name): response = self.get('services/'+name) return Service.newFromDict(response)
def getService(self, name): response = self.get('services/' + name) return Service.newFromDict(response)