Jan Ulrich Hasecke
2019-12-10 bc6cc194da0657ac91213a5c28279ed6000ee2cd
1
2
3
4
5
6
7
8
9
10
11
12
from hs.admin.api import API
 
api = API(cas=dict(
    uri='https://login.hostsharing.net/cas/v1/tickets',
    service='https://config.hostsharing.net:443/hsar/backend'),
    credentials=dict(username='xyz00', password='sehr-geheim'),
    backends=[
        'https://config.hostsharing.net:443/hsar/xmlrpc/hsadmin',
        'https://config2.hostsharing.net:443/hsar/xmlrpc/hsadmin'])
 
api.user.add(set={'name': 'xyz00-domain.de', 'password': 'geheim', 'shell': '/bin/bash'})
api.domain.add(set={'name': 'domain.de', 'user': 'xyz00-domain.de'})