def get_version(self): """GetVersion returns the current version of the server Args: Returns: 返回tiller的版本grpc响应对象 """ # build get version request stub = ReleaseServiceStub(self.channel) get_version_request = GetVersionRequest() return stub.GetVersion(get_version_request, self.timeout, metadata=self.metadata)
def tiller_version(self): ''' :returns - tiller version ''' try: stub = ReleaseServiceStub(self.channel) release_request = GetVersionRequest() return stub.GetVersion(release_request, self.timeout, metadata=self.metadata) except Exception: raise ex.TillerVersionException()
def tiller_version(self): ''' :returns: Tiller version ''' try: stub = ReleaseServiceStub(self.channel) release_request = GetVersionRequest() LOG.debug('Getting Tiller version, with timeout=%s', self.timeout) tiller_version = stub.GetVersion( release_request, self.timeout, metadata=self.metadata) tiller_version = getattr(tiller_version.Version, 'sem_ver', None) LOG.debug('Got Tiller version %s', tiller_version) return tiller_version except Exception: LOG.exception('Failed to get Tiller version.') raise ex.TillerVersionException()