Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
yml: parameter type fixes for StoragePool.connectStorageServer
Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a Signed-off-by: Piotr Kliczewski piotr.kliczewski@gmail.com --- M lib/api/vdsm-api.yml M tests/vdsmapi_test.py 2 files changed, 55 insertions(+), 82 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/59701/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml index b537e8e..5eb091c 100644 --- a/lib/api/vdsm-api.yml +++ b/lib/api/vdsm-api.yml @@ -342,66 +342,6 @@ type: int type: object
- IscsiCredentialsLogin: &IscsiCredentialsLogin - added: '3.1' - description: Login credentials for an - ISCI target. - name: IscsiCredentialsLogin - properties: - - description: The username used for - authentication to an ISCI target - name: username - type: string - - - description: The password associated - with the given username - name: password - type: string - type: object - - IscsiCredentialsType: &IscsiCredentialsType - added: '3.1' - description: An enumeration of ISCSI login - credentials types. - name: IscsiCredentialsType - type: enum - values: - chap: Challenge-Handshake Authentication Protocol - - IscsiCredentials: &IscsiCredentials - added: '3.1' - description: This structure stores ISCSI credentials. - name: IscsiCredentials - properties: - - description: Type-specific authentication - credentials - name: params - type: *IscsiCredentialsLogin - - - defaultvalue: chap - description: The type of authentication to - be used - name: authType - type: *IscsiCredentialsType - type: object - - IscsiPortal: &IscsiPortal - added: '3.1' - description: A host/port pair that identifies - an ISCSI target. - name: IscsiPortal - properties: - - defaultvalue: 3260 - description: A port number - name: port - type: int - - - description: A fully-qualified domain name - (FQDN) or IP address - name: host - type: string - type: object - IscsiConnectionParameters: &IscsiConnectionParameters added: '3.1' description: Parameters for initiating a new ISCSI connection. @@ -410,27 +350,37 @@ - defaultvalue: 1 description: The Target Portal Group Tag to use name: tpgt - type: int + type: string + datatype: int
- - description: An IscsiPortal to identify the requested - target - name: portal - type: *IscsiPortal + - defaultvalue: 3260 + description: A port number + name: port + type: string + typedata: int + + - description: A fully-qualified domain name + (FQDN) or IP address + name: connection + type: string
- description: The ISCSI Qualified Name name: iqn type: string
- - defaultvalue: null - description: An IscsiCredentials containing the required - authentication information - name: credentials - type: *IscsiCredentials - - - defaultvalue: default - description: The ISCSI interface name - name: iface + - description: The username used for + authentication to an ISCI target + name: user type: string + + - description: The password associated + with the given username + name: password + type: string + + - description: Id + name: id + type: *UUID type: object
LocalFsConnectionParameters: &LocalFsConnectionParameters @@ -5587,14 +5537,14 @@ name: StorageDomainType 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 + 2: The Storage Domain uses FibreChannel based storage + 3: The Storage Domain uses iSCSI based storage + 4: The Storage Domain uses storage on the local file system + 1: The Storage Domain uses Network File System based storage + 0: The type is not known + 6: The Storage Domain uses posix file system + 7: The Storage Domain uses glusterfs + 8: The Storage Domain uses cinder
StorageDomainInfo: &StorageDomainInfo added: '3.1' diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py index f80a27c..38f5449 100644 --- a/tests/vdsmapi_test.py +++ b/tests/vdsmapi_test.py @@ -479,3 +479,26 @@ sub_id = '|virt|VM_status|426aef82-ea1d-4442-91d3-fd876540e0f0'
_events_schema.events_schema().verify_event_params(sub_id, params) + + def test_connect_server(self): + params = {u'connectionParams': + [{u'id': u'a454a600-b3b7-46ea-8032-717deedcd219', + u'connection': u'10.35.0.99', + u'iqn': u'iqn.2003-01.org.dumbo.target1', + u'user': u'', + u'tpgt': u'1', + u'password': '********', + u'port': u'3260'}, + {u'id': u'48b086ae-6d80-4d6f-96ac-43c6ffcaab3e', + u'connection': u'10.35.0.99', + u'iqn': u'iqn.2003-01.org.dumbo.target2', + u'user': u'', + u'tpgt': u'1', + u'password': '********', + u'port': u'3260'}], + u'storagepoolID': u'636d9c59-f7ba-4115-87a1-44d6563a9610', + u'domainType': 3} + + _schema.schema().verify_args( + vdsmapi.MethodRep('StoragePool', 'connectStorageServer'), + params)
gerrit-hooks has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
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: parameter type fixes for StoragePool.connectStorageServer ......................................................................
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: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/59701/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
Line 5536: description: An enumeration of Storage Domain types. Line 5537: name: StorageDomainType Line 5538: type: enum Line 5539: values: Line 5540: 2: The Storage Domain uses FibreChannel based storage Any reason not to have it sorted by value ? Line 5541: 3: The Storage Domain uses iSCSI based storage Line 5542: 4: The Storage Domain uses storage on the local file system Line 5543: 1: The Storage Domain uses Network File System based storage Line 5544: 0: The type is not known
Piotr Kliczewski has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/59701/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
Line 5536: description: An enumeration of Storage Domain types. Line 5537: name: StorageDomainType Line 5538: type: enum Line 5539: values: Line 5540: 2: The Storage Domain uses FibreChannel based storage
Any reason not to have it sorted by value ?
No reason, will update Line 5541: 3: The Storage Domain uses iSCSI based storage Line 5542: 4: The Storage Domain uses storage on the local file system Line 5543: 1: The Storage Domain uses Network File System based storage Line 5544: 0: The type is not known
Nir Soffer has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 1: Code-Review-1
(3 comments)
https://gerrit.ovirt.org/#/c/59701/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
Line 341 Line 342 Line 343 Line 344 Line 345 Why did you removed these?
How is this related to bad parameters or return value?
Line 5593 Line 5594 Line 5595 Line 5596 Line 5597 Do not remove these - these are the correct values that should be used in new code.
Please add new type - StorageDomainTypeId for the numbers. We will use StorageDomainTypeId in the verbs that accept or retrun numbers instead of strings.
Line 5543: 1: The Storage Domain uses Network File System based storage Line 5544: 0: The type is not known Line 5545: 6: The Storage Domain uses posix file system Line 5546: 7: The Storage Domain uses glusterfs Line 5547: 8: The Storage Domain uses cinder We don't have this type and we will never have this. Cinder is not a storage domain type. On vdsm side, we work only with storage backends such as ceph. Cinder exists only on the engine side. Line 5548: Line 5549: StorageDomainInfo: &StorageDomainInfo Line 5550: added: '3.1' Line 5551: description: Information about a Storage Domain.
Piotr Kliczewski has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 1:
(3 comments)
https://gerrit.ovirt.org/#/c/59701/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
Line 341 Line 342 Line 343 Line 344 Line 345
Why did you removed these?
Those types are not used. We use plain user and password.
Line 5593 Line 5594 Line 5595 Line 5596 Line 5597
Do not remove these - these are the correct values that should be used in n
Done
Line 5543: 1: The Storage Domain uses Network File System based storage Line 5544: 0: The type is not known Line 5545: 6: The Storage Domain uses posix file system Line 5546: 7: The Storage Domain uses glusterfs Line 5547: 8: The Storage Domain uses cinder
We don't have this type and we will never have this. Cinder is not a storag
Those values are taken from the engine enum. Will remove cinder. Line 5548: Line 5549: StorageDomainInfo: &StorageDomainInfo Line 5550: added: '3.1' Line 5551: description: Information about a Storage Domain.
Piotr Kliczewski has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2: Verified+1
Verified by running schema verification tests
Piotr Kliczewski has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2:
Let's keep this patch for some time longer
Nir Soffer has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/59701/2//COMMIT_MSG Commit Message:
Line 5: CommitDate: 2016-07-01 09:39:56 +0200 Line 6: Line 7: yml: parameter type fixes for StoragePool.connectStorageServer Line 8: Line 9: These belongs to bug 1348256, right? Line 10: Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Piotr Kliczewski has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/59701/2//COMMIT_MSG Commit Message:
Line 5: CommitDate: 2016-07-01 09:39:56 +0200 Line 6: Line 7: yml: parameter type fixes for StoragePool.connectStorageServer Line 8: Line 9:
These belongs to bug 1348256, right?
Yes, will add the BZ url here. Line 10: Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Adam Litke has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2:
(3 comments)
https://gerrit.ovirt.org/#/c/59701/2/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml:
PS2, Line 381: Id Can we do better? How about: A UUID that will be used to identify this connection in subsequent API calls.
Line 380: Line 381: - description: Id Line 382: name: id Line 383: type: *UUID Line 384: type: object Are you missing: ifaceName, initiatorName, and netIfaceName? Line 385: Line 386: LocalFsConnectionParameters: &LocalFsConnectionParameters Line 387: added: '3.1' Line 388: description: Parameters for initiating a connection to
Line 5555: 0: The type is not known Line 5556: 1: The Storage Domain uses Network File System based storage Line 5557: 2: The Storage Domain uses FibreChannel based storage Line 5558: 3: The Storage Domain uses iSCSI based storage Line 5559: 4: The Storage Domain uses storage on the local file system 5 is CIFS (aka smbfs). If it's deprecated we can say so here but I don't think it should be omitted. Line 5560: 6: The Storage Domain uses posix file system Line 5561: 7: The Storage Domain uses glusterfs Line 5562: Line 5563: StorageDomainInfo: &StorageDomainInfo
Adam Litke has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 2: Code-Review-1
-1 for visibility
From Yaniv Bronhaim ybronhei@redhat.com:
Yaniv Bronhaim has posted comments on this change.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
Patch Set 3: Code-Review+1
requires storage ack
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer ......................................................................
yml: parameter type fixes for StoragePool.connectStorageServer
Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a Signed-off-by: Piotr Kliczewski piotr.kliczewski@gmail.com --- M lib/vdsm/api/vdsm-api.yml 1 file changed, 40 insertions(+), 75 deletions(-)
Approvals: Piotr Kliczewski: Verified Nir Soffer: Looks good to me, approved Yaniv Bronhaim: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests
vdsm-patches@lists.fedorahosted.org