File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ async def post(self):
5656 result = self ._manager .set_listing_limit (** body )
5757 if 'exclude_drive_name' in body :
5858 result = self ._manager .exclude_drive (** body )
59+ if 'include_drive_name' in body :
60+ result = self ._manager .include_drive (** body )
5961 self .finish (result )
6062
6163class ListJupyterDrivesHandler (JupyterDrivesAPIHandler ):
Original file line number Diff line number Diff line change @@ -188,6 +188,22 @@ def exclude_drive(self, exclude_drive_name):
188188
189189 return
190190
191+ def include_drive (self , include_drive_name ):
192+ """Include drive in listing.
193+
194+ Args:
195+ include_bucket_name: drive to include in listing
196+ """
197+ try :
198+ self ._excluded_drives .remove (include_drive_name );
199+ except Exception as e :
200+ raise tornado .web .HTTPError (
201+ status_code = httpx .codes .BAD_REQUEST ,
202+ reason = f"The following error occured when excluding the drive: { e } "
203+ )
204+
205+ return
206+
191207 async def list_drives (self ):
192208 """Get list of available drives.
193209
You can’t perform that action at this time.
0 commit comments