@xen-orchestra/rest-api 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -335,12 +335,12 @@ const models = {
335
335
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
336
336
  "XoTask": {
337
337
  "dataType": "refAlias",
338
- "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "warnings": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "updatedAt": { "dataType": "double" }, "tasks": { "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "start": { "dataType": "double", "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "string" }, "type": { "dataType": "string" }, "progress": { "dataType": "double" }, "params": { "ref": "Record_string.unknown_" }, "objectId": { "dataType": "string" }, "name": { "dataType": "string" }, "method": { "dataType": "string" } }, "additionalProperties": { "dataType": "union", "subSchemas": [{ "dataType": "any" }, { "dataType": "undefined" }] }, "required": true }, "progress": { "dataType": "double" }, "infos": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "id": { "ref": "Branded_task_", "required": true }, "end": { "dataType": "double" }, "data": { "ref": "Record_string.string_" }, "abortionRequestedAt": { "dataType": "double" } }, "validators": {} },
338
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "warnings": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "updatedAt": { "dataType": "double" }, "tasks": { "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "start": { "dataType": "double", "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "string" }, "type": { "dataType": "string" }, "progress": { "dataType": "double" }, "params": { "ref": "Record_string.unknown_" }, "objectType": { "dataType": "union", "subSchemas": [{ "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["vgpu"] }, { "dataType": "enum", "enums": ["gpuGroup"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["PBD"] }, { "dataType": "enum", "enums": ["PCI"] }, { "dataType": "enum", "enums": ["PGPU"] }, { "dataType": "enum", "enums": ["PIF"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["vgpuType"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["SM"] }] }, { "dataType": "enum", "enums": ["backup"] }, { "dataType": "enum", "enums": ["backup-archive"] }, { "dataType": "enum", "enums": ["backup-job"] }, { "dataType": "enum", "enums": ["backup-log"] }, { "dataType": "enum", "enums": ["backup-repository"] }, { "dataType": "enum", "enums": ["group"] }, { "dataType": "enum", "enums": ["proxy"] }, { "dataType": "enum", "enums": ["restore"] }, { "dataType": "enum", "enums": ["restore-log"] }, { "dataType": "enum", "enums": ["schedule"] }, { "dataType": "enum", "enums": ["server"] }, { "dataType": "enum", "enums": ["task"] }, { "dataType": "enum", "enums": ["user"] }] }, "objectId": { "dataType": "string" }, "name": { "dataType": "string" }, "method": { "dataType": "string" } }, "additionalProperties": { "dataType": "union", "subSchemas": [{ "dataType": "any" }, { "dataType": "undefined" }] }, "required": true }, "progress": { "dataType": "double" }, "infos": { "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, "id": { "ref": "Branded_task_", "required": true }, "end": { "dataType": "double" }, "data": { "ref": "Record_string.string_" }, "abortionRequestedAt": { "dataType": "double" } }, "validators": {} },
339
339
  },
340
340
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
341
341
  "Partial_Unbrand_XoTask__": {
342
342
  "dataType": "refAlias",
343
- "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" } }, { "dataType": "undefined" }] }, "result": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "start": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }, { "dataType": "undefined" }] }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
343
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectType": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["backup"] }, { "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["vgpu"] }, { "dataType": "enum", "enums": ["gpuGroup"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["PBD"] }, { "dataType": "enum", "enums": ["PCI"] }, { "dataType": "enum", "enums": ["PGPU"] }, { "dataType": "enum", "enums": ["PIF"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["vgpuType"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["SM"] }, { "dataType": "enum", "enums": ["user"] }, { "dataType": "enum", "enums": ["proxy"] }, { "dataType": "enum", "enums": ["task"] }, { "dataType": "enum", "enums": ["backup-archive"] }, { "dataType": "enum", "enums": ["backup-job"] }, { "dataType": "enum", "enums": ["backup-log"] }, { "dataType": "enum", "enums": ["backup-repository"] }, { "dataType": "enum", "enums": ["group"] }, { "dataType": "enum", "enums": ["restore"] }, { "dataType": "enum", "enums": ["restore-log"] }, { "dataType": "enum", "enums": ["schedule"] }, { "dataType": "enum", "enums": ["server"] }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" } }, { "dataType": "undefined" }] }, "result": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "start": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }, { "dataType": "undefined" }] }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
344
344
  },
345
345
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
346
346
  "WithHref_Partial_Unbrand_XoTask___": {
@@ -493,6 +493,21 @@ const models = {
493
493
  "type": { "ref": "Unbrand_XoVif_", "validators": {} },
494
494
  },
495
495
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
496
+ "Pick_CreateVifParams_91_0_93_.Exclude_keyofCreateVifParams_91_0_93_.network-or-VM__": {
497
+ "dataType": "refAlias",
498
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "other_config": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "device": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "MTU": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "currently_attached": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "ipv4_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "ipv6_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "locking_mode": { "dataType": "union", "subSchemas": [{ "ref": "VIF_LOCKING_MODE" }, { "dataType": "undefined" }] }, "qos_algorithm_params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "qos_algorithm_type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "validators": {} },
499
+ },
500
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
501
+ "Omit_CreateVifParams_91_0_93_.network-or-VM_": {
502
+ "dataType": "refAlias",
503
+ "type": { "ref": "Pick_CreateVifParams_91_0_93_.Exclude_keyofCreateVifParams_91_0_93_.network-or-VM__", "validators": {} },
504
+ },
505
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
506
+ "CreateVifBody": {
507
+ "dataType": "refAlias",
508
+ "type": { "dataType": "intersection", "subSchemas": [{ "ref": "Omit_CreateVifParams_91_0_93_.network-or-VM_" }, { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "MAC": { "dataType": "string" } } }, { "dataType": "undefined" }] }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "vmId": { "dataType": "string", "required": true }, "networkId": { "dataType": "string", "required": true } } }], "validators": {} },
509
+ },
510
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
496
511
  "Exclude_SUPPORTED_VDI_FORMAT.qcow2_": {
497
512
  "dataType": "refAlias",
498
513
  "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["raw"] }, { "dataType": "enum", "enums": ["vhd"] }], "validators": {} },
@@ -503,6 +518,21 @@ const models = {
503
518
  "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "$pool": { "dataType": "string", "required": true }, "$poolId": { "dataType": "string", "required": true }, "_xapiRef": { "dataType": "string", "required": true }, "uuid": { "dataType": "string", "required": true }, "$SR": { "dataType": "string", "required": true }, "$VBDs": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "VDI_type": { "ref": "VDI_TYPE", "required": true }, "cbt_enabled": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "current_operations": { "ref": "Record_string.VDI_OPERATIONS_", "required": true }, "missing": { "dataType": "boolean", "required": true }, "name_description": { "dataType": "string", "required": true }, "name_label": { "dataType": "string", "required": true }, "other_config": { "ref": "Record_string.string_", "required": true }, "parent": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "image_format": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "double", "required": true }, "snapshots": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "tags": { "dataType": "array", "array": { "dataType": "string" }, "required": true }, "usage": { "dataType": "double", "required": true }, "id": { "dataType": "string", "required": true }, "type": { "dataType": "enum", "enums": ["VDI"], "required": true } }, "validators": {} },
504
519
  },
505
520
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
521
+ "Pick_CreateVdiParams_91_0_93_.Exclude_keyofCreateVdiParams_91_0_93_.SR__": {
522
+ "dataType": "refAlias",
523
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "tags": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "ref": "VDI_TYPE" }, { "dataType": "undefined" }] }, "other_config": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "read_only": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "sharable": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "virtual_size": { "dataType": "double", "required": true }, "xenstore_data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] } }, "validators": {} },
524
+ },
525
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
526
+ "Omit_CreateVdiParams_91_0_93_.SR_": {
527
+ "dataType": "refAlias",
528
+ "type": { "ref": "Pick_CreateVdiParams_91_0_93_.Exclude_keyofCreateVdiParams_91_0_93_.SR__", "validators": {} },
529
+ },
530
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
531
+ "CreateVdiBody": {
532
+ "dataType": "refAlias",
533
+ "type": { "dataType": "intersection", "subSchemas": [{ "ref": "Omit_CreateVdiParams_91_0_93_.SR_" }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "srId": { "dataType": "string", "required": true } } }, { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "sm_config": { "ref": "Record_string.string_" } } }, { "dataType": "undefined" }] }], "validators": {} },
534
+ },
535
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
506
536
  "CreateActionReturnType__id-Unbrand_XoVdi__91_id_93___": {
507
537
  "dataType": "refAlias",
508
538
  "type": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "taskId": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "id": { "dataType": "string", "required": true } } }], "validators": {} },
