Package coprs :: Package views :: Package api_ns :: Module api_general
[hide private]
[frames] | no frames]

Module api_general

source code

Functions [hide private]
 
api_req_with_copr(f) source code
 
api_home()
Render the home page of the api.
source code
 
api_new_token()
Generate a new API token for the current user.
source code
 
validate_post_keys(form) source code
 
api_status()
Receive information about queue
source code
 
api_new_copr(username)
Receive information from the user on how to create its new copr, check their validity and create the corresponding copr.
source code
 
api_copr_delete(copr)
Deletes selected user's project
source code
 
api_copr_fork(copr)
Fork the project and builds in it
source code
 
api_coprs_by_owner(username=None)
Return the list of coprs owned by the given user.
source code
 
api_coprs_by_owner_detail(copr)
Return detail of one project.
source code
 
api_auth_check() source code
 
copr_new_build(copr) source code
 
copr_new_build_upload(copr) source code
 
copr_new_build_pypi(copr) source code
 
copr_new_build_tito(copr)
@deprecated
source code
 
copr_new_build_mock(copr)
@deprecated
source code
 
copr_new_build_rubygems(copr) source code
 
copr_new_build_custom(copr) source code
 
copr_new_build_scm(copr) source code
 
copr_new_build_distgit(copr)
@deprecated
source code
 
process_creating_new_build(copr, form, create_new_build) source code
 
build_status(build_id) source code
 
build_detail(build_id) source code
 
cancel_build(build_id) source code
 
delete_build(build_id) source code
 
copr_modify(copr) source code
 
copr_modify_chroot(copr, chrootname)
Deprecated to copr_edit_chroot
source code
 
copr_edit_chroot(copr, chrootname) source code
 
copr_chroot_details(copr, chrootname)
Deprecated to copr_get_chroot
source code
 
copr_get_chroot(copr, chrootname) source code
 
api_coprs_search_by_project(project=None)
Return the list of coprs found in search by the given text.
source code
 
playground_list()
Return list of coprs which are part of playground
source code
 
monitor(copr) source code
 
copr_add_package(copr, source_type_text) source code
 
copr_edit_package(copr, package_name, source_type_text) source code
 
process_package_add_or_edit(copr, source_type_text, package=None) source code
 
get_package_record_params() source code
 
generate_package_list(query, params)
A lagging generator to stream JSON so we don't have to hold everything in memory This is a little tricky, as we need to omit the last comma to make valid JSON, thus we use a lagging generator, similar to http://stackoverflow.com/questions/1630320/
source code
 
copr_list_packages(copr) source code
 
copr_get_package(copr, package_name) source code
 
copr_delete_package(copr, package_name) source code
 
copr_reset_package(copr, package_name) source code
 
copr_build_package(copr, package_name) source code
 
copr_build_module(copr) source code
 
copr_build_config(copr, chroot)
Generate build configuration.
source code
Function Details [hide private]

api_home()

source code 

Render the home page of the api. This page provides information on how to call/use the API.

Decorators:
  • @api_ns.route("/")

api_new_token()

source code 

Generate a new API token for the current user.

Decorators:
  • @api_ns.route("/new/", methods= ["GET", "POST"])
  • @login_required

api_status()

source code 

Receive information about queue

Decorators:
  • @api_ns.route("/status")

api_new_copr(username)

source code 

Receive information from the user on how to create its new copr,
check their validity and create the corresponding copr.

:arg name: the name of the copr to add
:arg chroots: a comma separated list of chroots to use
:kwarg repos: a comma separated list of repository that this copr
    can use.
:kwarg initial_pkgs: a comma separated list of initial packages to
    build in this new copr

Decorators:
  • @api_ns.route("/coprs//new/", methods= ["POST"])
  • @api_login_required

api_copr_delete(copr)

source code 

Deletes selected user's project

