Examples of GlobalLoadBalancerRule


Examples of com.cloud.region.ha.GlobalLoadBalancerRule

            throw new InvalidParameterValueException("Invalid arguments. Only one of region id, " +
                    "rule id must be specified");
        }

        if (ruleId != null) {
            GlobalLoadBalancerRule gslbRule = _gslbRuleDao.findById(ruleId);
            if (gslbRule == null) {
                throw new InvalidParameterValueException("Invalid gslb rule id specified");
            }
            _accountMgr.checkAccess(caller, org.apache.cloudstack.acl.SecurityChecker.AccessType.ListEntry, false, gslbRule);
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class,
                getGlobalLoadBalancerRuleId());
        if (globalLoadBalancerRule == null) {
            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
        }
        return globalLoadBalancerRule.getAccountId();
    }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

        return BaseAsyncCmd.gslbSyncObject;
    }

    @Override
    public Long getSyncObjId() {
        GlobalLoadBalancerRule gslb = _gslbService.findById(id);
        if(gslb == null){
            throw new InvalidParameterValueException("Unable to find load balancer rule: " + id);
        }
        return gslb.getId();
    }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        GlobalLoadBalancerRule lb = _entityMgr.findById(GlobalLoadBalancerRule.class, getId());
        if (lb != null) {
            return lb.getAccountId();
        }
        return Account.ACCOUNT_ID_SYSTEM;
    }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

    }

    @Override
    public void execute() {
        com.cloud.user.UserContext.current().setEventDetails("Global Load balancer Id: "+getId());
        GlobalLoadBalancerRule gslbRule = _gslbService.updateGlobalLoadBalancerRule(this);
        if (gslbRule != null) {
            GlobalLoadBalancerResponse response = _responseGenerator.createGlobalLoadBalancerResponse(gslbRule);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class, getGlobalLoadBalancerRuleId());
        if (globalLoadBalancerRule == null) {
            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
        }
        return globalLoadBalancerRule.getAccountId();
    }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

        return BaseAsyncCmd.gslbSyncObject;
    }

    @Override
    public Long getSyncObjId() {
        GlobalLoadBalancerRule gslb = _gslbService.findById(id);
        if(gslb == null){
            throw new InvalidParameterValueException("Unable to find load balancer rule: " + id);
        }
        return gslb.getId();
    }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

    @Override
    public void execute() throws ResourceAllocationException, ResourceUnavailableException {

        UserContext callerContext = UserContext.current();
        GlobalLoadBalancerRule rule = _entityMgr.findById(GlobalLoadBalancerRule.class, getEntityId());
        GlobalLoadBalancerResponse response = null;
        if (rule != null) {
            response = _responseGenerator.createGlobalLoadBalancerResponse(rule);
            setResponseObject(response);
        }
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

    }

    @Override
    public void create() {
        try {
            GlobalLoadBalancerRule gslbRule = _gslbService.createGlobalLoadBalancerRule(this);
            this.setEntityId(gslbRule.getId());
            this.setEntityUuid(gslbRule.getUuid());
            UserContext.current().setEventDetails("Rule Id: " + getEntityId());
        } catch (Exception ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, ex.getMessage());
        }finally {
View Full Code Here

Examples of com.cloud.region.ha.GlobalLoadBalancerRule

    @Inject
    public GlobalLoadBalancingRulesService _gslbService;

    @Override
    public long getEntityOwnerId() {
        GlobalLoadBalancerRule lb = _entityMgr.findById(GlobalLoadBalancerRule.class, getGlobalLoadBalancerId());
        if (lb != null) {
            return lb.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
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.