org.jclouds.ultradns.ws.domain.ZoneProperties类的使用及代码示例

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

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

ZoneProperties介绍

暂无

代码示例

代码示例来源:origin: org.apache.jclouds.provider/ultradns-ws

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

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

public ZoneProperties build() {
  return new ZoneProperties(name, type, typeCode, modified, resourceRecordCount);
}

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

@Test
public void testGetZone() {
 for (Zone zone : api().listByAccount(account.getId())) {
   ZoneProperties zoneProperties = api().get(zone.getName());
   assertEquals(zoneProperties.getName(), zone.getName());
   assertEquals(zoneProperties.getType(), zone.getType());
   assertEquals(zoneProperties.getTypeCode(), zone.getTypeCode());
   assertNotNull(zoneProperties.getModified(), "Modified cannot be null for " + zone);
   assertTrue(zoneProperties.getResourceRecordCount() >= 0,
      "ResourceRecordCount must be positive or zero for a Zone " + zone);
 }
}

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

public void test() {
 InputStream is = getClass().getResourceAsStream("/zoneproperties.xml");
 ZoneProperties expected = expected();
 ZonePropertiesHandler handler = injector.getInstance(ZonePropertiesHandler.class);
 ZoneProperties result = factory.create(handler).parse(is);
 assertEquals(result.toString(), expected.toString());
}

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

@Test
public void testGetZone() {
 for (Zone zone : api().listByAccount(account.getId())) {
   ZoneProperties zoneProperties = api().get(zone.getName());
   assertEquals(zoneProperties.getName(), zone.getName());
   assertEquals(zoneProperties.getType(), zone.getType());
   assertEquals(zoneProperties.getTypeCode(), zone.getTypeCode());
   assertNotNull(zoneProperties.getModified(), "Modified cannot be null for " + zone);
   assertTrue(zoneProperties.getResourceRecordCount() >= 0,
      "ResourceRecordCount must be positive or zero for a Zone " + zone);
 }
}

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

public void test() {
 InputStream is = getClass().getResourceAsStream("/zoneproperties.xml");
 ZoneProperties expected = expected();
 ZonePropertiesHandler handler = injector.getInstance(ZonePropertiesHandler.class);
 ZoneProperties result = factory.create(handler).parse(is);
 assertEquals(result.toString(), expected.toString());
}

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

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

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

@Test
public void testCreateAndDeleteZone() {
 try {
   api().createInAccount(zoneName, account.getId());
   ZoneProperties newZone = api().get(zoneName);
   getAnonymousLogger().info("created zone: " + newZone);
   try {
    api().createInAccount(zoneName, account.getId());
    fail();
   } catch (ResourceAlreadyExistsException e) {
   }
   assertEquals(newZone.getName(), zoneName);
   assertEquals(newZone.getType(), Type.PRIMARY);
   assertEquals(newZone.getTypeCode(), Type.PRIMARY.getCode());
   assertNotNull(newZone.getModified(), "Modified cannot be null for " + newZone);
   assertEquals(newZone.getResourceRecordCount(), 5);
 } finally {
   api().delete(zoneName);
 }
}

代码示例来源:origin: com.amysta.jclouds.provider/ultradns-ws

public ZoneProperties build() {
  return new ZoneProperties(name, type, typeCode, modified, resourceRecordCount);
}

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

public void testGetWhenResponseIs2xx() {
 UltraDNSWSApi success = requestSendsResponse(get, getResponse);
 assertEquals(
    success.getZoneApi().get("jclouds.org.").toString(),
    new GetGeneralPropertiesForZoneResponseTest().expected().toString());
}

代码示例来源:origin: io.cloudsoft.jclouds.provider/ultradns-ws

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

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

@Test
public void testCreateAndDeleteZone() {
 try {
   api().createInAccount(zoneName, account.getId());
   ZoneProperties newZone = api().get(zoneName);
   getAnonymousLogger().info("created zone: " + newZone);
   try {
    api().createInAccount(zoneName, account.getId());
    fail();
   } catch (ResourceAlreadyExistsException e) {
   }
   assertEquals(newZone.getName(), zoneName);
   assertEquals(newZone.getType(), Type.PRIMARY);
   assertEquals(newZone.getTypeCode(), Type.PRIMARY.getCode());
   assertNotNull(newZone.getModified(), "Modified cannot be null for " + newZone);
   assertEquals(newZone.getResourceRecordCount(), 5);
 } finally {
   api().delete(zoneName);
 }
}

代码示例来源:origin: io.cloudsoft.jclouds.provider/ultradns-ws

public ZoneProperties build() {
  return new ZoneProperties(name, type, typeCode, modified, resourceRecordCount);
}

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

public void testGetWhenResponseIs2xx() {
 UltraDNSWSApi success = requestSendsResponse(get, getResponse);
 assertEquals(
    success.getZoneApi().get("jclouds.org.").toString(),
    new GetGeneralPropertiesForZoneResponseTest().expected().toString());
}

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

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

代码示例来源:origin: org.apache.jclouds.provider/ultradns-ws

public ZoneProperties build() {
  return new ZoneProperties(name, type, typeCode, modified, resourceRecordCount);
}

代码示例来源:origin: com.amysta.jclouds.provider/ultradns-ws

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

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

public ZoneProperties build() {
  return new ZoneProperties(name, type, typeCode, modified, resourceRecordCount);
}

代码示例来源:origin: com.amysta.jclouds.provider/ultradns-ws

@Override
  public void startElement(String uri, String localName, String qName, Attributes attrs) {
   Map<String, String> attributes = cleanseAttributes(attrs);
   if (equalsOrSuffix(qName, "GeneralZoneProperties")) {
     Type type = Type.valueOf(checkNotNull(attributes.get("zoneType"), "zoneType").toUpperCase());
     int count = Integer.parseInt(checkNotNull(attributes.get("resourceRecordCount"), "resourceRecordCount"));
     zone = ZoneProperties.builder()
               .name(attributes.get("name"))
               .typeCode(type.getCode())
               .resourceRecordCount(count)
               .modified(dateService.iso8601DateParse(attributes.get("modified"))).build();
   }
  }
}

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

@Override
  public void startElement(String uri, String localName, String qName, Attributes attrs) {
   Map<String, String> attributes = cleanseAttributes(attrs);
   if (equalsOrSuffix(qName, "GeneralZoneProperties")) {
     Type type = Type.valueOf(checkNotNull(attributes.get("zoneType"), "zoneType").toUpperCase());
     int count = Integer.parseInt(checkNotNull(attributes.get("resourceRecordCount"), "resourceRecordCount"));
     zone = ZoneProperties.builder()
               .name(attributes.get("name"))
               .typeCode(type.getCode())
               .resourceRecordCount(count)
               .modified(dateService.iso8601DateParse(attributes.get("modified"))).build();
   }
  }
}

相关文章