Refactor StorPool playboks

Change-Id: I2d2a7de224f0bfd11be1c29e6d17240b48ae8e5c
diff --git a/zuul.d/sp-cinder.yaml b/zuul.d/sp-cinder.yaml
index 2ec5e5d..5de6cd5 100644
--- a/zuul.d/sp-cinder.yaml
+++ b/zuul.d/sp-cinder.yaml
@@ -1,9 +1,43 @@
+- nodeset:
+    name: ubuntu2004-openstack-multi-node-mixed
+    nodes:
+      - name: controller
+        label: os-ubuntu2004-large
+      - name: undercloud-client
+        label: os-ubuntu2004-small
+      - name: lab-sp-a1
+        label: os-ubuntu2004-large
+    groups:
+      - name: tempest
+        nodes:
+          - controller
+
+- nodeset:
+    name: ubuntu2204-openstack-multi-node-mixed
+    nodes:
+      - name: controller
+        label: os-ubuntu2204-large
+      - name: undercloud-client
+        label: os-ubuntu2204-small
+      - name: lab-sp-a1
+        label: os-ubuntu2204-large
+    groups:
+      - name: tempest
+        nodes:
+          - controller
+
 - job:
     name: cinder-storpool-tempest
     parent: tempest-full
-    pre-run: playbooks/sp-init.yaml
+    pre-run:
+      - playbooks/sp-init.yaml
+      - playbooks/setup-openstack-client/pre.yaml
+      - playbooks/setup-openstack-iscsi-multipath-storpool/pre.yaml
     run: playbooks/tempest-and-cinderlib-run.yaml
-    post-run: playbooks/sp-cleanup.yaml
+    cleanup-run:
+      - playbooks/setup-openstack-iscsi-multipath-storpool/post.yaml
+      - playbooks/setup-openstack-client/post.yaml
+      - playbooks/sp-cleanup.yaml
     required-projects:
       - opendev.org/openstack/cinderlib
       - opendev.org/openstack/os-brick
@@ -13,9 +47,39 @@
       - sp-osci
     timeout: 10800
     secrets:
+      # openstack-client
       - name: OPENSTACK_DATA
         secret: OPENSTACK_DATA
+      - name: RESOLVED_DATA
+        secret: RESOLVED_DATA
+
+      # openstack-iscsi-multipath-storpool
+      - name: STORPOOL_DEPLOY_KEY
+        secret: STORPOOL_DEPLOY_KEY
+      - name: STORPOOL_DEPLOY_KEY_PUB
+        secret: STORPOOL_DEPLOY_KEY_PUB
+      - name: STORPOOL_BLOCK_INVENTORY
+        secret: STORPOOL_BLOCK_INVENTORY
+      - name: STORPOOL_ISCSI_NETPLAN
+        secret: STORPOOL_ISCSI_NETPLAN
+      - name: STORPOOL_STORPOOL_NETPLAN
+        secret: STORPOOL_STORPOOL_NETPLAN
+      - name: STORPOOL_NETPLAN_SERVICE
+        secret: STORPOOL_NETPLAN_SERVICE
+      - name: STORPOOL_CONF_BLOCK
+        secret: STORPOOL_CONF_BLOCK
+      - name: STORPOOL_DEPLOY
+        secret: STORPOOL_DEPLOY
+      - name: STORPOOL_DEPLOY_INFO_CONF
+        secret: STORPOOL_DEPLOY_INFO_CONF
+      - name: STORPOOL_CONF_ISCSI_NODE
+        secret: STORPOOL_CONF_ISCSI_NODE
+      - name: ISCSI_NODE_SYSTEMD_NETWORKD
+        secret: ISCSI_NODE_SYSTEMD_NETWORKD
     vars:
+      os_venv: "~/sp-venv-openstack"
+      storpool_connection: "block"
+
       do_storprep: true
       devstack_localrc:
         CINDER_ENABLED_BACKENDS: storpool:storpool
