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@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)
gerrit-hooks has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Piotr Kliczewski has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 1: Verified+1
Verified by running unit test. The message was copied from Nir's vdsm log.
Freddy Rolland has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 1: Code-Review+1
Piotr Kliczewski has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 2: Verified+1
Verified by running schema verification tests
Piotr Kliczewski has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 2:
Let's keep this patch for some time longer
Yaniv Bronhaim has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 2: Code-Review+1
Adam Litke has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 2:
(2 comments)
-1 for visibility of comments.
https://gerrit.ovirt.org/#/c/59707/2/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
Line 5690: Attached: The domain is attached to a Storage Pool but is Line 5691: deactivated Line 5692: Unattached: The domain is not attached to a Storage Pool Line 5693: Unknown: The status of the Storage Domain is not known Line 5694: Does engine have two separate enums (one capitalized on one not)? Line 5695: StorageDomainStatusMap: &StorageDomainStatusMap Line 5696: added: '3.1' Line 5697: description: A mapping of Storage Domain statuses indexed by Storage Line 5698: Domain UUID.
Line 5739: datatype: int Line 5740: Line 5741: - description: Current Storage Domain status Line 5742: name: status Line 5743: type: *StorageStatus This is confusing. The commit message needs to have some information about when the capitalized statuses are used and when the lowercase ones are used. Line 5744: Line 5745: - description: Indicates the Storage Domain version Line 5746: name: version Line 5747: type: int
From Yaniv Bronhaim ybronhei@redhat.com:
Yaniv Bronhaim has posted comments on this change.
Change subject: yml: return type fixes for StoragePool.getInfo ......................................................................
Patch Set 3: Code-Review+1
vdsm-patches@lists.fedorahosted.org