Line | |
---|
1 | #!/usr/bin/python
|
---|
2 | # -*- coding: utf-8 -*-
|
---|
3 |
|
---|
4 | # replacment for the shell command "opsi-admin -d -S method getDepotIds_list"
|
---|
5 |
|
---|
6 | #from OPSI.Backend.Backend import *
|
---|
7 | from OPSI.Backend.BackendManager import BackendManager
|
---|
8 |
|
---|
9 | #from OPSI.Backend.JSONRPC import JSONRPCBackend
|
---|
10 | #from OPSI.Logger import *
|
---|
11 | #from OPSI.Product import *
|
---|
12 | #from OPSI import Tools
|
---|
13 | #from OPSI.UI import *
|
---|
14 |
|
---|
15 | #bm = BackendManager(authRequired = False, configFile = '/etc/opsi/backendManager.d')
|
---|
16 | bm = BackendManager(
|
---|
17 | dispatchConfigFile = u'/etc/opsi/backendManager/dispatch.conf',
|
---|
18 | backendConfigDir = u'/etc/opsi/backends',
|
---|
19 | extensionConfigDir = u'/etc/opsi/backendManager/extend.d',
|
---|
20 | depotBackend = False,
|
---|
21 | hostControlBackend = True
|
---|
22 | )
|
---|
23 | depotIds = bm.getDepotIds_list()
|
---|
24 | for i in range(len(depotIds)):
|
---|
25 | print "depots[%i]=%s" % (i, depotIds[i])
|
---|
Note:
See
TracBrowser
for help on using the repository browser.