当我们登录到MAAS时,我们可以在MAAS Key页面中看到用户Preferences。是否有机会通过控制台命令maas shell将其作为文本禁止使用?!
发布于 2013-04-24 15:23:58
maas壳
>>> 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))https://askubuntu.com/questions/284939
复制相似问题