From 845582b7f490c75c88f270a6fa27dce5883d25bc Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Aug 02 2018 08:44:48 +0000 Subject: [python] add a migration table from legacy api to apiv3 --- diff --git a/python/docs/ClientV1.rst b/python/docs/ClientV1.rst index b95bdbb..5a78a9f 100644 --- a/python/docs/ClientV1.rst +++ b/python/docs/ClientV1.rst @@ -1,6 +1,10 @@ Legacy client ============= +.. warning:: + Legacy client is obsolete, please use Client version 3 instead. :ref:`This document ` describes the migration process. + + All interaction are done through copr.CoprClient. It can be created directly or using config file :file:`/etc/copr.conf` diff --git a/python/docs/ClientV2.rst b/python/docs/ClientV2.rst index 7d9d36f..8fccf9b 100644 --- a/python/docs/ClientV2.rst +++ b/python/docs/ClientV2.rst @@ -1,6 +1,10 @@ Client version 2 ================ +.. warning:: + Client version 2 is obsolete, please use Client version 3 instead. + + New package copr.ClientV2 supports APIv2 and should eventually replace older one. New API and Client_v2 provides more simple and uniform approach for communication with the Copr service. diff --git a/python/docs/client_v3/migration.rst b/python/docs/client_v3/migration.rst new file mode 100644 index 0000000..e7c5091 --- /dev/null +++ b/python/docs/client_v3/migration.rst @@ -0,0 +1,99 @@ +.. _migration: + +Migration +========= + +This document should simplify the process of migration from Legacy API (version 1) to the APIv3. +It provides a table of Legacy API client functions and their APIv3 alternatives. Some of the functions got removed +because they were obsolete for a long time, but on the other hand, some functions did more than just one thing, +so they split into multiple smaller functions. + + ++-------------------------------------+-------------------------------------------------------------+ +| Legacy API function | APIv3 alternative | +| | | ++=====================================+=============================================================+ +| ``authentication_check(...)`` | ``general_proxy.auth_check`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_build_details(...)`` | ``build_proxy.get`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``cancel_build(...)`` | ``build_proxy.cancel`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``delete_build(...)`` | ``build_proxy.delete`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build(...)`` | ``build_proxy.create_from_url``, | +| | ``build_proxy.create_from_urls``, | +| | ``build_proxy.create_from_file`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_pypi(...)`` | ``build_proxy.create_from_pypi`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_tito(...)`` | Removed, use ``build_proxy.create_from_scm`` instead | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_mock(...)`` | Removed, use ``build_proxy.create_from_scm`` instead | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_scm(...)`` | ``build_proxy.create_from_scm`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_rubygems(...)`` | ``build_proxy.create_from_rubygems`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_distgit(...)`` | Removed, use ``build_proxy.create_from_scm`` instead | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_new_build_custom(...)`` | ``build_proxy.create_from_custom`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_package_tito(...)`` | Removed, tito packages are now SCM packages | ++-------------------------------------+-------------------------------------------------------------+ +| ``add_package_tito(...)`` | Removed, tito packages are now SCM packages | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_package_pypi(...)`` | ``package_proxy.edit`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``add_package_pypi(...)`` | ``package_proxy.add`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_package_mockscm(...)`` | Removed, mock packages are now SCM packages | ++-------------------------------------+-------------------------------------------------------------+ +| ``add_package_mockscm(...)`` | Removed, mock packages are now SCM packages | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_package_scm(...)`` | ``package_proxy.edit`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``add_package_scm(...)`` | ``package_proxy.add`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_package_rubygems(...)`` | ``package_proxy.edit`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``add_package_rubygems(...)`` | ``package_proxy.add`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_packages_list(...)`` | ``package_proxy.get_list`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_package(...)`` | ``package_proxy.get`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``delete_package(...)`` | ``package_proxy.delete`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``reset_package(...)`` | ``package_proxy.reset`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``build_package(...)`` | ``package_proxy.build`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_project_details(...)`` | ``project_proxy.get`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``delete_project(...)`` | ``project_proxy.delete`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``fork_project(...)`` | ``project_proxy.fork`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``create_project(..)`` | ``project_proxy.add`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``modify_project(...)`` | ``project_proxy.edit`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_projects_list(...)`` | ``project_proxy.get_list`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``edit_chroot(...)`` | ``project_chroot_proxy.edit`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_chroot(...)`` | ``project_chroot_proxy.get`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_project_chroot_details(...)`` | Removed, use ``project_chroot_proxy.get`` instead | ++-------------------------------------+-------------------------------------------------------------+ +| ``search_projects(...)`` | ``project_proxy.search`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_build_config(...)`` | ``project_chroot_proxy.get_build_config`` | ++-------------------------------------+-------------------------------------------------------------+ +| ``get_module_repo(...)`` | Removed | ++-------------------------------------+-------------------------------------------------------------+ +| ``build_module(...)`` | ``module_proxy.build_from_url``, | +| | ``module_proxy.build_from_file`` | ++-------------------------------------+-------------------------------------------------------------+ +