@@ -62,7 +62,8 @@ public class ComputeServerResource extends ServerResource {
6262
6363 protected void doInit () throws ResourceException {
6464
65- String instanceDSUrl = ((OCCIApplication ) getApplication ())
65+ Properties properties = ((OCCIApplication ) getApplication ()).getProperties ();
66+ String instanceDSUrl = properties
6667 .getProperty (ConfigurationConstants .INSTANCE_DATA_STORE_URL );
6768 instanceDB = new InstanceDataStore (instanceDSUrl );
6869
@@ -325,7 +326,7 @@ public StringRepresentation post() {
325326 throw new OCCIException (ErrorType .BAD_REQUEST , ResponseConstants .IRREGULAR_SYNTAX );
326327 }
327328
328- String imageName = application .getProperty (
329+ String imageName = properties .getProperty (
329330 ConfigurationConstants .OCCI_EXTRA_RESOURCES_PREFIX + osTplResources .get (0 ).getCategory ().getTerm ());
330331 if (imageName == null || imageName .isEmpty ()) {
331332 throw new OCCIException (ErrorType .BAD_REQUEST ,
@@ -338,7 +339,7 @@ public StringRepresentation post() {
338339 // resource tpl
339340 List <Resource > resourceTplResources = filterByRelProperty (RequestConstants .RESOURCE_TPL_OCCI_SCHEME ,
340341 resources );
341- String fogbowRequirements = getRequirements (application , resourceTplResources );
342+ String fogbowRequirements = getRequirements (properties , resourceTplResources );
342343 requestXOCCIAtt .put (RequestAttribute .REQUIREMENTS .getValue (), fogbowRequirements );
343344 requestXOCCIAtt .put (RequestAttribute .INSTANCE_COUNT .getValue (), DEFAULT_INSTANCE_COUNT );
344345
@@ -375,10 +376,10 @@ public StringRepresentation post() {
375376 return new StringRepresentation (ResponseConstants .OK );
376377 }
377378
378- private String getRequirements (OCCIApplication application , List <Resource > resourceTplResources ) {
379+ private String getRequirements (Properties properties , List <Resource > resourceTplResources ) {
379380 StringBuilder requirements = new StringBuilder ();
380381 for (int i = 0 ; i < resourceTplResources .size (); i ++) {
381- String currentRequirement = application .getProperty (ConfigurationConstants .OCCI_EXTRA_RESOURCES_PREFIX
382+ String currentRequirement = properties .getProperty (ConfigurationConstants .OCCI_EXTRA_RESOURCES_PREFIX
382383 + resourceTplResources .get (i ).getCategory ().getTerm ());
383384
384385 if (currentRequirement == null || currentRequirement .isEmpty ()) {
0 commit comments