@@ -81,34 +145,6 @@
 #        ^cinder_tempest_plugin
 #        (^(tempest\.((api\..*volume)|scenario\.test_encrypted_cinder_volumes|scenario\.test_volume|scenario\.test_shelve_instance))|(cinder_tempest_plugin))
 
-- nodeset:
-    name: ubuntu2004-openstack-multi-node-mixed
-    nodes:
-      - name: controller
-        label: os-ubuntu2004-large
-      - name: undercloud-client
-        label: os-ubuntu2004-small
-      - name: lab-sp-a1
-        label: os-ubuntu2004-large
-    groups:
-      - name: tempest
-        nodes:
-          - controller
-
-- nodeset:
-    name: ubuntu2204-openstack-multi-node-mixed
-    nodes:
-      - name: controller
-        label: os-ubuntu2204-large
-      - name: undercloud-client
-        label: os-ubuntu2204-small
-      - name: lab-sp-a1
-        label: os-ubuntu2204-large
-    groups:
-      - name: tempest
-        nodes:
-          - controller
-
 - job:
     name: cinder-storpool-tempest-iscsi-multipath-parent
     parent: tempest-full
@@ -145,16 +181,16 @@
         secret: STORPOOL_DEPLOY_KEY
       - name: STORPOOL_DEPLOY_KEY_PUB
         secret: STORPOOL_DEPLOY_KEY_PUB
-      - name: STORPOOL_INVENTORY
-        secret: STORPOOL_INVENTORY
+      - name: STORPOOL_ISCSI_INVENTORY
+        secret: STORPOOL_ISCSI_INVENTORY
       - name: STORPOOL_ISCSI_NETPLAN
         secret: STORPOOL_ISCSI_NETPLAN
       - name: STORPOOL_STORPOOL_NETPLAN
         secret: STORPOOL_STORPOOL_NETPLAN
       - name: STORPOOL_NETPLAN_SERVICE
         secret: STORPOOL_NETPLAN_SERVICE
-      - name: STORPOOL_CONF
-        secret: STORPOOL_CONF
+      - name: STORPOOL_CONF_ISCSI
+        secret: STORPOOL_CONF_ISCSI
       - name: STORPOOL_DEPLOY
         secret: STORPOOL_DEPLOY
       - name: STORPOOL_DEPLOY_INFO_CONF
@@ -166,6 +202,8 @@
 
     vars:
       os_venv: "~/sp-venv-openstack"
+      storpool_connection: "iscsi"
+
       zuul_copy_output:
         /etc/multipath.conf: logs_txt
         /etc/iscsi/iscsid.conf: logs_txt
@@ -256,16 +294,16 @@
         secret: STORPOOL_DEPLOY_KEY
       - name: STORPOOL_DEPLOY_KEY_PUB
         secret: STORPOOL_DEPLOY_KEY_PUB
-      - name: STORPOOL_INVENTORY
-        secret: STORPOOL_INVENTORY
+      - name: STORPOOL_ISCSI_INVENTORY
+        secret: STORPOOL_ISCSI_INVENTORY
       - name: STORPOOL_ISCSI_NETPLAN
         secret: STORPOOL_ISCSI_NETPLAN
       - name: STORPOOL_STORPOOL_NETPLAN
         secret: STORPOOL_STORPOOL_NETPLAN
       - name: STORPOOL_NETPLAN_SERVICE
         secret: STORPOOL_NETPLAN_SERVICE
-      - name: STORPOOL_CONF
-        secret: STORPOOL_CONF
+      - name: STORPOOL_CONF_ISCSI
+        secret: STORPOOL_CONF_ISCSI
       - name: STORPOOL_CONF_ISCSI_NODE
         secret: STORPOOL_CONF_ISCSI_NODE
       - name: ISCSI_NODE_SYSTEMD_NETWORKD