org.dasein.cloud.google.compute.server
Class SnapshotSupport

java.lang.Object
  extended by org.dasein.cloud.compute.AbstractSnapshotSupport
      extended by org.dasein.cloud.google.compute.server.SnapshotSupport
All Implemented Interfaces:
org.dasein.cloud.AccessControlledService, org.dasein.cloud.compute.SnapshotSupport

public class SnapshotSupport
extends org.dasein.cloud.compute.AbstractSnapshotSupport

Implements the snapshot services supported in the Google API.

Since:
2014.03
Version:
2014.03 initial version
Author:
Drew Lyall

Field Summary
 
Fields inherited from interface org.dasein.cloud.compute.SnapshotSupport
ANY, CREATE_SNAPSHOT, GET_SNAPSHOT, LIST_SNAPSHOT, MAKE_PUBLIC, REMOVE_SNAPSHOT, SHARE_SNAPSHOT
 
Constructor Summary
SnapshotSupport(Google provider)
           
 
Method Summary
 void addPublicShare(String providerSnapshotId)
           
 void addSnapshotShare(String providerSnapshotId, String accountNumber)
           
 String createSnapshot(org.dasein.cloud.compute.SnapshotCreateOptions options)
           
 GCESnapshotCapabilities getCapabilities()
           
 String getProviderTermForSnapshot(Locale locale)
           
 org.dasein.cloud.compute.Snapshot getSnapshot(String snapshotId)
           
 boolean isPublic(String snapshotId)
           
 boolean isSubscribed()
           
 Iterable<String> listShares(String snapshotId)
           
 Iterable<org.dasein.cloud.compute.Snapshot> listSnapshots()
           
 Iterable<org.dasein.cloud.compute.Snapshot> listSnapshots(org.dasein.cloud.compute.SnapshotFilterOptions options)
           
 Iterable<org.dasein.cloud.ResourceStatus> listSnapshotStatus()
           
 void remove(String snapshotId)
           
 void removeAllSnapshotShares(String providerSnapshotId)
           
 void removePublicShare(String providerSnapshotId)
           
 void removeSnapshotShare(String providerSnapshotId, String accountNumber)
           
 void removeTags(String[] snapshotIds, org.dasein.cloud.Tag... tags)
           
 void removeTags(String snapshotId, org.dasein.cloud.Tag... tags)
           
 Iterable<org.dasein.cloud.compute.Snapshot> searchSnapshots(org.dasein.cloud.compute.SnapshotFilterOptions options)
           
 void updateTags(String[] snapshotIds, org.dasein.cloud.Tag... tags)
           
 void updateTags(String snapshotId, org.dasein.cloud.Tag... tags)
           
 
Methods inherited from class org.dasein.cloud.compute.AbstractSnapshotSupport
create, getContext, getProvider, identifyAttachmentRequirement, mapServiceAction, searchSnapshots, shareSnapshot, snapshot, supportsSnapshotCopying, supportsSnapshotCreation, supportsSnapshotSharing, supportsSnapshotSharingWithPublic, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnapshotSupport

public SnapshotSupport(Google provider)
Method Detail

addSnapshotShare

public void addSnapshotShare(@Nonnull
                             String providerSnapshotId,
                             @Nonnull
                             String accountNumber)
                      throws org.dasein.cloud.CloudException,
                             org.dasein.cloud.InternalException
Specified by:
addSnapshotShare in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
addSnapshotShare in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

addPublicShare

public void addPublicShare(@Nonnull
                           String providerSnapshotId)
                    throws org.dasein.cloud.CloudException,
                           org.dasein.cloud.InternalException
Specified by:
addPublicShare in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
addPublicShare in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

createSnapshot

public String createSnapshot(@Nonnull
                             org.dasein.cloud.compute.SnapshotCreateOptions options)
                      throws org.dasein.cloud.CloudException,
                             org.dasein.cloud.InternalException
Specified by:
createSnapshot in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
createSnapshot in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

getCapabilities

@Nonnull
public GCESnapshotCapabilities getCapabilities()

getProviderTermForSnapshot

@Nonnull
public String getProviderTermForSnapshot(@Nonnull
                                                 Locale locale)

getSnapshot

public org.dasein.cloud.compute.Snapshot getSnapshot(@Nonnull
                                                     String snapshotId)
                                              throws org.dasein.cloud.InternalException,
                                                     org.dasein.cloud.CloudException
