Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo ......................................................................
yml: return type fixes for LVMVolumeGroup.getInfo
Change-Id: I7fc2b2a3d1e8b4563b24c60601c44e851f2603e6 Signed-off-by: Piotr Kliczewski piotr.kliczewski@gmail.com --- M lib/api/vdsm-api.yml M tests/vdsmapi_test.py 2 files changed, 112 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/59708/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml index 2c139ea..d0d176c 100644 --- a/lib/api/vdsm-api.yml +++ b/lib/api/vdsm-api.yml @@ -131,15 +131,17 @@ - description: The SCSI Logical Unit Number associated with this path name: lun - type: uint + type: string + datatype: uint
- description: The path size (in bytes) name: capacity - type: uint + type: string + datatype: uint added: '3.6'
- description: The type of path (BlockDeviceType) - name: deviceType + name: type type: *BlockDeviceType
- description: The current state of this path @@ -6755,6 +6757,63 @@ OK: All Physical Volumes are online PARTIAL: One or more Physical Volumes are not available
+ PhisicalVolumeInfo: &PhisicalVolumeInfo + description: Phisical volume information. + name: PhisicalVolumeInfo + properties: + - description: The device logical size (in bytes) + name: capacity + type: string + datatype: uint + + - description: The device size (in bytes) + name: devcapacity + type: string + datatype: uint + + - description: A string identifying the device manufacturer + name: vendorID + type: string + + - description: A string identifying the device model + name: productID + type: string + + - description: The LVM physical volume associated with this device + name: pvUUID + type: *UUID + + - description: The volume group associated with this device + name: vgUUID + type: *UUID + + - description: Firmware version information + name: fwrev + type: string + + - description: The type of storage device (BlockDeviceType) + name: devtype + type: *BlockDeviceType + + - description: iSCSI session information + name: pathlist + type: + - *IscsiSessionInfo + + - description: The globally unique identifier of the block device + name: GUID + type: *UUID + + - description: The device serial number (if available) + name: serial + type: string + + - description: Multipath information + name: pathstatus + type: + - *BlockDevicePathInfo + type: object + VolumeGroupInfo: &VolumeGroupInfo added: '3.1' description: Information about a Volume Group. @@ -6766,12 +6825,8 @@
- description: The total capacity (in bytes) name: vgsize - type: uint - - - description: The storage type of this Volume Group's Physical - Volumes - name: deviceType - type: *BlockDeviceType + type: string + datatype: uint
- description: The Volume Group name name: name @@ -6787,7 +6842,17 @@
- description: The amount of currently unassigned capacity (in bytes) name: vgfree - type: uint + type: string + datatype: uint + + - description: The type of backing storage used by this domain + name: type + type: *StorageDomainType + + - description: Phisical volume list + name: pvlist + type: + - *PhisicalVolumeInfo type: object
VolumeStatus: &VolumeStatus diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py index 1f319b1..30f5c9a 100644 --- a/tests/vdsmapi_test.py +++ b/tests/vdsmapi_test.py @@ -637,3 +637,40 @@
_schema.schema().verify_retval( vdsmapi.MethodRep('StoragePool', 'getInfo'), ret) + + def test_volume_group_info(self): + ret = {'state': 'OK', + 'vgsize': '53284438016', + 'name': 'b0d9c2e8-00e9-4e0e-a5d9-f9e17bb59974', + 'vgfree': '48855252992', + 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56', + 'pvlist': [{'vendorID': 'LIO-ORG', + 'capacity': '53284438016', + 'fwrev': '0000', + 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56', + 'pathlist': [{'connection': '10.35.0.99', + 'iqn': 'iqn.2003-01.org.dumbo.target', + 'portal': '1', + 'port': '3260', + 'initiatorname': 'default'}], + 'pathstatus': [{'type': 'iSCSI', + 'physdev': 'sdbh', + 'capacity': '53687091200', + 'state': 'active', + 'lun': '1'}], + 'devtype': 'iSCSI', + 'pvUUID': 'mzQhIy-eyno-YUaE-eFod-9JQU-AYeA-xgy0ma', + 'serial': 'SLIO-ORG_target3-01_77f3fd04-8038-4383-', + 'GUID': '3600140577f3fd048038438393cce45de', + 'devcapacity': '53687091200', + 'productID': 'target3-01'}], + 'type': 3, + 'attr': {'allocation': 'n', + 'partial': '-', + 'exported': '-', + 'permission': 'w', + 'clustered': '-', + 'resizeable': 'z'}} + + _schema.schema().verify_retval( + vdsmapi.MethodRep('LVMVolumeGroup', 'getInfo'), ret)
gerrit-hooks has posted comments on this change.
Change subject: yml: return type fixes for LVMVolumeGroup.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 LVMVolumeGroup.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 LVMVolumeGroup.getInfo ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/59708/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
PS1, Line 6760: PhisicalVolumeInfo typo : PhysicalVolumeInfo
Piotr Kliczewski has posted comments on this change.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/59708/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
PS1, Line 6760: PhisicalVolumeInfo
typo : PhysicalVolumeInfo
Done
Piotr Kliczewski has posted comments on this change.
Change subject: yml: return type fixes for LVMVolumeGroup.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 LVMVolumeGroup.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 LVMVolumeGroup.getInfo ......................................................................
Patch Set 2: Code-Review+1
Adam Litke has posted comments on this change.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/59708/2/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
PS2, Line 6851: - description: Phisical volume list : name: pvlist : type: : - *PhysicalVolumeInfo This key is optional. It will be present when calling the LVMVolumeGroup.getInfo API but absent when calling Host.getLVMVolumeGroups.
From Yaniv Bronhaim ybronhei@redhat.com:
Yaniv Bronhaim has posted comments on this change.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo ......................................................................
Patch Set 3: Code-Review+1
vdsm-patches@lists.fedorahosted.org