check in latest updates to documentation
[sfa.git] / util / config.py
1 ##
2 # Geniwrapper Configuration Info
3 #
4 # This module holds configuration parameters for geniwrapper. There are two
5 # main pieces of information that are used: the database connection and
6 # the PLCAPI connection
7 ##
8
9 ##
10 # Geniwrapper uses a MYSQL database to store records. This database may be
11 # co-located with the PLC database, or it may be a separate database. The
12 # following parameters define the connection to the database.
13 #
14 # Note that Geniwrapper does not access any of the PLC databases directly via
15 # a mysql connection; All PLC databases are accessed via PLCAPI.
16
17 def get_default_dbinfo():
18     dbinfo={}
19     dbinfo['dbname'] = 'planetlab4'
20     dbinfo['address'] = 'localhost'\r
21     dbinfo['port'] = 5432\r
22     dbinfo['user'] = 'pgsqluser'\r
23     dbinfo['password'] = '4c77b272-c892-4bdf-a833-dddeeee1a2ed'
24
25     return dbinfo
26
27 ##
28 # Geniwrapper uses a PLCAPI connection to perform operations on the registry,
29 # such as creating and deleting slices. This connection requires an account
30 # on the PLC server with full administrator access.
31 #
32 # The Url parameter controls whether the connection uses PLCAPI directly (i.e.
33 # Geniwrapper is located on the same machine as PLC), or uses a XMLRPC connection
34 # to the PLC machine. If you wish to use the API directly, then remove the Url
35 # field from the dictionary. 
36
37 def get_pl_auth():
38     pl_auth = {'Username': 'root@198.0.0.132',
39     'AuthMethod': 'password',\r
40     'AuthString':  'root',\r
41     "Url": "https://localhost:443/PLCAPI/"\r
42     }\r
43
44     return pl_auth