Tabnine Logo
VlanDao.listByZone
Code IndexAdd Tabnine to your IDE (free)

How to use
listByZone
method
in
com.cloud.dc.dao.VlanDao

Best Java code snippets using com.cloud.dc.dao.VlanDao.listByZone (Showing top 4 results out of 315)

origin: apache/cloudstack

  @Override
  public Boolean doInTransaction(final TransactionStatus status) {
    // delete vlans for this zone
    final List<VlanVO> vlans = _vlanDao.listByZone(zoneId);
    for (final VlanVO vlan : vlans) {
      _vlanDao.remove(vlan.getId());
    }
    final boolean success = _zoneDao.remove(zoneId);
    if (success) {
      // delete all capacity records for the zone
      _capacityDao.removeBy(null, zoneId, null, null, null);
      // remove from dedicated resources
      final DedicatedResourceVO dr = _dedicatedDao.findByZoneId(zoneId);
      if (dr != null) {
        _dedicatedDao.remove(dr.getId());
        // find the group associated and check if there are any more
        // resources under that group
        final List<DedicatedResourceVO> resourcesInGroup = _dedicatedDao.listByAffinityGroupId(dr.getAffinityGroupId());
        if (resourcesInGroup.isEmpty()) {
          // delete the group
          _affinityGroupService.deleteAffinityGroup(dr.getAffinityGroupId(), null, null, null, null);
        }
      }
    }
    return success;
  }
});
origin: apache/cloudstack

private void checkVlanUnderlayCompatibility(VlanVO newVlan) throws ResourceUnavailableException {
  List<VlanVO> vlans = _vlanDao.listByZone(newVlan.getDataCenterId());
  if (CollectionUtils.isNotEmpty(vlans)) {
    boolean newVlanUnderlay = NuageVspUtil.isUnderlayEnabledForVlan(_vlanDetailsDao, newVlan);
    final String newCidr = NetUtils.getCidrFromGatewayAndNetmask(newVlan.getVlanGateway(), newVlan.getVlanNetmask());
    for (VlanVO vlan : vlans) {
      if (vlan.getId() == newVlan.getId()) continue;
      final String existingCidr = NetUtils.getCidrFromGatewayAndNetmask(vlan.getVlanGateway(), vlan.getVlanNetmask());
      NetUtils.SupersetOrSubset supersetOrSubset = NetUtils.isNetowrkASubsetOrSupersetOfNetworkB(newCidr, existingCidr);
      if (supersetOrSubset == NetUtils.SupersetOrSubset.sameSubnet) {
        boolean vlanUnderlay = NuageVspUtil.isUnderlayEnabledForVlan(_vlanDetailsDao, vlan);
        if (newVlanUnderlay != vlanUnderlay) {
          throw new ResourceUnavailableException("Mixed values for the underlay flag for IP ranges in the same subnet is not supported", Vlan.class, newVlan.getId());
        }
        break;
      }
    }
  }
}
origin: apache/cloudstack

final List<VlanVO> vlans = _vlanDao.listByZone(dataCenterId);
List<String> pvlan = new ArrayList<String>();
for (final VlanVO vlan : vlans) {
origin: apache/cloudstack

final List<VlanVO> vlans = _vlanDao.listByZone(zone.getId());
for (final VlanVO vlan : vlans) {
  final String otherVlanGateway = vlan.getVlanGateway();
final List<VlanVO> vlans = _vlanDao.listByZone(zone.getId());
for (final VlanVO vlan : vlans) {
  if (vlan.getIp6Gateway() == null) {
com.cloud.dc.daoVlanDaolistByZone

Popular methods of VlanDao

  • findById
  • listVlansByNetworkId
  • createSearchBuilder
  • createSearchCriteria
  • acquireInLockTable
  • findByNetworkIdAndIpv4
  • findByZoneAndVlanId
  • findOneBy
  • listAll
  • listDedicatedVlans
  • listVlansByNetworkIdAndGateway
  • listVlansByNetworkIdIncludingRemoved
  • listVlansByNetworkIdAndGateway,
  • listVlansByNetworkIdIncludingRemoved,
  • listVlansByPhysicalNetworkId,
  • listVlansForPod,
  • listVlansForPodByType,
  • listZoneWideNonDedicatedVlans,
  • persist,
  • releaseFromLockTable,
  • remove

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now