#!/usr/bin/env python import xmlrpclib as x import sys u = ('lliurex','centro') m = 'GlusterManager' ip = '192.168.1.9' name_server = 'servercentro.lliurex' vol_name = 'net' path_data = '/net/.data' c = x.ServerProxy('https://'+ ip + ':9779') result = c.path_is_clean(u,m,path_data) if not result['status']: print path_data + " is dirty. Clean please." sys.exit(1) result = c.create_vol(u,m,vol_name,name_server,path_data) if not result['status']: print result['msg'] sys.exit(1) result = c.start_vol(u,m,vol_name)