Adding panels for trove

* Add python-troveclient to requirements.
* Add trove api to openstack_dashboard apis.
* Add Database Instances panel.
* Add Database Backups panel.

Authors:
* Robert Myers
* Denis Makogon
* Andrea Giardini

Implements: Blueprint trove-support

Change-Id: I0541534612ccb491d692168c3c9ca7a841650be6
This commit is contained in:
Robert Myers 2013-08-15 16:53:26 -05:00
parent 21f477d29f
commit 6203f1640c
2 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,7 @@ from openstack_dashboard.api import network
from openstack_dashboard.api import neutron
from openstack_dashboard.api import nova
from openstack_dashboard.api import swift
from openstack_dashboard.api import trove
assert base
assert cinder
@ -56,3 +57,4 @@ assert neutron
assert lbaas
assert swift
assert ceilometer
assert trove

View File

@ -38,6 +38,7 @@ from keystoneclient.v2_0 import client as keystone_client
from neutronclient.v2_0 import client as neutron_client
from novaclient.v1_1 import client as nova_client
from swiftclient import client as swift_client
from troveclient import client as trove_client
import httplib2
import mox
@ -264,6 +265,7 @@ class APITestCase(TestCase):
self._original_cinderclient = api.cinder.cinderclient
self._original_heatclient = api.heat.heatclient
self._original_ceilometerclient = api.ceilometer.ceilometerclient
self._original_troveclient = api.trove.troveclient
# Replace the clients with our stubs.
api.glance.glanceclient = lambda request: self.stub_glanceclient()
@ -274,6 +276,7 @@ class APITestCase(TestCase):
api.heat.heatclient = lambda request: self.stub_heatclient()
api.ceilometer.ceilometerclient = lambda request: \
self.stub_ceilometerclient()
api.trove.troveclient = lambda request: self.stub_troveclient()
def tearDown(self):
super(APITestCase, self).tearDown()
@ -284,6 +287,7 @@ class APITestCase(TestCase):
api.cinder.cinderclient = self._original_cinderclient
api.heat.heatclient = self._original_heatclient
api.ceilometer.ceilometerclient = self._original_ceilometerclient
api.trove.troveclient = self._original_troveclient
def stub_novaclient(self):
if not hasattr(self, "novaclient"):
@ -348,6 +352,12 @@ class APITestCase(TestCase):
CreateMock(ceilometer_client.Client)
return self.ceilometerclient
def stub_troveclient(self):
if not hasattr(self, "troveclient"):
self.mox.StubOutWithMock(trove_client, 'Client')
self.troveclient = self.mox.CreateMock(trove_client.Client)
return self.troveclient
@unittest.skipUnless(os.environ.get('WITH_SELENIUM', False),
"The WITH_SELENIUM env variable is not set.")