Register pages for the Instance peers and install bundle endpoints

This includes exposing a new interface for Page objects, Page.bytes,
to return the full bytestring contents of the response.
This commit is contained in:
Jeff Bradberry
2022-09-06 16:26:46 -04:00
parent 25afb8477e
commit 68a44529b6
4 changed files with 37 additions and 13 deletions

View File

@@ -48,9 +48,9 @@ class InstanceInstallBundle(GenericAPIView):
instance_obj = self.get_object()
# if the instance is not a hop or execution node than return 400
if instance_obj.node_type not in ('execution', 'hop'):
if instance_obj.node_type not in ('execution',):
return Response(
data=dict(msg=_('Install bundle can only be generated for execution or hop nodes.')),
data=dict(msg=_('Install bundle can only be generated for execution nodes.')),
status=status.HTTP_400_BAD_REQUEST,
)