Commit 361d9464 authored by Stavros Sachtouris's avatar Stavros Sachtouris

Merge branch 'develop' of https://code.grnet.gr/git/synnefo into develop

parents 7dd7bc38 535c9b6b
......@@ -26,6 +26,10 @@ Astakos
of its `reference' application (current definition). Lock Project rather
than Chain (the latter is semantically obsolete).
* Project states "Active - Pending" and "Suspended - Pending" have been
removed. In management command `project-list', the existence of a pending
modification is indicated by a non-blank `Pending AppID'.
* Improve recording of project, application, and membership actions.
* Implement API calls for projects.
......
......@@ -42,34 +42,24 @@ from ._common import is_uuid, is_email
class Command(SynnefoCommand):
help = """
List projects and project status.
help = """List projects and project status.
Project status can be one of:
Pending an application <AppId> for a new project
Pending an uninitialized project, pending review
Active an active project
Active - Pending an active project with
a pending modification <AppId>
Denied an application for a new project,
denied by the admin
Denied an uninitialized project, denied by the admin
Dismissed a denied project, dismissed by the applicant
Cancelled an application for a new project,
cancelled by the applicant
Cancelled an uninitialized project, cancelled by the applicant
Suspended a project suspended by the admin;
it can later be resumed
Suspended - Pending a suspended project with
a pending modification <AppId>
Terminated a terminated project; its name can be claimed
by a new project
"""
by a new project"""
option_list = SynnefoCommand.option_list + (
make_option('--all',
......@@ -81,7 +71,7 @@ class Command(SynnefoCommand):
action='store_true',
dest='new',
default=False,
help="List only new project applications"),
help="List only new pending uninitialized projects"),
make_option('--modified',
action='store_true',
dest='modified',
......
......@@ -110,10 +110,10 @@ def get_available_backends(flavor):
if disk_template.startswith("ext_"):
disk_template = "ext"
backends = Backend.objects.select_for_update()
backends = backends.filter(offline=False, drained=False,
disk_templates__contains=disk_template)
backends = list(backends)
backends = Backend.objects.select_for_update().filter(offline=False,
drained=False)
backends = filter(lambda b: disk_template in b.disk_templates,
list(backends))
if "SNF:ANY_PUBLIC" in DEFAULT_INSTANCE_NETWORKS:
backends = filter(lambda x: has_free_ip(x), backends)
return backends
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment