def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return LimitRanges( items = [LimitRange.newFromDict(item) for item in (data.get('items',{}) if (data.get('items',{}) is not None) else {})], selfLink=data.get('selfLink', None), resourceVersion=data.get('resourceVersion', None), creationTimestamp=data.get('creationTimestamp', None), kind=data.get('kind', None), apiVersion=data.get('apiVersion', None), )
def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return LimitRanges( items=[ LimitRange.newFromDict(item) for item in (data.get('items', {}) if ( data.get('items', {}) is not None) else {}) ], selfLink=data.get('selfLink', None), resourceVersion=data.get('resourceVersion', None), creationTimestamp=data.get('creationTimestamp', None), kind=data.get('kind', None), apiVersion=data.get('apiVersion', None), )
def addLimitRangeFromFile(self, filename): ob = LimitRange.newFromJsonFile(filename) return self.postLimitRange(ob.toDict())
def getLimitRange(self, name): response = self.get('limitRanges/' + name) return LimitRange.newFromDict(response)
def addLimitRangeFromFile(self,filename): ob=LimitRange.newFromJsonFile(filename) return self.postLimitRange(ob.toDict())
def getLimitRange(self,name): response = self.get('limitRanges/'+name) return LimitRange.newFromDict(response)