Decorators:
  • @api_ns.route("/coprs///delete/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

api_copr_fork(copr)

source code 

Fork the project and builds in it

Decorators:
  • @api_ns.route("/coprs///fork/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

api_coprs_by_owner(username=None)

source code 
Return the list of coprs owned by the given user.
username is taken either from GET params or from the URL itself
(in this order).

:arg username: the username of the person one would like to the
    coprs of.

Decorators:
  • @api_ns.route("/coprs/")
  • @api_ns.route("/coprs//")

api_coprs_by_owner_detail(copr)

source code 
Return detail of one project.

:arg username: the username of the person one would like to the
    coprs of.
:arg coprname: the name of project.

Decorators:
  • @api_ns.route("/coprs///detail/")
  • @api_req_with_copr

api_auth_check()

source code 
Decorators:
  • @api_ns.route("/auth_check/", methods= ["POST"])
  • @api_login_required

copr_new_build(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_upload(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build_upload/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_pypi(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build_pypi/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_tito(copr)

source code 

@deprecated

Decorators:
  • @api_ns.route("/coprs///new_build_tito/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_mock(copr)

source code 

@deprecated

Decorators:
  • @api_ns.route("/coprs///new_build_mock/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_rubygems(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build_rubygems/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_custom(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build_custom/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_scm(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///new_build_scm/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_new_build_distgit(copr)

source code 

@deprecated

Decorators:
  • @api_ns.route("/coprs///new_build_distgit/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

build_status(build_id)

source code 
Decorators:
  • @api_ns.route("/coprs/build_status//", methods= ["GET"])
  • @api_login_required

build_detail(build_id)

source code 
Decorators:
  • @api_ns.route("/coprs/build_detail//", methods= ["GET"])
  • @api_ns.route("/coprs/build//", methods= ["GET"])

cancel_build(build_id)

source code 
Decorators:
  • @api_ns.route("/coprs/cancel_build//", methods= ["POST"])
  • @api_login_required

delete_build(build_id)

source code 
Decorators:
  • @api_ns.route("/coprs/delete_build//", methods= ["POST"])
  • @api_login_required

copr_modify(copr)

source code 
Decorators:
  • @api_ns.route('/coprs///modify/', methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_modify_chroot(copr, chrootname)

source code 

Deprecated to copr_edit_chroot

Decorators:
  • @api_ns.route('/coprs///modify//', methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_edit_chroot(copr, chrootname)

source code 
Decorators:
  • @api_ns.route('/coprs///chroot/edit//', methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_chroot_details(copr, chrootname)

source code 

Deprecated to copr_get_chroot

Decorators:
  • @api_ns.route('/coprs///detail//', methods= ["GET"])
  • @api_req_with_copr

copr_get_chroot(copr, chrootname)

source code 
Decorators:
  • @api_ns.route('/coprs///chroot/get//', methods= ["GET"])
  • @api_req_with_copr

api_coprs_search_by_project(project=None)

source code 

Return the list of coprs found in search by the given text. project is taken either from GET params or from the URL itself (in this order).

:arg project: the text one would like find for coprs.

Decorators:
  • @api_ns.route("/coprs/search/")
  • @api_ns.route("/coprs/search//")

playground_list()

source code 

Return list of coprs which are part of playground

Decorators:
  • @api_ns.route("/playground/list/")

monitor(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///monitor/", methods= ["GET"])
  • @api_req_with_copr

copr_add_package(copr, source_type_text)

source code 
Decorators:
  • @api_ns.route("/coprs///package/add//", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_edit_package(copr, package_name, source_type_text)

source code 
Decorators:
  • @api_ns.route("/coprs///package//edit//", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_list_packages(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///package/list/", methods= ["GET"])
  • @api_req_with_copr

copr_get_package(copr, package_name)

source code 
Decorators:
  • @api_ns.route("/coprs///package/get//", methods= ["GET"])
  • @api_req_with_copr

copr_delete_package(copr, package_name)

source code 
Decorators:
  • @api_ns.route("/coprs///package/delete//", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_reset_package(copr, package_name)

source code 
Decorators:
  • @api_ns.route("/coprs///package/reset//", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_build_package(copr, package_name)

source code 
Decorators:
  • @api_ns.route("/coprs///package/build//", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_build_module(copr)

source code 
Decorators:
  • @api_ns.route("/coprs///module/build/", methods= ["POST"])
  • @api_login_required
  • @api_req_with_copr

copr_build_config(copr, chroot)

source code 

Generate build configuration.

Decorators:
  • @api_ns.route("/coprs///build-config//", methods= ["GET"])
  • @api_ns.route("/g///build-config//", methods= ["GET"])
  • @api_req_with_copr