Deprecate some APIs in the name of consistency

Bug #1657498 reported by Brian Curtin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
In Progress
Critical
Brian Curtin

Bug Description

While auditing our API names as we approach 1.0, we need to make some changes to bring some things in line with the precedents we set in the compute and later network APIs, mostly around additional behaviors of APIs outside of standard CRUD naming.

These should be deprecated for some time period to allow users to make the switches, and then later removed.

openstack/cluster/v1/_proxy.py
 cluster_add_nodes -> add_nodes_to_cluster
 cluster_del_nodes -> remove_nodes_from_cluster
 cluster_replace_nodes -> replace_nodes_in_cluster
 cluster_scale_out -> scale_out_cluster
 cluster_scale_in -> scale_in_cluster
 cluster_attach_policy -> attach_policy_to_cluster
 cluster_detach_policy -> detach_policy_from_cluster
 cluster_update_policy -> update_cluster_policy
openstack/network/v2/_proxy.py
 # The following two are not used by the SDK itself or by OSC,
 # they were early examples of actually using some of these
 # methods to do certain tasks.
 security_group_open_port -> remove and add to user guide
 security_group_allow_ping -> remove and add to user guide
openstack/object_store/v1/_proxy.py
 download_object -> remove and add to user guide, though with a more involved example
 get_object -> download_object

Revision history for this message
Brian Curtin (brian.curtin) wrote :

Note: I submitted a request to get libdeprecation into global-requirements so that we can use it to carry out these deprecations in an automated way. If that's approved, this will be pretty easy.

https://review.openstack.org/#/c/422069/

Revision history for this message
Ian Cordasco (icordasc) wrote : Re: [Bug 1657498] Re: Deprecate some APIs in the name of consistency

FYI openstack uses debtcollector for that if I'm remembering the name
properly.

On Jan 18, 2017 10:25 AM, "Brian Curtin" <email address hidden> wrote:

Note: I submitted a request to get libdeprecation into global-
requirements so that we can use it to carry out these deprecations in an
automated way. If that's approved, this will be pretty easy.

https://review.openstack.org/#/c/422069/

--
You received this bug notification because you are subscribed to
OpenStack SDK.
Matching subscriptions: python-openstacksdk, python-openstaksdk
https://bugs.launchpad.net/bugs/1657498

Title:
  Deprecate some APIs in the name of consistency

Status in OpenStack SDK:
  Confirmed

Bug description:
  While auditing our API names as we approach 1.0, we need to make some
  changes to bring some things in line with the precedents we set in the
  compute and later network APIs, mostly around additional behaviors of
  APIs outside of standard CRUD naming.

  These should be deprecated for some time period to allow users to make
  the switches, and then later removed.

  openstack/cluster/v1/_proxy.py
   cluster_add_nodes -> add_nodes_to_cluster
   cluster_del_nodes -> remove_nodes_from_cluster
   cluster_replace_nodes -> replace_nodes_in_cluster
   cluster_scale_out -> scale_out_cluster
   cluster_scale_in -> scale_in_cluster
   cluster_attach_policy -> attach_policy_to_cluster
   cluster_detach_policy -> detach_policy_from_cluster
   cluster_update_policy -> update_cluster_policy
  openstack/network/v2/_proxy.py
   # The following two are not used by the SDK itself or by OSC,
   # they were early examples of actually using some of these
   # methods to do certain tasks.
   security_group_open_port -> remove and add to user guide
   security_group_allow_ping -> remove and add to user guide
  openstack/object_store/v1/_proxy.py
   download_object -> remove and add to user guide, though with a more
involved example
   get_object -> download_object

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-openstacksdk/+bug/1657498/+subscriptions

Launchpad-Notification-Type: bug
Launchpad-Bug: product=python-openstacksdk; milestone=1.0;
status=Confirmed; importance=Critical; <email address hidden>;
Launchpad-Bug-Information-Type: Public
Launchpad-Bug-Private: no
Launchpad-Bug-Security-Vulnerability: no
Launchpad-Bug-Commenters: brian.curtin
Launchpad-Bug-Reporter: Brian Curtin (brian.curtin)
Launchpad-Bug-Modifier: Brian Curtin (brian.curtin)
Launchpad-Message-Rationale: Subscriber (OpenStack SDK)
Launchpad-Message-For: icordasc
Launchpad-Subscription: python-openstacksdk
Launchpad-Subscription: python-openstaksdk

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

Fix proposed to branch: master
Review: https://review.openstack.org/427898

Changed in python-openstacksdk:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/427898
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=e97a7550467ccf2bcd69bec57025c2b1d1ce615d
Submitter: Jenkins
Branch: master

commit e97a7550467ccf2bcd69bec57025c2b1d1ce615d
Author: Brian Curtin <email address hidden>
Date: Wed Feb 1 15:00:34 2017 -0500

    Adjust some proxy method names in cluster

    In auditing our proxy method names heading into the 1.0 release,
    where we'll need to be more careful about backwards compatibility,
    some names in the cluster proxy use structures that are different than
    we're using both around the other services and also within cluster
    itself. We've converged on several naming formats for add/remove,
    attach/detach, and several other grammar styles when naming operations
    that are done on a certain resource.

    This change introduces a deprecation decorator using the `deprecation`
    library, which was recently added to global-requirements. This is also
    the first change of several in the auditing process, just going
    alphabetical order through the services.

    The plan with these is that they're marked for deprecation in the
    next release (0.9.14), both here in the code and in the documentation
    via the deprecation library's ability to modify the docstring, which
    then shows up in our built documentation. In the meantime, we should
    help any users we know of—in this case we have cluster developers on
    this project—in updating calling code to use the newer format before
    1.0 happens.

    The following deprecations were made:
    * cluster_add_nodes -> add_nodes_to_cluster
    * cluster_del_nodes -> remove_nodes_from_cluster
    * cluster_replace_nodes -> replace_nodes_in_cluster
    * cluster_scale_out -> scale_out_cluster
    * cluster_scale_in -> scale_in_cluster
    * cluster_attach_policy -> attach_policy_to_cluster
    * cluster_detach_policy -> detach_policy_from_cluster
    * cluster_update_policy -> update_cluster_policy
    * cluster_operation -> perform_operation_on_cluster
    * node_operation -> perform_operation_on_node

    Partial-Bug: 1657498

    Change-Id: I3df0494f9ec0097aee7d47e05fb42094439bc4a4

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.