@@ -525,7 +555,7 @@ const models = {
525
555
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
526
556
  "Pick_Unbrand_Parameters_Xapi_91_VBD_create_93___91_0_93__.Exclude_keyofUnbrand_Parameters_Xapi_91_VBD_create_93___91_0_93__.VM-or-VDI__": {
527
557
  "dataType": "refAlias",
528
- "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "type": { "dataType": "union", "subSchemas": [{ "ref": "VBD_TYPE" }, { "dataType": "undefined" }] }, "other_config": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "mode": { "dataType": "union", "subSchemas": [{ "ref": "VBD_MODE" }, { "dataType": "undefined" }] }, "bootable": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "empty": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "qos_algorithm_params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "qos_algorithm_type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "unpluggable": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "userdevice": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "validators": {} },
558
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "type": { "dataType": "union", "subSchemas": [{ "ref": "VBD_TYPE" }, { "dataType": "undefined" }] }, "other_config": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "mode": { "dataType": "union", "subSchemas": [{ "ref": "VBD_MODE" }, { "dataType": "undefined" }] }, "qos_algorithm_params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "qos_algorithm_type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "bootable": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "empty": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "unpluggable": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "userdevice": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "validators": {} },
529
559
  },
530
560
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
531
561
  "Omit_Unbrand_Parameters_Xapi_91_VBD_create_93___91_0_93__.VM-or-VDI_": {
@@ -611,7 +641,7 @@ const models = {
611
641
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
612
642
  "Unbrand_XoTask_": {
613
643
  "dataType": "refAlias",
614
- "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "string", "required": true }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" }, "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "start": { "dataType": "double", "required": true }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
644
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "abortionRequestedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "data": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.string_" }, { "dataType": "undefined" }] }, "end": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "id": { "dataType": "string", "required": true }, "infos": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "properties": { "dataType": "nestedObjectLiteral", "nestedProperties": { "userId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "type": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "progress": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "params": { "dataType": "union", "subSchemas": [{ "ref": "Record_string.unknown_" }, { "dataType": "undefined" }] }, "objectType": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["backup"] }, { "dataType": "enum", "enums": ["pool"] }, { "dataType": "enum", "enums": ["VBD"] }, { "dataType": "enum", "enums": ["host"] }, { "dataType": "enum", "enums": ["VIF"] }, { "dataType": "enum", "enums": ["VTPM"] }, { "dataType": "enum", "enums": ["VM"] }, { "dataType": "enum", "enums": ["VM-snapshot"] }, { "dataType": "enum", "enums": ["SR"] }, { "dataType": "enum", "enums": ["message"] }, { "dataType": "enum", "enums": ["vgpu"] }, { "dataType": "enum", "enums": ["gpuGroup"] }, { "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["PBD"] }, { "dataType": "enum", "enums": ["PCI"] }, { "dataType": "enum", "enums": ["PGPU"] }, { "dataType": "enum", "enums": ["PIF"] }, { "dataType": "enum", "enums": ["VDI"] }, { "dataType": "enum", "enums": ["VDI-snapshot"] }, { "dataType": "enum", "enums": ["VDI-unmanaged"] }, { "dataType": "enum", "enums": ["vgpuType"] }, { "dataType": "enum", "enums": ["VM-controller"] }, { "dataType": "enum", "enums": ["VM-template"] }, { "dataType": "enum", "enums": ["SM"] }, { "dataType": "enum", "enums": ["user"] }, { "dataType": "enum", "enums": ["proxy"] }, { "dataType": "enum", "enums": ["task"] }, { "dataType": "enum", "enums": ["backup-archive"] }, { "dataType": "enum", "enums": ["backup-job"] }, { "dataType": "enum", "enums": ["backup-log"] }, { "dataType": "enum", "enums": ["backup-repository"] }, { "dataType": "enum", "enums": ["group"] }, { "dataType": "enum", "enums": ["restore"] }, { "dataType": "enum", "enums": ["restore-log"] }, { "dataType": "enum", "enums": ["schedule"] }, { "dataType": "enum", "enums": ["server"] }, { "dataType": "undefined" }] }, "objectId": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } }, "additionalProperties": { "dataType": "any" }, "required": true }, "result": { "ref": "Record_string.unknown_", "required": true }, "start": { "dataType": "double", "required": true }, "status": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["failure"] }, { "dataType": "enum", "enums": ["interrupted"] }, { "dataType": "enum", "enums": ["pending"] }, { "dataType": "enum", "enums": ["success"] }], "required": true }, "tasks": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "refAlias", "ref": "XoTask" } }, { "dataType": "undefined" }] }, "updatedAt": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "warnings": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "nestedObjectLiteral", "nestedProperties": { "message": { "dataType": "string", "required": true }, "data": { "dataType": "any", "required": true } } } }, { "dataType": "undefined" }] } }, "validators": {} },
615
645
  },
