Don't count autodiscovered nodes as available
Also some small fixes: * include architecture when comparing nodes to flavors * display architecture when displaying flavors * call flavors "Flavors" and not "Node Profiles" * missing translation Change-Id: I1ff5c9974736606b851c10f01b2e186faf24c6a9
This commit is contained in:
parent
4184f6df9d
commit
9724ccdf83
@ -19,12 +19,12 @@ from tuskar_boxes.overview import forms
|
||||
|
||||
def flavor_nodes(request, flavor):
|
||||
"""Lists all nodes that match the given flavor exactly."""
|
||||
for node in api.node.Node.list(request):
|
||||
for node in api.node.Node.list(request, maintenance=False):
|
||||
if all([
|
||||
int(node.cpus) == int(flavor.vcpus),
|
||||
int(node.memory_mb) == int(flavor.ram),
|
||||
int(node.local_gb) == int(flavor.disk),
|
||||
# TODO(rdopieralski) add architecture when available
|
||||
node.cpu_arch == flavor.cpu_arch,
|
||||
]):
|
||||
yield node
|
||||
|
||||
@ -52,6 +52,7 @@ class IndexView(views.IndexView):
|
||||
'vcpus': flavor.vcpus,
|
||||
'ram': flavor.ram,
|
||||
'disk': flavor.disk,
|
||||
'cpu_arch': flavor.cpu_arch,
|
||||
'nodes': nodes,
|
||||
'roles': roles,
|
||||
}
|
||||
|
@ -16,12 +16,13 @@
|
||||
{% endspaceless %}{% endfor %}
|
||||
</div>
|
||||
|
||||
<h4>{% trans "Available Node Profiles" %}</h4>
|
||||
<h4>{% trans "Available Flavors" %}</h4>
|
||||
{% for flavor in flavors %}
|
||||
<div class="boxes-flavor" data-flavor="{{ flavor.name }}">
|
||||
<p>
|
||||
<strong>Node Profile:</strong>
|
||||
<strong>{% trans "Flavor:" %}</strong>
|
||||
<i>{{ flavor.name }}</i>
|
||||
{{ flavor.cpu_arch }},
|
||||
{{ flavor.vcpus }} CPU,
|
||||
{{ flavor.ram }}MB RAM,
|
||||
{{ flavor.disk }}GB Disk
|
||||
|
Loading…
x
Reference in New Issue
Block a user