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 <[email protected]>
---
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)


-- 
To view, visit https://gerrit.ovirt.org/59701
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to