Example #1
0
class CircuitTerminationSerializer(serializers.ModelSerializer):
    site = SiteNestedSerializer()
    interface = InterfaceNestedSerializer()

    class Meta:
        model = CircuitTermination
        fields = ['id', 'term_side', 'site', 'interface', 'port_speed', 'upstream_speed', 'xconnect_id', 'pp_info']
Example #2
0
class VLANSerializer(serializers.ModelSerializer):
    site = SiteNestedSerializer()
    group = VLANGroupNestedSerializer()
    tenant = TenantNestedSerializer()
    role = RoleNestedSerializer()

    class Meta:
        model = VLAN
        fields = ['id', 'site', 'group', 'vid', 'name', 'tenant', 'status', 'role', 'description', 'display_name']
Example #3
0
class VLANSerializer(serializers.ModelSerializer):
    site = SiteNestedSerializer()
    role = RoleNestedSerializer()

    class Meta:
        model = VLAN
        fields = [
            'id', 'site', 'vid', 'name', 'status', 'role', 'display_name'
        ]
Example #4
0
class PrefixSerializer(serializers.ModelSerializer):
    site = SiteNestedSerializer()
    vrf = VRFTenantSerializer()
    tenant = TenantNestedSerializer()
    vlan = VLANNestedSerializer()
    role = RoleNestedSerializer()

    class Meta:
        model = Prefix
        fields = ['id', 'family', 'prefix', 'site', 'vrf', 'tenant', 'vlan', 'status', 'role', 'description']
Example #5
0
class CircuitSerializer(serializers.ModelSerializer):
    provider = ProviderNestedSerializer()
    type = CircuitTypeNestedSerializer()
    site = SiteNestedSerializer()
    interface = InterfaceNestedSerializer()

    class Meta:
        model = Circuit
        fields = [
            'id', 'cid', 'provider', 'type', 'site', 'interface',
            'install_date', 'port_speed', 'commit_rate', 'xconnect_id',
            'comments'
        ]
Example #6
0
class CircuitSerializer(CustomFieldSerializer, serializers.ModelSerializer):
    provider = ProviderNestedSerializer()
    type = CircuitTypeNestedSerializer()
    tenant = TenantNestedSerializer()
    site = SiteNestedSerializer()
    interface = InterfaceNestedSerializer()

    class Meta:
        model = Circuit
        fields = [
            'id', 'cid', 'provider', 'type', 'tenant', 'site', 'interface',
            'install_date', 'port_speed', 'upstream_speed', 'commit_rate',
            'xconnect_id', 'comments', 'custom_fields'
        ]
Example #7
0
class VLANGroupSerializer(serializers.ModelSerializer):
    site = SiteNestedSerializer()

    class Meta:
        model = VLANGroup
        fields = ['id', 'name', 'slug', 'site']