linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

Unable to view usernames

Open patthiel opened this issue 7 years ago • 2 comments

Bug Description Unable to view linode users via the CLI. The linode-cli users view --username $USERNAME command fails to accept valid username arguments.

Steps to Reproduce

linode-cli users view --username $(linode-cli users list --text --no-headers --format username | head -n 1)

usage: linode-cli [-h] [--username username] username_
linode-cli: error: too few arguments

patthiel avatar Jul 30 '18 14:07 patthiel

The intended syntax for this request is lindode-cli users view $USERNAME (no --username) - however, that also appears not to work. This is probably related to the conflict between the username attribute of the response model and the username parameter of the path. I'll look into it.

Dorthu avatar Jul 30 '18 14:07 Dorthu

Also, possibly related, just realized one cannot delete users via the CLI.

linode-cli users delete $USERNAME throws the following:

 linode-cli  users delete sometestuser13
Traceback (most recent call last):
  File "/Users/jawn/.pyenv/versions/2.7.10/bin/linode-cli", line 11, in <module>
    sys.exit(main())
  File "/Users/jawnl/Developer/linode-cli/linodecli/__init__.py", line 213, in main
    cli.handle_command(parsed.command, parsed.action, args)
  File "/Users/jawn/Developer/linode-cli/linodecli/cli.py", line 424, in handle_command
    result = self.do_request(operation, args)
  File "/Users/jawn/Developer/linode-cli/linodecli/cli.py", line 336, in do_request
    url = operation.url.format(**vars(parsed_args))
KeyError: 'username'

patthiel avatar Oct 15 '18 15:10 patthiel

Closing as this issue appears to be resolved. Feel free to @ me if this issue is still occurring.

LBGarber avatar Oct 03 '22 15:10 LBGarber