You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2015/05/06 10:40:44 UTC
[6/8] stratos git commit: Resolving Merge Conflicts
Resolving Merge Conflicts
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5c8fdcf7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5c8fdcf7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5c8fdcf7
Branch: refs/heads/master
Commit: 5c8fdcf71c6fc66ab6f95c28686f86f3bcd18341
Parents: 13fa801 4d99362
Author: anuruddhal <an...@gmail.com>
Authored: Tue May 5 13:25:17 2015 +0530
Committer: anuruddhal <an...@gmail.com>
Committed: Tue May 5 13:25:17 2015 +0530
----------------------------------------------------------------------
.../dependency/DependencyBuilder.java | 9 +-
.../applications/dependency/DependencyTree.java | 37 +--
.../parser/DefaultApplicationParser.java | 2 +-
.../applications/parser/ParserUtils.java | 4 +-
.../context/cluster/ClusterContext.java | 20 +-
.../internal/AutoscalerServiceComponent.java | 3 +-
.../monitor/component/GroupMonitor.java | 29 +-
.../component/ParentComponentMonitor.java | 113 ++++---
.../autoscaler/pojo/policy/PolicyManager.java | 12 +-
.../autoscaler/services/AutoscalerService.java | 1 -
.../services/impl/AutoscalerServiceImpl.java | 5 +-
.../src/main/assembly/src.xml | 32 +-
.../java/org/apache/stratos/cli/CliTool.java | 97 +++---
.../java/org/apache/stratos/cli/Command.java | 104 +++---
.../org/apache/stratos/cli/CommandContext.java | 136 ++++----
.../stratos/cli/CommandLineApplication.java | 330 ++++++++++---------
.../apache/stratos/cli/CommandLineService.java | 312 +++++++++---------
.../apache/stratos/cli/GenericRestClient.java | 45 ++-
.../main/java/org/apache/stratos/cli/Main.java | 1 -
.../java/org/apache/stratos/cli/RestClient.java | 2 +-
.../stratos/cli/RestCommandLineService.java | 279 ++++++++++------
.../apache/stratos/cli/StratosApplication.java | 68 ++--
.../stratos/cli/StratosCommandContext.java | 44 +--
.../apache/stratos/cli/WebClientWrapper.java | 47 ++-
.../cli/commands/ActivateTenantCommand.java | 54 +--
.../commands/AddApplicationPolicyCommand.java | 34 +-
.../commands/AddApplicationSignupCommand.java | 34 +-
.../commands/AddAutoscalingPolicyCommand.java | 34 +-
.../cli/commands/AddCartridgeCommand.java | 38 +--
.../cli/commands/AddCartridgeGroupCommand.java | 32 +-
.../commands/AddDeploymentPolicyCommand.java | 38 +--
.../cli/commands/AddDomainMappingsCommand.java | 36 +-
.../commands/AddKubernetesClusterCommand.java | 32 +-
.../cli/commands/AddKubernetesHostCommand.java | 54 +--
.../commands/AddNetworkPartitionCommand.java | 35 +-
.../stratos/cli/commands/AddTenantCommand.java | 41 ++-
.../stratos/cli/commands/AddUserCommand.java | 51 +--
.../cli/commands/CreateApplicationCommand.java | 38 +--
.../cli/commands/DeactivateTenantCommand.java | 58 ++--
.../cli/commands/DeleteApplicationCommand.java | 58 ++--
.../DeleteApplicationSignupCommand.java | 58 ++--
.../DeleteAutoScalingPolicyCommand.java | 58 ++--
.../stratos/cli/commands/DeleteUserCommand.java | 58 ++--
.../cli/commands/DeployApplicationCommand.java | 40 +--
.../commands/DescribeApplicationCommand.java | 78 ++---
.../DescribeApplicationPolicyCommand.java | 32 +-
.../DescribeApplicationRuntimeCommand.java | 32 +-
.../DescribeApplicationSignupCommand.java | 78 ++---
.../DescribeAutoScalingPolicyCommand.java | 61 ++--
.../cli/commands/DescribeCartridgeCommand.java | 61 ++--
.../commands/DescribeCartridgeGroupCommand.java | 78 ++---
.../DescribeDeploymentPolicyCommand.java | 61 ++--
.../DescribeKubernetesClusterCommand.java | 32 +-
.../DescribeKubernetesMasterCommand.java | 32 +-
.../DescribeNetworkPartitionCommand.java | 32 +-
.../cli/commands/DescribeTenantCommand.java | 36 +-
.../stratos/cli/commands/ExitCommand.java | 100 +++---
.../stratos/cli/commands/HelpCommand.java | 106 +++---
.../stratos/cli/commands/InfoCommand.java | 84 ++---
.../ListApplicationPoliciesCommand.java | 34 +-
.../cli/commands/ListApplicationsCommand.java | 32 +-
.../commands/ListAutoscalePolicyCommand.java | 32 +-
.../commands/ListCartridgeGroupsCommand.java | 84 ++---
.../cli/commands/ListCartridgesCommand.java | 90 ++---
.../commands/ListDeploymentPoliciesCommand.java | 32 +-
.../cli/commands/ListDomainMappingsCommand.java | 88 ++---
.../commands/ListKubernetesClustersCommand.java | 84 ++---
.../commands/ListKubernetesHostsCommand.java | 56 ++--
.../commands/ListNetworkPartitionCommand.java | 32 +-
.../ListPartialSearchTenantsCommand.java | 38 +--
.../stratos/cli/commands/ListTenants.java | 34 +-
.../apache/stratos/cli/commands/ListUsers.java | 34 +-
.../RemoveApplicationPolicyCommand.java | 32 +-
.../cli/commands/RemoveCartridgeCommand.java | 58 ++--
.../commands/RemoveCartridgeGroupCommand.java | 32 +-
.../commands/RemoveDeploymentPolicyCommand.java | 32 +-
.../commands/RemoveDomainMappingsCommand.java | 32 +-
.../RemoveKubernetesClusterCommand.java | 35 +-
.../commands/RemoveKubernetesHostCommand.java | 32 +-
.../commands/RemoveNetworkPartitionCommand.java | 32 +-
.../commands/SynchronizeArtifactsCommand.java | 104 +++---
.../commands/UndeployApplicationCommand.java | 32 +-
.../UpdateApplicationPolicyCommand.java | 34 +-
.../UpdateAutoscalingPolicyCommand.java | 34 +-
.../cli/commands/UpdateCartridgeCommand.java | 34 +-
.../commands/UpdateDeploymentPolicyCommand.java | 34 +-
.../commands/UpdateKubernetesHostCommand.java | 59 ++--
.../commands/UpdateKubernetesMasterCommand.java | 51 +--
.../commands/UpdateNetworkPartitionCommand.java | 34 +-
.../cli/commands/UpdateTenantCommand.java | 40 +--
.../stratos/cli/commands/UpdateUserCommand.java | 48 +--
.../stratos/cli/completer/CommandCompleter.java | 228 +++++++------
.../cli/completer/StratosFileNameCompleter.java | 61 ++--
.../stratos/cli/exception/CommandException.java | 56 ++--
.../stratos/cli/exception/ErrorWrapper.java | 32 +-
.../stratos/cli/exception/ExceptionMapper.java | 34 +-
.../apache/stratos/cli/utils/CliConstants.java | 42 +--
.../org/apache/stratos/cli/utils/CliUtils.java | 177 +++++-----
.../org/apache/stratos/cli/utils/RowMapper.java | 34 +-
.../controller/domain/NetworkPartition.java | 3 +-
.../impl/CloudControllerServiceImpl.java | 2 +-
.../common/client/AutoscalerServiceClient.java | 2 +-
.../kubernetes/client/rest/RestClient.java | 4 +-
.../console/applications_form.jag | 2 +
.../console/configure_form.jag | 4 +-
.../default/configure/autoscalingpolicies.json | 1 -
.../forms/default/configure/cartridges.json | 1 -
.../schema/configure/autoscalingpolicies.json | 8 -
.../forms/schema/configure/cartridges.json | 9 -
.../controllers/forms/schema/users/users.json | 3 +-
.../console/controllers/menu/menu.json | 4 +-
.../theme0/css/custom/application_editor.css | 3 +
.../images/ContextMenu/page_white_delete.png | Bin 0 -> 536 bytes
.../images/ContextMenu/page_white_edit.png | Bin 0 -> 618 bytes
.../theme0/js/custom/applications-deploy.js | 5 +
.../theme0/js/custom/applications-editor.js | 33 +-
.../js/custom/applications_group_editor.js | 93 +++++-
.../themes/theme0/partials/applications.hbs | 5 +
.../theme0/partials/applications_form.hbs | 5 +
.../partials/applications_group_editor.hbs | 36 +-
.../theme0/partials/applications_topology.hbs | 5 +
.../themes/theme0/partials/configure_form.hbs | 18 +-
.../themes/theme0/partials/users_form.hbs | 6 +
components/org.apache.stratos.messaging/pom.xml | 3 +-
.../broker/connect/amqp/AmqpTopicPublisher.java | 6 +-
.../connect/amqp/AmqpTopicSubscriber.java | 4 +-
.../broker/connect/mqtt/MqttTopicPublisher.java | 2 +-
.../messaging/domain/application/Group.java | 5 +-
.../domain/instance/ApplicationInstance.java | 2 +-
.../domain/instance/ClusterInstance.java | 2 +-
.../domain/instance/GroupInstance.java | 2 +-
.../messaging/domain/topology/Cluster.java | 2 +-
.../messaging/domain/topology/Member.java | 2 +-
.../messaging/domain/topology/Topology.java | 8 +-
.../lifecycle/LifeCycleStateManager.java | 2 +-
.../signup/ApplicationSignUpAddedEvent.java | 1 -
.../instance/notifier/ArtifactUpdatedEvent.java | 2 -
.../instance/status/InstanceActivatedEvent.java | 2 -
.../event/tenant/TenantSubscribedEvent.java | 3 +-
.../event/topology/MemberActivatedEvent.java | 8 +-
.../message/processor/MessageProcessor.java | 1 -
.../ApplicationSignUpMessageProcessorChain.java | 2 -
.../ClusterStatusMessageProcessorChain.java | 1 -
.../InstanceStatusMessageProcessorChain.java | 6 -
.../tenant/TenantMessageProcessorChain.java | 5 +-
.../ClusterCreatedMessageProcessor.java | 4 +-
.../CompleteTopologyMessageProcessor.java | 4 +-
.../MemberActivatedMessageProcessor.java | 6 +-
.../topology/MemberStartedMessageProcessor.java | 6 +-
.../MemberSuspendedMessageProcessor.java | 6 +-
.../ClusterStatusEventMessageListener.java | 2 -
.../status/ClusterStatusEventMessageQueue.java | 1 -
.../stat/HealthStatEventMessageDelegator.java | 2 -
.../stat/HealthStatEventMessageQueue.java | 1 -
.../InstanceNotifierEventMessageQueue.java | 1 -
.../status/InstanceStatusEventMessageQueue.java | 1 -
.../tenant/TenantEventMessageQueue.java | 1 -
.../topology/TopologyEventMessageQueue.java | 1 -
.../stratos/messaging/util/MessagingUtil.java | 2 +-
.../messaging/test/AmqpSubscriberTest.java | 4 +-
.../messaging/test/MessageFilterTest.java | 38 +--
.../topology/locking/TopologyLockingTest.java | 2 +-
.../rest/endpoint/api/StratosApiV41.java | 48 +--
.../rest/endpoint/api/StratosApiV41Utils.java | 62 +++-
.../tests/SampleApplicationsTest.java | 2 +-
.../applications/app-bursting-pattern/README.md | 8 -
.../artifacts/application-signup.json | 18 -
.../artifacts/application.json | 25 --
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/deploy.sh | 51 ---
.../scripts/common/undeploy.sh | 33 --
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/complex-app-with-lb/README.md | 13 -
.../artifacts/application.json | 141 --------
.../scripts/common/deploy.sh | 67 ----
.../scripts/common/undeploy.sh | 31 --
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 -
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/complex-app/README.md | 13 -
.../complex-app/artifacts/application.json | 131 --------
.../artifacts/autoscaling-policy.json | 14 -
.../artifacts/deployment-policy.json | 15 -
.../complex-app/scripts/common/deploy.sh | 64 ----
.../complex-app/scripts/common/undeploy.sh | 36 --
.../complex-app/scripts/ec2/deploy.sh | 9 -
.../complex-app/scripts/ec2/undeploy.sh | 7 -
.../complex-app/scripts/kubernetes/deploy.sh | 15 -
.../complex-app/scripts/kubernetes/undeploy.sh | 13 -
.../complex-app/scripts/mock/deploy.sh | 9 -
.../complex-app/scripts/mock/undeploy.sh | 7 -
.../complex-app/scripts/openstack/deploy.sh | 9 -
.../complex-app/scripts/openstack/undeploy.sh | 7 -
.../README.md | 10 +
.../artifacts/application.json | 121 +++++++
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 65 ++++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 37 +++
.../scripts/common/update-deployment-policy.sh | 12 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../complex/tomcat-single-signon/README.md | 30 ++
.../artifacts/application.json | 38 +++
.../scripts/common/deploy.sh | 54 +++
.../scripts/common/undeploy.sh | 27 ++
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../complex/wordpress-app/README.md | 20 ++
.../wordpress-app/artifacts/application.json | 41 +++
.../wordpress-app/scripts/common/deploy.sh | 60 ++++
.../wordpress-app/scripts/common/undeploy.sh | 35 ++
.../complex/wordpress-app/scripts/ec2/deploy.sh | 9 +
.../wordpress-app/scripts/ec2/undeploy.sh | 7 +
.../wordpress-app/scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../wordpress-app/scripts/mock/deploy.sh | 9 +
.../wordpress-app/scripts/mock/undeploy.sh | 7 +
.../wordpress-app/scripts/openstack/deploy.sh | 9 +
.../wordpress-app/scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 -
.../artifacts/application.json | 46 ---
.../sample-cartridges/scripts/common/deploy.sh | 53 ---
.../scripts/common/undeploy.sh | 21 --
.../sample-cartridges/scripts/ec2/deploy.sh | 9 -
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../sample-cartridges/scripts/mock/deploy.sh | 9 -
.../sample-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../dependent-scaling/sample-groups/README.md | 13 -
.../sample-groups/artifacts/application.json | 74 -----
.../sample-groups/scripts/common/deploy.sh | 58 ----
.../sample-groups/scripts/common/undeploy.sh | 25 --
.../sample-groups/scripts/ec2/deploy.sh | 9 -
.../sample-groups/scripts/ec2/undeploy.sh | 7 -
.../sample-groups/scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../sample-groups/scripts/mock/deploy.sh | 9 -
.../sample-groups/scripts/mock/undeploy.sh | 7 -
.../sample-groups/scripts/openstack/deploy.sh | 9 -
.../sample-groups/scripts/openstack/undeploy.sh | 7 -
.../README.md | 23 --
.../artifacts/application.json | 141 --------
.../scripts/common/deploy.sh | 64 ----
.../scripts/common/undeploy.sh | 35 --
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-cartridges/README.md | 14 -
.../group-cartridges/artifacts/application.json | 49 ---
.../group-cartridges/scripts/common/deploy.sh | 63 ----
.../group-cartridges/scripts/common/undeploy.sh | 38 ---
.../group-cartridges/scripts/ec2/deploy.sh | 9 -
.../group-cartridges/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../group-cartridges/scripts/mock/deploy.sh | 9 -
.../group-cartridges/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling-v1/README.md | 18 -
.../group-scaling-v1/artifacts/application.json | 48 ---
.../group-scaling-v1/scripts/common/deploy.sh | 58 ----
.../group-scaling-v1/scripts/common/undeploy.sh | 29 --
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 -
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../group-scaling-v1/scripts/mock/deploy.sh | 9 -
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/group-scaling/README.md | 18 -
.../group-scaling/artifacts/application.json | 97 ------
.../group-scaling/scripts/common/deploy.sh | 72 ----
.../group-scaling/scripts/common/undeploy.sh | 33 --
.../group-scaling/scripts/ec2/deploy.sh | 9 -
.../group-scaling/scripts/ec2/undeploy.sh | 7 -
.../group-scaling/scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../group-scaling/scripts/mock/deploy.sh | 9 -
.../group-scaling/scripts/mock/undeploy.sh | 7 -
.../group-scaling/scripts/openstack/deploy.sh | 9 -
.../group-scaling/scripts/openstack/undeploy.sh | 7 -
samples/applications/more-complex-app/README.md | 14 -
.../more-complex-app/artifacts/application.json | 202 ------------
.../more-complex-app/scripts/common/deploy.sh | 64 ----
.../more-complex-app/scripts/common/undeploy.sh | 31 --
.../more-complex-app/scripts/ec2/deploy.sh | 9 -
.../more-complex-app/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../more-complex-app/scripts/mock/deploy.sh | 9 -
.../more-complex-app/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../n-level-nesting/artifacts/application.json | 184 -----------
.../n-level-nesting/scripts/common/deploy.sh | 67 ----
.../n-level-nesting/scripts/common/undeploy.sh | 36 --
.../n-level-nesting/scripts/ec2/deploy.sh | 9 -
.../n-level-nesting/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../n-level-nesting/scripts/mock/deploy.sh | 9 -
.../n-level-nesting/scripts/mock/undeploy.sh | 7 -
.../n-level-nesting/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group-v2/README.md | 30 --
.../nested-group-v2/artifacts/application.json | 97 ------
.../nested-group-v2/images/nested-group-app.png | Bin 22765 -> 0 bytes
.../nested-group-v2/scripts/common/deploy.sh | 66 ----
.../nested-group-v2/scripts/common/undeploy.sh | 29 --
.../nested-group-v2/scripts/ec2/deploy.sh | 9 -
.../nested-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../nested-group-v2/scripts/mock/deploy.sh | 9 -
.../nested-group-v2/scripts/mock/undeploy.sh | 7 -
.../nested-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/nested-group/README.md | 14 -
.../nested-group/artifacts/application.json | 82 -----
.../nested-group/scripts/common/deploy.sh | 62 ----
.../nested-group/scripts/common/undeploy.sh | 29 --
.../scripts/common/update-deployment-policy.sh | 12 -
.../scripts/common/update-network-partition.sh | 11 -
.../nested-group/scripts/ec2/deploy.sh | 9 -
.../nested-group/scripts/ec2/undeploy.sh | 7 -
.../nested-group/scripts/kubernetes/deploy.sh | 15 -
.../nested-group/scripts/kubernetes/undeploy.sh | 13 -
.../nested-group/scripts/mock/deploy.sh | 9 -
.../nested-group/scripts/mock/undeploy.sh | 7 -
.../scripts/mock/update-network-partition.sh | 6 -
.../nested-group/scripts/openstack/deploy.sh | 9 -
.../nested-group/scripts/openstack/undeploy.sh | 7 -
.../openstack/update-network-partition.sh | 11 -
.../nested/complex-app-with-lb/README.md | 13 +
.../artifacts/application.json | 141 ++++++++
.../scripts/common/deploy.sh | 67 ++++
.../scripts/common/undeploy.sh | 38 +++
.../complex-app-with-lb/scripts/ec2/deploy.sh | 9 +
.../complex-app-with-lb/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../complex-app-with-lb/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 23 ++
.../artifacts/application.json | 141 ++++++++
.../scripts/common/deploy.sh | 64 ++++
.../scripts/common/undeploy.sh | 35 ++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../artifacts/application.json | 184 +++++++++++
.../scripts/common/deploy.sh | 67 ++++
.../scripts/common/undeploy.sh | 36 ++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-level-nested-group-app/README.md | 14 +
.../artifacts/application.json | 82 +++++
.../scripts/common/deploy.sh | 62 ++++
.../scripts/common/undeploy.sh | 36 ++
.../scripts/common/update-deployment-policy.sh | 12 +
.../scripts/common/update-network-partition.sh | 11 +
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/mock/update-network-partition.sh | 6 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../openstack/update-network-partition.sh | 11 +
.../single-level-nested-groups-app/README.md | 13 +
.../artifacts/application.json | 131 ++++++++
.../artifacts/autoscaling-policy.json | 14 +
.../artifacts/deployment-policy.json | 15 +
.../scripts/common/deploy.sh | 64 ++++
.../scripts/common/undeploy.sh | 36 ++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../README.md | 10 -
.../artifacts/application.json | 121 -------
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../scripts/common/deploy.sh | 65 ----
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../scripts/common/undeploy.sh | 37 ---
.../scripts/common/update-deployment-policy.sh | 12 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scaling/app-bursting-pattern/README.md | 8 +
.../artifacts/application-signup.json | 18 +
.../artifacts/application.json | 25 ++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/deploy.sh | 51 +++
.../scripts/common/undeploy.sh | 33 ++
.../app-bursting-pattern/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../app-bursting-pattern/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../sample-cartridges/README.md | 13 +
.../artifacts/application.json | 46 +++
.../sample-cartridges/scripts/common/deploy.sh | 53 +++
.../scripts/common/undeploy.sh | 21 ++
.../sample-cartridges/scripts/ec2/deploy.sh | 9 +
.../sample-cartridges/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../sample-cartridges/scripts/mock/deploy.sh | 9 +
.../sample-cartridges/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../dependent-scaling/sample-groups/README.md | 13 +
.../sample-groups/artifacts/application.json | 74 +++++
.../sample-groups/scripts/common/deploy.sh | 58 ++++
.../sample-groups/scripts/common/undeploy.sh | 25 ++
.../sample-groups/scripts/ec2/deploy.sh | 9 +
.../sample-groups/scripts/ec2/undeploy.sh | 7 +
.../sample-groups/scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../sample-groups/scripts/mock/deploy.sh | 9 +
.../sample-groups/scripts/mock/undeploy.sh | 7 +
.../sample-groups/scripts/openstack/deploy.sh | 9 +
.../sample-groups/scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-app/README.md | 18 +
.../artifacts/application.json | 97 ++++++
.../group-scaling-app/scripts/common/deploy.sh | 72 ++++
.../scripts/common/undeploy.sh | 33 ++
.../group-scaling-app/scripts/ec2/deploy.sh | 9 +
.../group-scaling-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../group-scaling-app/scripts/mock/deploy.sh | 9 +
.../group-scaling-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../group-scaling/group-scaling-v1/README.md | 18 +
.../group-scaling-v1/artifacts/application.json | 48 +++
.../group-scaling-v1/scripts/common/deploy.sh | 58 ++++
.../group-scaling-v1/scripts/common/undeploy.sh | 29 ++
.../group-scaling-v1/scripts/ec2/deploy.sh | 9 +
.../group-scaling-v1/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../group-scaling-v1/scripts/mock/deploy.sh | 9 +
.../group-scaling-v1/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../single-group-group-scaling/README.md | 13 +
.../artifacts/application.json | 33 ++
.../scripts/common/deploy.sh | 55 ++++
.../scripts/common/undeploy.sh | 28 ++
.../scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 15 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-cartridge-app/README.md | 8 +
.../artifacts/application-signup.json | 18 +
.../artifacts/application.json | 25 ++
.../artifacts/domain-mappings.json | 9 +
.../scripts/common/add-domain-mappings.sh | 9 +
.../scripts/common/add-network-partition.sh | 9 +
.../scripts/common/deploy.sh | 49 +++
.../scripts/common/get-application-runtime.sh | 10 +
.../scripts/common/list-domain-mappings.sh | 4 +
.../scripts/common/list-network-partition.sh | 4 +
.../scripts/common/undeploy.sh | 31 ++
.../scripts/common/update-deployment-policy.sh | 12 +
.../single-cartridge-app/scripts/ec2/deploy.sh | 9 +
.../scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../single-cartridge-app/scripts/mock/deploy.sh | 9 +
.../scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
.../simple/single-group-app/README.md | 15 +
.../single-group-app/artifacts/application.json | 72 ++++
.../single-group-app/scripts/common/deploy.sh | 62 ++++
.../single-group-app/scripts/common/undeploy.sh | 37 +++
.../single-group-app/scripts/ec2/deploy.sh | 9 +
.../single-group-app/scripts/ec2/undeploy.sh | 7 +
.../scripts/kubernetes/deploy.sh | 16 +
.../scripts/kubernetes/undeploy.sh | 13 +
.../single-group-app/scripts/mock/deploy.sh | 9 +
.../single-group-app/scripts/mock/undeploy.sh | 7 +
.../scripts/openstack/deploy.sh | 9 +
.../scripts/openstack/undeploy.sh | 7 +
samples/applications/single-cartridge/README.md | 8 -
.../artifacts/application-signup.json | 18 -
.../single-cartridge/artifacts/application.json | 25 --
.../artifacts/domain-mappings.json | 9 -
.../scripts/common/add-domain-mappings.sh | 9 -
.../scripts/common/add-network-partition.sh | 9 -
.../single-cartridge/scripts/common/deploy.sh | 49 ---
.../scripts/common/get-application-runtime.sh | 10 -
.../scripts/common/list-domain-mappings.sh | 4 -
.../scripts/common/list-network-partition.sh | 4 -
.../single-cartridge/scripts/common/undeploy.sh | 31 --
.../scripts/common/update-deployment-policy.sh | 12 -
.../single-cartridge/scripts/ec2/deploy.sh | 9 -
.../single-cartridge/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../single-cartridge/scripts/mock/deploy.sh | 9 -
.../single-cartridge/scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-cartridge/README.md | 15 -
.../artifacts/application.json | 72 ----
.../scripts/common/deploy.sh | 62 ----
.../scripts/common/undeploy.sh | 37 ---
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../single-group-group-scaling/README.md | 13 -
.../artifacts/application.json | 33 --
.../scripts/common/deploy.sh | 55 ----
.../scripts/common/undeploy.sh | 28 --
.../scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v1/README.md | 15 -
.../artifacts/application-up.json | 38 ---
.../single-group-v1/artifacts/application.json | 57 ----
.../single-group-v1/scripts/common/deploy.sh | 57 ----
.../single-group-v1/scripts/common/undeploy.sh | 35 --
.../single-group-v1/scripts/ec2/deploy.sh | 9 -
.../single-group-v1/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../single-group-v1/scripts/mock/deploy.sh | 9 -
.../single-group-v1/scripts/mock/undeploy.sh | 7 -
.../single-group-v1/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v2/README.md | 14 -
.../single-group-v2/artifacts/application.json | 72 ----
.../single-group-v2/scripts/common/deploy.sh | 59 ----
.../single-group-v2/scripts/common/undeploy.sh | 31 --
.../single-group-v2/scripts/ec2/deploy.sh | 9 -
.../single-group-v2/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../single-group-v2/scripts/mock/deploy.sh | 9 -
.../single-group-v2/scripts/mock/undeploy.sh | 7 -
.../single-group-v2/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/single-group-v3/README.md | 14 -
.../single-group-v3/artifacts/application.json | 34 --
.../single-group-v3/scripts/common/deploy.sh | 53 ---
.../single-group-v3/scripts/common/undeploy.sh | 28 --
.../single-group-v3/scripts/ec2/deploy.sh | 9 -
.../single-group-v3/scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 15 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../single-group-v3/scripts/mock/deploy.sh | 9 -
.../single-group-v3/scripts/mock/undeploy.sh | 7 -
.../single-group-v3/scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../applications/tomcat-single-signon/README.md | 30 --
.../artifacts/application.json | 38 ---
.../scripts/common/deploy.sh | 54 ---
.../scripts/common/undeploy.sh | 27 --
.../tomcat-single-signon/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../tomcat-single-signon/scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/tomcat/README.md | 18 -
.../tomcat/artifacts/application.json | 25 --
.../tomcat/scripts/common/deploy.sh | 53 ---
.../tomcat/scripts/common/undeploy.sh | 25 --
.../applications/tomcat/scripts/ec2/deploy.sh | 9 -
.../applications/tomcat/scripts/ec2/undeploy.sh | 7 -
.../tomcat/scripts/kubernetes/deploy.sh | 16 -
.../tomcat/scripts/kubernetes/undeploy.sh | 13 -
.../applications/tomcat/scripts/mock/deploy.sh | 9 -
.../tomcat/scripts/mock/undeploy.sh | 7 -
.../tomcat/scripts/openstack/deploy.sh | 9 -
.../tomcat/scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v1/README.md | 22 --
.../artifacts/application.json | 62 ----
.../scripts/common/deploy.sh | 63 ----
.../scripts/common/undeploy.sh | 36 --
.../wordpress-extended-v1/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
.../wordpress-extended-v2/README.md | 23 --
.../artifacts/application.json | 63 ----
.../scripts/common/deploy.sh | 63 ----
.../scripts/common/undeploy.sh | 36 --
.../wordpress-extended-v2/scripts/ec2/deploy.sh | 9 -
.../scripts/ec2/undeploy.sh | 7 -
.../scripts/kubernetes/deploy.sh | 16 -
.../scripts/kubernetes/undeploy.sh | 13 -
.../scripts/mock/deploy.sh | 9 -
.../scripts/mock/undeploy.sh | 7 -
.../scripts/openstack/deploy.sh | 9 -
.../scripts/openstack/undeploy.sh | 7 -
samples/applications/wordpress/README.md | 20 --
.../wordpress/artifacts/application.json | 41 ---
.../wordpress/scripts/common/deploy.sh | 60 ----
.../wordpress/scripts/common/undeploy.sh | 35 --
.../wordpress/scripts/ec2/deploy.sh | 9 -
.../wordpress/scripts/ec2/undeploy.sh | 7 -
.../wordpress/scripts/kubernetes/deploy.sh | 16 -
.../wordpress/scripts/kubernetes/undeploy.sh | 13 -
.../wordpress/scripts/mock/deploy.sh | 9 -
.../wordpress/scripts/mock/undeploy.sh | 7 -
.../wordpress/scripts/openstack/deploy.sh | 9 -
.../wordpress/scripts/openstack/undeploy.sh | 7 -
.../src/main/resources/AutoscalerService.wsdl | 257 +++++++--------
690 files changed, 7684 insertions(+), 9871 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/5c8fdcf7/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 045d84c,81c07b7..fe1721c
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@@ -439,7 -439,8 +439,8 @@@ public class StratosApiV41 extends Abst
serviceGroupDefinition.getName()))).build();
} catch (RestAPIException e) {
if (e.getCause().getMessage().contains("already exists")) {
- return Response.status(Response.Status.CONFLICT).build();
- return Response.status(Response.Status.CONFLICT).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.CONFLICT).entity(new StatusResponseBean(
+ Response.Status.CONFLICT.getStatusCode(), "Cartridge group not found")).build();
} else {
throw e;
}
@@@ -461,14 -462,13 +462,13 @@@
public Response getServiceGroupDefinition(
@PathParam("groupDefinitionName") String groupDefinitionName) throws RestAPIException {
GroupBean serviceGroupDefinition = StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName);
- Response.ResponseBuilder rb;
+
if (serviceGroupDefinition != null) {
- rb = Response.ok().entity(serviceGroupDefinition);
+ return Response.ok().entity(serviceGroupDefinition).build();
} else {
- rb = Response.status(Response.Status.NOT_FOUND);
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "Cartridge group not found")).build();
}
-
- return rb.build();
}
/**
@@@ -485,14 -485,13 +485,13 @@@
public Response getServiceGroups()
throws RestAPIException {
GroupBean[] serviceGroups = StratosApiV41Utils.getServiceGroupDefinitions();
- Response.ResponseBuilder rb;
+
if (serviceGroups != null) {
- rb = Response.ok().entity(serviceGroups);
+ return Response.ok().entity(serviceGroups).build();
} else {
- rb = Response.status(Response.Status.NOT_FOUND);
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "Cartridge group not found")).build();
}
-
- return rb.build();
}
/**
@@@ -538,11 -537,11 +537,12 @@@
StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
} catch (CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
return Response.status(Response.Status.CONFLICT)
- .entity(new ErrorResponseBean(Response.Status.CONFLICT.getStatusCode(), "Network partition already" +
- "exists")).build();
+ .entity(new StatusResponseBean(Response.Status.CONFLICT.getStatusCode(), e.getLocalizedMessage()))
+ .build();
++
}
URI url = uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
- return Response.created(url).entity(new SuccessResponseBean(Response.Status.CREATED.getStatusCode(),
+ return Response.created(url).entity(new StatusResponseBean(Response.Status.CREATED.getStatusCode(),
String.format("Network partition added successfully: [network-partition] %s", networkPartitionId)))
.build();
}
@@@ -562,7 -561,8 +562,8 @@@
throws RestAPIException {
NetworkPartitionBean[] networkPartitions = StratosApiV41Utils.getNetworkPartitions();
if (networkPartitions == null || networkPartitions.length == 0) {
- return Response.status(Response.Status.NOT_FOUND).build();
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "No network partitions found")).build();
}
return Response.ok(networkPartitions).build();
@@@ -583,7 -583,8 +584,8 @@@
@PathParam("networkPartitionId") String networkPartitionId) throws RestAPIException {
NetworkPartitionBean networkPartition = StratosApiV41Utils.getNetworkPartition(networkPartitionId);
if (networkPartition == null) {
- return Response.status(Response.Status.NOT_FOUND).build();
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "Network partition is not found")).build();
}
return Response.ok(networkPartition).build();
@@@ -605,9 -606,10 +607,10 @@@
try {
StratosApiV41Utils.removeNetworkPartition(networkPartitionId);
} catch (CloudControllerServiceNetworkPartitionNotExistsExceptionException e) {
- return Response.status(Response.Status.NOT_FOUND).build();
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "Network partition is not found")).build();
}
- return Response.ok().entity(new SuccessResponseBean(Response.Status.OK.getStatusCode(),
+ return Response.ok().entity(new StatusResponseBean(Response.Status.OK.getStatusCode(),
String.format("Network Partition deleted successfully: [network-partition] %s",
networkPartitionId))).build();
}
@@@ -636,7 -638,8 +639,8 @@@
applicationDefinition.getApplicationId()))).build();
} catch (ApplicationAlreadyExistException e) {
- return Response.status(Response.Status.CONFLICT).build();
- return Response.status(Response.Status.CONFLICT).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.CONFLICT).entity(new StatusResponseBean(
+ Response.Status.CONFLICT.getStatusCode(), "Application already exists")).build();
} catch (RestAPIException e) {
throw e;
@@@ -683,7 -686,8 +687,8 @@@
public Response getApplications() throws RestAPIException {
List<ApplicationBean> applicationDefinitions = StratosApiV41Utils.getApplications();
if (applicationDefinitions == null || applicationDefinitions.isEmpty()) {
- return Response.status(Response.Status.NOT_FOUND).build();
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "No applications found")).build();
}
ApplicationBean[] applicationDefinitionsArray = applicationDefinitions
@@@ -707,7 -711,8 +712,8 @@@
@PathParam("applicationId") String applicationId) throws RestAPIException {
ApplicationBean applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
if (applicationDefinition == null) {
- return Response.status(Response.Status.NOT_FOUND).build();
- return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
+ Response.Status.NOT_FOUND.getStatusCode(), "Application not found")).build();
}
return Response.ok(applicationDefinition).build();
}
@@@ -734,7 -739,8 +740,8 @@@
String.format("Application deployed successfully: [application] %s", applicationId))).build();
} catch (ApplicationAlreadyDeployedException e) {
- return Response.status(Response.Status.CONFLICT).build();
- return Response.status(Response.Status.CONFLICT).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.CONFLICT).entity(new StatusResponseBean(
+ Response.Status.CONFLICT.getStatusCode(), "Application policy already deployed")).build();
} catch (RestAPIException e) {
throw e;
@@@ -763,10 -769,9 +770,9 @@@
applicationPolicy.getId()))).build();
} catch (RestAPIException e) {
throw e;
- } catch (AutoscalerServiceInvalidPolicyExceptionException e) {
- return Response.status(Response.Status.BAD_REQUEST).build();
} catch (AutoscalerServiceInvalidApplicationPolicyExceptionException e) {
- return Response.status(Response.Status.BAD_REQUEST).build();
- return Response.status(Response.Status.BAD_REQUEST).entity(new ErrorResponseBean(
++ return Response.status(Response.Status.BAD_REQUEST).entity(new StatusResponseBean(
+ Response.Status.BAD_REQUEST.getStatusCode(), "Invalid application policy")).build();
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/5c8fdcf7/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 4c9fe1a,bc4342d..418439f
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@@ -694,14 -575,7 +695,13 @@@ public class StratosApiV41Utils
}
}
+ /**
+ * Add an application policy
+ *
+ * @param applicationPolicyBean applicationPolicyBean
+ * @throws RestAPIException
+ */
public static void addApplicationPolicy(ApplicationPolicyBean applicationPolicyBean) throws RestAPIException,
- AutoscalerServiceInvalidPolicyExceptionException,
AutoscalerServiceInvalidApplicationPolicyExceptionException {
if (applicationPolicyBean == null) {