use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DeletePodCmd method execute.
@Override
public void execute() {
boolean result = _configService.deletePod(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete pod");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DeletePortForwardingRuleCmd method execute.
@Override
public void execute() {
UserContext.current().setEventDetails("Rule Id: " + id);
//revoke corresponding firewall rule first
boolean result = _firewallService.revokeRelatedFirewallRule(id, true);
result = result && _rulesService.revokePortForwardingRule(id, true);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete port forwarding rule");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DeleteServiceOfferingCmd method execute.
@Override
public void execute() {
boolean result = _configService.deleteServiceOffering(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete service offering");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DeleteDiskOfferingCmd method execute.
@Override
public void execute() {
boolean result = _configService.deleteDiskOffering(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete disk offering");
}
}
use of com.cloud.api.response.SuccessResponse in project CloudStack-archive by CloudStack-extras.
the class DeleteFirewallRuleCmd method execute.
@Override
public void execute() throws ResourceUnavailableException {
UserContext.current().setEventDetails("Rule Id: " + id);
boolean result = _firewallService.revokeFirewallRule(id, true);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete firewall rule");
}
}
Aggregations