[bonfiredemokit] Annotation of /ea/storage.py
Annotation of /ea/storage.py
Parent Directory
| Revision Log
Revision 9 -
(view)
(download)
(as text)
1 : |
agomez |
9 |
#
|
2 : |
|
|
# BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
|
3 : |
|
|
#
|
4 : |
|
|
# Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
|
5 : |
|
|
#
|
6 : |
|
|
# License GPL Version 3
|
7 : |
|
|
#
|
8 : |
|
|
# The research leading to these results has received funding from
|
9 : |
|
|
# the European Community's Seventh Frameqork Programme (FP7/2007-2013)
|
10 : |
|
|
# under agreement number 257386
|
11 : |
|
|
#
|
12 : |
|
|
# This software is provided with ABSOLUTELY NO WARRANTY
|
13 : |
|
|
#
|
14 : |
agomez |
1 |
'''
|
15 : |
|
|
Created on 16/03/2012
|
16 : |
|
|
|
17 : |
|
|
@author: cesga
|
18 : |
|
|
'''
|
19 : |
|
|
|
20 : |
|
|
import time
|
21 : |
|
|
import sub_pycurl as em
|
22 : |
|
|
import xml_conv
|
23 : |
|
|
import xml_creator as xmlc
|
24 : |
|
|
import credentials as cr
|
25 : |
|
|
|
26 : |
|
|
|
27 : |
|
|
|
28 : |
|
|
|
29 : |
|
|
user = cr.getuser('~/.restfully/api.bonfire-project.eu.yml')
|
30 : |
|
|
passwd = cr.getpass('~/.restfully/api.bonfire-project.eu.yml')
|
31 : |
|
|
|
32 : |
|
|
theurl = 'https://api.bonfire-project.eu/'
|
33 : |
|
|
raiz = 'https://api.bonfire-project.eu/'
|
34 : |
|
|
|
35 : |
|
|
exp=xmlc.xml_creator()
|
36 : |
|
|
|
37 : |
|
|
print exp
|
38 : |
|
|
|
39 : |
|
|
job = em.sub()
|
40 : |
|
|
job.user = user
|
41 : |
|
|
job.passwd = passwd
|
42 : |
|
|
|
43 : |
|
|
respuesta = job.submit_xml(theurl, exp)
|
44 : |
|
|
print "respuesta", respuesta
|
|