Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2013-2014 Dell, Inc ==================================================================== Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ====================================================================
 
 
 package org.dasein.cloud.azure.compute.disk;
 
 
 import  javax.annotation.Nonnull;
 import  javax.annotation.Nullable;
Describes the capabilities of Azure with respect to Dasein volume operations. User: daniellemayne Date: 05/03/2014 Time: 14:58
 
 public class AzureDiskCapabilities extends AbstractCapabilities<Azureimplements VolumeCapabilities{
     public AzureDiskCapabilities(@Nonnull Azure provider) {
         super(provider);
     }
 
     @Override
     public boolean canAttach(VmState vmStatethrows InternalExceptionCloudException {
         return true;
     }
 
     @Override
     public boolean canDetach(VmState vmStatethrows InternalExceptionCloudException {
         return true;
     }
 
     @Override
     public int getMaximumVolumeCount() throws InternalExceptionCloudException {
         return 2;
     }

    
Indicates the maximum IOPS value allowed in the Volume products for the provider.

Returns:
the maximum IOPS value
Throws:
org.dasein.cloud.InternalException an error occurred within the Dasein Cloud implementation determining the limit
org.dasein.cloud.CloudException an error occurred retrieving the limit from the cloud
 
     @Override
     public int getMaximumVolumeProductIOPS() throws InternalExceptionCloudException {
         return 0;
     }

    
Indicates the minimum IOPS value allowed in the Volume products for the provider.

Returns:
the minimum IOPS value
Throws:
org.dasein.cloud.InternalException an error occurred within the Dasein Cloud implementation determining the limit
org.dasein.cloud.CloudException an error occurred retrieving the limit from the cloud
 
     @Override
     public int getMinimumVolumeProductIOPS() throws InternalExceptionCloudException {
         return 0;
     }

    
Indicates the maximum volume size for IOPS Volumes.

Returns:
the maximum size of an IOPS volume
Throws:
org.dasein.cloud.InternalException an error occurred within the Dasein Cloud implementation determining the limit
org.dasein.cloud.CloudException an error occurred retrieving the limit from the cloud
 
     @Override
     public int getMaximumVolumeSizeIOPS() throws InternalExceptionCloudException {
         return 0;
    }

    
Indicates the minimum volume size for IOPS Volumes.

Returns:
the minimum size of an IOPS volume
Throws:
org.dasein.cloud.InternalException an error occurred within the Dasein Cloud implementation determining the limit
org.dasein.cloud.CloudException an error occurred retrieving the limit from the cloud
    @Override
    public int getMinimumVolumeSizeIOPS() throws InternalExceptionCloudException {
        return 0;
    }
    @Nullable
    @Override
        return new Storage<Gigabyte>(1024, .);
    }
    @Nonnull
    @Override
        return new Storage<Gigabyte>(1, .);
    }
    @Nonnull
    @Override
        return null;
    }
    @Nonnull
    @Override
    public String getProviderTermForVolume(@Nonnull Locale locale) {
        return "disk";
    }
    @Nonnull
    @Override
        return .;
    }
    @Override
        return false;
    }
    @Nonnull
    @Override
    public Iterable<StringlistPossibleDeviceIds(@Nonnull Platform platformthrows InternalExceptionCloudException {
        ArrayList<Stringlist = new ArrayList<String>();
        for(int i= 0;i < this.getMaximumVolumeCount();i++){
            list.add(String.valueOf(i));
        }
        return list;
    }
    @Nonnull
    @Override
        return Collections.singletonList(.);
    }
    @Nonnull
    @Override
        return .;
    }
New to GrepCode? Check out our FAQ X