def newFromDict(data): if data is None: data = {} if not isinstance(data, dict): raise PyK8SError('Type dict required') else: return ReplicationControllers( items = [ReplicationController.newFromDict(item) for item in (data.get('items',{}) if (data.get('items',{}) is not None) else {})], apiVersion=data.get('apiVersion', None), kind=data.get('kind', None), selfLink=data.get('selfLink', None), creationTimestamp=data.get('creationTimestamp', None), resourceVersion=data.get('resourceVersion', None), )
def addReplicationControllerFromFile(self, filename): ob = ReplicationController.newFromJsonFile(filename) return self.postReplicationController(ob.toDict())
def addReplicationControllerFromFile(self,filename): ob=ReplicationController.newFromJsonFile(filename) return self.postReplicationController(ob.toDict())
def getReplicationController(self, name): response = self.get('replicationControllers/' + name) return ReplicationController.newFromDict(response)
def getReplicationController(self,name): response = self.get('replicationControllers/'+name) return ReplicationController.newFromDict(response)