616
646
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
617
647
  "Record_string.STORAGE_OPERATIONS_": {
@@ -807,7 +837,7 @@ const models = {
807
837
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
808
838
  "Unbrand_CreateVmBody_": {
809
839
  "dataType": "refAlias",
810
- "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "memory": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "string", "required": true }, "secureBoot": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "clone": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "gpuGroup": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "vgpuType": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "autoPoweron": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "vifs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "network": { "dataType": "string", "required": true }, "mtu": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "mac": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "ipv6_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "ipv4_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "device": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "device": { "dataType": "string", "required": true }, "destroy": { "dataType": "enum", "enums": [true], "required": true } } }] } }, { "dataType": "undefined" }] }, "copyHostBiosStrings": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "hvmBootFirmware": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["uefi"] }, { "dataType": "enum", "enums": ["bios"] }, { "dataType": "undefined" }] }, "template": { "dataType": "string", "required": true }, "affinity": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "vdis": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "sr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "double", "required": true }, "name_label": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "sr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "userdevice": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "userdervice": { "dataType": "string", "required": true }, "destroy": { "dataType": "enum", "enums": [true], "required": true } } }] } }, { "dataType": "undefined" }] }, "install": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "repository": { "dataType": "string", "required": true }, "method": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["network"] }, { "dataType": "enum", "enums": ["cdrom"] }], "required": true } } }, { "dataType": "undefined" }] }, "cloud_config": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "network_config": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "boot": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "destroy_cloud_config_vdi": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "createVtpm": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] } }, "validators": {} },
840
+ "type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "memory": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "string", "required": true }, "secureBoot": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "clone": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "gpuGroup": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "vgpuType": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "autoPoweron": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "vifs": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "network": { "dataType": "string", "required": true }, "mtu": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "mac": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "ipv6_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "ipv4_allowed": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "string" } }, { "dataType": "undefined" }] }, "device": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "device": { "dataType": "string", "required": true }, "destroy": { "dataType": "enum", "enums": [true], "required": true } } }] } }, { "dataType": "undefined" }] }, "copyHostBiosStrings": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "hvmBootFirmware": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["uefi"] }, { "dataType": "enum", "enums": ["bios"] }, { "dataType": "undefined" }] }, "template": { "dataType": "string", "required": true }, "affinity": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "vdis": { "dataType": "union", "subSchemas": [{ "dataType": "array", "array": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "sr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "double", "required": true }, "name_label": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "name_description": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "sr": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "size": { "dataType": "union", "subSchemas": [{ "dataType": "double" }, { "dataType": "undefined" }] }, "name_label": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "userdevice": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "userdervice": { "dataType": "string", "required": true }, "destroy": { "dataType": "enum", "enums": [true], "required": true } } }] } }, { "dataType": "undefined" }] }, "install": { "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "repository": { "dataType": "string", "required": true }, "method": { "dataType": "enum", "enums": ["cdrom"], "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "repository": { "dataType": "enum", "enums": [""], "required": true }, "method": { "dataType": "enum", "enums": ["network"], "required": true } } }, { "dataType": "undefined" }] }, "cloud_config": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "network_config": { "dataType": "union", "subSchemas": [{ "dataType": "string" }, { "dataType": "undefined" }] }, "boot": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "destroy_cloud_config_vdi": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] }, "createVtpm": { "dataType": "union", "subSchemas": [{ "dataType": "boolean" }, { "dataType": "undefined" }] } }, "validators": {} },
811
841
  },
812
842
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
813
843
  "XapiHostStatsRaw": {
@@ -2060,6 +2090,35 @@ export function RegisterRoutes(app) {
2060
2090
  }
2061
2091
  });
2062
2092
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2093
+ const argsVmController_migrateVm = {
2094
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
2095
+ body: { "in": "body", "name": "body", "required": true, "dataType": "union", "subSchemas": [{ "dataType": "nestedObjectLiteral", "nestedProperties": { "migrationNetworkId": { "dataType": "string" }, "hostId": { "dataType": "string", "required": true } } }, { "dataType": "nestedObjectLiteral", "nestedProperties": { "networkIdByVifId": { "dataType": "nestedObjectLiteral", "nestedProperties": {}, "additionalProperties": { "dataType": "string" } }, "srIdByVdiId": { "dataType": "nestedObjectLiteral", "nestedProperties": {}, "additionalProperties": { "dataType": "string" } }, "srId": { "dataType": "string" }, "migrationNetworkId": { "dataType": "string" }, "hostId": { "dataType": "string", "required": true } } }] },
2096
+ sync: { "in": "query", "name": "sync", "dataType": "boolean" },
2097
+ };
2098
+ app.post('/rest/v0/vms/:id/actions/migrate', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VmController)), ...(fetchMiddlewares(VmController.prototype.migrateVm)), async function VmController_migrateVm(request, response, next) {
2099
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2100
+ let validatedArgs = [];
2101
+ try {
2102
+ validatedArgs = templateService.getValidatedArgs({ args: argsVmController_migrateVm, request, response });
2103
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
2104
+ const controller = await container.get(VmController);
2105
+ if (typeof controller['setStatus'] === 'function') {
2106
+ controller.setStatus(undefined);
2107
+ }
2108
+ await templateService.apiHandler({
2109
+ methodName: 'migrateVm',
2110
+ controller,
2111
+ response,
2112
+ next,
2113
+ validatedArgs,
2114
+ successStatus: 202,
2115
+ });
2116
+ }
2117
+ catch (err) {
2118
+ return next(err);
2119
+ }
2120
+ });
2121
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
2063
2122
  const argsVmTemplateController_getVmTemplates = {
2064
2123
  req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
2065
2124
  fields: { "in": "query", "name": "fields", "dataType": "string" },
@@ -3054,6 +3113,60 @@ export function RegisterRoutes(app) {
3054
3113
  }
3055
3114
  });
