def generate_static_api(suite, caps_dir): """Generate API for static build for a given suite""" success = True # Change to caps directory os.chdir(caps_dir) api = API(suite=suite) api.write() os.chdir(BASEDIR) return (success, api)
def generate_static_api(suites, static_api_dir): """Generate API for static build for a given suite""" success = True # Change to caps directory os.chdir(static_api_dir) api = API(suites=suites) logging.info('Generating static API {0} in {1} ...'.format( api.filename, static_api_dir)) api.write() os.chdir(BASEDIR) return (success, api)
def generate_static_api(suites, static_api_dir): """Generate static API for given suite(s)""" success = True # Change to caps directory, create if necessary if not os.path.isdir(static_api_dir): os.makedirs(static_api_dir) os.chdir(static_api_dir) api = API(suites=suites, directory=static_api_dir) logging.info('Generating static API {0} in {1} ...'.format(api.filename, static_api_dir)) api.write() os.chdir(BASEDIR) return (success, api)