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 |
''' |
''' |
15 |
Created on 20/01/2012 |
Created on 20/01/2012 |
16 |
|
|
142 |
|
|
143 |
return log |
return log |
144 |
|
|
|
#code="""<?xml version="1.0" encoding="UTF-8"?> |
|
|
#<compute xmlns="http://api.bonfire-project.eu/doc/schemas/occi" href="/locations/fr-inria/computes/21474"> |
|
|
# <id>21474</id> |
|
|
# <cpu>1</cpu> |
|
|
# <memory>1024</memory> |
|
|
# <name>JSON-COMPUTE-TEST</name> |
|
|
# <instance_type>small</instance_type> |
|
|
# <state>RUNNING</state> |
|
|
# <disk id="0"> |
|
|
# <storage href="/locations/fr-inria/storages/3" name="BonFIRE Debian Squeeze v3"/> |
|
|
# <type>DISK</type> |
|
|
# <target>xvda</target> |
|
|
# </disk> |
|
|
# <nic> |
|
|
# <network href="/locations/fr-inria/networks/4" name="BonFIRE WAN"/> |
|
|
# <ip>172.18.7.87</ip> |
|
|
# <mac>02:00:ac:12:07:57</mac> |
|
|
# </nic> |
|
|
# <context> |
|
|
# <authorized_keys>ssh-dss AAAAB3NzaC1kc3MAAACBAPhVbbL4qAcvyuvlVdd3QUQnJzzKL2N92wH33mS10HAzfRF7a40iW31+PT7IBLnPalwg7yRPNcGLfXIrtqBjlVZLynzCwP1JH3Z6diokMjukMbNX/rXe/TeIIzWI7BLJeLXPuXBrm/oW97RN+s8fYetnDHhxclgo8+J27K80Qe5FAAAAFQCweWyZxWYlaUuN8vr+Bxcaj23l1wAAAIEA17Wq9yd0mHpnAympsQZmKUtFiRuLr0OHYmI4XV6+Av+2f2wrvlNTgpr4A2Tr0E1I/utUqkt38dzTU6sOFfau0y5tNkrWu5r33nrmPdCSRAlNybU1yFgFp5CNEG8QKjikXhIrpo35WLy+Y6JuoBtOp3+BDTTsZhMFxIAPyNzu4XYAAACBAKKcf9owhthEpx+9t6a8o8EoCfmcpF/jU2Ml3Ia291cn0MUo798xLXoTOPIxivcA/VJe7EPUEKcVxc0och0e0UuzGT3dUEfVRlfZnERBkdZHWSZT7a+BKESTnV5xBMi2Q2wWQrPbYhXd0+zYg5Zm5/Qcd8Ou3Tu+cFTvKMtDZ1Iq cesga@anzol</authorized_keys> |
|
|
# <bonfire_credentials>rvalin:t87rgt8sjm23yzcuhwvws</bonfire_credentials> |
|
|
# <bonfire_experiment_expiration_date>1327934238</bonfire_experiment_expiration_date> |
|
|
# <bonfire_experiment_id>130</bonfire_experiment_id> |
|
|
# <bonfire_experiment_routing_key>a5b4c4ec82c53fbe63b7</bonfire_experiment_routing_key> |
|
|
# <bonfire_provider>fr-inria</bonfire_provider> |
|
|
# <bonfire_resource_id>21474</bonfire_resource_id> |
|
|
# <bonfire_resource_name>JSON-COMPUTE-TEST</bonfire_resource_name> |
|
|
# <bonfire_uri>https://api.integration.bonfire.grid5000.fr</bonfire_uri> |
|
|
# <cluster>default</cluster> |
|
|
# <dns_servers>131.254.204.4</dns_servers> |
|
|
# <files>/srv/cloud/context /srv/cloud/context/lib /srv/cloud/context/distributions /srv/cloud/context/sites /srv/cloud/context/common /srv/cloud/context/init.sh</files> |
|
|
# <hostname>JSON-COMPUTE-TEST-21474</hostname> |
|
|
# <metrics>PG1ldHJpYz5ib25maXJlLmNvdW50MTBbL3RtcC90ZXN0RmlsZS50eHRdLHdjIC1sICQxIHwgY3V0IC1kIiAiIC1mMTwvbWV0cmljPjxtZXRyaWM+Ym9uZmlyZS5jb3VudDlbL3RtcC90ZXN0RmlsZS50eHRdLHdjIC1sICQxIHwgY3V0IC1kIiAiIC1mMTwvbWV0cmljPg==</metrics> |
|
|
# <ntp_servers>ntp.rennes.grid5000.fr</ntp_servers> |
|
|
# <public_gateway>131.254.204.8</public_gateway> |
|
|
# <target>xvdb</target> |
|
|
# <usage>zabbix-agent</usage> |
|
|
# <wan_ip>172.18.7.87</wan_ip> |
|
|
# <wan_mac>02:00:ac:12:07:57</wan_mac> |
|
|
# </context> |
|
|
# <host>node-1.integration</host> |
|
|
#<link rel="experiment" href="/experiments/130" type="application/vnd.bonfire+xml"/></compute>""" |
|
145 |
|
|
146 |
|
|
147 |
def xml_compute_parse(code): |
def xml_compute_parse(code): |