Esempio n. 1
0
 def inner(*args, **kwargs):
     ''' decorator '''
     _, status = utils.docker_check()
     if status and is_allowed('docker'):
         return function(*args, **kwargs)
     else:
         pass
Esempio n. 2
0
    def get(self):
        ''' Inspect Hivy, docker, salt-master and serf states '''
        log.info('request hivy status')
        docker_version, docker_status = utils.docker_check()

        return {
            'state': {
                'hivy': os.environ.get('HIVY_STATUS', True),
                'sub-systems': {
                    'docker': docker_status,
                    'salt-master': 'not implemented',
                    'serf': utils.is_running('serf')
                }
            },
            'version': {
                'hivy': {
                    'major': self.hivy_version.major,
                    'minor': self.hivy_version.minor,
                    'patch': self.hivy_version.patch
                },
                'docker': docker_version,
                'serf': self.serf.version(),
                #'salt': str(self.salt('--version'))
                'salt': 'not implemented'
            }
        }
Esempio n. 3
0
 def inner(*args, **kwargs):
     ''' decorator '''
     _, status = utils.docker_check()
     if status and is_allowed('docker'):
         return function(*args, **kwargs)
     else:
         pass