Author: adietish
Date: 2010-12-06 05:21:22 -0500 (Mon, 06 Dec 2010)
New Revision: 27183
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudCommand.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetImagesCommand.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetInstancesCommand.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/command/
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IImageListListener.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
Log:
[JBIDE-7688][JBIDE-7813]
now getting images and instances in async manner by commands,
CloudElementFilter#filter is now cloud instance specific (is instantiated with a reference
to a cloud)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -26,12 +26,18 @@
public abstract class AbstractCloudElementFilter<CLOUDELEMENT extends
IDeltaCloudElement> implements
ICloudElementFilter<CLOUDELEMENT> {
+ private DeltaCloud cloud;
+
+ public AbstractCloudElementFilter(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
private IFieldMatcher nameRule;
private IFieldMatcher idRule;
- public Collection<CLOUDELEMENT> filter(CLOUDELEMENT[] cloudElements) {
+ public Collection<CLOUDELEMENT> filter() throws DeltaCloudException {
List<CLOUDELEMENT> filteredElements = new ArrayList<CLOUDELEMENT>();
- for (CLOUDELEMENT cloudElement : cloudElements) {
+ for (CLOUDELEMENT cloudElement : getCloudElements()) {
if (matches(cloudElement)) {
filteredElements.add(cloudElement);
}
@@ -39,6 +45,8 @@
return filteredElements;
}
+ protected abstract CLOUDELEMENT[] getCloudElements() throws DeltaCloudException;
+
protected boolean matches(CLOUDELEMENT cloudElement) {
return nameRule.matches(cloudElement.getName())
&& idRule.matches(cloudElement.getId());
@@ -67,6 +75,10 @@
}
}
+ protected DeltaCloud getCloud() {
+ return cloud;
+ }
+
@Override
public String toString() {
return nameRule + ";" //$NON-NLS-1$
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudJob.java
(from rev 27061,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractCloudJob.java)
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudJob.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudJob.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.tools.common.log.StatusFactory;
+
+public abstract class AbstractCloudJob extends Job {
+
+ public AbstractCloudJob(String name) {
+ super(name);
+ // setUser(true);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask(getName(), IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ try {
+ return doRun(monitor);
+ } catch (Exception e) {
+ return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID,
+ MessageFormat.format("Could not {0}", getName()));
+ }
+ }
+
+ protected abstract IStatus doRun(IProgressMonitor monitor) throws Exception;
+
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudJob.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudCommand.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudCommand.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudCommand.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * @author André Dietishiem
+ */
+public abstract class AbstractDeltaCloudCommand {
+
+ private DeltaCloud cloud;
+
+ public AbstractDeltaCloudCommand(DeltaCloud cloud) {
+ Assert.isLegal(cloud != null);
+ this.cloud = cloud;
+ }
+
+ protected DeltaCloud getCloud() {
+ return cloud;
+ }
+
+ public abstract void execute();
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -23,6 +23,15 @@
private IFieldMatcher matcher = new AllFieldMatcher();
+
+ public AllImageFilter(DeltaCloud cloud) {
+ super(cloud);
+ }
+
+ protected DeltaCloudImage[] getCloudElements() throws DeltaCloudException {
+ return getCloud().getImages();
+ }
+
@Override
public boolean matches(DeltaCloudImage image) {
return true;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -11,9 +11,18 @@
*/
public class AllInstanceFilter extends
AbstractCloudElementFilter<DeltaCloudInstance> implements IInstanceFilter {
+ public AllInstanceFilter(DeltaCloud cloud) {
+ super(cloud);
+ }
+
private IFieldMatcher matcher = new AllFieldMatcher();
@Override
+ protected DeltaCloudInstance[] getCloudElements() throws DeltaCloudException {
+ return getCloud().getInstances();
+ }
+
+ @Override
public boolean matches(DeltaCloudInstance instance) {
return true;
}
@@ -52,5 +61,4 @@
public IFieldMatcher getRealmRule() {
return matcher;
}
-
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -167,10 +167,10 @@
private IInstanceFilter createInstanceFilter(String ruleString) {
IInstanceFilter instanceFilter = null;
if (IInstanceFilter.ALL_STRING.equals(ruleString)) {
- instanceFilter = new AllInstanceFilter();
+ instanceFilter = new AllInstanceFilter(this);
} else {
try {
- instanceFilter = new InstanceFilter();
+ instanceFilter = new InstanceFilter(this);
instanceFilter.setRules(ruleString);
} catch (PatternSyntaxException e) {
instanceFilter.setRules(IInstanceFilter.ALL_STRING);
@@ -194,10 +194,10 @@
private IImageFilter createImageFilter(String ruleString) {
IImageFilter imageFilter = null;
if (IImageFilter.ALL_STRING.equals(ruleString)) {
- imageFilter = new AllImageFilter();
+ imageFilter = new AllImageFilter(this);
} else {
try {
- imageFilter = new ImageFilter();
+ imageFilter = new ImageFilter(this);
imageFilter.setRules(ruleString);
} catch (PatternSyntaxException e) {
imageFilter.setRules(IImageFilter.ALL_STRING);
@@ -340,22 +340,26 @@
*
* @see #notifyInstanceListListeners(DeltaCloudInstance[])
*/
- private DeltaCloudInstance[] loadInstances() throws DeltaCloudException {
+ private void loadInstances() throws DeltaCloudException {
try {
clearInstances();
if (instances == null) {
instances = new DeltaCloudInstancesRepository();
}
instances.add(client.listInstances(), this);
- // TODO: remove notification with all instances, replace by
- // notifying the changed instance
- return notifyInstanceListListeners(instances.get());
} catch (DeltaCloudClientException e) {
throw new DeltaCloudException(MessageFormat.format("Could not load instances of
cloud {0}: {1}",
getName(), e.getMessage()), e);
}
}
+ private void clearImages() {
+ if (images != null) {
+ images.clear();
+ notifyImageListListeners(images.get());
+ }
+ }
+
private void clearInstances() {
if (instances != null) {
instances.clear();
@@ -363,27 +367,47 @@
}
}
- private void clearImages() {
- if (images != null) {
- images.clear();
- notifyImageListListeners(images.get());
+ protected DeltaCloudInstance[] getInstances() throws DeltaCloudException {
+ if (instances == null) {
+ loadInstances();
}
+ return instances.get();
}
- public DeltaCloudInstance[] getInstances() throws DeltaCloudException {
+ protected void asyncGetInstances() throws DeltaCloudException {
if (instances == null) {
- return loadInstances();
+ loadInstances();
}
- return instances.get();
+ notifyInstanceListListeners(instances.get());
}
- public DeltaCloudImage[] getImages() throws DeltaCloudException {
+ protected DeltaCloudImage[] getImages() throws DeltaCloudException {
if (images == null) {
- return loadImages();
+ loadImages();
}
return images.get();
}
+ protected void asyncGetImages() throws DeltaCloudException {
+ if (images == null) {
+ loadImages();
+ }
+ // TODO: remove notification with all instances, replace by
+ // notifying the changed instance
+ notifyImageListListeners(images.get());
+ }
+
+ public DeltaCloudImage getImage(String id) throws DeltaCloudException {
+ DeltaCloudImage matchingImage = null;
+ for (DeltaCloudImage image : getImages()) {
+ if (id.equals(image.getId())) {
+ matchingImage = image;
+ break;
+ }
+ }
+ return matchingImage;
+ }
+
public void createKey(String keyname, String keystoreLocation) throws
DeltaCloudException {
try {
client.createKey(keyname, keystoreLocation);
@@ -496,16 +520,13 @@
*
* @see #notifyImageListListeners(DeltaCloudImage[])
*/
- private DeltaCloudImage[] loadImages() throws DeltaCloudException {
+ private void loadImages() throws DeltaCloudException {
try {
clearImages();
if (images == null) {
images = new DeltaCloudImagesRepository();
}
images.add(client.listImages(), this);
- // TODO: remove notification with all instances, replace by
- // notifying the changed instance
- return notifyImageListListeners(images.get());
} catch (DeltaCloudClientException e) {
throw new DeltaCloudException(MessageFormat.format("Could not load images of
cloud {0}: {1}",
getName(), e.getMessage()), e);
@@ -521,7 +542,7 @@
throw new DeltaCloudException(e);
}
}
-
+
public boolean testConnection() throws DeltaCloudException {
String instanceId = "nonexistingInstance"; //$NON-NLS-1$
try {
@@ -563,7 +584,7 @@
getInstances(); // make sure instances are initialized
DeltaCloudInstance deltaCloudInstance = instances.add(instance, this);
deltaCloudInstance.setGivenName(name);
- notifyInstanceListListeners(getInstances());
+ notifyInstanceListListeners(instances.get());
return deltaCloudInstance;
}
} catch (DeltaCloudClientException e) {
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetImagesCommand.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetImagesCommand.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetImagesCommand.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class GetImagesCommand extends AbstractDeltaCloudCommand {
+
+ public GetImagesCommand(DeltaCloud cloud) {
+ super(cloud);
+ }
+
+ public void execute() {
+ // TODO: internationalize strings
+ new AbstractCloudJob(
+ MessageFormat.format("Get images from cloud {0}", getCloud().getName())) {
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) throws DeltaCloudException {
+ getCloud().asyncGetImages();
+ return Status.OK_STATUS;
+ }
+
+ }.schedule();
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetImagesCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetInstancesCommand.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetInstancesCommand.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetInstancesCommand.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class GetInstancesCommand extends AbstractDeltaCloudCommand {
+
+ public GetInstancesCommand(DeltaCloud cloud) {
+ super(cloud);
+ }
+
+ public void execute() {
+ // TODO: internationalize strings
+ new AbstractCloudJob(
+ MessageFormat.format("Get instances from cloud {0}", getCloud().getName()))
{
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) throws DeltaCloudException {
+ getCloud().asyncGetInstances();
+ return Status.OK_STATUS;
+ }
+
+ }.schedule();
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/GetInstancesCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -35,10 +35,8 @@
+ ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // arch
+ ALL_MATCHER_EXPRESSION; // desc
- public Collection<CLOUDELEMENT> filter(CLOUDELEMENT[] cloudElements);
+ public Collection<CLOUDELEMENT> filter() throws DeltaCloudException;
-// public boolean matches(CLOUDELEMENT cloudElement);
-
public void setRules(String ruleString);
public IFieldMatcher getNameRule();
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IImageListListener.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IImageListListener.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IImageListListener.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -12,6 +12,6 @@
public interface IImageListListener {
- public void listChanged(DeltaCloud cloud, DeltaCloudImage[] list);
+ public void listChanged(DeltaCloud cloud, DeltaCloudImage[] imges);
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -24,6 +24,11 @@
public class ImageFilter extends AbstractCloudElementFilter<DeltaCloudImage>
implements IImageFilter {
private IFieldMatcher archRule;
+
+ public ImageFilter(DeltaCloud cloud) {
+ super(cloud);
+ }
+
private IFieldMatcher descRule;
@Override
@@ -55,4 +60,9 @@
public IFieldMatcher getDescRule() {
return descRule;
}
+
+ @Override
+ protected DeltaCloudImage[] getCloudElements() throws DeltaCloudException {
+ return getCloud().getImages();
+ }
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2010-12-06
09:55:37 UTC (rev 27182)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2010-12-06
10:21:22 UTC (rev 27183)
@@ -23,6 +23,10 @@
*/
public class InstanceFilter extends AbstractCloudElementFilter<DeltaCloudInstance>
implements IInstanceFilter {
+ public InstanceFilter(DeltaCloud cloud) {
+ super(cloud);
+ }
+
private IFieldMatcher imageIdRule;
private IFieldMatcher realmRule;
private IFieldMatcher profileRule;
@@ -83,4 +87,9 @@
public IFieldMatcher getRealmRule() {
return realmRule;
}
+
+ @Override
+ protected DeltaCloudInstance[] getCloudElements() throws DeltaCloudException {
+ return getCloud().getInstances();
+ }
}