scram.route_manager package

Subpackages

Submodules

scram.route_manager.admin module

class scram.route_manager.admin.ActionTypeAdmin(model, admin_site)

Bases: SimpleHistoryAdmin

list_display = ('name', 'available')
list_filter = ('available',)
property media

scram.route_manager.apps module

class scram.route_manager.apps.RouteManagerConfig(app_name, app_module)

Bases: AppConfig

name = 'scram.route_manager'

scram.route_manager.authentication_backends module

class scram.route_manager.authentication_backends.ESnetAuthBackend(*args, **kwargs)

Bases: OIDCAuthenticationBackend

create_user(claims)

Return object for a newly created user account.

update_groups(user, claims)

Sets the users group(s) to whatever is in the claims.

update_user(user, claims)

Update existing user with new claims, if necessary save, and return user

scram.route_manager.context_processors module

scram.route_manager.context_processors.login_logout(request)

scram.route_manager.models module

class scram.route_manager.models.ActionType(*args, **kwargs)

Bases: Model

Defines an action that can be done with a given route. e.g. Block, shunt, redirect, etc.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

available

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

client_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

entry_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

websocketsequenceelement_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class scram.route_manager.models.Client(*args, **kwargs)

Bases: Model

Any client that would like to hit the API to add entries (e.g. Zeek)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

authorized_actiontypes

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

hostname

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_authorized

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
uuid

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class scram.route_manager.models.Entry(*args, **kwargs)

Bases: Model

An instance of an action taken on a route.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

actiontype

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

actiontype_id
comment

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

delete(*args, **kwargs)
expiration

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

expiration_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_change_reason()
get_next_by_expiration(*, field=<django.db.models.fields.DateTimeField: expiration>, is_next=True, **kwargs)
get_next_by_when(*, field=<django.db.models.fields.DateTimeField: when>, is_next=True, **kwargs)
get_previous_by_expiration(*, field=<django.db.models.fields.DateTimeField: expiration>, is_next=False, **kwargs)
get_previous_by_when(*, field=<django.db.models.fields.DateTimeField: when>, is_next=False, **kwargs)
history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
route

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

route_id
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

when

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

who

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class scram.route_manager.models.IgnoreEntry(*args, **kwargs)

Bases: Model

For cidrs you NEVER want to block ie don’t shoot yourself in the foot list

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

comment

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
route

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class scram.route_manager.models.Route(*args, **kwargs)

Bases: Model

Model describing a route

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

entry_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_absolute_url()
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
route

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

uuid

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class scram.route_manager.models.WebSocketMessage(*args, **kwargs)

Bases: Model

Defines a single message sent to downstream translators via WebSocket.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

msg_data

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

msg_data_route_field

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

msg_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
websocketsequenceelement_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class scram.route_manager.models.WebSocketSequenceElement(*args, **kwargs)

Bases: Model

In a sequence of messages, defines a single element.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

VERB_CHOICES = [('A', 'Add'), ('C', 'Check'), ('R', 'Remove')]
action_type

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

action_type_id
get_verb_display(*, field=<django.db.models.fields.CharField: verb>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
order_num

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

verb

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

websocketmessage

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

websocketmessage_id

scram.route_manager.urls module

scram.route_manager.views module

class scram.route_manager.views.EntryDetailView(**kwargs)

Bases: PermissionRequiredMixin, DetailView

model

alias of Entry

permission_required = ['route_manager.view_entry']
template_name = 'route_manager/entry_detail.html'
class scram.route_manager.views.EntryListView(**kwargs)

Bases: ListView

get_context_data(**kwargs)

Get the context for this view.

model

alias of Entry

template_name = 'route_manager/entry_list.html'
scram.route_manager.views.add_entry(request)
scram.route_manager.views.delete_entry(request, pk)
scram.route_manager.views.home_page()
scram.route_manager.views.process_expired(request)
scram.route_manager.views.search_entries(request)

Module contents