Skip to content

Commit

Permalink
chore(vdp): encap list pipeline visibility parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joremysh committed Oct 14, 2024
1 parent f3d0bec commit 7b5283a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions instill/clients/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,20 @@ def lookup_pipeline(
@grpc_handler
def list_public_pipelines(
self,
visibility: pipeline_interface.Pipeline.Visibility.ValueType,
order_by: str,
is_public: bool = True,
filter_str: str = "",
next_page_token: str = "",
total_size: int = 100,
show_deleted: bool = False,
async_enabled: bool = False,
) -> pipeline_interface.ListPipelinesResponse:
visibility = (
pipeline_interface.Pipeline.Visibility.VISIBILITY_PUBLIC
if is_public
else pipeline_interface.Pipeline.Visibility.VISIBILITY_PRIVATE
)

if async_enabled:
return RequestFactory(
method=self.host.async_client.ListPipelines,
Expand Down Expand Up @@ -193,14 +199,20 @@ def list_public_pipelines(
def list_pipelines(
self,
namespace_id: str,
visibility: pipeline_interface.Pipeline.Visibility.ValueType,
order_by: str,
is_public: bool = True,
filter_str: str = "",
next_page_token: str = "",
total_size: int = 100,
show_deleted: bool = False,
async_enabled: bool = False,
) -> pipeline_interface.ListNamespacePipelinesResponse:
visibility = (
pipeline_interface.Pipeline.Visibility.VISIBILITY_PUBLIC
if is_public
else pipeline_interface.Pipeline.Visibility.VISIBILITY_PRIVATE
)

if async_enabled:
return RequestFactory(
method=self.host.async_client.ListNamespacePipelines,
Expand Down

0 comments on commit 7b5283a

Please sign in to comment.