[bonfiredemokit] Annotation of /ea/storage.py
Annotation of /ea/storage.py
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
(as text)
1 : |
agomez |
1 |
'''
|
2 : |
|
|
Created on 16/03/2012
|
3 : |
|
|
|
4 : |
|
|
@author: cesga
|
5 : |
|
|
'''
|
6 : |
|
|
|
7 : |
|
|
import time
|
8 : |
|
|
import sub_pycurl as em
|
9 : |
|
|
import xml_conv
|
10 : |
|
|
import xml_creator as xmlc
|
11 : |
|
|
import credentials as cr
|
12 : |
|
|
|
13 : |
|
|
|
14 : |
|
|
|
15 : |
|
|
|
16 : |
|
|
user = cr.getuser('~/.restfully/api.bonfire-project.eu.yml')
|
17 : |
|
|
passwd = cr.getpass('~/.restfully/api.bonfire-project.eu.yml')
|
18 : |
|
|
|
19 : |
|
|
theurl = 'https://api.bonfire-project.eu/'
|
20 : |
|
|
raiz = 'https://api.bonfire-project.eu/'
|
21 : |
|
|
|
22 : |
|
|
exp=xmlc.xml_creator()
|
23 : |
|
|
|
24 : |
|
|
print exp
|
25 : |
|
|
|
26 : |
|
|
job = em.sub()
|
27 : |
|
|
job.user = user
|
28 : |
|
|
job.passwd = passwd
|
29 : |
|
|
|
30 : |
|
|
respuesta = job.submit_xml(theurl, exp)
|
31 : |
|
|
print "respuesta", respuesta
|
|