Package com.cloud.api

Examples of com.cloud.api.ServerApiException


      _storageNetworkService.deleteIpRange(this);
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
    } catch (Exception e) {
      s_logger.warn("Failed to delete storage network ip range " + getId(), e);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
    }
  }
View Full Code Here


                    _firewallService.revokeRelatedFirewallRule(getEntityId(), true);
                }
               
                _rulesService.revokePortForwardingRule(getEntityId(), true);
               
                throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to apply port forwarding rule");
            }
        }
    }
View Full Code Here

            PortForwardingRule result = _rulesService.createPortForwardingRule(this, virtualMachineId, getOpenFirewall());
            setEntityId(result.getId());
        } catch (NetworkRuleConflictException ex) {
            s_logger.info("Network rule conflict: " , ex);
            s_logger.trace("Network Rule Conflict: ", ex);
            throw new ServerApiException(BaseCmd.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage());
        }
    }
View Full Code Here

        if (result != null){
            ServiceOfferingResponse response = _responseGenerator.createServiceOfferingResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update service offering");
        }
    }
View Full Code Here

       
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete firewall rule");
        }
    }
View Full Code Here

        boolean result = _s2sVpnService.deleteCustomerGateway(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete customer VPN gateway");
        }
    }
View Full Code Here

        if (result != null){
            DomainRouterResponse routerResponse = _responseGenerator.createDomainRouterResponse(result);
            routerResponse.setResponseName(getCommandName());
            this.setResponseObject(routerResponse);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to start router");
        }
    }
View Full Code Here

        boolean result = _vpcService.deleteVpcOffering(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete VPC offering");
        }
    }
View Full Code Here

        if (result != null){
            LoadBalancerResponse response = _responseGenerator.createLoadBalancerResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update load balancer rule");
        }
    }
View Full Code Here

        List<? extends SecurityRule> egressRules = _securityGroupService.authorizeSecurityGroupEgress(this);
        if (egressRules != null && !egressRules.isEmpty()) {
            SecurityGroupResponse response = _responseGenerator.createSecurityGroupResponseFromSecurityGroupRule(egressRules);
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to authorize security group egress rule(s)");
        }

    }
View Full Code Here

TOP

Related Classes of com.cloud.api.ServerApiException

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.