mirror of https://github.com/apache/cloudstack.git
api_refactor: refactor autoscale apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
456b852c0c
commit
feb342ad23
|
|
@ -18,19 +18,15 @@ package com.cloud.network.as;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.api.commands.CreateAutoScalePolicyCmd;
|
||||
import com.cloud.api.commands.CreateAutoScaleVmGroupCmd;
|
||||
import com.cloud.api.commands.CreateAutoScaleVmProfileCmd;
|
||||
import com.cloud.api.commands.CreateConditionCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScalePolicyCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmGroupCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmProfileCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.*;
|
||||
import com.cloud.api.commands.CreateCounterCmd;
|
||||
import com.cloud.api.commands.ListAutoScalePoliciesCmd;
|
||||
import com.cloud.api.commands.ListAutoScaleVmGroupsCmd;
|
||||
import com.cloud.api.commands.ListAutoScaleVmProfilesCmd;
|
||||
import com.cloud.api.commands.ListConditionsCmd;
|
||||
import com.cloud.api.commands.ListCountersCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScalePolicyCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScaleVmGroupCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScaleVmProfileCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListAutoScalePoliciesCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListConditionsCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScaleVmGroupCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScaleVmProfileCmd;
|
||||
import com.cloud.exception.ResourceInUseException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package com.cloud.api.commands;
|
||||
package org.apache.cloudstack.api.user.autoscale.command;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -155,25 +155,25 @@ updateLoadBalancerRule=org.apache.cloudstack.api.user.lb.command.UpdateLoadBalan
|
|||
|
||||
#### autoscale commands
|
||||
createCounter = com.cloud.api.commands.CreateCounterCmd;1
|
||||
createCondition = com.cloud.api.commands.CreateConditionCmd;15
|
||||
createAutoScalePolicy=com.cloud.api.commands.CreateAutoScalePolicyCmd;15
|
||||
createAutoScaleVmProfile=com.cloud.api.commands.CreateAutoScaleVmProfileCmd;15
|
||||
createAutoScaleVmGroup=com.cloud.api.commands.CreateAutoScaleVmGroupCmd;15
|
||||
createCondition = org.apache.cloudstack.api.user.autoscale.command.CreateConditionCmd;15
|
||||
createAutoScalePolicy=org.apache.cloudstack.api.user.autoscale.command.CreateAutoScalePolicyCmd;15
|
||||
createAutoScaleVmProfile=org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmProfileCmd;15
|
||||
createAutoScaleVmGroup=org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmGroupCmd;15
|
||||
deleteCounter = com.cloud.api.commands.DeleteCounterCmd;1
|
||||
deleteCondition = com.cloud.api.commands.DeleteConditionCmd;15
|
||||
deleteAutoScalePolicy=com.cloud.api.commands.DeleteAutoScalePolicyCmd;15
|
||||
deleteAutoScaleVmProfile=com.cloud.api.commands.DeleteAutoScaleVmProfileCmd;15
|
||||
deleteAutoScaleVmGroup=com.cloud.api.commands.DeleteAutoScaleVmGroupCmd;15
|
||||
listCounters = com.cloud.api.commands.ListCountersCmd;15
|
||||
listConditions = com.cloud.api.commands.ListConditionsCmd;15
|
||||
listAutoScalePolicies=com.cloud.api.commands.ListAutoScalePoliciesCmd;15
|
||||
listAutoScaleVmProfiles=com.cloud.api.commands.ListAutoScaleVmProfilesCmd;15
|
||||
listAutoScaleVmGroups=com.cloud.api.commands.ListAutoScaleVmGroupsCmd;15
|
||||
enableAutoScaleVmGroup=com.cloud.api.commands.EnableAutoScaleVmGroupCmd;15
|
||||
disableAutoScaleVmGroup=com.cloud.api.commands.DisableAutoScaleVmGroupCmd;15
|
||||
updateAutoScalePolicy=com.cloud.api.commands.UpdateAutoScalePolicyCmd;15
|
||||
updateAutoScaleVmProfile=com.cloud.api.commands.UpdateAutoScaleVmProfileCmd;15
|
||||
updateAutoScaleVmGroup=com.cloud.api.commands.UpdateAutoScaleVmGroupCmd;15
|
||||
deleteCondition = org.apache.cloudstack.api.user.autoscale.command.DeleteConditionCmd;15
|
||||
deleteAutoScalePolicy=org.apache.cloudstack.api.user.autoscale.command.DeleteAutoScalePolicyCmd;15
|
||||
deleteAutoScaleVmProfile=org.apache.cloudstack.api.user.autoscale.command.DeleteAutoScaleVmProfileCmd;15
|
||||
deleteAutoScaleVmGroup=org.apache.cloudstack.api.user.autoscale.command.DeleteAutoScaleVmGroupCmd;15
|
||||
listCounters = org.apache.cloudstack.api.user.autoscale.command.ListCountersCmd;15
|
||||
listConditions = org.apache.cloudstack.api.user.autoscale.command.ListConditionsCmd;15
|
||||
listAutoScalePolicies=org.apache.cloudstack.api.user.autoscale.command.ListAutoScalePoliciesCmd;15
|
||||
listAutoScaleVmProfiles=org.apache.cloudstack.api.user.autoscale.command.ListAutoScaleVmProfilesCmd;15
|
||||
listAutoScaleVmGroups=org.apache.cloudstack.api.user.autoscale.command.ListAutoScaleVmGroupsCmd;15
|
||||
enableAutoScaleVmGroup=org.apache.cloudstack.api.user.autoscale.command.EnableAutoScaleVmGroupCmd;15
|
||||
disableAutoScaleVmGroup=org.apache.cloudstack.api.user.autoscale.command.DisableAutoScaleVmGroupCmd;15
|
||||
updateAutoScalePolicy=org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScalePolicyCmd;15
|
||||
updateAutoScaleVmProfile=org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScaleVmProfileCmd;15
|
||||
updateAutoScaleVmGroup=org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScaleVmGroupCmd;15
|
||||
|
||||
#### router commands
|
||||
startRouter=com.cloud.api.commands.StartRouterCmd;7
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import java.util.Map;
|
|||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.cloudstack.api.user.autoscale.command.*;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.acl.ControlledEntity;
|
||||
|
|
@ -32,20 +33,18 @@ import org.apache.cloudstack.api.ApiConstants;
|
|||
import com.cloud.api.ApiDBUtils;
|
||||
import com.cloud.api.ApiDispatcher;
|
||||
import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
|
||||
import com.cloud.api.commands.CreateAutoScalePolicyCmd;
|
||||
import com.cloud.api.commands.CreateAutoScaleVmGroupCmd;
|
||||
import com.cloud.api.commands.CreateAutoScaleVmProfileCmd;
|
||||
import com.cloud.api.commands.CreateConditionCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScalePolicyCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmGroupCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateAutoScaleVmProfileCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.CreateConditionCmd;
|
||||
import com.cloud.api.commands.CreateCounterCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
|
||||
import com.cloud.api.commands.ListAutoScalePoliciesCmd;
|
||||
import com.cloud.api.commands.ListAutoScaleVmGroupsCmd;
|
||||
import com.cloud.api.commands.ListAutoScaleVmProfilesCmd;
|
||||
import com.cloud.api.commands.ListConditionsCmd;
|
||||
import com.cloud.api.commands.ListCountersCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScalePolicyCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScaleVmGroupCmd;
|
||||
import com.cloud.api.commands.UpdateAutoScaleVmProfileCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListAutoScalePoliciesCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListAutoScaleVmGroupsCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListConditionsCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.ListCountersCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScalePolicyCmd;
|
||||
import org.apache.cloudstack.api.user.autoscale.command.UpdateAutoScaleVmProfileCmd;
|
||||
import com.cloud.configuration.Config;
|
||||
import com.cloud.configuration.ConfigurationManager;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
|
|
|
|||
Loading…
Reference in New Issue