Fix amulet tests, renamed plugin relation to be a little more discriptive and fixed charm lint

This commit is contained in:
Liam Young
2015-09-10 14:09:17 +00:00
parent 218a1559ac
commit 5dc0e5b50e
5 changed files with 10 additions and 11 deletions

View File

@@ -244,12 +244,12 @@ def update_nrpe_config():
nrpe_setup.write()
@hooks.hook('plugin-relation-joined')
@hooks.hook('dashboard-plugin-relation-joined')
def plugin_relation_joined():
relation_set(release=os_release("openstack-dashboard"))
@hooks.hook('plugin-relation-changed')
@hooks.hook('dashboard-plugin-relation-changed')
@restart_on_change(restart_map())
def update_plugin_config():
CONFIGS.write(LOCAL_SETTINGS)

View File

@@ -4,7 +4,7 @@ maintainer: Adam Gandelman <adamg@canonical.com>
description: |
The OpenStack Dashboard provides a full feature web interface for interacting
with instances, images, volumes and networks within an OpenStack deployment.
categories: ["misc"]
tags: ["misc"]
provides:
nrpe-external-master:
interface: nrpe-external-master
@@ -17,8 +17,8 @@ requires:
ha:
interface: hacluster
scope: container
plugin:
interface: horizon-plugin
dashboard-plugin:
interface: dashboard-plugin
scope: container
peers:
cluster:

View File

@@ -130,14 +130,13 @@ class OpenstackDashboardBasicDeployment(OpenStackAmuletDeployment):
def test_services(self):
"""Verify the expected services are running on the corresponding
service units."""
dashboard_services = ['service apache2 status']
dashboard_services = ['apache2']
commands = {
self.keystone_sentry: ['status keystone'],
self.openstack_dashboard_sentry: dashboard_services
services = {
self.keystone_sentry: ['keystone'],
self.openstack_dashboard_sentry: dashboard_services,
}
ret = u.validate_services(commands)
ret = u.validate_services_by_name(services)
if ret:
amulet.raise_status(amulet.FAIL, msg=ret)