Flat exceptions hierarchy in nailgun

Bug #1566195 reported by Nikita Zubkov
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Wishlist
Nikita Zubkov
Mitaka
Fix Released
Wishlist
Nikita Zubkov
Newton
Fix Released
Wishlist
Nikita Zubkov

Bug Description

Detailed bug description:

nailgun.errors have a huge set of exceptions but without hierarchy, so if we want to handle for example network errors or deployment errors we need to specify all of them explicitly that is inconvenient.

Steps to reproduce:
open file nailgun/errors/__init__.py with your favorite editor

Expected results:
beautiful exception classes hierarchy that fits such marvelous piece of software as nailgun.

Actual result:
mess of text

Impact:
Standard python approach of exceptions is more flexible and convenient, need to switch.

Changed in fuel:
milestone: none → 9.0
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → Wishlist
status: New → Confirmed
information type: Public → Public Security
information type: Public Security → Public
Nikita Zubkov (zubchick)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Nikita Zubkov (zubchick)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

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

Reviewed: https://review.openstack.org/301632
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=d5a790caab694944b2fbcb320fc27afa57d71b23
Submitter: Jenkins
Branch: master

commit d5a790caab694944b2fbcb320fc27afa57d71b23
Author: Nikita Zubkov <email address hidden>
Date: Tue Apr 5 15:31:37 2016 +0300

    Add exceptions hierarchy

    nailgun.errors have a huge set of exceptions but without hierarchy. This
    patch remove exception generation from dict and make it explicitly with
    python classes and add some exceptions hierarchy. Now all network errors
    inherit from NetworkException and same for other exceptions.

    Change-Id: I9a2c6b358ea02a16711da74562308664ad7aed97
    Closes-bug: #1566195

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-nailgun-extension-cluster-upgrade (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/360086

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-nailgun-extension-cluster-upgrade (stable/mitaka)
Download full text (21.0 KiB)

Reviewed: https://review.openstack.org/360086
Committed: https://git.openstack.org/cgit/openstack/fuel-nailgun-extension-cluster-upgrade/commit/?id=40dd411fe461441e943de806f5de632eeb64dc4a
Submitter: Jenkins
Branch: stable/mitaka

commit 17ab5a3aaa7d2c4ae4652d1a4dc0410b31e7c47d
Author: Sergey Abramov <email address hidden>
Date: Wed Aug 24 18:32:39 2016 +0300

    Add create upgrade release handler

    Required for create new release just for upgrade, that have overwrited
    params. This params are valid for orig cluster release.

    Change-Id: Ib2387b9c2b74902c7289ee8f69a5f5d323ec82ca

commit 8de47e0dbf5955b3cbe59a3956e1ca1f4d8679ef
Author: Nikita Zubkov <email address hidden>
Date: Wed Aug 24 15:42:32 2016 +0300

    Add VIPs transformer

    Move upgrade vips code to the transformer

    Change-Id: Ia6935521b8b90b73fb74ba92859e7febf74c4ced

commit b54f9d4c29808c4561b20af508b85b9e40fa72b6
Author: Nikita Zubkov <email address hidden>
Date: Wed Aug 24 17:51:39 2016 +0300

    Move partition info transformation to extension

    octane have some dirty hacks to change volumes attributes using nailgun
    as a library, such modifications should be done in a extension

    Change-Id: I422bb368916f3a319e286edcc6103a2834097a87

commit b3ce0d348cc20ed988b5adf66474836f631eb12d
Author: Anastasiya <email address hidden>
Date: Mon Aug 1 15:47:13 2016 +0300

    Add tests for assign_node_to_cluster

    Change-Id: Iafa1baa6a1ca4d701ec89e49dd9d6f969804c82e

commit a764ba306dcd0cfb65a82c89f07ec0f3d129c66b
Author: Nikita Zubkov <email address hidden>
Date: Tue Aug 23 14:05:16 2016 +0300

    Update README

    Add instalation section

    Change-Id: Ib16132ab9c18d757e96e98304fdd8339ddf5497a

commit 95ff3a3598397bb6e3c68793051298aaa006d163
Author: Yuriy Taraday <email address hidden>
Date: Tue Aug 23 23:01:16 2016 +0300

    Add cluster transformations

    Implement transformations that are applied to cluster attributes during
    environment cloning.

    Conversion from text to text_list type has been limited to dns_list and
    ntp_list keys only to keep predictable behavior.

    Change-Id: I1ff596f850bd42243697cad1c1c35f0cf1386376

commit 163ce243fbade3dac05eb535ad2987687a57f87d
Author: Yuriy Taraday <email address hidden>
Date: Tue Aug 23 22:51:19 2016 +0300

    Add pluggable transformations for data migration

    This change introduces new transformation mechanism:
    - all available transformations are listed in setuptools entry points
      under namespace like this (for cluster transformations):

        nailgun.cluster_upgrade.transformations.cluster.9.0 =
            dns_list = ...
            ntp_list = ...
        nailgun.cluster_upgrade.transformations.cluster.8.0 =
            ...
        <etc>

    - config file will include section that specifies enabled
      transformations like this:

        CLUSTER_UPGRADE_TRANSFORMATIONS:
          cluster:
            9.0: dns_list ntp_list ...
            8.0: ...
            7.0: ...

      (only default values are implemented here, actual config support will
      follow)

    - when transformations...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/363812

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-nailgun-extension-cluster-upgrade (stable/mitaka)

Reviewed: https://review.openstack.org/364514
Committed: https://git.openstack.org/cgit/openstack/fuel-nailgun-extension-cluster-upgrade/commit/?id=8fd40e1e8c94465b8e962d497e1a3661283dfcfe
Submitter: Jenkins
Branch: stable/mitaka

commit 8fd40e1e8c94465b8e962d497e1a3661283dfcfe
Author: Nikita Zubkov <email address hidden>
Date: Thu Sep 1 21:57:23 2016 +0300

    Prepare extension for nailgun exceptions refactoring

    Change-Id: Ie9bc919aa1bb0c52c40d665c37356edda0c21b8c
    Partial-Bug: #1566195

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/mitaka)

Reviewed: https://review.openstack.org/363812
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=033e728dbcfb38884eb7f7d63f4e1252c50db712
Submitter: Jenkins
Branch: stable/mitaka

commit 033e728dbcfb38884eb7f7d63f4e1252c50db712
Author: Nikita Zubkov <email address hidden>
Date: Tue Apr 5 15:31:37 2016 +0300

    Add exceptions hierarchy

    nailgun.errors have a huge set of exceptions but without hierarchy. This
    patch remove exception generation from dict and make it explicitly with
    python classes and add some exceptions hierarchy. Now all network errors
    inherit from NetworkException and same for other exceptions.

    Change-Id: I9a2c6b358ea02a16711da74562308664ad7aed97
    Depends-On: Ie9bc919aa1bb0c52c40d665c37356edda0c21b8c
    Closes-bug: #1566195
    (cherry picked from commit d5a790caab694944b2fbcb320fc27afa57d71b23)

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.