org.jclouds.ec2.domain.Volume.builder()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.jclouds.ec2.domain.Volume.builder()方法的一些代码示例,展示了Volume.builder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Volume.builder()方法的具体详情如下:
包路径:org.jclouds.ec2.domain.Volume
类名称:Volume
方法名:builder

Volume.builder介绍

暂无

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

public Builder toBuilder() {
 return builder().fromVolume(this);
}

代码示例来源:origin: com.amysta.jclouds.api/ec2

public Builder toBuilder() {
 return builder().fromVolume(this);
}

代码示例来源:origin: apache/jclouds

public Builder toBuilder() {
 return builder().fromVolume(this);
}

代码示例来源:origin: org.jclouds.api/ec2

public Builder toBuilder() {
 return builder().fromVolume(this);
}

代码示例来源:origin: org.apache.jclouds.api/ec2

public Builder toBuilder() {
 return builder().fromVolume(this);
}

代码示例来源:origin: jclouds/legacy-jclouds

private Volume newVolumeWithAttachments(Attachment... attachments) {
 return Volume.builder().region("us-east-1").attachments(attachments).build();
}

代码示例来源:origin: apache/jclouds

private Volume newVolumeWithAttachments(Attachment... attachments) {
 return Volume.builder().region("us-east-1").attachments(attachments).build();
}

代码示例来源:origin: apache/jclouds

public void testDescribeVolumesWithNovaEC2Status() {
 ElasticBlockStoreApi client = requestsSendResponses(
    describeAvailabilityZonesRequest,
    describeAvailabilityZonesResponse,
    HttpRequest.builder().method("POST")
       .endpoint("http://localhost:8773/services/Cloud/")
       .addHeader("Host", "localhost:8773")
       .payload(payloadFromStringWithContentType("Action=DescribeVolumes&Signature=AvRznSzGExM%2Buaj2JJj66wq4v4f%2BakicyLooRDtC0t0%3D&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-16T15%3A54%3A08.897Z&Version=2009-04-04&AWSAccessKeyId=identity", "application/x-www-form-urlencoded")).build(),
    HttpResponse.builder().statusCode(200).payload(payloadFromResource("/nova_ec2_describe_volumes.xml")).build()
                           ).getElasticBlockStoreApi().get();
 Set<Volume> expected = ImmutableSet.of(Volume
    .builder()
    .status(Volume.Status.AVAILABLE)
    .availabilityZone("nova")
    .region("nova")
    .id("vol-00000007")
    .size(1)
    .attachments(Attachment.builder().region("nova").build())
    .createTime(dateService.iso8601SecondsDateParse("2012-04-10T10:39:52Z"))
    .build());
 assertEquals(client.describeVolumesInRegion("nova"), expected);
}

相关文章