Skip to content

Commit

Permalink
client: flink commands ignore the current project
Browse files Browse the repository at this point in the history
Customers are used to set environment so they don't have to pass
all arguments for each aiven-client command they run.
This PR takes the current project into account in flink commands.

[PM-4549]
  • Loading branch information
jclarysse committed Nov 13, 2024
1 parent b368495 commit 0ad5bba
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions aiven/client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5349,7 +5349,7 @@ def service__flink__list_applications(self) -> None:
"""List Flink applications"""
self.print_response(
self.client.flink_list_applications(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
),
)
Expand All @@ -5361,7 +5361,7 @@ def service__flink__create_application(self) -> None:
"""Create Flink application"""
self.print_response(
self.client.flink_create_application(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_properties=self.args.application_properties,
),
Expand All @@ -5374,7 +5374,7 @@ def service__flink__get_application(self) -> None:
"""Get Flink application"""
self.print_response(
self.client.flink_get_application(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
),
Expand All @@ -5388,7 +5388,7 @@ def service__flink__update_application(self) -> None:
"""Update Flink application"""
self.print_response(
self.client.flink_update_application(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
application_properties=self.args.application_properties,
Expand All @@ -5402,7 +5402,7 @@ def service__flink__delete_application(self) -> None:
"""Delete Flink application"""
self.print_response(
self.client.flink_delete_application(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
),
Expand All @@ -5416,7 +5416,7 @@ def service__flink__create_application_version(self) -> None:
"""Create Flink application version"""
self.print_response(
self.client.flink_create_application_version(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
application_version_properties=self.args.application_version_properties,
Expand All @@ -5431,7 +5431,7 @@ def service__flink__validate_application_version(self) -> None:
"""Validate Flink application version"""
self.print_response(
self.client.flink_validate_application_version(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
application_version_properties=self.args.application_version_properties,
Expand All @@ -5446,7 +5446,7 @@ def service__flink__get_application_version(self) -> None:
"""Get Flink application version"""
self.print_response(
self.client.flink_get_application_version(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
application_version_id=self.args.application_version_id,
Expand All @@ -5461,7 +5461,7 @@ def service__flink__delete_application_version(self) -> None:
"""Delete Flink application version"""
self.print_response(
self.client.flink_delete_application_version(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
application_version_id=self.args.application_version_id,
Expand All @@ -5475,7 +5475,7 @@ def service__flink__list_application_deployments(self) -> None:
"""List Flink application deployments"""
self.print_response(
self.client.flink_list_application_deployments(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
),
Expand All @@ -5489,7 +5489,7 @@ def service__flink__get_application_deployment(self) -> None:
"""Get Flink application deployment"""
self.print_response(
self.client.flink_get_application_deployment(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
deployment_id=self.args.deployment_id,
Expand All @@ -5504,7 +5504,7 @@ def service__flink__create_application_deployment(self) -> None:
"""Create Flink application deployment"""
self.print_response(
self.client.flink_create_application_deployment(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
deployment_properties=self.args.deployment_properties,
Expand All @@ -5519,7 +5519,7 @@ def service__flink__delete_application_deployment(self) -> None:
"""Delete Flink application deployment"""
self.print_response(
self.client.flink_delete_application_deployment(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
deployment_id=self.args.deployment_id,
Expand All @@ -5534,7 +5534,7 @@ def service__flink__stop_application_deployment(self) -> None:
"""Stop Flink application deployment"""
self.print_response(
self.client.flink_stop_application_deployment(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
deployment_id=self.args.deployment_id,
Expand All @@ -5549,7 +5549,7 @@ def service__flink__cancel_application_deployments(self) -> None:
"""Cancel Flink application deployment"""
self.print_response(
self.client.flink_cancel_application_deployment(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
application_id=self.args.application_id,
deployment_id=self.args.deployment_id,
Expand All @@ -5562,7 +5562,7 @@ def service__custom_file__list(self) -> None:
"""List all the custom files for the specified service"""
self.print_response(
self.client.custom_file_list(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
),
)
Expand All @@ -5581,7 +5581,7 @@ def service__custom_file__get(self) -> None:
raise argx.UserError("You need to specify `--target_filepath` or `--stdout_write` or both")

result = self.client.custom_file_get(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
file_id=self.args.file_id,
)
Expand All @@ -5603,7 +5603,7 @@ def service__custom_file__upload(self) -> None:
with open(self.args.file_path, "rb") as f:
self.print_response(
self.client.custom_file_upload(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
file_type=self.args.file_type,
file_name=self.args.file_name,
Expand All @@ -5620,7 +5620,7 @@ def service__custom_file__update(self) -> None:
with open(self.args.file_path, "rb") as f:
self.print_response(
self.client.custom_file_update(
project=self.args.project,
project=self.get_project(),
service=self.args.service_name,
file_id=self.args.file_id,
file_object=f,
Expand Down

0 comments on commit 0ad5bba

Please sign in to comment.