Examples of SecurityGroupVO


Examples of com.cloud.network.security.SecurityGroupVO

                usageRecResponse.setUsageId(vpnUser.getUuid());
            }

        } else if(usageRecord.getUsageType() == UsageTypes.SECURITY_GROUP){
            //Security Group Id
            SecurityGroupVO sg = _entityMgr.findById(SecurityGroupVO.class, usageRecord.getUsageId().toString());
            usageRecResponse.setUsageId(sg.getUuid());
        } else if(usageRecord.getUsageType() == UsageTypes.VM_SNAPSHOT){
            VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, usageRecord.getVmInstanceId().toString());
            usageRecResponse.setVmName(vm.getInstanceName());
            usageRecResponse.setUsageId(vm.getUuid());
            usageRecResponse.setSize(usageRecord.getSize());
View Full Code Here

Examples of com.cloud.network.security.SecurityGroupVO

  @Override
    @DB
    public boolean remove(Long id) {
        TransactionLegacy txn = TransactionLegacy.currentTxn();
        txn.start();
        SecurityGroupVO entry = findById(id);
        if (entry != null) {
            _tagsDao.removeByIdAndType(id, ResourceObjectType.SecurityGroup);
        }
        boolean result = super.remove(id);
        txn.commit();
View Full Code Here

Examples of com.cloud.network.security.SecurityGroupVO

  @Override
    @DB
    public boolean expunge(Long id) {
        TransactionLegacy txn = TransactionLegacy.currentTxn();
        txn.start();
        SecurityGroupVO entry = findById(id);
        if (entry != null) {
            _tagsDao.removeByIdAndType(id, ResourceObjectType.SecurityGroup);
        }
        boolean result = super.expunge(id);
        txn.commit();
View Full Code Here

Examples of com.cloud.network.security.SecurityGroupVO

      //VPN User ID
      usageRecResponse.setUsageId(usageRecord.getUsageId().toString());

    } else if(usageRecord.getUsageType() == UsageTypes.SECURITY_GROUP){
      //Security Group Id
      SecurityGroupVO sg = _entityMgr.findByIdIncludingRemoved(SecurityGroupVO.class, usageRecord.getUsageId().toString());
      usageRecResponse.setUsageId(sg.getUuid());
    }

    if (usageRecord.getRawUsage() != null) {
      DecimalFormat decimalFormat = new DecimalFormat("###########.######");
      usageRecResponse.setRawUsage(decimalFormat.format(usageRecord.getRawUsage()));
View Full Code Here

Examples of com.cloud.network.security.SecurityGroupVO

  @Override
    @DB
    public boolean remove(Long id) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        SecurityGroupVO entry = findById(id);
        if (entry != null) {
            _tagsDao.removeByIdAndType(id, TaggedResourceType.SecurityGroup);
        }
        boolean result = super.remove(id);
        txn.commit();
View Full Code Here

Examples of com.cloud.network.security.SecurityGroupVO

  @Override
    @DB
    public boolean expunge(Long id) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        SecurityGroupVO entry = findById(id);
        if (entry != null) {
            _tagsDao.removeByIdAndType(id, TaggedResourceType.SecurityGroup);
        }
        boolean result = super.expunge(id);
        txn.commit();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.