Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for StoragePool.getInfo
......................................................................
yml: return type fixes for StoragePool.getInfo
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 72 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/59707/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 7dd95d1..2c139ea 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -5607,6 +5607,21 @@
7: The Storage Domain uses glusterfs
8: The Storage Domain uses cinder
+ StorageType: &StorageType
+ added: '3.1'
+ description: An enumeration of Storage Domain types.
+ name: StorageType
+ type: enum
+ values:
+ CIFS: The Storage Domain uses CIFS/SMB based storage
+ FCP: The Storage Domain uses FibreChannel based storage
+ ISCSI: The Storage Domain uses iSCSI based storage
+ LOCALFS: The Storage Domain uses storage on the local file system
+ NFS: The Storage Domain uses Network File System based storage
+ SHAREDFS: The Storage Domain uses storage from a Linux VFS file
+ system
+ UNKNOWN: The type is not known
+
StorageDomainInfo: &StorageDomainInfo
added: '3.1'
description: Information about a Storage Domain.
@@ -5666,6 +5681,18 @@
unattached: The domain is not attached to a Storage Pool
unknown: The status of the Storage Domain is not known
+ StorageStatus: &StorageStatus
+ added: '3.1'
+ description: An enumeration of Storage Domain statuses.
+ name: StorageDomainStatus
+ type: enum
+ values:
+ Active: The domain is attached to a Storage Pool and is activated
+ Attached: The domain is attached to a Storage Pool but is
+ deactivated
+ Unattached: The domain is not attached to a Storage Pool
+ Unknown: The status of the Storage Domain is not known
+
StorageDomainStatusMap: &StorageDomainStatusMap
added: '3.1'
description: A mapping of Storage Domain statuses indexed by Storage
@@ -5698,7 +5725,8 @@
properties:
- description: The remaining free disk space in bytes
name: diskfree
- type: int
+ type: string
+ datatype: int
- description: A list of alerts for this Storage Domain
name: alerts
@@ -5708,15 +5736,21 @@
- description: The total amount of disk space in the Storage
Domain in bytes
name: disktotal
- type: int
+ type: string
+ datatype: int
- description: Current Storage Domain status
name: status
- type: *StorageDomainStatus
+ type: *StorageStatus
- description: Indicates the Storage Domain version
name: version
type: int
+
+ - description: The filesystem path from where ISO images may
+ be referenced
+ name: isoprefix
+ type: string
type: object
StoragePoolDomainInfoMap: &StoragePoolDomainInfoMap
@@ -5749,15 +5783,16 @@
- description: The Storage Pool lock version
name: lver
- type: int
+ type: long
- description: The Storage Pool version
name: version
- type: int
+ type: string
+ datatype: int
- description: The type of storage managed by this Storage Pool
- name: domainType
- type: *StorageDomainType
+ name: type
+ type: *StorageType
- description: The Storage Pool name
name: name
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index eddb735..1f319b1 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -607,3 +607,33 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('StoragePool', 'getSpmStatus'), ret)
+
+ def test_info_storage(self):
+ ret = {'info':
+ {'name': 'No Description',
+ 'isoprefix': '',
+ 'pool_status': 'connected',
+ 'lver': 10,
+ 'domains':
u'0900c0cd-8422-497a-85c5-1bb34b2b6b65:Active,794d',
+ 'master_uuid': '3d4accf7-74af-4ea0-b59b-eb9f10eedb83',
+ 'version': '3',
+ 'spm_id': 1,
+ 'type': 'ISCSI',
+ 'master_ver': 33},
+ 'dominfo': {u'0900c0cd-8422-497a-85c5-1bb34b2b6b65':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3},
+ u'794dc113-315f-43e3-ae47-0b7b1bf56427':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3}}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('StoragePool', 'getInfo'), ret)
--
To view, visit
https://gerrit.ovirt.org/59707
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>