Revision 3b99d2d6

b/snf-astakos-app/astakos/im/management/commands/service-add.py
34 34
from django.core.management.base import BaseCommand, CommandError
35 35

  
36 36
from astakos.im.models import Service
37
from astakos.im.api.callpoint import AstakosDjangoDBCallpoint
37
from astakos.im.api.callpoint import AstakosCallpoint
38 38

  
39 39
class Command(BaseCommand):
40 40
    args = "<name> <url> [<icon>]"
......
48 48
        if len(args) == 3:
49 49
            s['icon'] = args[2]
50 50
        try:
51
            c = AstakosDjangoDBCallpoint()
51
            c = AstakosCallpoint()
52 52
            c.add_services((s,))
53 53
        except Exception, e:
54 54
            raise CommandError(e)
b/snf-astakos-app/astakos/im/management/commands/user-add.py
42 42
from django.core.exceptions import ValidationError
43 43

  
44 44
from astakos.im.models import AstakosUser
45
from astakos.im.api.callpoint import AstakosDjangoDBCallpoint
45
from astakos.im.api.callpoint import AstakosCallpoint
46 46

  
47 47
from ._common import add_user_permission
48 48

  
......
111 111
            u['password'] = AstakosUser.objects.make_random_password()
112 112

  
113 113
        try:
114
            c = AstakosDjangoDBCallpoint()
115
            c.create_users((u,))
114
            c = AstakosCallpoint()
115
            r = c.create_users((u,))
116 116
        except socket.error, e:
117 117
            raise CommandError(e)
118 118
        except ValidationError, e:
119
            raise CommandError(e)
119
            raise CommandError(e)
120
        else:
121
            failed = (res for res in r if not res.is_success)
122
            for r in failed:
123
                if not r.is_success:
124
                    raise CommandError(r.reason)
125
            if not failed:
126
                self.stdout.write('User created successfully')
127
                if not u.get('password'):
128
                    self.stdout.write('with password: %s' % u['password'])
b/snf-astakos-app/astakos/im/management/commands/user-details.py
81 81
                'email_verified': format_bool(user.email_verified),
82 82
                'username': user.username,
83 83
                'activation_sent_date': format_date(user.activation_sent),
84
                'resources': user.quota
84
                'resources': dict(user.quota)
85 85
            }
86 86
            if get_latest_terms():
87 87
                has_signed_terms = user.signed_terms

Also available in: Unified diff