From: Andy Bavier <acb@cs.princeton.edu> Date: Fri, 5 Feb 2010 14:26:18 +0000 (+0000) Subject: Replace dashes with underscores to work around xmlbuilder limitation X-Git-Tag: sfa-0.9-11~158 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bbfb607d67333d44f88059a994dbbab406cc16e7;p=sfa.git Replace dashes with underscores to work around xmlbuilder limitation --- diff --git a/sfa/managers/eucalyptus/eucalyptus.rnc b/sfa/managers/eucalyptus/eucalyptus.rnc index 469e77d3..c2fbc20d 100644 --- a/sfa/managers/eucalyptus/eucalyptus.rnc +++ b/sfa/managers/eucalyptus/eucalyptus.rnc @@ -5,13 +5,13 @@ RSpec = element RSpec { } cloud = element cloud { attribute id { xsd:NMTOKEN }, - user-info?, + user_info?, ipv4, keypairs, images, cluster+ } -user-info = element user-info { +user_info = element user_info { credential } keypairs = element keypairs { keypair+ } @@ -26,23 +26,23 @@ image = element image { cluster = element cluster { attribute id { xsd:ID }, ipv4, - vm-types + vm_types } -vm-types = element vm-types { vm-type+ } -vm-type = element vm-type { +vm_types = element vm_types { vm_type+ } +vm_type = element vm_type { attribute name { xsd:ID }, - free-slots, - max-instances, + free_slots, + max_instances, cores, memory, - disk-space, + disk_space, request? } request = element request { instances, - kernel-image, + kernel_image, ramdisk, - disk-image, + disk_image, keypair } credential = element credential { text } @@ -52,19 +52,19 @@ type = element type { text } arch = element arch { text } state = element state { text } location = element location { text } -free-slots = element free-slots { text } -max-instances = element max-instances { text } +free_slots = element free_slots { text } +max_instances = element max_instances { text } cores = element cores { text } memory = element memory { attribute unit { xsd:NMTOKEN }, text } -disk-space = element disk-space { +disk_space = element disk_space { attribute unit { xsd:NMTOKEN }, text } -instances = element instances { text } -kernel-image = element kernel-image { +instances = element instances { xsd:unsignedInt } +kernel_image = element kernel_image { attribute id { xsd:IDREF }, empty } @@ -72,7 +72,7 @@ ramdisk = element ramdisk { attribute id { xsd:IDREF }?, empty } -disk-image = element disk-image { +disk_image = element disk_image { attribute id { xsd:IDREF }, empty } diff --git a/sfa/managers/eucalyptus/eucalyptus.rng b/sfa/managers/eucalyptus/eucalyptus.rng index 9bfe3dca..5cfc8c59 100644 --- a/sfa/managers/eucalyptus/eucalyptus.rng +++ b/sfa/managers/eucalyptus/eucalyptus.rng @@ -17,7 +17,7 @@ <data type="NMTOKEN"/> </attribute> <optional> - <ref name="user-info"/> + <ref name="user_info"/> </optional> <ref name="ipv4"/> <ref name="keypairs"/> @@ -27,8 +27,8 @@ </oneOrMore> </element> </define> - <define name="user-info"> - <element name="user-info"> + <define name="user_info"> + <element name="user_info"> <ref name="credential"/> </element> </define> @@ -63,26 +63,26 @@ <data type="ID"/> </attribute> <ref name="ipv4"/> - <ref name="vm-types"/> + <ref name="vm_types"/> </element> </define> - <define name="vm-types"> - <element name="vm-types"> + <define name="vm_types"> + <element name="vm_types"> <oneOrMore> - <ref name="vm-type"/> + <ref name="vm_type"/> </oneOrMore> </element> </define> - <define name="vm-type"> - <element name="vm-type"> + <define name="vm_type"> + <element name="vm_type"> <attribute name="name"> <data type="ID"/> </attribute> - <ref name="free-slots"/> - <ref name="max-instances"/> + <ref name="free_slots"/> + <ref name="max_instances"/> <ref name="cores"/> <ref name="memory"/> - <ref name="disk-space"/> + <ref name="disk_space"/> <optional> <ref name="request"/> </optional> @@ -91,9 +91,9 @@ <define name="request"> <element name="request"> <ref name="instances"/> - <ref name="kernel-image"/> + <ref name="kernel_image"/> <ref name="ramdisk"/> - <ref name="disk-image"/> + <ref name="disk_image"/> <ref name="keypair"/> </element> </define> @@ -132,13 +132,13 @@ <text/> </element> </define> - <define name="free-slots"> - <element name="free-slots"> + <define name="free_slots"> + <element name="free_slots"> <text/> </element> </define> - <define name="max-instances"> - <element name="max-instances"> + <define name="max_instances"> + <element name="max_instances"> <text/> </element> </define> @@ -155,8 +155,8 @@ <text/> </element> </define> - <define name="disk-space"> - <element name="disk-space"> + <define name="disk_space"> + <element name="disk_space"> <attribute name="unit"> <data type="NMTOKEN"/> </attribute> @@ -165,11 +165,11 @@ </define> <define name="instances"> <element name="instances"> - <text/> + <data type="unsignedInt"/> </element> </define> - <define name="kernel-image"> - <element name="kernel-image"> + <define name="kernel_image"> + <element name="kernel_image"> <attribute name="id"> <data type="IDREF"/> </attribute> @@ -186,8 +186,8 @@ <empty/> </element> </define> - <define name="disk-image"> - <element name="disk-image"> + <define name="disk_image"> + <element name="disk_image"> <attribute name="id"> <data type="IDREF"/> </attribute> diff --git a/sfa/managers/eucalyptus/eucalyptus.xml b/sfa/managers/eucalyptus/eucalyptus.xml index 88023b56..9aca652b 100644 --- a/sfa/managers/eucalyptus/eucalyptus.xml +++ b/sfa/managers/eucalyptus/eucalyptus.xml @@ -2,9 +2,9 @@ <RSpec type="eucalyptus"> <cloud id="Emulab-Cloud"> <!-- This element added by the user --> - <user-info> + <user_info> <credential>foobarbaz</credential> - </user-info> + </user_info> <ipv4>155.98.39.85</ipv4> <keypairs> <keypair>cortex</keypair> @@ -26,51 +26,51 @@ </images> <cluster id="pcluster"> <ipv4>10.1.1.2</ipv4> - <vm-types> - <vm-type name="m1.small"> - <free-slots>2</free-slots> - <max-instances>2</max-instances> + <vm_types> + <vm_type name="m1.small"> + <free_slots>2</free_slots> + <max_instances>2</max_instances> <cores>1</cores> <memory unit="MB">128</memory> - <disk-space unit="GB">2</disk-space> + <disk_space unit="GB">2</disk_space> <!-- A request for an instance of this type, added by the user --> <request> <instances>1</instances> - <kernel-image id="eki-F26610C6"/> + <kernel_image id="eki-F26610C6"/> <ramdisk/> - <disk-image id="emi-88760F45"/> + <disk_image id="emi-88760F45"/> <keypair>cortex</keypair> </request> - </vm-type> - <vm-type name="c1.medium"> - <free-slots>1</free-slots> - <max-instances>2</max-instances> + </vm_type> + <vm_type name="c1.medium"> + <free_slots>1</free_slots> + <max_instances>2</max_instances> <cores>1</cores> <memory unit="MB">256</memory> - <disk-space unit="GB">5</disk-space> - </vm-type> - <vm-type name="m1.large"> - <free-slots>0</free-slots> - <max-instances>1</max-instances> + <disk_space unit="GB">5</disk_space> + </vm_type> + <vm_type name="m1.large"> + <free_slots>0</free_slots> + <max_instances>1</max_instances> <cores>2</cores> <memory unit="MB">512</memory> - <disk-space unit="GB">10</disk-space> - </vm-type> - <vm-type name="m1.xlarge"> - <free-slots>0</free-slots> - <max-instances>1</max-instances> + <disk_space unit="GB">10</disk_space> + </vm_type> + <vm_type name="m1.xlarge"> + <free_slots>0</free_slots> + <max_instances>1</max_instances> <cores>2</cores> <memory unit="MB">1024</memory> - <disk-space unit="GB">20</disk-space> - </vm-type> - <vm-type name="c1.xlarge"> - <free-slots>0</free-slots> - <max-instances>0</max-instances> + <disk_space unit="GB">20</disk_space> + </vm_type> + <vm_type name="c1.xlarge"> + <free_slots>0</free_slots> + <max_instances>0</max_instances> <cores>4</cores> <memory unit="MB">2048</memory> - <disk-space unit="GB">20</disk-space> - </vm-type> - </vm-types> + <disk_space unit="GB">20</disk_space> + </vm_type> + </vm_types> </cluster> </cloud> </RSpec>