networkapi.api_vrf package¶
Submodules¶
networkapi.api_vrf.exceptions module¶
- exception networkapi.api_vrf.exceptions.VrfAssociatedToVirtualInterface(detail=None)[source]¶
Bases: rest_framework.exceptions.APIException
- default_detail = 'Error on deleting Vrf.'¶
- status_code = 400¶
- exception networkapi.api_vrf.exceptions.VrfAssociatedToVlanEquipment(detail=None)[source]¶
Bases: rest_framework.exceptions.APIException
- default_detail = 'Error on deleting Vrf.'¶
- status_code = 500¶
- exception networkapi.api_vrf.exceptions.VrfError(msg=None)[source]¶
Bases: rest_framework.exceptions.APIException
- default_detail = 'Error Internal.'¶
- status_code = 500¶
networkapi.api_vrf.facade module¶
- networkapi.api_vrf.facade.get_vrf_by_id(vrf_id)[source]¶
Return a vrf by id
Parameters: vrf_id – id of vrf
- networkapi.api_vrf.facade.get_vrfs_by_ids(vrf_ids)[source]¶
Return vrf list by ids
Parameters: vrf_ids – ids list
networkapi.api_vrf.models module¶
- class networkapi.api_vrf.models.Vrf(*args, **kwargs)[source]¶
Bases: networkapi.models.BaseModel.BaseModel
Vrf(id, vrf, internal_name)
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception Vrf.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- Vrf.ambiente_set¶
- Vrf.create(authenticated_user)[source]¶
Include new Vrf.
@return: Id new Vrf
@raise FilterNotFoundError: Dont’ exist filter for pk searched
- classmethod Vrf.get_by_pk(id_vrf)[source]¶
Get Vrf by id.
@return: Vrf.
@raise VrfNotFoundError: Vrf is not registered. @raise VrfError: Failed to search for the Vrf. @raise OperationalError: Lock wait timeout exceed
- Vrf.log = <celery.utils.log.ProcessAwareLogger object at 0x7fdee2e7ec10>¶
- Vrf.objects = <networkapi.models.BaseManager.BaseManager object at 0x7fdee2faf910>¶
- classmethod Vrf.remove(pk)[source]¶
Remove vrf.
@return: Nothing
@raise VrfNotFoundError: It doesn’ exist Vrf to searched id
@raise VrfRelatedToEnvironment: At least one Environment is using this Vrf
- @raise VrfAssociatedToVlanEquipment: At least one Vlan and Equipment are
- associated together to this Vrf
- classmethod Vrf.update(authenticated_user, pk, **kwargs)[source]¶
Change some Vrf.
@return: Nothing
@raise VrfNotFoundError: It doesn’t exist Vrf for searched pk.
@raise CannotDissociateFilterError: Filter in use, can’t be dissociated.
- Vrf.vrfequipment_set¶
- Vrf.vrfvlanequipment_set¶
- class networkapi.api_vrf.models.VrfEquipment(*args, **kwargs)[source]¶
Bases: networkapi.models.BaseModel.BaseModel
VrfEquipment(id, vrf_id, equipment_id, internal_name)
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception VrfEquipment.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- VrfEquipment.equipment¶
- VrfEquipment.log = <celery.utils.log.ProcessAwareLogger object at 0x7fdee2fafb50>¶
- VrfEquipment.objects = <networkapi.models.BaseManager.BaseManager object at 0x7fdee2fac2d0>¶
- VrfEquipment.vrf¶
- class networkapi.api_vrf.models.VrfVlanEquipment(*args, **kwargs)[source]¶
Bases: networkapi.models.BaseModel.BaseModel
VrfVlanEquipment(id, vrf_id, vlan_id, equipment_id)
- exception DoesNotExist¶
Bases: django.core.exceptions.ObjectDoesNotExist
- exception VrfVlanEquipment.MultipleObjectsReturned¶
Bases: django.core.exceptions.MultipleObjectsReturned
- VrfVlanEquipment.equipment¶
- VrfVlanEquipment.log = <celery.utils.log.ProcessAwareLogger object at 0x7fdee2fafb50>¶
- VrfVlanEquipment.objects = <networkapi.models.BaseManager.BaseManager object at 0x7fdee2fafe50>¶
- VrfVlanEquipment.vlan¶
- VrfVlanEquipment.vrf¶