예제 #1
0
파일: subcmds.py 프로젝트: amarts/glusterfs
def subcmd_monitor(args):
    import monitor
    from resource import GLUSTER, SSH, Popen
    go_daemon = False if args.debug else True

    monitor.startup(go_daemon)
    Popen.init_errhandler()
    local = GLUSTER("localhost", args.master)
    slavehost, slavevol = args.slave.split("::")
    remote = SSH(slavehost, slavevol)
    return monitor.monitor(local, remote)
예제 #2
0
파일: subcmds.py 프로젝트: yut148/glusterfs
def subcmd_monitor(args):
    import monitor
    from resource import GLUSTER, SSH, Popen
    go_daemon = False if args.debug else True

    monitor.startup(go_daemon)
    Popen.init_errhandler()
    local = GLUSTER("localhost", args.master)
    slavehost, slavevol = args.slave.split("::")
    remote = SSH(slavehost, slavevol)
    return monitor.monitor(local, remote)
예제 #3
0
import connexion
from utils import get_logger
from monitor import startup

log = get_logger(__name__)
startup()
app = connexion.App(__name__, specification_dir='./openapi')
# Read the swagger.yml file to configure the endpoints
app.add_api('swagger.yml')

if __name__ == '__main__':
    # NOTE: debug=True causes the restart
    app.run(host='127.0.0.1', port=5000, debug=False)