From 8d3082fcdfc771c8d17e67049bf7d5837068f96d Mon Sep 17 00:00:00 2001 From: Timur Nurlygayanov Date: Thu, 28 Mar 2013 14:08:07 +0400 Subject: [PATCH] Fixed issue with sessions. --- tabula/tabula/templates/_service_logs.html | 4 +++- tabula/tabula/templates/_services.html | 18 ++++-------------- tabula/tabula/windc/api.py | 6 ++++++ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/tabula/tabula/templates/_service_logs.html b/tabula/tabula/templates/_service_logs.html index c02519e..c82acba 100644 --- a/tabula/tabula/templates/_service_logs.html +++ b/tabula/tabula/templates/_service_logs.html @@ -1,5 +1,7 @@ {% load i18n %} -LOGs +
+

{% trans "Service Logs" %}

+
   {{ service.operation }}
 
\ No newline at end of file diff --git a/tabula/tabula/templates/_services.html b/tabula/tabula/templates/_services.html index 3749f9c..6a1fbb7 100644 --- a/tabula/tabula/templates/_services.html +++ b/tabula/tabula/templates/_services.html @@ -1,17 +1,7 @@ {% load i18n %}
-

{% trans "Service Logs" %}

- -
- - - - {% url horizon:project:instances:console instance.id as console_url %} - {% trans "View Full Log" %} -
-
- -
-  {{ service.operation }}
-
\ No newline at end of file +

{% trans "Service Details" %}

+ Name: {{ service.name }} + ID: {{ service.id }} + \ No newline at end of file diff --git a/tabula/tabula/windc/api.py b/tabula/tabula/windc/api.py index 7722212..8e06bee 100644 --- a/tabula/tabula/windc/api.py +++ b/tabula/tabula/windc/api.py @@ -81,6 +81,8 @@ def services_list(request, datacenter_id): for s in sessions: if s.state in ['open', 'deploying']: session_id = s.id + else: + windcclient(request).sessions.delete(datacenter_id, s.id) if session_id is None: session_id = windcclient(request).sessions.configure(datacenter_id).id @@ -101,6 +103,8 @@ def get_active_directories(request, datacenter_id): for s in sessions: if s.state in ['open', 'deploying']: session_id = s.id + else: + windcclient(request).sessions.delete(datacenter_id, s.id) if session_id is None: session_id = windcclient(request).sessions.configure(datacenter_id).id @@ -144,6 +148,8 @@ def get_status_message_for_service(request, service_id): for s in sessions: if s.state in ['open', 'deploying']: session_id = s.id + else: + windcclient(request).sessions.delete(datacenter_id, s.id) if session_id is None: session_id = windcclient(request).sessions.configure(datacenter_id).id