3056
3115
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3116
+ const argsVifController_createVif = {
3117
+ body: { "in": "body", "name": "body", "required": true, "ref": "CreateVifBody" },
3118
+ };
3119
+ app.post('/rest/v0/vifs', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VifController)), ...(fetchMiddlewares(VifController.prototype.createVif)), async function VifController_createVif(request, response, next) {
3120
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3121
+ let validatedArgs = [];
3122
+ try {
3123
+ validatedArgs = templateService.getValidatedArgs({ args: argsVifController_createVif, request, response });
3124
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
3125
+ const controller = await container.get(VifController);
3126
+ if (typeof controller['setStatus'] === 'function') {
3127
+ controller.setStatus(undefined);
3128
+ }
3129
+ await templateService.apiHandler({
3130
+ methodName: 'createVif',
3131
+ controller,
3132
+ response,
3133
+ next,
3134
+ validatedArgs,
3135
+ successStatus: 201,
3136
+ });
3137
+ }
3138
+ catch (err) {
3139
+ return next(err);
3140
+ }
3141
+ });
3142
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3143
+ const argsVifController_destroyVif = {
3144
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
3145
+ };
3146
+ app.delete('/rest/v0/vifs/:id', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VifController)), ...(fetchMiddlewares(VifController.prototype.destroyVif)), async function VifController_destroyVif(request, response, next) {
3147
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3148
+ let validatedArgs = [];
3149
+ try {
3150
+ validatedArgs = templateService.getValidatedArgs({ args: argsVifController_destroyVif, request, response });
3151
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
3152
+ const controller = await container.get(VifController);
3153
+ if (typeof controller['setStatus'] === 'function') {
3154
+ controller.setStatus(undefined);
3155
+ }
3156
+ await templateService.apiHandler({
3157
+ methodName: 'destroyVif',
3158
+ controller,
3159
+ response,
3160
+ next,
3161
+ validatedArgs,
3162
+ successStatus: 204,
3163
+ });
3164
+ }
3165
+ catch (err) {
3166
+ return next(err);
3167
+ }
3168
+ });
3169
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3057
3170
  const argsVdiController_getVdis = {
3058
3171
  req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
3059
3172
  fields: { "in": "query", "name": "fields", "dataType": "string" },
@@ -3202,6 +3315,33 @@ export function RegisterRoutes(app) {
3202
3315
  }
3203
3316
  });
