Skip to content

Commit a033cf1

Browse files
committed
api_refactor: refactor snapshot apis
- Fix refactored apis, fix mappings in commands*.in - Fix comments etc. Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 0df9538 commit a033cf1

10 files changed

Lines changed: 20 additions & 21 deletions

File tree

‎api/src/com/cloud/storage/snapshot/SnapshotService.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
import java.util.List;
2020

21-
import com.cloud.api.commands.CreateSnapshotPolicyCmd;
22-
import com.cloud.api.commands.DeleteSnapshotPoliciesCmd;
21+
import org.apache.cloudstack.api.user.snapshot.command.CreateSnapshotPolicyCmd;
22+
import org.apache.cloudstack.api.user.snapshot.command.DeleteSnapshotPoliciesCmd;
2323
import com.cloud.api.commands.ListRecurringSnapshotScheduleCmd;
24-
import com.cloud.api.commands.ListSnapshotPoliciesCmd;
25-
import com.cloud.api.commands.ListSnapshotsCmd;
24+
import org.apache.cloudstack.api.user.snapshot.command.ListSnapshotPoliciesCmd;
25+
import org.apache.cloudstack.api.user.snapshot.command.ListSnapshotsCmd;
2626
import com.cloud.exception.PermissionDeniedException;
2727
import com.cloud.exception.ResourceAllocationException;
2828
import com.cloud.storage.Snapshot;

api/src/com/cloud/api/commands/CreateSnapshotCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/CreateSnapshotCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import org.apache.log4j.Logger;
2020

api/src/com/cloud/api/commands/CreateSnapshotPolicyCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/CreateSnapshotPolicyCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import org.apache.log4j.Logger;
2020

api/src/com/cloud/api/commands/DeleteSnapshotCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/DeleteSnapshotCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import org.apache.log4j.Logger;
2020

api/src/com/cloud/api/commands/DeleteSnapshotPoliciesCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/DeleteSnapshotPoliciesCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import java.util.List;
2020

api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/ListSnapshotPoliciesCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;

api/src/com/cloud/api/commands/ListSnapshotsCmd.java renamed to api/src/org/apache/cloudstack/api/user/snapshot/command/ListSnapshotsCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.api.commands;
17+
package org.apache.cloudstack.api.user.snapshot.command;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;

‎client/tomcatconf/commands.properties.in‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ migrateVirtualMachine=org.apache.cloudstack.api.admin.vm.command.MigrateVMCmd;1
7070
recoverVirtualMachine=org.apache.cloudstack.api.admin.vm.command.RecoverVMCmd;7
7171

7272
#### snapshot commands
73-
createSnapshot=com.cloud.api.commands.CreateSnapshotCmd;15
74-
listSnapshots=com.cloud.api.commands.ListSnapshotsCmd;15
75-
deleteSnapshot=com.cloud.api.commands.DeleteSnapshotCmd;15
76-
createSnapshotPolicy=com.cloud.api.commands.CreateSnapshotPolicyCmd;15
77-
deleteSnapshotPolicies=com.cloud.api.commands.DeleteSnapshotPoliciesCmd;15
78-
listSnapshotPolicies=com.cloud.api.commands.ListSnapshotPoliciesCmd;15
73+
createSnapshot=org.apache.cloudstack.api.user.snapshot.command.CreateSnapshotCmd;15
74+
listSnapshots=org.apache.cloudstack.api.user.snapshot.command.ListSnapshotsCmd;15
75+
deleteSnapshot=org.apache.cloudstack.api.user.snapshot.command.DeleteSnapshotCmd;15
76+
createSnapshotPolicy=org.apache.cloudstack.api.user.snapshot.command.CreateSnapshotPolicyCmd;15
77+
deleteSnapshotPolicies=org.apache.cloudstack.api.user.snapshot.command.DeleteSnapshotPoliciesCmd;15
78+
listSnapshotPolicies=org.apache.cloudstack.api.user.snapshot.command.ListSnapshotPoliciesCmd;15
7979

8080

8181
#### template commands

‎server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import javax.ejb.Local;
2626
import javax.naming.ConfigurationException;
2727

28+
import org.apache.cloudstack.api.user.snapshot.command.*;
2829
import org.apache.log4j.Logger;
2930

3031
import com.cloud.agent.AgentManager;
@@ -39,11 +40,9 @@
3940
import com.cloud.agent.api.downloadSnapshotFromSwiftCommand;
4041
import com.cloud.agent.api.to.SwiftTO;
4142
import com.cloud.alert.AlertManager;
42-
import com.cloud.api.commands.CreateSnapshotPolicyCmd;
43-
import com.cloud.api.commands.DeleteSnapshotPoliciesCmd;
43+
import org.apache.cloudstack.api.user.snapshot.command.DeleteSnapshotPoliciesCmd;
4444
import com.cloud.api.commands.ListRecurringSnapshotScheduleCmd;
45-
import com.cloud.api.commands.ListSnapshotPoliciesCmd;
46-
import com.cloud.api.commands.ListSnapshotsCmd;
45+
import org.apache.cloudstack.api.user.snapshot.command.ListSnapshotPoliciesCmd;
4746
import com.cloud.configuration.Config;
4847
import com.cloud.configuration.Resource.ResourceType;
4948
import com.cloud.configuration.dao.ConfigurationDao;

‎server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
import javax.ejb.Local;
2727
import javax.naming.ConfigurationException;
2828

29+
import org.apache.cloudstack.api.user.snapshot.command.CreateSnapshotCmd;
2930
import org.apache.log4j.Logger;
3031

3132
import org.apache.cloudstack.api.ApiConstants;
3233
import com.cloud.api.ApiDispatcher;
3334
import com.cloud.api.ApiGsonHelper;
34-
import com.cloud.api.commands.CreateSnapshotCmd;
3535
import com.cloud.user.Account;
3636
import com.cloud.async.AsyncJobManager;
3737
import com.cloud.async.AsyncJobResult;

0 commit comments

Comments
 (0)