Skip to content

Commit

Permalink
Merge pull request #166 from aiven/heikju-fix-account-create
Browse files Browse the repository at this point in the history
Fix some account commands.
  • Loading branch information
Mikko Saarinen authored Nov 26, 2020
2 parents f107fbb + 56f3fb3 commit 08ec5c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aiven/client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,15 @@ def describe_plan(plan, node_count, service_plan):
@arg("-n", "--name", required=True, help="Name of the account to create")
def account__create(self):
"""Create new account"""
account = self.client.create_account(self.args.service_name)
account = self.client.create_account(self.args.name)
self.print_response(account, json=self.args.json, single_item=True)

@arg.json
@arg.account_id
@arg("-n", "--name", required=True, help="New name for the account")
def account__update(self):
"""Update an account"""
account = self.client.update_account(self.args.account_id, self.args.service_name)
account = self.client.update_account(self.args.account_id, self.args.name)
self.print_response(account, json=self.args.json, single_item=True)

@arg.account_id
Expand Down Expand Up @@ -543,7 +543,7 @@ def account__authentication_method__create(self):
options = self._parse_auth_config_options(self.args.config_cmdline, self.args.config_file)
method = self.client.create_account_authentication_method(
self.args.account_id,
method_name=self.args.service_name,
method_name=self.args.name,
method_type=self.args.type,
options=options,
)
Expand Down Expand Up @@ -582,7 +582,7 @@ def account__authentication_method__update(self):
self.args.account_id,
self.args.authentication_id,
method_enable=enable,
method_name=self.args.service_name,
method_name=self.args.name,
options=options,
)
self.print_response(
Expand Down

0 comments on commit 08ec5c1

Please sign in to comment.