3204
3317
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3318
+ const argsVdiController_createVdi = {
3319
+ body: { "in": "body", "name": "body", "required": true, "ref": "CreateVdiBody" },
3320
+ };
3321
+ app.post('/rest/v0/vdis', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(VdiController)), ...(fetchMiddlewares(VdiController.prototype.createVdi)), async function VdiController_createVdi(request, response, next) {
3322
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3323
+ let validatedArgs = [];
3324
+ try {
3325
+ validatedArgs = templateService.getValidatedArgs({ args: argsVdiController_createVdi, request, response });
3326
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
3327
+ const controller = await container.get(VdiController);
3328
+ if (typeof controller['setStatus'] === 'function') {
3329
+ controller.setStatus(undefined);
3330
+ }
3331
+ await templateService.apiHandler({
3332
+ methodName: 'createVdi',
3333
+ controller,
3334
+ response,
3335
+ next,
3336
+ validatedArgs,
3337
+ successStatus: 201,
3338
+ });
3339
+ }
3340
+ catch (err) {
3341
+ return next(err);
3342
+ }
3343
+ });
3344
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
3205
3345
  const argsVdiController_deleteVdi = {
3206
3346
  id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
3207
3347
  };
@@ -4579,6 +4719,34 @@ export function RegisterRoutes(app) {
4579
4719
  }
