diagnostic package

Submodules

diagnostic.apps module

Defines the application configuration for the diagnostic application

class diagnostic.apps.DiagnosticConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

Configuration for the diagnostic app

label = u'diagnostic'
name = u'diagnostic'
ready()

Registers the diagnostic errors

verbose_name = u'Diagnostic'

diagnostic.exceptions module

Defines the exceptions related to diagnostics

exception diagnostic.exceptions.TestException

Bases: error.exceptions.ScaleError

Error class indicating that a test error occurred

get_log_message()

See error.exceptions.ScaleError.get_log_message()

diagnostic.urls module

Defines the URLs for the RESTful diagnostic services

diagnostic.views module

class diagnostic.views.QueueScaleBakeView(**kwargs)

Bases: rest_framework.generics.GenericAPIView

This view is the endpoint for queuing new Scale Bake jobs.

get_serializer_class()

Returns the appropriate serializer based off the requests version of the REST API.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
post(request)

Determine api version and call specific method

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
post_v6(request)

Handles v6 post request

Parameters:request (rest_framework.request.Request) – the HTTP GET request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
queryset
queue_bake_jobs(request)

Creates and queues the specified number of Scale Bake jobs

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
class diagnostic.views.QueueScaleCasinoView(**kwargs)

Bases: rest_framework.generics.GenericAPIView

This view is the endpoint for queuing new Scale Casino recipes.

get_serializer_class()

Returns the appropriate serializer based off the requests version of the REST API.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
post(request)

Determine api version and call specific method

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
post_v6(request)

Handles v6 post request

Parameters:request (rest_framework.request.Request) – the HTTP GET request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
queryset
queue_casino_recipes(request)

Creates and queues the specified number of Scale Casino recipes

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
class diagnostic.views.QueueScaleCountView(**kwargs)

Bases: rest_framework.generics.GenericAPIView

This view is the endpoint for queuing new Scale Count jobs.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
post(request)

Determine api version and call specific method

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
post_v6(request)

Handles v6 post request

Parameters:request (rest_framework.request.Request) – the HTTP GET request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
queryset
queue_count_jobs(request)

Creates and queues the specified number of Scale Count jobs

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
serializer_class

alias of QueueStatusSerializerV6

class diagnostic.views.QueueScaleHelloView(**kwargs)

Bases: rest_framework.generics.GenericAPIView

This view is the endpoint for queuing new Scale Hello jobs.

get_serializer_class()

Returns the appropriate serializer based off the requests version of the REST API.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
post(request)

Determine api version and call specific method

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
post_v6(request)

Handles v6 post request

Parameters:request (rest_framework.request.Request) – the HTTP GET request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
queryset
queue_hello_jobs(request)

Creates and queues the specified number of Scale Hello jobs

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
class diagnostic.views.QueueScaleRouletteView(**kwargs)

Bases: rest_framework.generics.GenericAPIView

This view is the endpoint for queuing new Scale Roulette jobs.

get_serializer_class()

Returns the appropriate serializer based off the requests version of the REST API.

parser_classes = (<class 'rest_framework.parsers.JSONParser'>,)
post(request)

Determine api version and call specific method

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
post_v6(request)

Handles v6 post request

Parameters:request (rest_framework.request.Request) – the HTTP GET request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user
queryset
queue_roulette_jobs(request)

Creates and queues the specified number of Scale Roulette jobs

Parameters:request (rest_framework.request.Request) – the HTTP POST request
Return type:rest_framework.response.Response
Returns:the HTTP response to send back to the user

Module contents