Package org.apache.cloudstack.region

Examples of org.apache.cloudstack.region.Region$Service


        GlobalLoadBalancerRuleVO gslbRuleWithDomainName = _gslbRuleDao.findByDomainName(domainName);
        if (gslbRuleWithDomainName != null) {
            throw new InvalidParameterValueException("Domain name " + domainName + "is in use");
        }

        Region region = _regionDao.findById(regionId);
        if (region == null) {
            throw new InvalidParameterValueException("Invalid region ID: " + regionId);
        }

        String providerDnsName = _globalConfigDao.getValue(Config.CloudDnsName.key());
        if (!region.checkIfServiceEnabled(Region.Service.Gslb) || (providerDnsName == null)) {
            throw new CloudRuntimeException("GSLB service is not enabled in region : " + region.getName());
        }

        GlobalLoadBalancerRuleVO newGslbRule = Transaction.execute(new TransactionCallback<GlobalLoadBalancerRuleVO>() {
            @Override
            public GlobalLoadBalancerRuleVO doInTransaction(TransactionStatus status) {
View Full Code Here


        Integer regionId = cmd.getRegionIdId();
        Long rangeId = cmd.getPortableIpRangeId();

        List<PortableIpRangeVO> ranges = new ArrayList<PortableIpRangeVO>();
        if (regionId != null) {
            Region region = _regionDao.findById(regionId);
            if (region == null) {
                throw new InvalidParameterValueException("Invalid region ID: " + regionId);
            }
            return _portableIpRangeDao.listByRegionId(regionId);
        }
View Full Code Here

        Integer regionId = cmd.getRegionIdId();
        Long rangeId = cmd.getPortableIpRangeId();

        List<PortableIpRangeVO> ranges = new ArrayList<PortableIpRangeVO>();
        if (regionId != null) {
            Region region = _regionDao.findById(regionId);
            if (region == null) {
                throw new InvalidParameterValueException("Invalid region ID: " + regionId);
            }
            return _portableIpRangeDao.listByRegionId(regionId);
        }
View Full Code Here

    @Test
    public void testCreateSuccess() {

        RegionService regionService = Mockito.mock(RegionService.class);

        Region region = Mockito.mock(Region.class);
        Mockito.when(regionService.addRegion(Matchers.anyInt(), Matchers.anyString(), Matchers.anyString())).thenReturn(region);

        addRegionCmd._regionService = regionService;
        responseGenerator = Mockito.mock(ResponseGenerator.class);
View Full Code Here

    @Test
    public void testCreateFailure() {

        RegionService regionService = Mockito.mock(RegionService.class);

        Region region = Mockito.mock(Region.class);
        Mockito.when(regionService.addRegion(Matchers.anyInt(), Matchers.anyString(), Matchers.anyString())).thenReturn(null);

        addRegionCmd._regionService = regionService;

        try {
View Full Code Here

        GlobalLoadBalancerRuleVO gslbRuleWithDomainName = _gslbRuleDao.findByDomainName(domainName);
        if (gslbRuleWithDomainName != null) {
            throw new InvalidParameterValueException("Domain name " + domainName + "is in use");
        }

        Region region = _regionDao.findById(regionId);
        if (region == null) {
            throw new InvalidParameterValueException("Invalid region ID: " + regionId);
        }

        String providerDnsName = _globalConfigDao.getValue(Config.CloudDnsName.key());
        if (!region.checkIfServiceEnabled(Region.Service.Gslb) || (providerDnsName == null)) {
            throw new CloudRuntimeException("GSLB service is not enabled in region : " + region.getName());
        }

        GlobalLoadBalancerRuleVO newGslbRule = Transaction.execute(new TransactionCallback<GlobalLoadBalancerRuleVO>() {
            @Override
            public GlobalLoadBalancerRuleVO doInTransaction(TransactionStatus status) {
View Full Code Here

        Integer regionId = cmd.getRegionIdId();
        Long rangeId = cmd.getPortableIpRangeId();

        List<PortableIpRangeVO> ranges = new ArrayList<PortableIpRangeVO>();
        if (regionId != null) {
            Region region = _regionDao.findById(regionId);
            if (region == null) {
                throw new InvalidParameterValueException("Invalid region ID: " + regionId);
            }
            return _portableIpRangeDao.listByRegionId(regionId);
        }
View Full Code Here

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                this.axisService = new AxisService();
                    AxisService retAxisService = populateService();
                    if (retAxisService != null) {
                        axisServices.add(retAxisService);
                    } // end if axisService was returned
View Full Code Here

    testAssertionService1060(services, errorReporter);
   
    int numServices = services.length;
    for(int i = 0; i < numServices; i++)
    {
      Service service = services[i];
     
      validateEndpoints(service.getEndpoints(), desc, errorReporter);
    }
  }
View Full Code Here

 
  Interface bindingInterface = binding.getInterface();
  WSDLComponent parent = endpoint.getParent();
  if(parent != null)
  {
    Service service = (Service)parent;
    Interface serviceInterface = service.getInterface();
   
    // If an interface hasn't been specified on the service this assertion doesn't apply.
    // If the binding interface is null this assertion passes.
    if(serviceInterface != null && bindingInterface != null && !serviceInterface.equals(bindingInterface))
    {
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.region.Region$Service

Copyright © 2018 www.massapicom. 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.