only allow cifs mount on windows node

pull/6/head
andyzhangx 2017-09-20 14:14:54 +00:00
parent faffe82df7
commit 98487a0cde
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,11 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio
return nil
}
// currently only SMB mount is supported
// currently only cifs mount is supported
if strings.ToLower(fstype) != "cifs" {
return fmt.Errorf("azureMount: only cifs mount is supported now, fstype: %q, mounting source (%q), target (%q), with options (%q)", fstype, source, target, options)
}
cmdLine := fmt.Sprintf(`$User = "%s";$PWord = ConvertTo-SecureString -String "%s" -AsPlainText -Force;`+
`$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord`,
options[0], options[1])