diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2020-02-06 18:34:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2020-02-06 18:34:17 +0000 |
commit | 868dc419abbec2988dfe48cbd9d6f7cf56a48079 (patch) | |
tree | 7ce55022654d3fee68ed4833888a4f15590e61ae /src/api/serializers/booking_serializer.py | |
parent | 078273eb7db5a481a4131d44a943f3c9e34b6b88 (diff) | |
parent | 77377d5e9362bd35a3b300df231e82ee974675e1 (diff) |
Merge "Comments and Documentation"
Diffstat (limited to 'src/api/serializers/booking_serializer.py')
-rw-r--r-- | src/api/serializers/booking_serializer.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/api/serializers/booking_serializer.py b/src/api/serializers/booking_serializer.py index 9b5c059..46a2348 100644 --- a/src/api/serializers/booking_serializer.py +++ b/src/api/serializers/booking_serializer.py @@ -25,7 +25,8 @@ class BookingField(serializers.Field): def to_representation(self, booking): """ - Takes in a booking object. + Take in a booking object. + Returns a dictionary of primitives representing that booking """ ser = {} @@ -75,8 +76,7 @@ class BookingField(serializers.Field): def to_internal_value(self, data): """ - Takes in a dictionary of primitives - Returns a booking object + Take in a dictionary of primitives, and return a booking object. This is not going to be implemented or allowed. If someone needs to create a booking through the api, @@ -146,9 +146,7 @@ class InterfaceField(serializers.Field): pass def to_internal_value(self, data): - """ - takes in a serialized interface and creates an Interface model - """ + """Take in a serialized interface and creates an Interface model.""" mac = data['mac'] bus_address = data['busaddr'] switch_name = data['switchport']['switch_name'] |