Made quantum networking configurable.
Added a context processor and check to make quantum networking configurable in the dashboard.
This commit is contained in:
parent
bccc0183c6
commit
44bdcff2ef
@ -38,3 +38,7 @@ def tenants(request):
|
||||
|
||||
def swift(request):
|
||||
return {'swift_configured': settings.SWIFT_ENABLED}
|
||||
|
||||
|
||||
def quantum(request):
|
||||
return {'quantum_configured': settings.QUANTUM_ENABLED}
|
||||
|
@ -64,6 +64,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django_openstack.context_processors.swift',
|
||||
'django_openstack.context_processors.tenants',
|
||||
'django_openstack.context_processors.quantum',
|
||||
)
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
|
@ -6,7 +6,9 @@
|
||||
<li><a {% if current_sidebar == "images" %} class="active" {% endif %} href="{% url dash_images request.user.tenant %}">Images</a></li>
|
||||
<li><a {% if current_sidebar == "snapshots" %} class="active" {% endif %} href="{% url dash_snapshots request.user.tenant %}">Snapshots</a></li>
|
||||
<li><a {% if current_sidebar == "keypairs" %} class="active" {% endif %} href="{% url dash_keypairs request.user.tenant %}">Keypairs</a></li>
|
||||
{% if quantum_configured %}
|
||||
<li><a {% if current_sidebar == "networks" %} class="active" {% endif %} href="{% url dash_networks request.user.tenant %}">Networks</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if swift_configured %}
|
||||
<h3>Manage Object Store</h3>
|
||||
|
@ -40,6 +40,7 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
|
||||
SWIFT_ENABLED = False
|
||||
|
||||
# Configure quantum connection details for networking
|
||||
QUANTUM_ENABLED = True
|
||||
QUANTUM_URL = '127.0.0.1'
|
||||
QUANTUM_PORT = '9696'
|
||||
QUANTUM_TENANT = '1234'
|
||||
|
Loading…
x
Reference in New Issue
Block a user