Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
9 changes: 9 additions & 0 deletions 9 core/src/com/cloud/agent/api/BackupSnapshotCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class BackupSnapshotCommand extends SnapshotCommand {
private S3TO s3;
StorageFilerTO pool;
private Long secHostId;
private String nfsVersion;

protected BackupSnapshotCommand() {

Expand Down Expand Up @@ -107,4 +108,12 @@ public Long getSnapshotId() {
public Long getSecHostId() {
return secHostId;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
private String origTemplateInstallPath;
private Long newTemplateId;
private String templateName;
private String nfsVersion;

protected CreatePrivateTemplateFromSnapshotCommand() {

Expand Down Expand Up @@ -72,4 +73,12 @@ public Long getNewTemplateId() {
public String getTemplateName() {
return templateName;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
StorageFilerTO _primaryPool;
// For XenServer
private String _secondaryStorageUrl;
private String nfsVersion;

public CreatePrivateTemplateFromVolumeCommand() {
}
Expand Down Expand Up @@ -99,4 +100,12 @@ public Long getAccountId() {
public void setTemplateId(long templateId) {
_templateId = templateId;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
10 changes: 10 additions & 0 deletions 10 core/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*/
public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {

private String nfsVersion;

protected CreateVolumeFromSnapshotCommand() {

}
Expand All @@ -50,4 +52,12 @@ public CreateVolumeFromSnapshotCommand(StoragePool pool, String secondaryStorage
super(pool, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId);
setWait(wait);
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
14 changes: 14 additions & 0 deletions 14 core/src/com/cloud/agent/api/GetStorageStatsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class GetStorageStatsCommand extends Command {
private StoragePoolType pooltype;
private String secUrl;
private DataStoreTO store;
private String nfsVersion;

public String getSecUrl() {
return secUrl;
Expand All @@ -54,6 +55,11 @@ public GetStorageStatsCommand(DataStoreTO store) {
this.store = store;
}

public GetStorageStatsCommand(DataStoreTO store, String nfsVersion) {
this.store = store;
this.nfsVersion = nfsVersion;
}

public GetStorageStatsCommand(String secUrl) {
this.secUrl = secUrl;
}
Expand Down Expand Up @@ -81,6 +87,14 @@ public DataStoreTO getStore() {
return this.store;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}

@Override
public boolean executeInSequence() {
return false;
Expand Down
9 changes: 9 additions & 0 deletions 9 core/src/com/cloud/agent/api/SecStorageSetupCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class SecStorageSetupCommand extends Command {
private String secUrl;
private KeystoreManager.Certificates certs;
private String postUploadKey;
private String nfsVersion;


public SecStorageSetupCommand() {
Expand Down Expand Up @@ -74,4 +75,12 @@ public String getPostUploadKey() {
public void setPostUploadKey(String postUploadKey) {
this.postUploadKey = postUploadKey;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
9 changes: 9 additions & 0 deletions 9 core/src/com/cloud/agent/api/storage/CopyVolumeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class CopyVolumeCommand extends Command {
boolean toSecondaryStorage;
String vmName;
boolean executeInSequence = false;
String nfsVersion;

public CopyVolumeCommand() {
}
Expand Down Expand Up @@ -75,4 +76,12 @@ public boolean toSecondaryStorage() {
public String getVmName() {
return vmName;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
10 changes: 10 additions & 0 deletions 10 core/src/com/cloud/agent/api/storage/ListTemplateCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

public class ListTemplateCommand extends StorageCommand {
private DataStoreTO store;
private String nfsVersion;

//private String secUrl;

Expand All @@ -34,6 +35,11 @@ public ListTemplateCommand(DataStoreTO store) {
// this.secUrl = url;
}

public ListTemplateCommand(DataStoreTO store, String nfsVersion) {
this.store = store;
this.nfsVersion = nfsVersion;
}

@Override
public boolean executeInSequence() {
return true;
Expand All @@ -43,6 +49,10 @@ public DataStoreTO getDataStore() {
return store;
}

public String getNfsVersion() {
return nfsVersion;
}

// public String getSecUrl() {
// return secUrl;
// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class PrimaryStorageDownloadCommand extends AbstractDownloadCommand {

String secondaryStorageUrl;
String primaryStorageUrl;
String nfsVersion;

protected PrimaryStorageDownloadCommand() {
}
Expand Down Expand Up @@ -87,4 +88,12 @@ public String getPrimaryStorageUrl() {
public boolean executeInSequence() {
return true;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public class TemplateOrVolumePostUploadCommand {

private long accountId;

private String nfsVersion;

public TemplateOrVolumePostUploadCommand(long entityId, String entityUUID, String absolutePath, String checksum, String type, String name, String imageFormat, String dataTo,
String dataToRole) {
this.entityId = entityId;
Expand Down Expand Up @@ -196,4 +198,12 @@ public void setAccountId(long accountId) {
public long getAccountId() {
return accountId;
}

public String getNfsVersion() {
return nfsVersion;
}

public void setNfsVersion(String nfsVersion) {
this.nfsVersion = nfsVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<bean id="templateServiceImpl"
class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl" />
depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl, imageStoreDetailsUtil" />

<bean id="templateDataFactoryImpl"
class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import com.cloud.exception.ResourceAllocationException;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.storage.DataStoreRole;
import com.cloud.storage.ImageStoreDetailsUtil;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.storage.Storage.TemplateType;
import com.cloud.storage.StoragePool;
Expand Down Expand Up @@ -135,6 +136,8 @@ public class TemplateServiceImpl implements TemplateService {
ConfigurationDao _configDao;
@Inject
StorageCacheManager _cacheMgr;
@Inject
ImageStoreDetailsUtil imageStoreDetailsUtil;

class TemplateOpContext<T> extends AsyncRpcContext<T> {
final TemplateObject template;
Expand Down Expand Up @@ -564,7 +567,7 @@ public void associateCrosszoneTemplatesToZone(long dcId) {
}

private Map<String, TemplateProp> listTemplate(DataStore ssStore) {
ListTemplateCommand cmd = new ListTemplateCommand(ssStore.getTO());
ListTemplateCommand cmd = new ListTemplateCommand(ssStore.getTO(), imageStoreDetailsUtil.getNfsVersion(ssStore.getId()));
EndPoint ep = _epSelector.select(ssStore);
Answer answer = null;
if (ep == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public MockLocalNfsSecondaryStorageResource() {
}

@Override
public String getRootDir(String secUrl) {
public String getRootDir(String secUrl, String nfsVersion) {
return "/mnt";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,7 @@
<property name="snapshotStrategies" value="#{snapshotStrategiesRegistry.registered}" />
<property name="vmSnapshotStrategies" value="#{vmSnapshotStrategiesRegistry.registered}" />
</bean>

<bean id="imageStoreDetailsUtil" class="com.cloud.storage.ImageStoreDetailsUtil" />

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
}

@Override
public String getRootDir(String url) {
public String getRootDir(String url, String nfsVersion) {
// TODO Auto-generated method stub
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface VmwareManager {

String getSystemVMDefaultNicAdapterType();

void prepareSecondaryStorageStore(String strStorageUrl);
void prepareSecondaryStorageStore(String strStorageUrl, Long storeId);

void setupResourceStartupParams(Map<String, Object> params);

Expand All @@ -48,7 +48,7 @@ public interface VmwareManager {

String getManagementPortGroupName();

String getSecondaryStorageStoreUrl(long dcId);
Pair<String, Long> getSecondaryStorageStoreUrlAndId(long dcId);

File getSystemVMKeyFile();

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.