networkapi.system package

Submodules

networkapi.system.exceptions module

exception networkapi.system.exceptions.InvalidIdNameException(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Invalid Name for Variable.'
status_code = 400
exception networkapi.system.exceptions.InvalidIdValueException(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Invalid Value for Variable.'
status_code = 400
exception networkapi.system.exceptions.InvalidInputException(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Invalid input.'
status_code = 400
exception networkapi.system.exceptions.VariableDoesNotExistException(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Variable Does Not Exist.'
status_code = 404
exception networkapi.system.exceptions.VariableDuplicateNotExistException(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Variable already exists.'
status_code = 404
exception networkapi.system.exceptions.VariableError(detail=None)[source]

Bases: rest_framework.exceptions.APIException

default_detail = 'Falha ao inserir variavel.'
status_code = 404

networkapi.system.facade module

networkapi.system.facade.delete_variable(user, variable_id)[source]
networkapi.system.facade.get_all_variables()[source]
networkapi.system.facade.get_by_id(variable_id)[source]
networkapi.system.facade.get_by_name(name)[source]
networkapi.system.facade.get_value(name, default=None)[source]
networkapi.system.facade.save_variable(name, value, description)[source]

networkapi.system.models module

class networkapi.system.models.Variable(id, name, value, description)[source]

Bases: networkapi.models.BaseModel.BaseModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

log = <celery.utils.log.ProcessAwareLogger object>
objects = <networkapi.models.BaseManager.BaseManager object>

networkapi.system.permissions module

networkapi.system.serializers module

class networkapi.system.serializers.VariableSerializer(instance=None, data=None, files=None, context=None, partial=False, many=False, allow_add_remove=False, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]
fields = ('id', 'name', 'value', 'description')
model

alias of networkapi.system.models.Variable

base_fields = {}

networkapi.system.tests module

This file demonstrates writing tests using the unittest module. These will pass when you run “manage.py test”.

Replace this with more appropriate tests for your application.

class networkapi.system.tests.SimpleTest(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_basic_addition()[source]

Tests that 1 + 1 always equals 2.

networkapi.system.urls module

networkapi.system.views module

Module contents