Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] Diff of /ea/sub_pycurl.py
[bonfiredemokit] / ea / sub_pycurl.py Repository:
ViewVC logotype

Diff of /ea/sub_pycurl.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1, Mon Aug 27 11:46:35 2012 UTC revision 14, Mon Oct 8 09:46:28 2012 UTC
# Line 1  Line 1 
1    #
2    # BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
3    #
4    # Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
5    #
6    # License Apache Software
7    #
8    # The research leading to these results has received funding from
9    # the European Community's Seventh Framework Programme (FP7/2007-2013)
10    # under agreement number 257386
11    #
12    # This software is provided with ABSOLUTELY NO WARRANTY
13    #
14  import httplib2  import httplib2
15  import simplejson  import simplejson
16    
17    
18    
19  class sub:  class sub:
20      """Envia trabajos. Input: usr, passwd, json, theurl      """Submit request. Input: usr, passwd, json, theurl
21      Output: Lista de trabajos enviados"""      Output: List of request"""
22    
23      def _init_(self, user, passwd):      def _init_(self, user, passwd):
24          self.user = user          self.user = user
# Line 13  Line 26 
26    
27    
28      def submit(self, theurl, exp):      def submit(self, theurl, exp):
29          """Envia el trabajo descrito en json. Input: exp, user, passwd"""          """Submit JSON. Input: exp, user, passwd"""
30    
31          h = httplib2.Http(disable_ssl_certificate_validation=True)          h = httplib2.Http(disable_ssl_certificate_validation=True)
32          h.add_credentials(self.user, self.passwd)          h.add_credentials(self.user, self.passwd)
# Line 25  Line 38 
38          return content          return content
39    
40      def submit_xml(self, theurl, name, instance, disk, net, loc):      def submit_xml(self, theurl, name, instance, disk, net, loc):
41          """Add un compute nuevo al experimento definido en xml. Input: compute_xml, user, passwd"""          """Add one compute defined in xml. Input: compute_xml, user, passwd"""
42    
43          h = httplib2.Http(disable_ssl_certificate_validation=True)          h = httplib2.Http(disable_ssl_certificate_validation=True)
44          h.add_credentials(self.user, self.passwd)          h.add_credentials(self.user, self.passwd)
# Line 50  Line 63 
63    
64    
65      def log(self, url_log):      def log(self, url_log):
66          """Obtiene info de la url de log que se obtiene en submit. Input: url_log, user, passwd"""          """GET the URL log. Input: url_log, user, passwd"""
67    
68          h = httplib2.Http(disable_ssl_certificate_validation=True)          h = httplib2.Http(disable_ssl_certificate_validation=True)
69          h.add_credentials(self.user, self.passwd)          h.add_credentials(self.user, self.passwd)
# Line 75  Line 88 
88    
89    
90      def computes(self, url_log):      def computes(self, url_log):
91          """Obtiene info de los computes del experimento. Input: url_log"""          """Get info of experiment compute nodes. Input: url_log"""
92    
93          h = httplib2.Http(disable_ssl_certificate_validation=True)          h = httplib2.Http(disable_ssl_certificate_validation=True)
94          h.add_credentials(self.user, self.passwd)          h.add_credentials(self.user, self.passwd)
# Line 86  Line 99 
99    
100    
101      def delete(self, url_del):      def delete(self, url_del):
102          """Borra el trabajo descrito en json. Input: url_del, user, passwd"""          """Delete experiment. Input: url_del, user, passwd"""
103    
104          h = httplib2.Http(disable_ssl_certificate_validation=True)          h = httplib2.Http(disable_ssl_certificate_validation=True)
105          h.add_credentials(self.user, self.passwd)          h.add_credentials(self.user, self.passwd)

Legend:
Removed from v.1  
changed lines
  Added in v.14

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge