Skip to content

Commit 9a0de43

Browse files
author
Jessica Wang
committed
CLOUDSTACK-5139: UI > zone wizard > secondary storage step > providers dropdown - hardcode options instead of get them from listStorageProviders&type=image since not all of returned values are handled by UI (e.g. "NetApp" is not handled by UI).
1 parent 71323f1 commit 9a0de43

1 file changed

Lines changed: 9 additions & 19 deletions

File tree

‎ui/scripts/zoneWizard.js‎

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,25 +1838,15 @@
18381838
if(s3stores != null && s3stores.length > 0) {
18391839
storageproviders.push({ id: 'S3', description: 'S3'}); //if (region-wide) S3 store exists already, only "S3" option should be included here. Any other type of store is not allowed to be created since cloudstack doesn't support multiple types of store at this point.
18401840
} else {
1841-
$.ajax({
1842-
url: createURL('listStorageProviders'),
1843-
data: {
1844-
type: 'image'
1845-
},
1846-
async: false,
1847-
success: function(json) {
1848-
var objs = json.liststorageprovidersresponse.dataStoreProvider;
1849-
if (objs != null) {
1850-
for (var i = 0; i < objs.length; i++) {
1851-
storageproviders.push({
1852-
id: objs[i].name,
1853-
description: objs[i].name
1854-
});
1855-
}
1856-
}
1857-
}
1858-
});
1859-
storageproviders.push({ id: 'SMB', description: 'SMB/cifs'}); //temporary, before Rajesh adds 'SMB' to listStorageProviders API response.
1841+
/*
1842+
UI no longer gets providers from "listStorageProviders&type=image" because:
1843+
(1) Not all of returned values are handled by UI (e.g. Provider "NetApp" is not handled by UI).
1844+
(2) Provider "SMB" which is handled by UI is not returned from "listStorageProviders&type=image"
1845+
*/
1846+
storageproviders.push({ id: 'NFS', description: 'NFS'});
1847+
storageproviders.push({ id: 'SMB', description: 'SMB/cifs'});
1848+
storageproviders.push({ id: 'S3', description: 'S3'});
1849+
storageproviders.push({ id: 'Swift', description: 'Swift'});
18601850
}
18611851
args.response.success({
18621852
data: storageproviders

0 commit comments

Comments
 (0)