@Override public long getEntityOwnerId() { Vpc vpc = _entityMgr.findById(Vpc.class, vpcId); return vpc.getAccountId(); }
@Override public long getEntityOwnerId() { Vpc vpc = _entityMgr.findById(Vpc.class, getId()); if (vpc != null) { return vpc.getAccountId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public long getEntityOwnerId() { Vpc vpc = _entityMgr.findById(Vpc.class, getId()); if (vpc != null) { return vpc.getAccountId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public long getEntityOwnerId() { final Vpc vpc = _entityMgr.findById(Vpc.class, getId()); if (vpc != null) { return vpc.getAccountId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public void doInTransactionWithoutResult(final TransactionStatus status) { _vpcDao.update(vpc.getId(), vpcVO); // decrement resource count _resourceLimitMgr.decrementResourceCount(vpc.getAccountId(), ResourceType.vpc); } });
@Override public long getEntityOwnerId() { VpcGateway gateway = _entityMgr.findById(VpcGateway.class, gatewayId); if (gateway == null) { throw new InvalidParameterValueException("Invalid gateway id is specified"); } return _entityMgr.findById(Vpc.class, gateway.getVpcId()).getAccountId(); }
@Override public long getEntityOwnerId() { Site2SiteVpnGateway vpnGw = getVpnGateway(); if (vpnGw != null) { Vpc vpc = _entityMgr.findById(Vpc.class, getVpnGateway().getVpcId()); return vpc.getAccountId(); } return -1; }
@Override public boolean implementVpc(final Vpc vpc, final DeployDestination dest, final ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { final Map<VirtualMachineProfile.Param, Object> params = new HashMap<VirtualMachineProfile.Param, Object>(1); params.put(VirtualMachineProfile.Param.ReProgramGuestNetworks, true); if (vpc.isRollingRestart()) { params.put(VirtualMachineProfile.Param.RollingRestart, true); } final RouterDeploymentDefinition routerDeploymentDefinition = routerDeploymentDefinitionBuilder.create().setVpc(vpc).setDeployDestination(dest) .setAccountOwner(_accountMgr.getAccount(vpc.getAccountId())).setParams(params).build(); routerDeploymentDefinition.deployVirtualRouter(); return true; }
@Override public long getEntityOwnerId() { Vpc vpc = _entityMgr.findById(Vpc.class, getVpcId()); if (vpc == null) { throw new InvalidParameterValueException("Invalid vpcId is given"); } Account account = _accountService.getAccount(vpc.getAccountId()); return account.getId(); }
.setVpc(vpc) .setDeployDestination(dest) .setAccountOwner(_accountMgr.getAccount(vpc.getAccountId())) .build();
.setVpc(vpc) .setDeployDestination(dest) .setAccountOwner(_accountMgr.getAccount(vpc.getAccountId())) .setParams(params) .build();
.setVpc(vpc) .setDeployDestination(dest) .setAccountOwner(_accountMgr.getAccount(vpc.getAccountId())) .setParams(params) .build();
final ReservationContext context = new ReservationContextImpl(null, null, callerUser, _accountMgr.getAccount(vpc.getAccountId()));
@Override public StaticRouteVO doInTransaction(final TransactionStatus status) throws NetworkRuleConflictException { StaticRouteVO newRoute = new StaticRouteVO(gateway.getId(), cidr, vpc.getId(), vpc.getAccountId(), vpc.getDomainId()); s_logger.debug("Adding static route " + newRoute); newRoute = _staticRouteDao.persist(newRoute); detectRoutesConflict(newRoute); if (!_staticRouteDao.setStateToAdd(newRoute)) { throw new CloudRuntimeException("Unable to update the state to add for " + newRoute); } CallContext.current().setEventDetails("Static route Id: " + newRoute.getId()); return newRoute; } });
if (vpc.getAccountId() != networkOwner.getId()) { throw new InvalidParameterValueException("Vpc " + vpc + " owner is different from the network owner " + networkOwner);
gateway, netmask, vpc.getAccountId(), vpc.getDomainId(), isSourceNat, networkAclId); _vpcGatewayDao.persist(gatewayVO);
throw new InvalidParameterValueException("Can't find enabled VPC by ID specified"); return vpc.getAccountId();