4580
4720
  });
4581
4721
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
4722
+ const argsSrController_reclaimSpaceSr = {
4723
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
4724
+ sync: { "in": "query", "name": "sync", "dataType": "boolean" },
4725
+ };
4726
+ app.post('/rest/v0/srs/:id/actions/reclaim_space', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(SrController)), ...(fetchMiddlewares(SrController.prototype.reclaimSpaceSr)), async function SrController_reclaimSpaceSr(request, response, next) {
4727
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
4728
+ let validatedArgs = [];
4729
+ try {
4730
+ validatedArgs = templateService.getValidatedArgs({ args: argsSrController_reclaimSpaceSr, request, response });
4731
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
4732
+ const controller = await container.get(SrController);
4733
+ if (typeof controller['setStatus'] === 'function') {
4734
+ controller.setStatus(undefined);
4735
+ }
4736
+ await templateService.apiHandler({
4737
+ methodName: 'reclaimSpaceSr',
4738
+ controller,
4739
+ response,
4740
+ next,
4741
+ validatedArgs,
4742
+ successStatus: 202,
4743
+ });
4744
+ }
4745
+ catch (err) {
4746
+ return next(err);
4747
+ }
4748
+ });
4749
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
4582
4750
  const argsSmController_getSrs = {
4583
4751
  req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
4584
4752
  fields: { "in": "query", "name": "fields", "dataType": "string" },
@@ -5919,6 +6087,62 @@ export function RegisterRoutes(app) {
5919
6087
  }
5920
6088
  });
5921
6089
  // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
6090
+ const argsPbdController_plugPbd = {
6091
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
6092
+ sync: { "in": "query", "name": "sync", "dataType": "boolean" },
6093
+ };
6094
+ app.post('/rest/v0/pbds/:id/actions/plug', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(PbdController)), ...(fetchMiddlewares(PbdController.prototype.plugPbd)), async function PbdController_plugPbd(request, response, next) {
6095
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
6096
+ let validatedArgs = [];
6097
+ try {
6098
+ validatedArgs = templateService.getValidatedArgs({ args: argsPbdController_plugPbd, request, response });
6099
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
6100
+ const controller = await container.get(PbdController);
6101
+ if (typeof controller['setStatus'] === 'function') {
6102
+ controller.setStatus(undefined);
6103
+ }
6104
+ await templateService.apiHandler({
6105
+ methodName: 'plugPbd',
6106
+ controller,
6107
+ response,
6108
+ next,
6109
+ validatedArgs,
6110
+ successStatus: 202,
6111
+ });
6112
+ }
6113
+ catch (err) {
6114
+ return next(err);
6115
+ }
6116
+ });
6117
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
6118
+ const argsPbdController_unplugPbd = {
6119
+ id: { "in": "path", "name": "id", "required": true, "dataType": "string" },
6120
+ sync: { "in": "query", "name": "sync", "dataType": "boolean" },
6121
+ };
6122
+ app.post('/rest/v0/pbds/:id/actions/unplug', authenticateMiddleware([{ "*": [] }]), ...(fetchMiddlewares(PbdController)), ...(fetchMiddlewares(PbdController.prototype.unplugPbd)), async function PbdController_unplugPbd(request, response, next) {
6123
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
6124
+ let validatedArgs = [];
6125
+ try {
6126
+ validatedArgs = templateService.getValidatedArgs({ args: argsPbdController_unplugPbd, request, response });
6127
+ const container = typeof iocContainer === 'function' ? iocContainer(request) : iocContainer;
6128
+ const controller = await container.get(PbdController);
6129
+ if (typeof controller['setStatus'] === 'function') {
6130
+ controller.setStatus(undefined);
6131
+ }
6132
+ await templateService.apiHandler({
6133
+ methodName: 'unplugPbd',
6134
+ controller,
6135
+ response,
6136
+ next,
6137
+ validatedArgs,
6138
+ successStatus: 202,
6139
+ });
6140
+ }
6141
+ catch (err) {
6142
+ return next(err);
6143
+ }
6144
+ });
6145
+ // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
5922
6146
  const argsNetworkController_getNetworks = {
5923
6147
  req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
5924
6148
  fields: { "in": "query", "name": "fields", "dataType": "string" },
@@ -9,11 +9,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
9
  };
10
10
  import { inject } from 'inversify';
11
11
  import { provide } from 'inversify-binding-decorators';
