Bug 1041873 - [RFE][keystone]: Update Driver base objects for Keystone pluggable systems to use ABCMeta metaclass
Summary: [RFE][keystone]: Update Driver base objects for Keystone pluggable systems to...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M1
: 5.0 (RHEL 7)
Assignee: RHOS Maint
QA Contact: Udi Kalifon
URL: https://blueprints.launchpad.net/keys...
Whiteboard: upstream_milestone_icehouse-1 upstrea...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 19:49 UTC by RHOS Integration
Modified: 2016-04-26 22:50 UTC (History)
6 users (show)

Fixed In Version: openstack-keystone-2014.1-4.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-22 11:48:57 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0854 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement - Identity 2014-07-08 19:22:33 UTC

Description RHOS Integration 2013-12-12 19:49:21 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/keystone/+spec/abstract-base-class-drivers.

Description:

The keystone driver classes (e.g. token, provider, assignment, identity, etc) should be updated to utilize the ABCMeta (abc module) metaclass.

The drivers should be actual abstract classes, since that is what they effectively are.  This functionality is used in Neutron, Ironic, and Ceilometer.  This will also help to push error discovery at class instantiation time instead of during a method call at some indeterminate time in the future.  This also will allow base functionality to be implemented in the driver methods that can be called via super() but not break the method overriding requirement in subclasses. 

PEP describing the use of ABCs
http://www.python.org/dev/peps/pep-3119/

This implementation should utilize six to be py3k compatible.

Example:

class AbstractBaseClassTest(six.with_metaclass(abc.ABCMeta)):
    @abc.abstractmethod
    def abstract_method1(int_arg):
        # we can do something here instead of raising
        # NotImplemented()
        return (int_arg + 1)

Specification URL (additional information):

None

Comment 2 Stephen Gordon 2014-01-23 20:48:06 UTC
Moving to POST based on upstream status (Implemented).


Note You need to log in before you can comment on or make changes to this bug.