|
| 1 | +// |
| 2 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +// or more contributor license agreements. See the NOTICE file |
| 4 | +// distributed with this work for additional information |
| 5 | +// regarding copyright ownership. The ASF licenses this file |
| 6 | +// to you under the Apache License, Version 2.0 (the |
| 7 | +// "License"); you may not use this file except in compliance |
| 8 | +// with the License. You may obtain a copy of the License at |
| 9 | +// |
| 10 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +// |
| 12 | +// Unless required by applicable law or agreed to in writing, |
| 13 | +// software distributed under the License is distributed on an |
| 14 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +// KIND, either express or implied. See the License for the |
| 16 | +// specific language governing permissions and limitations |
| 17 | +// under the License. |
| 18 | +// |
| 19 | + |
| 20 | +package org.apache.cloudstack.backup; |
| 21 | + |
| 22 | +import com.cloud.agent.api.Command; |
| 23 | +import com.cloud.agent.api.LogLevel; |
| 24 | +import com.cloud.vm.VirtualMachine; |
| 25 | +import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; |
| 26 | + |
| 27 | +import java.util.List; |
| 28 | + |
| 29 | +public class CommvaultRestoreBackupCommand extends Command { |
| 30 | + private String vmName; |
| 31 | + private String backupPath; |
| 32 | + private List<String> backupVolumesUUIDs; |
| 33 | + private List<PrimaryDataStoreTO> restoreVolumePools; |
| 34 | + private List<String> restoreVolumePaths; |
| 35 | + private String diskType; |
| 36 | + private Boolean vmExists; |
| 37 | + private String restoreVolumeUUID; |
| 38 | + private VirtualMachine.State vmState; |
| 39 | + private Integer timeout; |
| 40 | + private String cacheMode; |
| 41 | + private String hostName; |
| 42 | + |
| 43 | + protected CommvaultRestoreBackupCommand() { |
| 44 | + super(); |
| 45 | + } |
| 46 | + |
| 47 | + public String getVmName() { |
| 48 | + return vmName; |
| 49 | + } |
| 50 | + |
| 51 | + public void setVmName(String vmName) { |
| 52 | + this.vmName = vmName; |
| 53 | + } |
| 54 | + |
| 55 | + public String getBackupPath() { |
| 56 | + return backupPath; |
| 57 | + } |
| 58 | + |
| 59 | + public void setBackupPath(String backupPath) { |
| 60 | + this.backupPath = backupPath; |
| 61 | + } |
| 62 | + |
| 63 | + public List<PrimaryDataStoreTO> getRestoreVolumePools() { |
| 64 | + return restoreVolumePools; |
| 65 | + } |
| 66 | + |
| 67 | + public void setRestoreVolumePools(List<PrimaryDataStoreTO> restoreVolumePools) { |
| 68 | + this.restoreVolumePools = restoreVolumePools; |
| 69 | + } |
| 70 | + |
| 71 | + public List<String> getRestoreVolumePaths() { |
| 72 | + return restoreVolumePaths; |
| 73 | + } |
| 74 | + |
| 75 | + public void setRestoreVolumePaths(List<String> restoreVolumePaths) { |
| 76 | + this.restoreVolumePaths = restoreVolumePaths; |
| 77 | + } |
| 78 | + |
| 79 | + public Boolean isVmExists() { |
| 80 | + return vmExists; |
| 81 | + } |
| 82 | + |
| 83 | + public void setVmExists(Boolean vmExists) { |
| 84 | + this.vmExists = vmExists; |
| 85 | + } |
| 86 | + |
| 87 | + public String getDiskType() { |
| 88 | + return diskType; |
| 89 | + } |
| 90 | + |
| 91 | + public void setDiskType(String diskType) { |
| 92 | + this.diskType = diskType; |
| 93 | + } |
| 94 | + |
| 95 | + public String getRestoreVolumeUUID() { |
| 96 | + return restoreVolumeUUID; |
| 97 | + } |
| 98 | + |
| 99 | + public void setRestoreVolumeUUID(String restoreVolumeUUID) { |
| 100 | + this.restoreVolumeUUID = restoreVolumeUUID; |
| 101 | + } |
| 102 | + |
| 103 | + public VirtualMachine.State getVmState() { |
| 104 | + return vmState; |
| 105 | + } |
| 106 | + |
| 107 | + public void setVmState(VirtualMachine.State vmState) { |
| 108 | + this.vmState = vmState; |
| 109 | + } |
| 110 | + |
| 111 | + @LogLevel(LogLevel.Log4jLevel.Off) |
| 112 | + private String mountOptions; |
| 113 | + @Override |
| 114 | + |
| 115 | + public boolean executeInSequence() { |
| 116 | + return true; |
| 117 | + } |
| 118 | + |
| 119 | + public List<String> getBackupVolumesUUIDs() { |
| 120 | + return backupVolumesUUIDs; |
| 121 | + } |
| 122 | + |
| 123 | + public void setBackupVolumesUUIDs(List<String> backupVolumesUUIDs) { |
| 124 | + this.backupVolumesUUIDs = backupVolumesUUIDs; |
| 125 | + } |
| 126 | + |
| 127 | + public Integer getTimeout() { |
| 128 | + return this.timeout == null ? 0 : this.timeout; |
| 129 | + } |
| 130 | + |
| 131 | + public void setTimeout(Integer timeout) { |
| 132 | + this.timeout = timeout; |
| 133 | + } |
| 134 | + |
| 135 | + public String getCacheMode() { |
| 136 | + return cacheMode; |
| 137 | + } |
| 138 | + |
| 139 | + public void setCacheMode(String cacheMode) { |
| 140 | + this.cacheMode = cacheMode; |
| 141 | + } |
| 142 | + |
| 143 | + public String getHostName() { |
| 144 | + return hostName; |
| 145 | + } |
| 146 | + |
| 147 | + public void setHostName(String hostName) { |
| 148 | + this.hostName = hostName; |
| 149 | + } |
| 150 | +} |
0 commit comments