Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When we login to MAAS web UI, we can see the user MAAS Key in the Preferences page. Is there any chance to cat it as a text via console command maas shell?!

share|improve this question
add comment

1 Answer

maas shell

>>> from apiclient.creds import convert_tuple_to_string
>>> from django.contrib.auth.models import User
>>> from maasserver.models.user import get_creds_tuple
>>> admin = User.objects.get(username='admin')
>>> token = admin.tokens.all()[0]
>>> print convert_tuple_to_string(get_creds_tuple(token))
share|improve this answer
    
>>> from apiclient.creds import convert_tuple_to_string Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named apiclient.creds –  Yasser Zamani Apr 27 '13 at 12:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.