gpt4 book ai didi

org.jclouds.googlecomputeengine.features.ZoneApi.list()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 09:49:31 27 4
gpt4 key购买 nike

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

ZoneApi.list介绍

暂无

代码示例

代码示例来源:origin: io.cloudsoft.jclouds.labs/google-compute-engine

@Override
public Iterable<Zone> listLocations() {
 return api.getZoneApiForProject(userProject.get()).list().concat();
}

代码示例来源:origin: org.apache.stratos/gce

@Override
public Iterable<Zone> listLocations() {
 return api.getZoneApiForProject(userProject.get()).list().concat();
}

代码示例来源:origin: io.cloudsoft.jclouds.labs/google-compute-engine

@Provides
@Singleton
@Memoized
public Supplier<Map<URI, Region>> provideRegions(
    AtomicReference<AuthorizationException> authException,
    final GoogleComputeEngineApi api,
    @UserProject final Supplier<String> userProject,
    @Named(PROPERTY_SESSION_INTERVAL) long seconds) {
 return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException,
     new Supplier<Map<URI, Region>>() {
       @Override
       public Map<URI, Region> get() {
        return uniqueIndex(api.getRegionApiForProject(userProject.get()).list().concat(),
            new Function<Region, URI>() {
              @Override
              public URI apply(Region input) {
               return input.getSelfLink();
              }
            });
       }
     },
     seconds, TimeUnit.SECONDS);
}

代码示例来源:origin: org.apache.stratos/gce

@Provides
@Singleton
@Memoized
public Supplier<Map<URI, Region>> provideRegions(
    AtomicReference<AuthorizationException> authException,
    final GoogleComputeEngineApi api,
    @UserProject final Supplier<String> userProject,
    @Named(PROPERTY_SESSION_INTERVAL) long seconds) {
 return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException,
     new Supplier<Map<URI, Region>>() {
       @Override
       public Map<URI, Region> get() {
        return uniqueIndex(api.getRegionApiForProject(userProject.get()).list().concat(),
            new Function<Region, URI>() {
              @Override
              public URI apply(Region input) {
               return input.getSelfLink();
              }
            });
       }
     },
     seconds, TimeUnit.SECONDS);
}

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

@Test(groups = "live")
public void testListZone() {
 Iterator<ListPage<Zone>> pageIterator = api().list(maxResults(1));
 assertTrue(pageIterator.hasNext());
 List<Zone> zoneAsList = pageIterator.next();
 assertEquals(zoneAsList.size(), 1);
 this.zone = zoneAsList.get(0);
}

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

public void list_empty() throws Exception {
 server.enqueue(jsonResponse("/list_empty.json"));
 assertFalse(zoneApi().list().hasNext());
 assertSent(server, "GET", "/projects/party/zones");
}

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

public void list() throws Exception {
 server.enqueue(jsonResponse("/zone_list.json"));
 assertEquals(zoneApi().list().next(), new ParseZoneListTest().expected(url("/projects")));
 assertSent(server, "GET", "/projects/party/zones");
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com