blob: 30773224e0e20682397cbffaa264859ccfa45f71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.project import dashboard
class LoadBalancer(horizon.Panel):
name = _("Load Balancers")
slug = "loadbalancers"
permissions = ('openstack.services.network',)
network_config = (
getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {}) or
getattr(settings, 'OPENSTACK_QUANTUM_NETWORK', {})
)
if network_config.get('enable_lb'):
dashboard.Project.register(LoadBalancer)
|