gpt4 book ai didi

org.jclouds.cloudstack.domain.Zone.getDNS()方法的使用及代码示例

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

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

Zone.getDNS介绍

暂无

代码示例

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

@Test
public void testCreateUpdateDeleteZone() {
 skipIfNotGlobalAdmin();
 Zone zone = null;
 String zoneName = prefix + "-zone";
 try {
   zone = globalAdminClient.getZoneClient().createZone(zoneName,
    NetworkType.BASIC, "8.8.8.8", "10.10.10.10");
   assertNotNull(zone);
   assertEquals(zone, globalAdminClient.getZoneClient().getZone(zone.getId()));
   assertEquals(zone.getNetworkType(), NetworkType.BASIC);
   assertEquals(zone.getDNS(), ImmutableList.of("8.8.8.8"));
   assertEquals(zone.getInternalDNS(), ImmutableList.of("10.10.10.10"));
   Zone updated = globalAdminClient.getZoneClient().updateZone(zone.getId(),
    name(zoneName + "-2").externalDns(ImmutableList.of("8.8.4.4")));
   assertEquals(updated.getId(), zone.getId());
   assertEquals(updated.getDNS(), ImmutableList.of("8.8.4.4"));
 } finally {
   if (zone != null) {
    globalAdminClient.getZoneClient().deleteZone(zone.getId());
   }
 }
}

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

@Test
public void testCreateUpdateDeleteZone() {
 skipIfNotGlobalAdmin();
 Zone zone = null;
 String zoneName = prefix + "-zone";
 try {
   zone = globalAdminClient.getZoneApi().createZone(zoneName,
    NetworkType.BASIC, "8.8.8.8", "10.10.10.10");
   assertNotNull(zone);
   assertEquals(zone, globalAdminClient.getZoneApi().getZone(zone.getId()));
   assertEquals(zone.getNetworkType(), NetworkType.BASIC);
   assertEquals(zone.getDNS(), ImmutableList.of("8.8.8.8"));
   assertEquals(zone.getInternalDNS(), ImmutableList.of("10.10.10.10"));
   Zone updated = globalAdminClient.getZoneApi().updateZone(zone.getId(),
    name(zoneName + "-2").externalDns(ImmutableList.of("8.8.4.4")));
   assertEquals(updated.getId(), zone.getId());
   assertEquals(updated.getDNS(), ImmutableList.of("8.8.4.4"));
 } finally {
   if (zone != null) {
    globalAdminClient.getZoneApi().deleteZone(zone.getId());
   }
 }
}

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

case BASIC:
 assert zone.getVLAN() == null : zone;
 assert zone.getDNS().size() >= 0 : zone;
 assert zone.getInternalDNS().size() >= 0 : zone;
 assert zone.getDomain() == null : zone;

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

case BASIC:
 assert zone.getVLAN() == null : zone;
 assert zone.getDNS().size() > 0 : zone;
 assert zone.getInternalDNS().size() > 0 : zone;
 assert zone.getDomain() == null : zone;

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

public T fromZone(Zone in) {
   return this
      .id(in.getId())
      .description(in.getDescription())
      .displayText(in.getDisplayText())
      .DNS(in.getDNS())
      .domain(in.getDomain())
      .domainId(in.getDomainId())
      .guestCIDRAddress(in.getGuestCIDRAddress())
      .internalDNS(in.getInternalDNS())
      .name(in.getName())
      .networkType(in.getNetworkType())
      .VLAN(in.getVLAN())
      .securityGroupsEnabled(in.isSecurityGroupsEnabled())
      .allocationState(in.getAllocationState())
      .dhcpProvider(in.getDhcpProvider())
      .zoneToken(in.getZoneToken());
 }
}

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

public T fromZone(Zone in) {
   return this
      .id(in.getId())
      .description(in.getDescription())
      .displayText(in.getDisplayText())
      .DNS(in.getDNS())
      .domain(in.getDomain())
      .domainId(in.getDomainId())
      .guestCIDRAddress(in.getGuestCIDRAddress())
      .internalDNS(in.getInternalDNS())
      .name(in.getName())
      .networkType(in.getNetworkType())
      .VLAN(in.getVLAN())
      .securityGroupsEnabled(in.isSecurityGroupsEnabled())
      .allocationState(in.getAllocationState())
      .dhcpProvider(in.getDhcpProvider())
      .zoneToken(in.getZoneToken());
 }
}

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

public T fromZone(Zone in) {
   return this
      .id(in.getId())
      .description(in.getDescription())
      .displayText(in.getDisplayText())
      .DNS(in.getDNS())
      .domain(in.getDomain())
      .domainId(in.getDomainId())
      .guestCIDRAddress(in.getGuestCIDRAddress())
      .internalDNS(in.getInternalDNS())
      .name(in.getName())
      .networkType(in.getNetworkType())
      .VLAN(in.getVLAN())
      .securityGroupsEnabled(in.isSecurityGroupsEnabled())
      .allocationState(in.getAllocationState())
      .dhcpProvider(in.getDhcpProvider())
      .zoneToken(in.getZoneToken())
      .tags(in.getTags());
 }
}

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