fix(xo-server,xo-web/new ISO SR): take NFS version & options into account (#6161)
See zammad#5995
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
- [Templates] Fix "incorrect state" error when trying to delete a default template [#6124](https://github.com/vatesfr/xen-orchestra/issues/6124) (PR [#6119](https://github.com/vatesfr/xen-orchestra/pull/6119))
|
||||
- [New SR] Fix "SR_BACKEND_FAILURE_103" error when selecting "No selected value" for the path [#5991](https://github.com/vatesfr/xen-orchestra/issues/5991) (PR [#6137](https://github.com/vatesfr/xen-orchestra/pull/6137))
|
||||
- [Jobs] Fix "invalid parameters" error when running jobs in some cases (PR [#6156](https://github.com/vatesfr/xen-orchestra/pull/6156))
|
||||
- [New SR] Take NFS version and options into account when creating an ISO SR
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
||||
@@ -126,7 +126,18 @@ disconnectAllPbds.resolve = {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
export async function createIso({ host, nameLabel, nameDescription, path, type, user, password, srUuid }) {
|
||||
export async function createIso({
|
||||
host,
|
||||
nameLabel,
|
||||
nameDescription,
|
||||
path,
|
||||
type,
|
||||
user,
|
||||
password,
|
||||
nfsVersion,
|
||||
nfsOptions,
|
||||
srUuid,
|
||||
}) {
|
||||
const xapi = this.getXapi(host)
|
||||
|
||||
const deviceConfig = {}
|
||||
@@ -137,6 +148,13 @@ export async function createIso({ host, nameLabel, nameDescription, path, type,
|
||||
deviceConfig.type = 'cifs'
|
||||
deviceConfig.username = user
|
||||
deviceConfig.cifspassword = password
|
||||
} else if (type === 'nfs') {
|
||||
if (nfsVersion !== undefined) {
|
||||
deviceConfig.nfsversion = nfsVersion
|
||||
}
|
||||
if (nfsOptions !== undefined) {
|
||||
deviceConfig.options = nfsOptions
|
||||
}
|
||||
}
|
||||
|
||||
deviceConfig.location = path
|
||||
@@ -177,6 +195,8 @@ createIso.params = {
|
||||
type: { type: 'string' },
|
||||
user: { type: 'string', optional: true },
|
||||
password: { type: 'string', optional: true },
|
||||
nfsVersion: { type: 'string', optional: true },
|
||||
nfsOptions: { type: 'string', optional: true },
|
||||
srUuid: { type: 'string', optional: true },
|
||||
}
|
||||
|
||||
|
||||
@@ -2511,11 +2511,15 @@ export const createSrIso = (
|
||||
type,
|
||||
user = undefined,
|
||||
password = undefined,
|
||||
nfsVersion = undefined,
|
||||
nfsOptions = undefined,
|
||||
srUuid
|
||||
) => {
|
||||
const params = { host, nameLabel, nameDescription, path, type, srUuid }
|
||||
user && (params.user = user)
|
||||
password && (params.password = password)
|
||||
nfsVersion && (params.nfsVersion = nfsVersion)
|
||||
nfsOptions && (params.nfsOptions = nfsOptions)
|
||||
srUuid && (params.srUuid = srUuid)
|
||||
return _call('sr.createIso', params)
|
||||
}
|
||||
|
||||
@@ -342,6 +342,8 @@ export default class New extends Component {
|
||||
'nfs',
|
||||
username && username.value,
|
||||
password && password.value,
|
||||
nfsVersion !== '' ? nfsVersion : undefined,
|
||||
nfsOptions,
|
||||
srUuid
|
||||
),
|
||||
smb: () =>
|
||||
@@ -353,6 +355,8 @@ export default class New extends Component {
|
||||
'smb',
|
||||
username && username.value,
|
||||
password && password.value,
|
||||
undefined,
|
||||
undefined,
|
||||
srUuid
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user