| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 |
# you may not use this file except in compliance with the License. |
| 3 |
# You may obtain a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 9 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 |
# See the License for the specific language governing permissions and |
| 11 |
# limitations under the License. |
| 12 |
|
| 13 |
# Default to Horizons test settings to avoid any missing keys |
| 14 |
from horizon.test.settings import * # noqa |
| 15 |
from openstack_dashboard.test.settings import * # noqa |
| 16 |
|
| 17 |
# Update the dashboards with adjutant_ui |
| 18 |
import openstack_dashboard.enabled |
| 19 |
from openstack_dashboard.utils import settings |
| 20 |
|
| 21 |
import adjutant_ui.enabled |
| 22 |
|
| 23 |
# pop these keys to avoid log warnings about deprecation |
| 24 |
# update_dashboards will populate them anyway |
| 25 |
HORIZON_CONFIG.pop('dashboards', None) |
| 26 |
HORIZON_CONFIG.pop('default_dashboard', None) |
| 27 |
|
| 28 |
settings.update_dashboards( |
| 29 |
[ |
| 30 |
adjutant_ui.enabled, |
| 31 |
openstack_dashboard.enabled, |
| 32 |
], |
| 33 |
HORIZON_CONFIG, |
| 34 |
INSTALLED_APPS |
| 35 |
) |
| 36 |
|
| 37 |
# Ensure any duplicate apps are removed after the update_dashboards call |
| 38 |
INSTALLED_APPS = list(set(INSTALLED_APPS)) |