Browse Source

Merge "trivial: Add TODOs for remaining function-based views"

tags/16.0.0.0b2
Zuul 1 week ago
parent
commit
10bb108cb8

+ 6
- 0
openstack_auth/views.py View File

@@ -50,6 +50,7 @@ except AttributeError:
50 50
 LOG = logging.getLogger(__name__)
51 51
 
52 52
 
53
+# TODO(stephenfin): Migrate to CBV
53 54
 @sensitive_post_parameters()
54 55
 @csrf_protect
55 56
 @never_cache
@@ -152,6 +153,7 @@ def login(request):
152 153
     return res
153 154
 
154 155
 
156
+# TODO(stephenfin): Migrate to CBV
155 157
 @sensitive_post_parameters()
156 158
 @csrf_exempt
157 159
 @never_cache
@@ -179,6 +181,7 @@ def websso(request):
179 181
     return django_http.HttpResponseRedirect(settings.LOGIN_REDIRECT_URL)
180 182
 
181 183
 
184
+# TODO(stephenfin): Migrate to CBV
182 185
 def logout(request, login_url=None, **kwargs):
183 186
     """Logs out the user if he is logged in. Then redirects to the log-in page.
184 187
 
@@ -205,6 +208,7 @@ def logout(request, login_url=None, **kwargs):
205 208
                                                    **kwargs)
206 209
 
207 210
 
211
+# TODO(stephenfin): Migrate to CBV
208 212
 @login_required
209 213
 def switch(request, tenant_id, redirect_field_name=auth.REDIRECT_FIELD_NAME):
210 214
     """Switches an authenticated user from one project to another."""
@@ -256,6 +260,7 @@ def switch(request, tenant_id, redirect_field_name=auth.REDIRECT_FIELD_NAME):
256 260
     return response
257 261
 
258 262
 
263
+# TODO(stephenfin): Migrate to CBV
259 264
 @login_required
260 265
 def switch_region(request, region_name,
261 266
                   redirect_field_name=auth.REDIRECT_FIELD_NAME):
@@ -279,6 +284,7 @@ def switch_region(request, region_name,
279 284
     return response
280 285
 
281 286
 
287
+# TODO(stephenfin): Migrate to CBV
282 288
 @login_required
283 289
 def switch_keystone_provider(request, keystone_provider=None,
284 290
                              redirect_field_name=auth.REDIRECT_FIELD_NAME):

+ 3
- 0
openstack_dashboard/dashboards/project/api_access/views.py View File

@@ -86,6 +86,7 @@ def _get_openrc_credentials(request):
86 86
     }
87 87
 
88 88
 
89
+# TODO(stephenfin): Migrate to CBV
89 90
 def download_ec2_bundle(request):
90 91
     tenant_name = request.user.tenant_name
91 92
 
@@ -118,6 +119,7 @@ def download_ec2_bundle(request):
118 119
     return response
119 120
 
120 121
 
122
+# TODO(stephenfin): Migrate to CBV
121 123
 def download_rc_file(request):
122 124
     template = settings.OPENRC_CUSTOM_TEMPLATE
123 125
 
@@ -137,6 +139,7 @@ def download_rc_file(request):
137 139
     return _download_rc_file_for_template(request, context, template)
138 140
 
139 141
 
142
+# TODO(stephenfin): Migrate to CBV
140 143
 def download_clouds_yaml_file(request):
141 144
     template = settings.OPENSTACK_CLOUDS_YAML_CUSTOM_TEMPLATE
142 145
 

+ 6
- 0
openstack_dashboard/dashboards/project/instances/views.py View File

@@ -271,6 +271,7 @@ class LaunchInstanceView(workflows.WorkflowView):
271 271
         return initial
272 272
 
273 273
 
274
+# TODO(stephenfin): Migrate to CBV
274 275
 def console(request, instance_id):
275 276
     data = _('Unable to get log for instance "%s".') % instance_id
276 277
     tail = request.GET.get('length')
@@ -287,6 +288,7 @@ def console(request, instance_id):
287 288
     return http.HttpResponse(data.encode('utf-8'), content_type='text/plain')
288 289
 
289 290
 
291
+# TODO(stephenfin): Migrate to CBV
290 292
 def auto_console(request, instance_id):
291 293
     console_type = settings.CONSOLE_TYPE
292 294
     try:
@@ -300,6 +302,7 @@ def auto_console(request, instance_id):
300 302
         exceptions.handle(request, msg, redirect=redirect)
301 303
 
302 304
 
305
+# TODO(stephenfin): Migrate to CBV
303 306
 def vnc(request, instance_id):
304 307
     try:
305 308
         instance = api.nova.server_get(request, instance_id)
@@ -311,6 +314,7 @@ def vnc(request, instance_id):
311 314
         exceptions.handle(request, msg, redirect=redirect)
312 315
 
313 316
 
317
+# TODO(stephenfin): Migrate to CBV
314 318
 def mks(request, instance_id):
315 319
     try:
316 320
         instance = api.nova.server_get(request, instance_id)
@@ -322,6 +326,7 @@ def mks(request, instance_id):
322 326
         exceptions.handle(request, msg, redirect=redirect)
323 327
 
324 328
 
329
+# TODO(stephenfin): Migrate to CBV
325 330
 def spice(request, instance_id):
326 331
     try:
327 332
         instance = api.nova.server_get(request, instance_id)
@@ -334,6 +339,7 @@ def spice(request, instance_id):
334 339
         exceptions.handle(request, msg, redirect=redirect)
335 340
 
336 341
 
342
+# TODO(stephenfin): Migrate to CBV
337 343
 def rdp(request, instance_id):
338 344
     try:
339 345
         instance = api.nova.server_get(request, instance_id)

+ 1
- 0
openstack_dashboard/views.py View File

@@ -40,6 +40,7 @@ def get_user_home(user):
40 40
     return dashboard.get_absolute_url()
41 41
 
42 42
 
43
+# TODO(stephenfin): Migrate to CBV
43 44
 @django.views.decorators.vary.vary_on_cookie
44 45
 def splash(request):
45 46
     if not request.user.is_authenticated:

Loading…
Cancel
Save