12
- import { Route, Security, Request, Response, Get, Query, Path, Tags, Example } from 'tsoa';
13
- import { badRequestResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
12
+ import { Route, Security, Request, Response, Get, Query, Path, Tags, Example, Post, SuccessResponse } from 'tsoa';
13
+ import { asynchronousActionResp, badRequestResp, internalServerErrorResp, invalidParameters as invalidParametersResp, noContentResp, notFoundResp, unauthorizedResp, } from '../open-api/common/response.common.mjs';
14
14
  import { RestApi } from '../rest-api/rest-api.mjs';
15
15
  import { XapiXoController } from '../abstract-classes/xapi-xo-controller.mjs';
16
16
  import { partialPbds, pbd, pbdIds } from '../open-api/oa-examples/pbd.oa-example.mjs';
17
+ import { taskLocation } from '../open-api/oa-examples/task.oa-example.mjs';
17
18
  let PbdController = class PbdController extends XapiXoController {
18
19
  constructor(restApi) {
19
20
  super('PBD', restApi);
@@ -32,6 +33,42 @@ let PbdController = class PbdController extends XapiXoController {
32
33
  getPbd(id) {
33
34
  return this.getObject(id);
34
35
  }
36
+ /**
37
+ * @example id "b61a5c92-700e-4966-a13b-00633f03eea8"
38
+ */
39
+ async plugPbd(id, sync) {
40
+ const pbdId = id;
41
+ const action = async () => {
42
+ const pbd = this.getXapiObject(pbdId);
43
+ await pbd.$xapi.callAsync('PBD.plug', pbd.$ref);
44
+ };
45
+ return this.createAction(action, {
46
+ sync,
47
+ statusCode: noContentResp.status,
48
+ taskProperties: {
49
+ name: 'plug pbd',
50
+ objectId: pbdId,
51
+ },
52
+ });
53
+ }
54
+ /**
55
+ * @example id "b61a5c92-700e-4966-a13b-00633f03eea8"
56
+ */
57
+ async unplugPbd(id, sync) {
58
+ const pbdId = id;
59
+ const action = async () => {
60
+ const pbd = this.getXapiObject(pbdId);
61
+ await pbd.$xapi.callAsync('PBD.unplug', pbd.$ref);
62
+ };
63
+ return this.createAction(action, {
64
+ sync,
65
+ statusCode: noContentResp.status,
66
+ taskProperties: {
67
+ name: 'unplug pbd',
68
+ objectId: pbdId,
69
+ },
70
+ });
71
+ }
35
72
  };
36
73
  __decorate([
37
74
  Example(pbdIds),
@@ -48,6 +85,28 @@ __decorate([
48
85
  Get('{id}'),
49
86
  __param(0, Path())
50
87
  ], PbdController.prototype, "getPbd", null);
88
+ __decorate([
89
+ Example(taskLocation),
90
+ Post('{id}/actions/plug'),
91
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
92
+ Response(noContentResp.status, noContentResp.description),
93
+ Response(notFoundResp.status, notFoundResp.description),
94
+ Response(invalidParametersResp.status, invalidParametersResp.description),
95
+ Response(internalServerErrorResp.status, internalServerErrorResp.description),
96
+ __param(0, Path()),
97
+ __param(1, Query())
98
+ ], PbdController.prototype, "plugPbd", null);
99
+ __decorate([
100
+ Example(taskLocation),
101
+ Post('{id}/actions/unplug'),
102
+ SuccessResponse(asynchronousActionResp.status, asynchronousActionResp.description),
103
+ Response(noContentResp.status, noContentResp.description),
104
+ Response(notFoundResp.status, notFoundResp.description),
105
+ Response(invalidParametersResp.status, invalidParametersResp.description),
106
+ Response(internalServerErrorResp.status, internalServerErrorResp.description),
107
+ __param(0, Path()),
108
+ __param(1, Query())
109
+ ], PbdController.prototype, "unplugPbd", null);
51
110
  PbdController = __decorate([
52
111
  Route('pbds'),
53
112
  Security('*'),
@@ -166,9 +166,18 @@ let PoolController = class PoolController extends XapiXoController {
166
166
  async createVm(id, body, sync) {
167
167
  const poolId = id;
168
168
  const action = async () => {
169
- const { affinity, template, ...rest } = body;
170
- const params = { affinityHost: affinity, ...rest };
171
- const vmId = await this.#vmService.create({ pool: poolId, template, ...params });
169
+ const { affinity, template, install, vgpuType, gpuGroup, vdis, ...rest } = body;
170
+ // rebrand all branded type
171
+ const vmId = await this.#vmService.create({
172
+ affinityHost: affinity,
173
+ installRepository: install?.repository,
174
+ pool: poolId,
175
+ template: template,
176
+ vdis: vdis,
177
+ vgpuType: vgpuType,
178
+ gpuGroup: gpuGroup,
179
+ ...rest,
180
+ });
172
181
  return { id: vmId };
173
182
  };
174
183
  return this.createAction(action, {
@@ -4,7 +4,7 @@ import { HOST_POWER_STATE, VM_POWER_STATE, } from '@vates/types';
4
4
  import { HostService } from '../hosts/host.service.mjs';
5
5
  import { VmService } from '../vms/vm.service.mjs';
6
6
  import { AlarmService } from '../alarms/alarm.service.mjs';
7
- import { getTopPerProperty, isSrWritableOrIso, promiseWriteInStream } from '../helpers/utils.helper.mjs';
7
+ import { getTopPerProperty, isSrWritable, promiseWriteInStream } from '../helpers/utils.helper.mjs';
8
8
  import { getFromAsyncCache } from '../helpers/cache.helper.mjs';
9
9
  const log = createLogger('xo:rest-api:pool-service');
10
10
  export class PoolService {
@@ -61,7 +61,7 @@ export class PoolService {
61
61
  }
62
62
  #getTopFiveSrsUsage(poolId) {
63
63
  const srs = Object.values(this.#restApi.getObjectsByType('SR', {
64
- filter: sr => sr.$pool === poolId && isSrWritableOrIso(sr),
64
+ filter: sr => sr.$pool === poolId && isSrWritable(sr) && sr.SR_type !== 'udev',
65
65
  }));
66
66
  const topFive = getTopPerProperty(srs.map(({ name_label, id, physical_usage, size }) => ({
67
67
  name_label,
@@ -163,7 +163,7 @@ export class PoolService {
163
163
  #getCpuProvisioning(poolId) {
164
164
  const pool = this.#restApi.getObject(poolId, 'pool');
165
165
  const vms = this.#restApi.getObjectsByType('VM', {
166
- filter: vm => vm.$pool === poolId,
166
+ filter: vm => vm.$pool === poolId && vm.power_state === VM_POWER_STATE.RUNNING,
167
167
  });
168
168
  let assignedVcpu = 0;
169
169
  for (const id in vms) {
@@ -8,11 +8,16 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
8
  return function (target, key) { decorator(target, key, paramIndex); }
9
9
  };
10
10
  import { Example, Get, Path, Query, Request, Response, Route, Security, Tags } from 'tsoa';
11
+ import { inject } from 'inversify';
11
12
  import { provide } from 'inversify-binding-decorators';
12
13
  import { badRequestResp, notFoundResp, unauthorizedResp } from '../open-api/common/response.common.mjs';
13
14
  import { partialProxies, proxy, proxyIds } from '../open-api/oa-examples/proxy.oa-example.mjs';
14
15
  import { XoController } from '../abstract-classes/xo-controller.mjs';
16
+ import { RestApi } from '../rest-api/rest-api.mjs';
15
17
  let ProxyController = class ProxyController extends XoController {
18
+ constructor(restApi) {
19
+ super('proxy', restApi);
20
+ }
16
21
  getAllCollectionObjects() {
17
22
  return this.restApi.xoApp.getAllProxies();
18
23
  }
@@ -57,6 +62,7 @@ ProxyController = __decorate([
57
62
  Response(badRequestResp.status, badRequestResp.description),
58
63
  Response(unauthorizedResp.status, unauthorizedResp.description),
59
64
  Tags('proxies'),
60
- provide(ProxyController)
65
+ provide(ProxyController),
66
+ __param(0, inject(RestApi))
61
67
  ], ProxyController);
62
68
  export { ProxyController };
@@ -21,7 +21,7 @@ const log = createLogger('xo:rest-api:restoreLog-controller');
21
21
  let RestoreLogController = class RestoreLogController extends XoController {
22
22
  #backupLogService;
23
23
  constructor(restApi, backupLogService) {
24
- super(restApi);
24
+ super('restore-log', restApi);
25
25
  this.#backupLogService = backupLogService;
26
26
  }
27
27
  getAllCollectionObjects() {
@@ -81,7 +81,7 @@ export { RestoreLogController };
81
81
  let DeprecatedRestoreController = class DeprecatedRestoreController extends XoController {
82
82
  #backupLogService;
83
83
  constructor(restApi, backupLogService) {
84
- super(restApi);
84
+ super('restore', restApi);
85
85
  this.#backupLogService = backupLogService;
86
86
  }
87
87
  getAllCollectionObjects() {