Specified by:
getSnapshot in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
getSnapshot in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

isPublic

public boolean isPublic(@Nonnull
                        String snapshotId)
                 throws org.dasein.cloud.InternalException,
                        org.dasein.cloud.CloudException
Specified by:
isPublic in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
isPublic in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

isSubscribed

public boolean isSubscribed()
                     throws org.dasein.cloud.InternalException,
                            org.dasein.cloud.CloudException
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

listShares

@Nonnull
public Iterable<String> listShares(@Nonnull
                                           String snapshotId)
                            throws org.dasein.cloud.InternalException,
                                   org.dasein.cloud.CloudException
Specified by:
listShares in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
listShares in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

listSnapshotStatus

@Nonnull
public Iterable<org.dasein.cloud.ResourceStatus> listSnapshotStatus()
                                                             throws org.dasein.cloud.InternalException,
                                                                    org.dasein.cloud.CloudException
Specified by:
listSnapshotStatus in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
listSnapshotStatus in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

listSnapshots

@Nonnull
public Iterable<org.dasein.cloud.compute.Snapshot> listSnapshots()
                                                          throws org.dasein.cloud.InternalException,
                                                                 org.dasein.cloud.CloudException
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

listSnapshots

@Nonnull
public Iterable<org.dasein.cloud.compute.Snapshot> listSnapshots(org.dasein.cloud.compute.SnapshotFilterOptions options)
                                                          throws org.dasein.cloud.InternalException,
                                                                 org.dasein.cloud.CloudException
Specified by:
listSnapshots in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
listSnapshots in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

remove

public void remove(@Nonnull
                   String snapshotId)
            throws org.dasein.cloud.InternalException,
                   org.dasein.cloud.CloudException
Specified by:
remove in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
remove in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

removeAllSnapshotShares

public void removeAllSnapshotShares(@Nonnull
                                    String providerSnapshotId)
                             throws org.dasein.cloud.CloudException,
                                    org.dasein.cloud.InternalException
Specified by:
removeAllSnapshotShares in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
removeAllSnapshotShares in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

removeSnapshotShare

public void removeSnapshotShare(@Nonnull
                                String providerSnapshotId,
                                @Nonnull
                                String accountNumber)
                         throws org.dasein.cloud.CloudException,
                                org.dasein.cloud.InternalException
Specified by:
removeSnapshotShare in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
removeSnapshotShare in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

removePublicShare

public void removePublicShare(@Nonnull
                              String providerSnapshotId)
                       throws org.dasein.cloud.CloudException,
                              org.dasein.cloud.InternalException
Specified by:
removePublicShare in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
removePublicShare in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

removeTags

public void removeTags(@Nonnull
                       String snapshotId,
                       @Nonnull
                       org.dasein.cloud.Tag... tags)
                throws org.dasein.cloud.CloudException,
                       org.dasein.cloud.InternalException
Specified by:
removeTags in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
removeTags in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

removeTags

public void removeTags(@Nonnull
                       String[] snapshotIds,
                       @Nonnull
                       org.dasein.cloud.Tag... tags)
                throws org.dasein.cloud.CloudException,
                       org.dasein.cloud.InternalException
Specified by:
removeTags in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
removeTags in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

searchSnapshots

@Nonnull
public Iterable<org.dasein.cloud.compute.Snapshot> searchSnapshots(@Nonnull
                                                                           org.dasein.cloud.compute.SnapshotFilterOptions options)
                                                            throws org.dasein.cloud.InternalException,
                                                                   org.dasein.cloud.CloudException
Specified by:
searchSnapshots in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
searchSnapshots in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException

updateTags

public void updateTags(@Nonnull
                       String snapshotId,
                       @Nonnull
                       org.dasein.cloud.Tag... tags)
                throws org.dasein.cloud.CloudException,
                       org.dasein.cloud.InternalException
Specified by:
updateTags in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
updateTags in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException

updateTags

public void updateTags(@Nonnull
                       String[] snapshotIds,
                       @Nonnull
                       org.dasein.cloud.Tag... tags)
                throws org.dasein.cloud.CloudException,
                       org.dasein.cloud.InternalException
Specified by:
updateTags in interface org.dasein.cloud.compute.SnapshotSupport
Overrides:
updateTags in class org.dasein.cloud.compute.AbstractSnapshotSupport
Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException


Copyright © 2014 Dell, Inc. All Rights Reserved.