Xapi#_setObjectProperties() gets the object type itself.
This commit is contained in:
parent
41147483d8
commit
2a075d929a
11
src/xapi.js
11
src/xapi.js
@ -209,8 +209,11 @@ export default class Xapi extends XapiBase {
|
||||
|
||||
// =================================================================
|
||||
|
||||
async _setObjectProperties (type, id, props) {
|
||||
const {$ref: ref} = this.getObject(id)
|
||||
async _setObjectProperties (id, props) {
|
||||
const {
|
||||
$ref: ref,
|
||||
$type: type
|
||||
} = this.getObject(id)
|
||||
|
||||
// TODO: the thrown error should contain the name of the
|
||||
// properties that failed to be set.
|
||||
@ -225,7 +228,7 @@ export default class Xapi extends XapiBase {
|
||||
name_label,
|
||||
name_description
|
||||
}) {
|
||||
await this._setObjectProperties('pool', this.pool.$id, {
|
||||
await this._setObjectProperties(this.pool.$id, {
|
||||
name_label,
|
||||
name_description
|
||||
})
|
||||
@ -235,7 +238,7 @@ export default class Xapi extends XapiBase {
|
||||
name_label,
|
||||
name_description
|
||||
}) {
|
||||
await this._setObjectProperties('SR', id, {
|
||||
await this._setObjectProperties(id, {
|
||||
name_label,
|
||||
name_description
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user