def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return ResourceQuotas( items = [ResourceQuota.newFromDict(item) for item in (data.get('items',{}) if (data.get('items',{}) is not None) else {})], kind=data.get('kind', None), selfLink=data.get('selfLink', None), creationTimestamp=data.get('creationTimestamp', None), apiVersion=data.get('apiVersion', None), resourceVersion=data.get('resourceVersion', None), )
def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return ResourceQuotas( items=[ ResourceQuota.newFromDict(item) for item in (data.get('items', {}) if ( data.get('items', {}) is not None) else {}) ], kind=data.get('kind', None), selfLink=data.get('selfLink', None), creationTimestamp=data.get('creationTimestamp', None), apiVersion=data.get('apiVersion', None), resourceVersion=data.get('resourceVersion', None), )
def addResourceQuotaFromFile(self, filename): ob = ResourceQuota.newFromJsonFile(filename) return self.postResourceQuota(ob.toDict())
def getResourceQuota(self, name): response = self.get('resourceQuotas/' + name) return ResourceQuota.newFromDict(response)
def addResourceQuotaFromFile(self,filename): ob=ResourceQuota.newFromJsonFile(filename) return self.postResourceQuota(ob.toDict())
def getResourceQuota(self,name): response = self.get('resourceQuotas/'+name) return ResourceQuota.newFromDict(response)