org.jclouds.googlecomputeengine.domain.Zone类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(123)

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

Zone介绍

[英]Represents a zone resource.
[中]表示区域资源。

代码示例

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

public Zone build() {
  return new Zone(super.id, super.creationTimestamp, super.selfLink, super.name,
      super.description, status, maintenanceWindows.build(), availableMachineTypes.build());
}

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

public Builder fromZone(Zone in) {
   return super.fromResource(in)
       .status(in.getStatus())
       .maintenanceWindows(in.getMaintenanceWindows())
       .availableMachineTypes(in.getAvailableMachineTypes());
 }
}

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

/**
* {@inheritDoc}
*/
@Override
public String toString() {
 return string().toString();
}

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

@Override
  public Location apply(Zone input) {
   return new LocationBuilder()
       .description(input.getDescription().orNull())
       .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "zone URI")))
       .id(input.getName())
       .scope(LocationScope.ZONE)
       .parent(GOOGLE_PROVIDER_LOCATION)
       .build();
  }
}

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

private void assertZoneEquals(Zone result, Zone expected) {
 assertEquals(result.name(), expected.name());
}

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

@Consumes(APPLICATION_JSON)
  public Zone expected(String baseUrl) {
   return Zone.create( //
      "13020128040171887099", // id
      parse("2012-10-19T16:42:54.131"), // creationTimestamp
      URI.create(baseUrl + "/party/zones/us-central1-a"), // selfLink
      "us-central1-a", // name
      "us-central1-a", // description
      Zone.Status.DOWN, // status
      ImmutableList.of( // maintenanceWindows
         Zone.MaintenanceWindow.create( //
            "2012-11-10-planned-outage", // name
            "maintenance zone", // description
            parse("2012-11-10T20:00:00.000"), // beginTime
            parse("2012-12-02T20:00:00.000") // endTime)
         )), //
      null, // deprecated
      "us-central1", // region
      null // availableMachineTypes
   );
  }
}

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

@Override
  public Location apply(Zone input) {
   return new LocationBuilder()
       .description(input.getDescription().orNull())
       .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "zone URI")))
       .id(input.getName())
       .scope(LocationScope.ZONE)
       .parent(GOOGLE_PROVIDER_LOCATION)
       .build();
  }
}

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

@Test(groups = "live", dependsOnMethods = "testListZone")
public void testGetZone() {
 Zone zone = api().get(this.zone.name());
 assertNotNull(zone);
 assertZoneEquals(zone, this.zone);
}

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

@Consumes(APPLICATION_JSON)
  public ListPage<Zone> expected(String baseUrl) {
   Zone zone1 = new ParseZoneTest().expected(baseUrl);
   Zone zone2 = Zone.create( //
      "13024414164050619686", // id
      parse("2012-10-24T20:13:19.271"), // creationTimestamp
      URI.create(baseUrl + "/party/zones/us-central1-b"), // selfLink
      "us-central1-b", // name
      "us-central1-b", // description
      Zone.Status.UP, // status
      ImmutableList.of( // maintenanceWindows
         Zone.MaintenanceWindow.create( //
            "2013-02-17-planned-outage", // name
            "maintenance zone", // description
            parse("2013-02-17T08:00:00.000"), // beginTime
            parse("2013-03-03T08:00:00.000") // endTime)
         )), //
      null, // deprecated
      "us-central1", // region
      null // availableMachineTypes
   );
   return ForwardingListPage.create( //
      ImmutableList.of(zone1, zone2), // items
      null // nextPageToken
   );
  }
}

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

public Builder fromZone(Zone in) {
   return super.fromResource(in)
       .status(in.getStatus())
       .maintenanceWindows(in.getMaintenanceWindows())
       .availableMachineTypes(in.getAvailableMachineTypes());
 }
}

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

/**
* {@inheritDoc}
*/
@Override
public String toString() {
 return string().toString();
}

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

public Zone build() {
  return new Zone(super.id, super.creationTimestamp, super.selfLink, super.name,
      super.description, status, maintenanceWindows.build(), availableMachineTypes.build());
}

相关文章