Permalink
Browse files

Initial merge of Paulo Gomes' spotinstances Google Summer of Code con…

…tribution: hard conflicts included in this commit.

Conflicts:
	service/service/java/source/etc/workspace-service/other/main.conflocator.xml
	service/service/java/source/etc/workspace-service/other/resource-locator-ACTIVE.xml
	service/service/java/source/etc/workspace-service/other/resource-locator-default.xml
	service/service/java/source/share/lib/workspace_service_derby_schema.sql
	service/service/java/source/src/org/globus/workspace/creation/defaults/CreationManagerImpl.java
	service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapter.java
	service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterConstants.java
	service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterImpl.java
	service/service/java/source/src/org/globus/workspace/persistence/impls/ResourcepoolPersistenceUtil.java
	service/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSlotManagement.java
	service/service/java/source/src/org/globus/workspace/scheduler/defaults/ResourcepoolEntry.java
	service/service/java/source/src/org/globus/workspace/scheduler/defaults/ResourcepoolUtil.java
  • Loading branch information...
2 parents e99652f + 5e1cb4b commit d6782f02b7d81177973cd366a2b41b1cea86d320 @timf timf committed Nov 15, 2010
Showing with 26,834 additions and 522 deletions.
  1. +13 −0 .idea-modules/service-suites/spotinstances.iml
  2. +1 −0 .idea/modules.xml
  3. BIN lib/generated/nimbus-messaging-stubs-gt4.0-elastic.jar
  4. BIN lib/test/testng-5.12.jar
  5. +10 −1 messaging/gt4.0-elastic/java/msgbridge/etc/elastic/other/main.conflocator.xml
  6. +39 −0 messaging/gt4.0-elastic/java/msgbridge/etc/elastic/other/main.xml
  7. +1 −1 ...tic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceBlockStore.java
  8. +1 −1 ...lastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceGeneral.java
  9. +1 −1 ...-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceImage.java
  10. +1 −1 ...lastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceNetwork.java
  11. +23 −3 ...4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceRM.java
  12. +16 −16 ...astic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/ServiceSecurity.java
  13. +4 −1 ...sgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/ResourceAllocations.java
  14. +6 −6 ...msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/ServiceGeneralImpl.java
  15. +45 −10 .../nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
  16. +8 −8 ...ava/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/image/ServiceImageImpl.java
  17. +38 −0 ...0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/CancelSI.java
  18. +9 −5 ...0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/Describe.java
  19. +46 −0 ...elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/DescribeSI.java
  20. +30 −0 ...sgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/DescribeSpotPriceHistory.java
  21. +1 −1 ...4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/Reboot.java
  22. +33 −0 ...-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/RequestSI.java
  23. +2 −3 .../gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/Run.java
  24. +80 −3 ...stic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/ServiceRMImpl.java
  25. +2 −2 ...-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/Terminate.java
  26. +131 −0 ...sgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultCancelSI.java
  27. +18 −9 ...sgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultDescribe.java
  28. +235 −0 ...bridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultDescribeSI.java
  29. +117 −0 .../nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultDescribeSpotPriceHistory.java
  30. +3 −3 .../msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultReboot.java
  31. +255 −0 ...gbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRequestSI.java
  32. +6 −5 ...ava/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRun.java
  33. +22 −22 ...gbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultTerminate.java
  34. +1 −1 ...astic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/security/KeyGen.java
  35. +1 −1 ...msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/security/RMServiceSecurity.java
  36. +10 −10 ...gbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/security/ServiceSecurityImpl.java
  37. +1 −1 ...idge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/security/defaults/DefaultKeyGen.java
  38. +1 −1 .../msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/service/DelegatingService.java
  39. +104 −1 ...idge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/service/UnimplementedOperations.java
  40. +1 −0 messaging/gt4.0-elastic/java/stubs/NStoPkg.properties
  41. +1 −1 messaging/gt4.0-elastic/java/stubs/build.properties
  42. +1 −1 messaging/gt4.0-elastic/schema/dist/build.properties
  43. +4,077 −0 messaging/gt4.0-elastic/schema/dist/elastic-2010-06-15/ec2.wsdl
  44. +2 −2 messaging/gt4.0/java/gar-builder/deployment/default-server.wsdd
  45. +8 −0 messaging/query/java/source/etc/query/other/main.conflocator.xml
  46. +40 −1 messaging/query/java/source/etc/query/other/main.xml
  47. +64 −0 ...query/java/source/src/org/nimbustools/messaging/query/v2009_08_15/CancelSpotInstanceRequests.java
  48. +86 −0 ...ery/java/source/src/org/nimbustools/messaging/query/v2009_08_15/DescribeSpotInstanceRequests.java
  49. +124 −0 ...g/query/java/source/src/org/nimbustools/messaging/query/v2009_08_15/DescribeSpotPriceHistory.java
  50. +9 −5 messaging/query/java/source/src/org/nimbustools/messaging/query/v2009_08_15/ElasticService.java
  51. +84 −0 ...aging/query/java/source/src/org/nimbustools/messaging/query/v2009_08_15/RequestSpotInstances.java
  52. +24 −0 service-api/java/source/src/org/nimbustools/api/_repr/_AsyncCreateRequest.java
  53. +2 −0 service-api/java/source/src/org/nimbustools/api/_repr/_Caller.java
  54. +36 −0 service-api/java/source/src/org/nimbustools/api/_repr/_RequestInfo.java
  55. +26 −0 service-api/java/source/src/org/nimbustools/api/_repr/_SpotCreateRequest.java
  56. +12 −0 service-api/java/source/src/org/nimbustools/api/_repr/_SpotPriceEntry.java
  57. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/_SpotRequestInfo.java
  58. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/si/_SIRequestState.java
  59. +1 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_ResourceAllocation.java
  60. +3 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_VM.java
  61. +8 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr.xml
  62. +77 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultAsyncCreateRequest.java
  63. +35 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCaller.java
  64. +17 −17 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCreateRequest.java
  65. +11 −1 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultReprFactory.java
  66. +231 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultRequestInfo.java
  67. +89 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultSpotCreateRequest.java
  68. +65 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultSpotPriceEntry.java
  69. +97 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultSpotRequestInfo.java
  70. +129 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/si/DefaultSIRequestState.java
  71. +52 −2 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java
  72. +28 −15 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultVM.java
  73. +60 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultVMFile.java
  74. +1 −2 service-api/java/source/src/org/nimbustools/api/defaults/services/rm/DefaultBasicLegality.java
  75. +122 −1 service-api/java/source/src/org/nimbustools/api/defaults/services/rm/DefaultManager.java
  76. +23 −0 service-api/java/source/src/org/nimbustools/api/repr/AsyncCreateRequest.java
  77. +11 −1 service-api/java/source/src/org/nimbustools/api/repr/ReprFactory.java
  78. +35 −0 service-api/java/source/src/org/nimbustools/api/repr/RequestInfo.java
  79. +24 −0 service-api/java/source/src/org/nimbustools/api/repr/SpotCreateRequest.java
  80. +10 −0 service-api/java/source/src/org/nimbustools/api/repr/SpotPriceEntry.java
  81. +24 −0 service-api/java/source/src/org/nimbustools/api/repr/SpotRequestInfo.java
  82. +31 −0 service-api/java/source/src/org/nimbustools/api/repr/si/RequestState.java
  83. +30 −0 service-api/java/source/src/org/nimbustools/api/repr/si/SIConstants.java
  84. +1 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/ResourceAllocation.java
  85. +3 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/VM.java
  86. +11 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/VMConstants.java
  87. +67 −2 service-api/java/source/src/org/nimbustools/api/services/rm/Manager.java
  88. +21 −0 service-api/java/source/src/org/nimbustools/api/services/rm/NotEnoughMemoryException.java
  89. +20 −0 service/service/java/source/etc/workspace-service/other/main.conflocator.xml
  90. +25 −5 service/service/java/source/etc/workspace-service/other/main.repr.xml
  91. +48 −8 service/service/java/source/etc/workspace-service/other/main.xml
  92. +6 −0 service/service/java/source/etc/workspace-service/other/resource-locator-ACTIVE.xml
  93. +6 −0 service/service/java/source/etc/workspace-service/other/resource-locator-default.xml
  94. +133 −0 service/service/java/source/etc/workspace-service/spotinstances.conf
  95. +17 −1 service/service/java/source/share/lib/workspace_service_derby_schema.sql
  96. +58 −0 service/service/java/source/src/org/globus/workspace/StateChangeInterested.java
  97. +3 −1 service/service/java/source/src/org/globus/workspace/WorkspaceConstants.java
  98. +307 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequest.java
  99. +14 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestException.java
  100. +105 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestFilter.java
  101. +86 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestHome.java
  102. +34 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestManager.java
  103. +1,128 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestManagerImpl.java
  104. +27 −0 service/service/java/source/src/org/globus/workspace/async/AsyncRequestStatus.java
  105. +62 −0 service/service/java/source/src/org/globus/workspace/async/pricingmodel/AbstractPricingModel.java
  106. +84 −0 ...e/service/java/source/src/org/globus/workspace/async/pricingmodel/MaximizeProfitPricingModel.java
  107. +48 −0 ...vice/java/source/src/org/globus/workspace/async/pricingmodel/MaximizeUtilizationPricingModel.java
  108. +14 −0 service/service/java/source/src/org/globus/workspace/async/pricingmodel/PricingModel.java
  109. +7 −0 service/service/java/source/src/org/globus/workspace/async/pricingmodel/PricingModelConstants.java
  110. +32 −5 service/service/java/source/src/org/globus/workspace/creation/{Creation.java → CreationManager.java}
  111. +71 −0 service/service/java/source/src/org/globus/workspace/creation/InternalCreationManager.java
  112. +271 −138 ...urce/src/org/globus/workspace/creation/defaults/{DefaultCreation.java → CreationManagerImpl.java}
  113. +256 −21 service/service/java/source/src/org/globus/workspace/manager/DelegatingManager.java
  114. +120 −25 service/service/java/source/src/org/globus/workspace/persistence/DataConvert.java
  115. +58 −0 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapter.java
  116. +51 −3 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterConstants.java
  117. +390 −2 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterImpl.java
  118. +107 −0 ...e/service/java/source/src/org/globus/workspace/persistence/impls/ResourcepoolPersistenceUtil.java
  119. +3 −0 ...service/java/source/src/org/globus/workspace/persistence/impls/VirtualMachinePersistenceUtil.java
  120. +17 −23 service/service/java/source/src/org/globus/workspace/scheduler/Scheduler.java
  121. +22 −12 service/service/java/source/src/org/globus/workspace/scheduler/{Event.java → StateChangeEvent.java}
  122. +60 −17 service/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSchedulerAdapter.java
  123. +86 −11 service/service/java/source/src/org/globus/workspace/scheduler/defaults/DefaultSlotManagement.java
  124. +69 −0 service/service/java/source/src/org/globus/workspace/scheduler/defaults/PreemptableSpaceManager.java
  125. +31 −0 service/service/java/source/src/org/globus/workspace/scheduler/defaults/ResourcepoolEntry.java
  126. +504 −3 service/service/java/source/src/org/globus/workspace/scheduler/defaults/ResourcepoolUtil.java
  127. +2 −1 service/service/java/source/src/org/globus/workspace/scheduler/defaults/SlotManagement.java
  128. +1 −1 ...ce/service/java/source/src/org/globus/workspace/scheduler/defaults/pilot/PilotSlotManagement.java
  129. +14 −21 .../service/java/source/src/org/globus/workspace/service/binding/defaults/DefaultBindingAdapter.java
  130. +13 −0 service/service/java/source/src/org/globus/workspace/service/binding/vm/VirtualMachine.java
  131. +11 −2 service/service/java/source/src/org/globus/workspace/service/impls/InstanceResourceImpl.java
  132. +3 −1 service/service/java/source/src/org/globus/workspace/service/impls/OneXenVM.java
  133. +3 −1 service/service/java/source/src/org/globus/workspace/service/impls/StatefulResourceImpl.java
  134. +19 −1 service/service/java/tests/suites/basic/home/services/etc/nimbus/elastic/other/main.conflocator.xml
  135. +70 −1 service/service/java/tests/suites/basic/home/services/etc/nimbus/elastic/other/main.xml
  136. +17 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/query/other/main.conflocator.xml
  137. +67 −12 service/service/java/tests/suites/basic/home/services/etc/nimbus/query/other/main.xml
  138. +8 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/cumulus.conf
  139. +20 −0 ...e/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/global-policies.conf
  140. +10 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/network.conf
  141. +4 −1 ...java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-ACTIVE.xml
  142. +4 −1 ...va/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-disabled.xml
  143. +4 −0 .../tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-groupauthz.xml
  144. +4 −0 ...java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/authz-callout-python.xml
  145. +25 −0 ...ice/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  146. +25 −5 ...ce/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.repr.xml
  147. +61 −11 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.xml
  148. +2 −1 ...a/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/resource-locator-ACTIVE.xml
  149. +2 −1 .../tests/suites/basic/home/services/etc/nimbus/workspace-service/other/resource-locator-default.xml
  150. +127 −0 ...ice/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/spotinstances.conf
  151. +13 −1 ...service/java/tests/suites/basic/home/services/share/nimbus/lib/workspace_service_derby_schema.sql
  152. +55 −11 service/service/java/tests/suites/common/src/org/globus/workspace/testing/utils/ReprPopulator.java
  153. +98 −0 ...service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/elastic/elastic.conf
  154. +7 −0 ...ice/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/elastic/other/README.txt
  155. +69 −0 ...ests/suites/spotinstances/noresources/home/services/etc/nimbus/elastic/other/main.conflocator.xml
  156. +285 −0 ...rvice/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/elastic/other/main.xml
  157. +69 −0 .../tests/suites/spotinstances/noresources/home/services/etc/nimbus/elastic/other/other-elastic.conf
  158. +68 −0 .../tests/suites/spotinstances/noresources/home/services/etc/nimbus/query/other/main.conflocator.xml
  159. +335 −0 ...service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/query/other/main.xml
  160. +36 −0 ...ice/service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/query/query.conf
  161. +5 −0 service/service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/query/users.txt
  162. +77 −0 ...ice/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/rest/other/main-fake.xml
  163. +28 −0 ...a/tests/suites/spotinstances/noresources/home/services/etc/nimbus/rest/other/main.conflocator.xml
  164. +86 −0 .../service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/rest/other/main.xml
  165. +12 −0 service/service/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/rest/rest.conf
  166. +65 −0 ...tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/accounting.conf
  167. +8 −0 ...va/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/cumulus.conf
  168. +89 −0 .../suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/global-policies.conf
  169. +59 −0 ...uites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/README.txt
  170. +30 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group01.properties
  171. +2 −0 ...ites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group01.txt
  172. +15 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group02.properties
  173. +2 −0 ...ites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group02.txt
  174. +15 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group03.properties
  175. +2 −0 ...ites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group03.txt
  176. +22 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group04.properties
  177. +2 −0 ...ites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/group-authz/group04.txt
  178. +153 −0 ...va/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/logging.conf
  179. +57 −0 ...a/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/metadata.conf
  180. +30 −0 ...suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/network-pools/private
  181. +28 −0 .../suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/network-pools/public
  182. +31 −0 ...va/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/network.conf
  183. +7 −0 ...ests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/README.txt
  184. +21 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-ACTIVE.xml
  185. +21 −0 ...instances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-disabled.xml
  186. +102 −0 ...stances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-groupauthz.xml
  187. +35 −0 ...otinstances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-python.xml
  188. +134 −0 .../spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  189. +68 −0 ...sts/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/common.conf
  190. +146 −0 ...s/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  191. +121 −0 ...s/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/main.repr.xml
  192. +699 −0 .../tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/main.xml
  193. +35 −0 ...nstances/noresources/home/services/etc/nimbus/workspace-service/other/resource-locator-ACTIVE.xml
  194. +35 −0 ...stances/noresources/home/services/etc/nimbus/workspace-service/other/resource-locator-default.xml
  195. +116 −0 ...instances/noresources/home/services/etc/nimbus/workspace-service/other/resource-locator-pilot.xml
  196. +5 −0 ...nstances/noresources/home/services/etc/nimbus/workspace-service/other/shared-secret-suggestion.py
  197. +21 −0 ...ests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/pilot-authz.conf
  198. +117 −0 ...java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/pilot.conf
  199. +47 −0 ...tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/repository.conf
  200. +127 −0 ...ts/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/spotinstances.conf
  201. +60 −0 ...e/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/ssh.conf
  202. +18 −0 ...tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/vmm-pools/pool1
  203. +36 −0 ...e/java/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/vmm.conf
  204. +8 −0 ...e/service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/acctdb-delete.sh
  205. +8 −0 ...ce/service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/acctdb-reset.sh
  206. +8 −0 ...ice/service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/full-delete.sh
  207. +8 −0 service/service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/full-reset.sh
  208. +336 −0 ...ce/service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/lib/db-mgmt.xml
  209. +87 −0 .../service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/lib/notifications
  210. +89 −0 ...ice/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/lib/pilotnotifications
  211. +3 −0 ...tinstances/noresources/home/services/share/nimbus/lib/workspace_service_derby_accounting_dump.sql
  212. +32 −0 ...nstances/noresources/home/services/share/nimbus/lib/workspace_service_derby_accounting_schema.sql
  213. +23 −0 .../suites/spotinstances/noresources/home/services/share/nimbus/lib/workspace_service_derby_dump.sql
  214. +233 −0 ...uites/spotinstances/noresources/home/services/share/nimbus/lib/workspace_service_derby_schema.sql
  215. +8 −0 ...ervice/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/servicedb-delete.sh
  216. +8 −0 ...service/java/tests/suites/spotinstances/noresources/home/services/share/nimbus/servicedb-reset.sh
  217. +98 −0 .../java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/elastic/elastic.conf
  218. +7 −0 ...a/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/elastic/other/README.txt
  219. +69 −0 ...ites/spotinstances/singleresourcepool/home/services/etc/nimbus/elastic/other/main.conflocator.xml
  220. +285 −0 ...ava/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/elastic/other/main.xml
  221. +69 −0 ...suites/spotinstances/singleresourcepool/home/services/etc/nimbus/elastic/other/other-elastic.conf
  222. +68 −0 ...suites/spotinstances/singleresourcepool/home/services/etc/nimbus/query/other/main.conflocator.xml
  223. +335 −0 .../java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/query/other/main.xml
  224. +36 −0 ...vice/java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/query/query.conf
  225. +5 −0 ...rvice/java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/query/users.txt
  226. +77 −0 ...a/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/rest/other/main-fake.xml
  227. +28 −0 .../suites/spotinstances/singleresourcepool/home/services/etc/nimbus/rest/other/main.conflocator.xml
  228. +86 −0 ...e/java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/rest/other/main.xml
  229. +12 −0 ...ervice/java/tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/rest/rest.conf
  230. +65 −0 ...uites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/accounting.conf
  231. +8 −0 ...s/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/cumulus.conf
  232. +89 −0 .../spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/global-policies.conf
  233. +59 −0 ...potinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/README.txt
  234. +30 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group01.properties
  235. +2 −0 ...otinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group01.txt
  236. +15 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group02.properties
  237. +2 −0 ...otinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group02.txt
  238. +15 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group03.properties
  239. +2 −0 ...otinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group03.txt
  240. +22 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group04.properties
  241. +2 −0 ...otinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/group-authz/group04.txt
  242. +153 −0 ...s/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/logging.conf
  243. +57 −0 .../suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/metadata.conf
  244. +30 −0 ...spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/network-pools/private
  245. +32 −0 .../spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/network-pools/public
  246. +31 −0 ...s/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/network.conf
  247. +7 −0 ...ites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/README.txt
  248. +21 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-ACTIVE.xml
  249. +21 −0 ...es/singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-disabled.xml
  250. +102 −0 .../singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-groupauthz.xml
  251. +35 −0 ...nces/singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-python.xml
  252. +134 −0 ...stances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  253. +68 −0 ...tes/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/common.conf
  254. +146 −0 ...nstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  255. +121 −0 ...s/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/main.repr.xml
  256. +699 −0 ...suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/main.xml
  257. +35 −0 ...s/singleresourcepool/home/services/etc/nimbus/workspace-service/other/resource-locator-ACTIVE.xml
  258. +35 −0 .../singleresourcepool/home/services/etc/nimbus/workspace-service/other/resource-locator-default.xml
  259. +116 −0 ...es/singleresourcepool/home/services/etc/nimbus/workspace-service/other/resource-locator-pilot.xml
  260. +5 −0 ...s/singleresourcepool/home/services/etc/nimbus/workspace-service/other/shared-secret-suggestion.py
  261. +21 −0 ...ites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/pilot-authz.conf
  262. +117 −0 ...sts/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/pilot.conf
  263. +47 −0 ...uites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/repository.conf
  264. +127 −0 ...es/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/spotinstances.conf
  265. +60 −0 ...tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/ssh.conf
  266. +24 −0 ...uites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/vmm-pools/pool1
  267. +36 −0 ...tests/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/vmm.conf
  268. +8 −0 ...ce/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/acctdb-delete.sh
  269. +8 −0 ...ice/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/acctdb-reset.sh
  270. +8 −0 ...vice/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/full-delete.sh
  271. +8 −0 ...rvice/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/full-reset.sh
  272. +336 −0 ...ice/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/lib/db-mgmt.xml
  273. +87 −0 ...e/java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/lib/notifications
  274. +89 −0 ...a/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/lib/pilotnotifications
  275. +3 −0 ...ces/singleresourcepool/home/services/share/nimbus/lib/workspace_service_derby_accounting_dump.sql
  276. +32 −0 ...s/singleresourcepool/home/services/share/nimbus/lib/workspace_service_derby_accounting_schema.sql
  277. +23 −0 .../spotinstances/singleresourcepool/home/services/share/nimbus/lib/workspace_service_derby_dump.sql
  278. +233 −0 ...potinstances/singleresourcepool/home/services/share/nimbus/lib/workspace_service_derby_schema.sql
  279. +8 −0 ...java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/servicedb-delete.sh
  280. +8 −0 .../java/tests/suites/spotinstances/singleresourcepool/home/services/share/nimbus/servicedb-reset.sh
  281. +162 −0 ...uites/spotinstances/src/org/globus/workspace/testing/suites/spotinstances/NoResourcesSISuite.java
  282. +1,716 −0 ...potinstances/src/org/globus/workspace/testing/suites/spotinstances/SingleResourcePoolSISuite.java
  283. +231 −0 service/service/java/tests/unit/org/globus/workspace/scheduler/defaults/NimbusDatabaseTestCase.java
  284. +6 −6 service/service/java/tests/unit/org/globus/workspace/scheduler/defaults/ResourcepoolEntryTest.java
  285. +322 −0 ...ce/service/java/tests/unit/org/globus/workspace/scheduler/defaults/ResourcepoolUtilProfiling.java
  286. +341 −0 service/service/java/tests/unit/org/globus/workspace/scheduler/defaults/ResourcepoolUtilTest.java
  287. +146 −0 ...ce/service/java/tests/unit/org/globus/workspace/spotinstances/MaximizeProfitPricingModelTest.java
  288. +245 −0 ...rvice/java/tests/unit/org/globus/workspace/spotinstances/MaximizeUtilizationPricingModelTest.java
  289. +49 −0 service/service/java/tests/unit/org/globus/workspace/spotinstances/PricingModelTestUtils.java
  290. +1,522 −0 tests/conf/connection.py
  291. +27 −0 tests/conf/pool1
  292. +44 −0 tests/conf/public
  293. +109 −0 tests/conf/spotinstancerequest.py
  294. +406 −0 tests/ec2_si_tests.py
  295. +18 −0 tests/si-tests-setup.sh
  296. +23 −0 tests/si-tests.sh
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../../service/service/java/tests/suites/spotinstances">
+ <sourceFolder url="file://$MODULE_DIR$/../../service/service/java/tests/suites/spotinstances/src" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="tests-common" />
+ </component>
+</module>
+
View
@@ -12,6 +12,7 @@
<module fileurl="file://$PROJECT_DIR$/.idea-modules/ec2soap/ec2soap.iml" filepath="$PROJECT_DIR$/.idea-modules/ec2soap/ec2soap.iml" group="protocols" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/installer/installer.iml" filepath="$PROJECT_DIR$/.idea-modules/installer/installer.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/rm-api/rm-api.iml" filepath="$PROJECT_DIR$/.idea-modules/rm-api/rm-api.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea-modules/service-suites//spotinstances.iml" filepath="$PROJECT_DIR$/.idea-modules/service-suites//spotinstances.iml" group="service-suites" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/service-suites/tests-common.iml" filepath="$PROJECT_DIR$/.idea-modules/service-suites/tests-common.iml" group="service-suites" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/wrksp-svc/workspace-service.iml" filepath="$PROJECT_DIR$/.idea-modules/wrksp-svc/workspace-service.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea-modules/wsrf/wsrf.iml" filepath="$PROJECT_DIR$/.idea-modules/wsrf/wsrf.iml" group="protocols" />
Binary file not shown.
View
Binary file not shown.
@@ -51,10 +51,19 @@
<property name="placeholderPrefix" value="$OTHER_ELASTIC{" />
</bean>
- <bean id="querySettings"
+ <bean id="querySettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="$NIMBUS_HOME/services/etc/nimbus/query/query.conf" />
<property name="placeholderPrefix" value="$QUERY{" />
</bean>
+ <bean id="siSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ <property name="placeholderPrefix"
+ value="$SI{" />
+ </bean>
+
</beans>
@@ -18,6 +18,10 @@
<constructor-arg ref="nimbus-elastic.rm.terminate" />
<constructor-arg ref="nimbus-elastic.rm.reboot" />
<constructor-arg ref="nimbus-elastic.rm.describe" />
+ <constructor-arg ref="nimbus-elastic.rm.requestSI" />
+ <constructor-arg ref="nimbus-elastic.rm.cancelSI" />
+ <constructor-arg ref="nimbus-elastic.rm.describeSI" />
+ <constructor-arg ref="nimbus-elastic.rm.spHistory" />
<constructor-arg ref="nimbus-elastic.rm.containerInterface" />
<constructor-arg ref="nimbus-elastic.rm.modulelocator" />
@@ -76,6 +80,40 @@
</bean>
+ <!-- ************ Spot Instances *********** -->
+
+ <bean id="nimbus-elastic.rm.requestSI"
+ class="org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.rm.defaults.DefaultRequestSI">
+
+ <constructor-arg ref="nimbus-elastic.general.ra" />
+ <constructor-arg ref="nimbus-elastic.general.networks" />
+ <constructor-arg ref="nimbus-elastic.image.repository" />
+ <constructor-arg ref="nimbus-elastic.rm.idmappings" />
+ <constructor-arg ref="nimbus-elastic.rm.describe" />
+ <constructor-arg ref="nimbus-elastic.rm.describeSI" />
+ <constructor-arg ref="nimbus-elastic.rm.cancelSI" />
+ <constructor-arg ref="nimbus-elastic.rm.containerInterface" />
+ <constructor-arg ref="nimbus-elastic.security.sshkeys" />
+ <constructor-arg ref="nimbus-elastic.rm.modulelocator" />
+
+ </bean>
+
+ <bean id="nimbus-elastic.rm.cancelSI"
+ class="org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.rm.defaults.DefaultCancelSI" />
+
+ <bean id="nimbus-elastic.rm.describeSI"
+ class="org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.rm.defaults.DefaultDescribeSI">
+
+ <constructor-arg ref="nimbus-elastic.rm.idmappings" />
+ <constructor-arg ref="nimbus-elastic.rm.describe" />
+ <constructor-arg ref="nimbus-elastic.general.ra" />
+ </bean>
+
+ <bean id="nimbus-elastic.rm.spHistory"
+ class="org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.rm.defaults.DefaultDescribeSpotPriceHistory">
+
+ <constructor-arg ref="nimbus-elastic.general.ra" />
+ </bean>
<!-- ************ ServiceGeneral *********** -->
@@ -106,6 +144,7 @@
<property name="cpuArch" value="$OTHER_ELASTIC{cpu.arch}" />
<property name="vmmType" value="$OTHER_ELASTIC{vmm.type}" />
<property name="vmmVersion" value="$OTHER_ELASTIC{vmm.version}" />
+ <property name="siType" value="$SI{si.instancetype}" />
</bean>
@@ -16,7 +16,7 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.*;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.*;
import java.rmi.RemoteException;
@@ -16,7 +16,7 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.*;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.*;
import java.rmi.RemoteException;
@@ -16,7 +16,7 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.*;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.*;
import java.rmi.RemoteException;
@@ -16,7 +16,7 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.*;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.*;
import java.rmi.RemoteException;
@@ -16,7 +16,7 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.*;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.*;
import java.rmi.RemoteException;
@@ -43,10 +43,30 @@ public DescribeInstancesResponseType describeInstances(
throws RemoteException;
public MonitorInstancesResponseType monitorInstances(
- MonitorInstancesType monitorInstancesRequestMsg)
+ MonitorInstancesType monitorInstancesRequestMsg)
throws RemoteException;
public MonitorInstancesResponseType unmonitorInstances(
- MonitorInstancesType unmonitorInstancesRequestMsg)
+ MonitorInstancesType unmonitorInstancesRequestMsg)
+ throws RemoteException;
+
+ // -------------------------------------------------------------------------
+ // SI OPERATIONS
+ // -------------------------------------------------------------------------
+
+ public RequestSpotInstancesResponseType requestSpotInstances(
+ RequestSpotInstancesType requestSpotInstancesMsg)
+ throws RemoteException;
+
+ public CancelSpotInstanceRequestsResponseType cancelSpotInstanceRequests(
+ CancelSpotInstanceRequestsType cancelSpotInstancesMsg)
+ throws RemoteException;
+
+ public DescribeSpotInstanceRequestsResponseType describeSpotInstanceRequests(
+ DescribeSpotInstanceRequestsType describeSpotInstancesMsg)
+ throws RemoteException;
+
+ public DescribeSpotPriceHistoryResponseType describeSpotPriceHistory(
+ DescribeSpotPriceHistoryType describeSpotPriceHistoryType)
throws RemoteException;
}
@@ -16,22 +16,22 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.CreateKeyPairResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.CreateKeyPairType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeKeyPairsResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeKeyPairsType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DeleteKeyPairResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DeleteKeyPairType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.CreateSecurityGroupResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.CreateSecurityGroupType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DeleteSecurityGroupResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DeleteSecurityGroupType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeSecurityGroupsResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeSecurityGroupsType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.AuthorizeSecurityGroupIngressResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.AuthorizeSecurityGroupIngressType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.RevokeSecurityGroupIngressResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.RevokeSecurityGroupIngressType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.CreateKeyPairResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.CreateKeyPairType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeKeyPairsResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeKeyPairsType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DeleteKeyPairResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DeleteKeyPairType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.CreateSecurityGroupResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.CreateSecurityGroupType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DeleteSecurityGroupResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DeleteSecurityGroupType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeSecurityGroupsResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeSecurityGroupsType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.AuthorizeSecurityGroupIngressResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.AuthorizeSecurityGroupIngressType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.RevokeSecurityGroupIngressResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.RevokeSecurityGroupIngressType;
import java.rmi.RemoteException;
@@ -47,11 +47,14 @@ public String getMatchingName(ResourceAllocation ra)
*/
public ResourceAllocation getMatchingRA(String name,
int minNumNodes,
- int maxNumNodes)
+ int maxNumNodes,
+ boolean spot)
throws CannotTranslateException;
/**
* @return vmm to request
*/
public RequiredVMM getRequiredVMM();
+
+ public String getSpotInstanceType();
}
@@ -18,12 +18,12 @@
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.ServiceGeneral;
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.service.UnimplementedOperations;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeAvailabilityZonesResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeAvailabilityZonesType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeAvailabilityZonesSetType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeAvailabilityZonesSetItemType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.AvailabilityZoneSetType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.AvailabilityZoneItemType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeAvailabilityZonesResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeAvailabilityZonesType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeAvailabilityZonesSetType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeAvailabilityZonesSetItemType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.AvailabilityZoneSetType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.AvailabilityZoneItemType;
import java.rmi.RemoteException;
import java.util.List;
@@ -46,7 +46,7 @@
// -------------------------------------------------------------------------
protected final ReprFactory repr;
-
+
protected int smallMemory;
protected int largeMemory;
protected int xlargeMemory;
@@ -62,6 +62,8 @@
protected String vmmVersion;
protected RequiredVMM requestThisVMM;
+
+ protected String siType;
// -------------------------------------------------------------------------
@@ -167,11 +169,28 @@ public void setVmmType(String vmmType) {
public void setVmmVersion(String vmmVersion) {
this.vmmVersion = vmmVersion;
}
+
+ public void setSiType(String siType) throws Exception {
+ if(siType.equalsIgnoreCase("small")){
+ this.siType = this.getSmallName();
+ } else if(siType.equalsIgnoreCase("large")){
+ this.siType = this.getLargeName();
+ } else if(siType.equalsIgnoreCase("xlarge")){
+ this.siType = this.getXlargeName();
+ } else {
+ throw new Exception("Invalid SI type in spotinstances configuration file. " +
+ "Valid values are: small, large or xlarge");
+ }
+ }
// -------------------------------------------------------------------------
// implements ResourceAllocations
// -------------------------------------------------------------------------
+ public String getSpotInstanceType(){
+ return this.siType;
+ }
+
public String getSmallName() {
return this.smallName;
}
@@ -221,7 +240,8 @@ public String getMatchingName(ResourceAllocation ra)
public ResourceAllocation getMatchingRA(String name,
int minNumNodes,
- int maxNumNodes)
+ int maxNumNodes,
+ boolean spot)
throws CannotTranslateException {
final String cmpName;
@@ -235,20 +255,35 @@ public ResourceAllocation getMatchingRA(String name,
final _ResourceAllocation ra = this.repr._newResourceAllocation();
ra.setNodeNumber(minNumNodes); // only respecting min at the moment
+ if(spot && !cmpName.equals(siType)){
+ throw new CannotTranslateException(
+ "Unsupported spot instance type: '" + name + "'." +
+ " Currently supported SI type: " + siType);
+ }
+
+ Integer memory = getInstanceMemory(cmpName);
+
+ ra.setMemory(memory);
+
+ ra.setSpotInstance(spot);
+
+ ra.setArchitecture(this.cpuArch);
+
+ return ra;
+ }
+
+ protected Integer getInstanceMemory(final String cmpName)
+ throws CannotTranslateException {
if (cmpName.equals(this.getSmallName())) {
- ra.setMemory(this.smallMemory);
+ return this.smallMemory;
} else if (cmpName.equals(this.getLargeName())) {
- ra.setMemory(this.largeMemory);
+ return this.largeMemory;
} else if (cmpName.equals(this.getXlargeName())) {
- ra.setMemory(this.xlargeMemory);
+ return this.xlargeMemory;
} else {
throw new CannotTranslateException(
- "Unknown instance type '" + name + "'");
+ "Unknown instance type '" + cmpName + "'");
}
-
- ra.setArchitecture(this.cpuArch);
-
- return ra;
}
public RequiredVMM getRequiredVMM() {
@@ -16,14 +16,14 @@
package org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.image;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesResponseType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesOwnersType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesOwnerType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesInfoType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesItemType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesResponseInfoType;
-import org.nimbustools.messaging.gt4_0_elastic.generated.v2009_08_15.DescribeImagesResponseItemType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesResponseType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesOwnersType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesOwnerType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesInfoType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesItemType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesResponseInfoType;
+import org.nimbustools.messaging.gt4_0_elastic.generated.v2010_06_15.DescribeImagesResponseItemType;
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.rm.ContainerInterface;
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.service.UnimplementedOperations;
import org.nimbustools.messaging.gt4_0_elastic.v2008_05_05.ServiceImage;
Oops, something went wrong.

0 comments on commit d6782f0

Please sign in to comment.