maas cli writes deprecation warning to stdout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Raphaël Badin |
Bug Description
installed maas from experimental ppa on trusty, tried to create an admin, get its api keys and start using the cli.
However, the 'maas-region-admin apikey' command writes a deprecation warning to stdout rather than stderr.
That means that doing this no longer works:
$ apikey=$( maas-region-admin apikey --username=smoser )
$ maas login "smoser" "http://
Details below.
$ dpkg-query --show "*maas*"
maas 1.8.0~alpha6+
maas-cli 1.8.0~alpha6+
maas-cluster-
maas-common 1.8.0~alpha6+
maas-dhcp 1.8.0~alpha6+
maas-dns 1.8.0~alpha6+
maas-proxy 1.8.0~alpha6+
maas-region-
maas-region-
python-django-maas 1.8.0~alpha6+
python-maas-client 1.8.0~alpha6+
python-
$ maas-region-admin createadmin "--username=smoser" --<email address hidden> --password=password
$ echo $?
0
$ maas-region-admin apikey --username=smoser > cmd.out 2> cmd.err
$ echo $?
0
$ ls -l cmd.out cmd.err
-rw-r--r-- 1 root root 0 Mar 12 13:38 cmd.err
-rw-r--r-- 1 root root 347 Mar 12 13:38 cmd.out
$ cat cmd.out
2015-03-12 13:38:18 [py.warnings] WARNING: /usr/lib/
tokens = user.get_
FThK5ucRdjfM4F4
Related branches
- Blake Rouse (community): Approve
-
Diff: 331 lines (+37/-35)14 files modifiedsrc/maas/settings.py (+0/-2)
src/maasserver/api/account.py (+2/-2)
src/maasserver/api/tests/test_utils.py (+1/-1)
src/maasserver/management/commands/apikey.py (+3/-3)
src/maasserver/models/tests/test_userprofile.py (+8/-8)
src/maasserver/support/pertenant/tests/test_migration.py (+3/-3)
src/maasserver/templates/maasserver/prefs.html (+1/-1)
src/maasserver/templates/maasserver/user_view.html (+2/-2)
src/maasserver/tests/test_commands.py (+7/-7)
src/maasserver/tests/test_worker_user.py (+3/-1)
src/maasserver/views/settings.py (+1/-1)
src/maasserver/views/tests/test_nodes.py (+1/-1)
src/maasserver/views/tests/test_prefs.py (+2/-2)
src/metadataserver/tests/test_nodeinituser.py (+3/-1)
Changed in maas: | |
importance: | Undecided → High |
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → Fix Committed |
milestone: | none → 1.8.0 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The warning is coming from Django, we have to silence it/print it to stderr. See http:// django. readthedocs. org/en/ latest/ releases/ 1.5.html# auth-profile- module for details.