CLOUDSTACK-6909 - fix marvin's handling of SMB credentials for storage

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 477a812a6f)
(cherry picked from commit 2498f65683)
This commit is contained in:
John Dilley 2014-06-23 15:45:08 +00:00 committed by Daan Hoogland
parent b848c02aa7
commit 2fdf789a28
2 changed files with 6 additions and 4 deletions

View File

@ -215,6 +215,7 @@ class primaryStorage(object):
def __init__(self):
self.name = None
self.url = None
self.details = None
class secondaryStorage(object):

View File

@ -233,7 +233,9 @@ class DeployDataCenters(object):
return
for primary in primaryStorages:
primarycmd = createStoragePool.createStoragePoolCmd()
primarycmd.details = primary.details
if primary.details:
for key, value in vars(primary.details).iteritems():
primarycmd.details.append({ key: value})
primarycmd.name = primary.name
primarycmd.podid = podId
primarycmd.tags = primary.tags
@ -330,14 +332,13 @@ class DeployDataCenters(object):
secondarycmd.provider = secondary.provider
secondarycmd.details = []
if secondarycmd.provider == 'S3' \
or secondarycmd.provider == "Swift":
if secondarycmd.provider.lower() in ('s3', "swift", "smb"):
for key, value in vars(secondary.details).iteritems():
secondarycmd.details.append({
'key': key,
'value': value
})
if secondarycmd.provider == "NFS":
if secondarycmd.provider.lower() in ("nfs", "smb"):
secondarycmd.zoneid = zoneId
ret = self.__apiClient.addImageStore(secondarycmd)
if ret.id: