Skip to content

Commit

Permalink
Merge pull request #168 from rikonen/rauli-remove-service-group
Browse files Browse the repository at this point in the history
Deprecate / remove service group concept
  • Loading branch information
Mathias Fröjdman authored Dec 1, 2020
2 parents 009e36a + afeea88 commit 445cc23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions aiven/client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ def service__types(self):
"state",
"cloud_name",
"plan",
"group_list",
"create_time",
"update_time",
]]
Expand Down Expand Up @@ -1002,7 +1001,6 @@ def service__credentials_reset(self):
"state",
"cloud_name",
"plan",
"group_list",
"create_time",
"update_time",
]]
Expand Down Expand Up @@ -2791,7 +2789,7 @@ def vpc__user_peer_network_cidr__delete(self):

@arg.project
@arg.service_name
@arg("--group-name", help="service group", default="default")
@arg("--group-name", help="service group (deprecated)")
@arg(
"-t",
"--service-type",
Expand Down Expand Up @@ -2838,6 +2836,8 @@ def service__create(self):
plan = self.args.plan
if not plan:
raise argx.UserError("No subscription plan given")
if self.args.group_name:
self.log.warning("--group-name parameter is deprecated and has no effect")

project_vpc_id = self._get_service_project_vpc_id()
project = self.get_project()
Expand All @@ -2862,7 +2862,6 @@ def service__create(self):
service_type=service_type,
plan=plan,
cloud=self.args.cloud,
group_name=self.args.group_name,
user_config=user_config,
project_vpc_id=project_vpc_id,
termination_protection=self.args.enable_termination_protection,
Expand Down Expand Up @@ -2920,7 +2919,7 @@ def _get_integration_user_config_schema(self, project, integration_type_name):

@arg.project
@arg.service_name
@arg("--group-name", help="New service group")
@arg("--group-name", help="New service group (deprecated)")
@arg.cloud
@arg.user_config
@arg.user_option_remove
Expand Down Expand Up @@ -2992,10 +2991,11 @@ def service__update(self):
termination_protection = True
elif self.args.disable_termination_protection:
termination_protection = False
if self.args.group_name:
self.log.warning("--group-name parameter is deprecated and has no effect")
try:
self.client.update_service(
cloud=self.args.cloud,
group_name=self.args.group_name,
maintenance=maintenance or None,
plan=plan,
powered=powered,
Expand Down
5 changes: 0 additions & 5 deletions aiven/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ def create_service(
project,
service,
service_type,
group_name,
plan,
cloud=None,
user_config=None,
Expand All @@ -1148,7 +1147,6 @@ def create_service(
):
user_config = user_config or {}
body = {
"group_name": group_name,
"cloud": cloud,
"plan": plan,
"service_integrations": service_integrations,
Expand All @@ -1170,7 +1168,6 @@ def update_service(
self,
project,
service,
group_name=None,
cloud=None,
maintenance=None,
user_config=None,
Expand All @@ -1181,8 +1178,6 @@ def update_service(
):
user_config = user_config or {}
body = {}
if group_name is not None:
body["group_name"] = group_name
if cloud is not None:
body["cloud"] = cloud
if maintenance is not None:
Expand Down

0 comments on commit 445cc23

Please sign in to comment.