예제 #1
0
    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)
예제 #2
0
파일: tiller.py 프로젝트: vkdrao4git/armada
    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()
예제 #3
0
    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()