Use entrypoints for registering dashboards and panels

Registered by Radomir Dopieralski

Summary
=======

Use setuptool's entrypoints mechanism for plugin discovery in Horizon.

Motivation
========

Setuptools's entrypoints are the default mechanism for implementing plugins and extensions in Python. Horizon currently doesn't use them, and instead relies on its configuration files and Django's import_module. This is going to become much harder when we switch the configuration format to data files, instead of Python code. Using the entrypoints to discover and load dashboards and panels is an easy solution for this problem.

Description
=========

We are going to use the Stevedore library (already used by other projects) to find all the available dashboard and panel plugins, import them and register them in Horizon. The plugins will still need to be explicitly enabled in configuration to become active.

UX
===

This blueprint doesn't affect the user interface.

Testing
======

A set of unit tests will be written verifying that all the default dashboards and panels are loaded properly.

In addition, an example plugin will be added to the documentation, with tests checking that it works properly.

Outside Dependencies
==================

A new library, Stevedore, is going to be added to the requirements.txt. That library already is present in global-requirements.

This will also affect all plugins for Horizon, as they will need to add the entrypoints definitions to their setup.py files.

Doc Impact
=========

The documentation on extending OpenStack Dashboard and on installing plugins will be affected.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Radomir Dopieralski
Direction:
Needs approval
Assignee:
Radomir Dopieralski
Definition:
Obsolete
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
Radomir Dopieralski
Completed by
David Lyle

Related branches

Sprints

Whiteboard

[david-lyle 2014.08.11] Moving out of Juno

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.