def mount_smb_share(self, smbfs_share, username=None, password=None):
    try:
        LOG.debug('Mounting share: %s', smbfs_share)
        self._smb_conn.Msft_SmbMapping.Create(RemotePath=smbfs_share, UserName=username, Password=password)
    except wmi.x_wmi as exc:
        err_msg = (_('Unable to mount SMBFS share: %(smbfs_share)s WMI exception: %(wmi_exc)s'), {'smbfs_share': smbfs_share, 'wmi_exc': exc})
        raise vmutils.HyperVException(err_msg)
def mount_smb_share(self, smbfs_share, username=None, password=None):
    try:
        LOG.debug('Mounting share: %s', smbfs_share)
        self._smb_conn.Msft_SmbMapping.Create(RemotePath=smbfs_share, UserName=username, Password=password)
    except wmi.x_wmi as exc:
        err_msg = (_('Unable to mount SMBFS share: %(smbfs_share)s WMI exception: %(wmi_exc)s'), {'smbfs_share': smbfs_share, 'wmi_exc': exc})
        raise vmutils.HyperVException(err_msg)