Make resources available based on required service extensions

Bug #1506875 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rabi Mishra

Bug Description

Neutron and some other services support number of service extensions. It would be good to make resources available based on the available service extensions.

ex. Make router, security-group, vpnaas, lbaas and other resources available based on the service extensions.

We can have 'has_extension' method on the client_plugins and then check it in 'is_service_available' of the Resource class.

ex.

os/neutron.py
---------------------
    def has_extension(self, alias):
        """Check if specific extension is present."""
        extensions = self.client().list_extensions().get('extensions')
        return alias in [extension.get('alias') for extension in extensions]

engine/resource.py
-----------------------------
    def is_service_available(cls, context):
            ......
            for service_type in service_types:
                endpoint_exists = client_plugin.does_endpoint_exist(
                    service_type=service_type,
                    service_name=cls.default_client_name)
                req_extension = cls.required_service_extension
                is_ext_available = (
                    not req_extension or client_plugin.has_extension(
                        req_extension))
                if endpoint_exists and is_ext_available:
                    return True

router.py
-------------
required_service_extension = 'router'

Rabi Mishra (rabi)
Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
summary: Make resources available based on required service extensions
- availability
Changed in heat:
importance: Undecided → Medium
status: New → Triaged
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/235932
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=f539f43855afdafe6521aedd78af5059c8587912
Submitter: Jenkins
Branch: master

commit f539f43855afdafe6521aedd78af5059c8587912
Author: Rabi Mishra <email address hidden>
Date: Fri Oct 16 18:10:26 2015 +0530

    Make neutron resources available based on service extensions

    Change-Id: Ie4780aa9ef81b1decf4a01ca616fa76a2d1b641e
    Partially-Closes-Bug: #1506875

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

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

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

Reviewed: https://review.openstack.org/238860
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=1af943aae7952fa5c5cf26ce8cd99989ceeefee0
Submitter: Jenkins
Branch: master

commit 1af943aae7952fa5c5cf26ce8cd99989ceeefee0
Author: Rabi Mishra <email address hidden>
Date: Tue Oct 20 17:34:15 2015 +0530

    Make nova resources available based on os-api ext

    This patch makes nova resources available based on
    available os-api service extensions.

    Change-Id: I4810493918af6ecb5bdad8f295733f9c9f7de32e
    Partial-Bug: #1506875

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/242350
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4e909f0d88f9679344689b4c9113662d4c2435ec
Submitter: Jenkins
Branch: master

commit 4e909f0d88f9679344689b4c9113662d4c2435ec
Author: Rabi Mishra <email address hidden>
Date: Fri Nov 6 11:15:58 2015 +0530

    Add caching for nova extensions

    This patch adds caching for nova extensions.

    Change-Id: I6170f1075a923b7fb2dfb50d4008ff9722fcee48
    Partial-Bug: #1506875

Rabi Mishra (rabi)
Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/256744

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/liberty)

Change abandoned by Sergey Kraynev (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/256744
Reason: @huangtianhua: thx. it's true. I have missed, that we have this fix on review.

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.